Public Methods |
struct cCustomForm* | cCustomForm_ctor (struct cCustomForm *ptr_custom_form, struct rect_t *rect, char *name, bool round, struct cWinApp *ptr_win_app) |
void | cCustomForm_dtor (struct cCustomForm *ptr_custom_form, int memory_flag) |
int | cCustomForm_ShowModal (struct cCustomForm *ptr_custom_form) |
bool | cCustomForm_proc (struct cCustomForm *ptr_custom_form, struct Message *ptr_message) |
void | cCustomForm_Disconnect (struct cCustomForm *ptr_custom_form) |
bool | cCustomForm_Select (struct cCustomForm *ptr_custom_form) |
void | cCustomForm_update (struct cCustomForm *ptr_custom_form) |
struct cClip* | cCustomForm_GetParent (struct cCustomForm *ptr_custom_form) |
void | cCustomForm_Hide (struct cCustomForm *ptr_custom_form) |
void | cCustomForm_Show (struct cCustomForm *ptr_custom_form) |
void | cCustomForm_Disable (struct cCustomForm *ptr_custom_form) |
void | cCustomForm_Enable (struct cCustomForm *ptr_custom_form) |
void | cCustomForm_AddObj (struct cCustomForm *ptr_custom_form, struct cObject *ptr_object, int x, int y) |
void | cCustomForm_InsObj (struct cCustomForm *ptr_custom_form, struct cObject *ptr_object, int x, int y, int index) |
void | cCustomForm_RemObj (struct cCustomForm *ptr_custom_form, struct cObject *ptr_object) |
bool | cCustomForm_SelectFirst (struct cCustomForm *ptr_custom_form) |
bool | cCustomForm_SelectPrev (struct cCustomForm *ptr_custom_form, bool round) |
bool | cCustomForm_SelectNext (struct cCustomForm *ptr_custom_form, bool round) |
void | cCustomForm_Scroll (struct cCustomForm *ptr_custom_form, struct rect_t *rectangle) |
void | cCustomForm_Scroll_Ex (struct cCustomForm *ptr_custom_form, int x, int y) |
void | cCustomForm_SendScroll (struct cCustomForm *ptr_custom_form) |
int | cCustomForm_GetShifty (struct cCustomForm *ptr_custom_form) |
int | cCustomForm_GetShiftx (struct cCustomForm *ptr_custom_form) |
int | cCustomForm_GetCount (struct cCustomForm *ptr_custom_form) |
struct cObject* | cCustomForm_get_by_index (struct cCustomForm *ptr_custom_form, int index) |
int | cCustomForm_FindObj (struct cCustomForm *ptr_custom_form, struct cObject *ptr_object) |
struct cObject* | cCustomForm_GetSelectedObject (struct cCustomForm *ptr_custom_form) |
Public Attributes |
char | FormNameString [30] |
char | Type |
struct cWinApp* | CurrApplication |
struct cClip* | ClientArea |
int | ModalResult |
int | HelpContext |
This is the main form structure, used to produce full-screen rectangle and rounded-rectangle windows (forms). Forms are useful for creating non-game applications. These applications usually consist of one or more hierarchically organized screens or windows, and the user moves between them in accordance with its hierarchy.
To achieve this using forms, you should simply derive one cCustomForm structure for every window you need. Then in your application, create your main window's object and call its cCustomForm_ShowModal method. If you need to show another window somewhere, create the object of the form structure you need and fill the form fields. Then call its ShowModal method, read the save form data, and delete the form.
You can also create non-modal windows, if you need to. After creating a form, you can view it (see cCustomForm_Show). When a message comes in, call the form's cCustomForm_Proc function to process it. The key is one form per screen or window.
You must call the cCustomForm_ctor function before use and the cCustomForm_dtor function after use.