Use cProgressBar to add a progress bar to your application. Progress bars provide users with visual feedback about the progress of a procedure within an application. As the procedure progresses, the rectangular progress bar gradually fills from left to right with the system highlight color.
Disables a cProgressBar 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 cProgressBar from it's parent object.
#include <cywin.h> ... struct cBitmap cbmp; struct Bitmap bmp; struct module_t main_module; ... init_module( &main_module ); ... // Creates a bitmap from the file "root.ico". Bitmap_ctor_Ex1( &bmp, "root.ico" ); cBitmap_ctor( &cbmp, &bmp ); // Puts the cBitmap object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &cbmp, 10, 40 ); ... // Removes the object from the Cybiko screen. It's the same as using the cObject_Disconnect( &cbmp ) function. cBitmap_Disconnect( &cbmp ); ... // Puts the cBitmap object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &cbmp, 10, 40 ); ... // Afterwards this function disconnects the cBitmap object automatically. cBitmap_dtor( &cbmp, LEAVE_MEMORY ); Bitmap_dtor( &bmp, LEAVE_MEMORY );
Enables for selection cProgressBar 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_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 cClip of the parent 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_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 cProgressBar 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 cProgressBar 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 ); ... // It's the same as using the cButton_Select( &button ) function. // Selects the button. cObject_Select( &button ); ... cButton_dtor( &button, LEAVE_MEMORY );
Sets the current bar position and updates the object.
#include <cywin.h> { ... struct cProgressBar cprogr; struct module_t main_module; ... init_module( &main_module ); ... // The color value may be: CLR_LTGRAY, CLR_BKGRAY, CLR_WHITE, CLR_BLACK. cProgressBar_ctor( &cprogr, 100, 0, 100, cool_normal_font, CLR_WHITE, CLR_BLACK, 20 ); // Puts the cBitmap object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &cprogr, 10, 40 ); ... for( int i=0; i<100; i++ ) { ... cProgressBar_SetCurrentPos( &cprogr, i ); ... } ... cProgressBar_dtor( &cedit, LEAVE_MEMORY );\ }
Shows a cProgressBar 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.
#include <cywin.h> ... struct cProgressBar cprogr; struct module_t main_module; ... init_module( &main_module ); ... // The color value may be: CLR_LTGRAY, CLR_BKGRAY, CLR_WHITE, CLR_BLACK. cProgressBar_ctor( &cprogr, 100, 0, 100, cool_normal_font, CLR_WHITE, CLR_BLACK, 20 ); // Puts the cBitmap object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &cprogr, 10, 40 ); ... cProgressBar_dtor( &cedit, LEAVE_MEMORY );
Destructor.
Deletes an object.
#include <cywin.h> ... struct cProgressBar cprogr; struct module_t main_module; ... init_module( &main_module ); ... // The color value may be: CLR_LTGRAY, CLR_BKGRAY, CLR_WHITE, CLR_BLACK. cProgressBar_ctor( &cprogr, 100, 0, 100, cool_normal_font, CLR_WHITE, CLR_BLACK, 20 ); // Puts the cBitmap object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &cprogr, 10, 40 ); ... cProgressBar_dtor( &cedit, LEAVE_MEMORY );
The Message-processing function.
#include <cywin.h> ... struct cBitmap cbmp; struct Bitmap bmp; struct module_t main_module; struct Message* ptr_message; ... init_module( &main_module ); ... // Creates a bitmap from the file "root.ico". Bitmap_ctor_Ex1( &bmp, "root.ico" ); cBitmap_ctor( &cbmp, &bmp ); // Puts the cBitmap object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &cbmp, 10, 40 ); ... ptr_message = cWinApp_get_message( main_module.m_process, 0, 1, MSG_USER ); // It's the same as using the cObject_proc( &cbmp, ptr_message ) function. // Processes the messages that the cBitmap control manages. cBitmap_proc( &cbmp, ptr_message ); ... // Afterwards this function disconnects the cBitmap object automatically. cBitmap_dtor( &cbmp, LEAVE_MEMORY ); Bitmap_dtor( &bmp, LEAVE_MEMORY );
Updates a cProgressBar object.
Sends a signal to the system, that the object must be redrawn. After you change the state of an object, you must call this function to redraw your 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 );