A static, transparent text line. Use this structure to place text on the Cybiko computer's screen.
To place a cText object created by the cText_ctor function onto the Cybiko screen, use the cWinApp_AddObj function. If you want to replace the onscreen text, you should first clear it with the cWinApp_clear_screen function. Then use the cText_SetText function to place new text.
You must call the cText_ctor function before use and the cText_dtor function after use.
Disables a cText object so that it cannot be selected.
#include <cywin.h> struct cText text; struct module_t main_module; ... init_module( &main_module ); ... cText_ctor( &text, "Any string", cool_normal_font , CLR_DKGRAY ); cWinApp_clear_screen(); // Puts the 'text' object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &text, 10, 40 ); // Now the user can't use this object cText_Disable (&text); ... // Now the user can use this object again cText_Enable (&text); ... cText_dtor( &text, LEAVE_MEMORY );
Disconnects a cText object from its parent object.
#include <cywin.h> struct cText text; struct module_t main_module; ... init_module( &main_module ); ... cText_ctor( &text, "Any string", cool_normal_font , CLR_DKGRAY ); cWinApp_clear_screen(); // Puts the 'text' object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &text, 10, 40 ); // Removes the object from the Cybiko screen. cText_Disconnect( &text); ... // Puts the 'text' object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &text, 10, 40 ); // Afterwards this function disconnects the cText object automatically cText_dtor( &text, LEAVE_MEMORY );
Enables a cText object so that it may be selected.
#include <cywin.h> struct cText text; struct module_t main_module; ... init_module( &main_module ); ... cText_ctor( &text, "Any string", cool_normal_font , CLR_DKGRAY ); cWinApp_clear_screen(); // Puts the 'text' object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &text, 10, 40 ); // Now the user can't use this object cText_Disable (&text); ... // Now the user can use this object again cText_Enable (&text); ... cText_dtor( &text, LEAVE_MEMORY );
Returns a pointer to the parent object.
#include <cywin.h> struct cText text; struct module_t main_module; struct cClip *parent; ... init_module( &main_module ); ... cText_ctor( &text, "Any string", cool_normal_font , CLR_DKGRAY ); cWinApp_clear_screen(); // Puts the 'text' object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &text, 10, 40 ); parent = cText_GetParent( &text ); if ( parent == main_module.m_process ) { } ... cText_dtor( &text, LEAVE_MEMORY );
Hides a cText object.
#include <cywin.h> struct cText text; struct module_t main_module; ... init_module( &main_module ); ... cText_ctor( &text, "Any string", cool_normal_font , CLR_DKGRAY ); cWinApp_clear_screen(); // Puts the 'text' object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &text, 10, 40 ); cText_Hide (&text); ... cText_Show (&text); ... cText_dtor( &text, LEAVE_MEMORY );
Selects a cText object.
#include <cywin.h> struct cText text; struct module_t main_module; ... init_module( &main_module ); ... cText_ctor( &text, "Any string", cool_normal_font , CLR_DKGRAY ); cWinApp_clear_screen(); // Puts the 'text' object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &text, 10, 40 ); cText_Select(&text) ... cText_dtor( &text, LEAVE_MEMORY );
Sets a new text line.
#include <cywin.h> ... struct cText text; struct module_t main_module; ... init_module( &main_module ); ... cText_ctor( &text, "Any string", cool_normal_font , CLR_DKGRAY ); cWinApp_clear_screen(); // Puts the 'text' object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &text, 10, 40 ); ... cWinApp_clear_screen(); cText_SetText( &text, "Another text" ); ... cText_dtor( &text, LEAVE_MEMORY );
Shows a cText object.
#include <cywin.h> struct cText text; struct module_t main_module; ... init_module( &main_module ); ... cText_ctor( &text, "Any string", cool_normal_font , CLR_DKGRAY ); cWinApp_clear_screen(); // Puts the 'text' object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &text, 10, 40 ); cText_Hide (&text); ... cText_Show (&text); ... cText_dtor( &text, LEAVE_MEMORY );
Initializes a cText object.
#include <cywin.h> ... struct cText text; struct module_t main_module; ... init_module( &main_module ); ... cText_ctor( &text, "Any string", cool_normal_font , CLR_DKGRAY ); // Puts the 'text' object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &text, 10, 40 ); ... cText_dtor( &text, LEAVE_MEMORY );
Deletes a cText object.
#include <cywin.h> ... struct cText text; struct module_t main_module; ... init_module( &main_module ); ... cText_ctor( &text, "Any string", cool_normal_font , CLR_DKGRAY ); // Puts the 'text' object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &text, 10, 40 ); ... cText_dtor( &text, LEAVE_MEMORY );
The message-processing function.
Updates a cText object.
#include <cywin.h> struct cText text; struct module_t main_module; ... init_module( &main_module ); ... cText_ctor( &text, "Any string", cool_normal_font , CLR_DKGRAY ); cWinApp_clear_screen(); // Puts the 'text' object on the Cybiko screen. cWinApp_AddObj( main_module.m_process, &text, 10, 40 ); cWinApp_clear_screen(); // Redraws the text cText_update(&text); ... cText_dtor( &text, LEAVE_MEMORY );