A filled rectangle. To put a cBox on the Cybiko screen, use the cWinApp_AddObj() function.
Disables a cBox object so that it cannot be selected.
#include <cywin.h> ... struct cButton button; struct module_t main_module; struct cClip* parent; ... init_module( &main_module ); ... cButton_ctor( &button, "Button text", mrOk ); // Puts the 'button' object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &button, 20, 50 ); ... // It's the same as using the cButton_Disable( &button ) function. // Now the user can't use this object. cObject_Disable( &button ) ... // It's the same as using the cButton_Enable( &button ) function. // Now the user can use this object again. cObject_Enable( &button ) ... cButton_dtor( &button, LEAVE_MEMORY );
Disconnects a cBox object from its parent object.
#include <cywin.h> ... struct cBox cbox; struct module_t main_module; ... init_module( &main_module ); ... cBox_ctor( &cbox, 100, 100, CLR_LTGRAY, TRUE ); // Puts the cBox object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &cbox, 10, 40 ); ... // Removes the cBox object from the Cybiko screen. cBox_Disconnect( &cbmp ); ... // Puts the cBox object on the Cybiko screen again. cWinApp_AddObj( main_module.m_process, &cbmp, 10, 40 ); ... cBox_dtor( &cbox, LEAVE_MEMORY ); ...
Enables a cBox object - so that it may be selected.
#include <cywin.h> ... struct cButton button; struct module_t main_module; struct cClip* parent; ... init_module( &main_module ); ... cButton_ctor( &button, "Button text", mrOk ); // Puts the 'button' object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &button, 20, 50 ); ... // It's the same as using the cButton_Disable( &button ) function. // Now the user can't use this object. cObject_Disable( &button ) ... // It's the same as using the cButton_Enable( &button ) function. // Now the user can use this object again. cObject_Enable( &button ) ... cButton_dtor( &button, LEAVE_MEMORY );
Returns a pointer to the parent object's cClip.
#include <cywin.h> ... struct cButton button; struct module_t main_module; struct cClip* parent; ... init_module( &main_module ); ... cButton_ctor( &button, "Button text", mrOk ); // Puts the 'button' object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &button, 20, 50 ); ... // It's the same as using the cButton_GetParent( &button ) function. // Checks for the right parent relation. parent = cObject_GetParent( &button ); if ( parent == main_module.m_process ) { ... } ... cButton_dtor( &button, LEAVE_MEMORY );
Hides a cBox object.
#include <cywin.h> ... struct cButton button; struct module_t main_module; struct cClip* parent; ... init_module( &main_module ); ... cButton_ctor( &button, "Button text", mrOk ); // Puts the 'button' object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &button, 20, 50 ); ... // It's the same as using the cButton_Hide( &button ) function. cObject_Hide( &button ); ... // It's the same as using the cButton_Show( &button ) function. cObject_Show( &button ); ... cButton_dtor( &button, LEAVE_MEMORY );
Selects a cBox object.
#include <cywin.h> ... struct cBox cbox; struct module_t main_module; ... init_module( &main_module ); ... // It's the same as using the cButton_Select( &button ) function. // Selects the button. cObject_Select( &button ); ... cButton_dtor( &button, LEAVE_MEMORY );
Shows a cBox object.
#include <cywin.h> ... struct cButton button; struct module_t main_module; struct cClip* parent; ... init_module( &main_module ); ... cButton_ctor( &button, "Button text", mrOk ); // Puts the 'button' object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &button, 20, 50 ); ... // It's the same as using the cButton_Hide( &button ) function. cObject_Hide( &button ); ... // It's the same as using the cButton_Show( &button ) function. cObject_Show( &button ); ... cButton_dtor( &button, LEAVE_MEMORY );
Constructor.
Creates an empty cBox object.
#include <cywin.h> ... struct cBox cbox; struct module_t main_module; ... init_module( &main_module ); cBox_ctor( &cbox, 100, 100, CLR_LTGRAY, TRUE ); // Puts the cBox object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &cbox, 10, 40 ); ... cBox_dtor( &cbox, LEAVE_MEMORY );
Destructor.
Deletes the cBox.
#include <cywin.h> ... struct cBox cbox; struct module_t main_module; ... init_module( &main_module ); ... cBox_ctor( &cbox, 100, 100, CLR_LTGRAY, TRUE ); // Puts the cBox object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &cbox, 10, 40 ); ... cBox_dtor( &cbox, LEAVE_MEMORY );
The Message-processing function.
#include <cywin.h> ... struct cBox cbox; struct module_t main_module; ... init_module( &main_module ); ... cBox_ctor( &cbox, 100, 100, CLR_LTGRAY, TRUE ); // Puts the cBox object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &cbox, 10, 40 ); ... ptr_message = cWinApp_get_message( main_module.m_process, 0, 1, MSG_USER ); // Processes messages using the cBox message handler. cBox_proc( &cbox, ptr_message ); ... cBox_dtor( &cbox, LEAVE_MEMORY ); ...
Updates a cBox object.
#include <cywin.h> ... struct cButton button; struct module_t main_module; ... init_module( &main_module ); ... cButton_ctor( &button, "Button text", mrOk ); // Puts the 'button' object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &button, 20, 50 ); ... cWinApp_clear_screen(); // It's the same as using the cButton_update( &button ) function. // Redraws the button. cObject_update( &button ) ... cButton_dtor( &button, LEAVE_MEMORY );