Component framework
Component index
Section index

Component framework


Search

Type

Object

Summary

General GUI framework

Description

This is the main component one will use to create a modern GUI application. In general, any GUI application will use one FRAMEWORK object to handle its main window. The FRAMEWORK object handle the general layout and the following items: menubar, taskbar, part of the help menu, document area (up to 5, status area. Each document area may be multi-documents with a notebook. The framework handle various core function such as the quit/mayquit protocol and the focus notification.

void newdocument (void *data)void about ()
void newdocument (void *data, int noarea)void area1 (FRAMEWORK_INFO&info)
void area2 (FRAMEWORK_INFO&info)
void area3 (FRAMEWORK_INFO&info)
void area4 (FRAMEWORK_INFO&info)
void area5 (FRAMEWORK_INFO&info)
void document (int noarea, FRAMEWORK_INFO&info)
void ending (bool &do_not_end)
void helpindex ()
void layout ()
void menubar ()
void menudo (int id, FRAMEWORK_INFOS[]infos, FRAMEWORK_INFO *[]focus)
void message ()
void messages ()
void nodocument (int area, bool &end)
void status (PRIVATE_MESSAGE&ending)
void taskbar ()
int taskdo (int id, int allo)
void taskdo (int id, FRAMEWORK_INFOS[]infos, FRAMEWORK_INFO *[]focus)

Examples

sample / FRAMEWORK / framework inside framework
sample / FRAMEWORK / quit-without-save
sample / FRAMEWORK / restarting documents
sample / FRAMEWORK / using layout

Prototypes

framework (const char *title, PRIVATE_MESSAGE &msg)

framework (const char *title)

Main constructor, normally used for the first FRAMEWORK of a program

framework (const char *title, FRAMEWORK_INFO &info)

Methods

void newdocument (void *data)

Request the edition of a new document

void newdocument (void *data, int noarea)

Request the edition of a new document in one area

Functags

void about () Optional

Must present information about this program

void area1 (FRAMEWORK_INFO&info) Optional

Define documents for area one

void area2 (FRAMEWORK_INFO&info) Optional

Define document for area two

void area3 (FRAMEWORK_INFO&info) Optional

Define documents for area three

void area4 (FRAMEWORK_INFO&info) Optional

Define documents for area four

void area5 (FRAMEWORK_INFO&info) Optional

Define documents for area five

void document (int noarea, FRAMEWORK_INFO&info) Optional

Default document handling functag

document is called if the areaN tag is not defined

void ending (bool &do_not_end) Optional

Called when the application is ready/willing to end

When every document accepted to end, but the framework ask all document to end. this functags is called. This is generally used to collect various information about the current documents and potentially as a last chance to abort the end.

void helpindex () Optional

void layout () Optional

void menubar () Optional

void menudo (int id, FRAMEWORK_INFOS[]infos, FRAMEWORK_INFO *[]focus) Optional

This is called when a menu option is selected

Not much

void message () Optional

Called when a message is received

void messages () Optional

void nodocument (int area, bool &end) Optional

Called when there is no more document displayed

The application may use this to create setup a default document.

void status (PRIVATE_MESSAGE&ending) Optional

Manage the status bar

The application can define any status bar. In fact, the application sets a dialog with whatever content. In general, PRIVATE_MESSAGE are used to signal the dialog so it updates its content.

void taskbar () Optional

int taskdo (int id, int allo) Optional

This is called when a taskbar button is selected

Not much But it will get better with time

void taskdo (int id, FRAMEWORK_INFOS[]infos, FRAMEWORK_INFO *[]focus) Optional

Fhelpers

void end ()

void endok ()

bool must_end (FRAMEWORK_MSGS &msgs)

void newbutton (int id, const char *icon, const char *title, const char *help)

Register a new button in tbe task bar

void newdocument (void *data, int noarea)

void newdocument (int noarea)

void endmenu ()

Mark the end of a submenu or topmenu or helpmenu.

void helpmenu ()

Register a help menu with an about and index entry in it.

void menuentry (int id, const char*title)

Register one entry in the menubar pull-down.

void submenu (const char *title)

Register a sub-menu in a pull-down.

void topmenu (const char *title)

Register a top menu in the menubar.

void layout_area1 (bool isbook)

void layout_area2 (bool isbook)

void layout_area3 (bool isbook)

void layout_area4 (bool isbook)

void layout_area5 (bool isbook)

void layout_book ()

void layout_cmd (int cmd, const char *ctl, ...)

void layout_dispolast (GUI_H_DISPO hdispo, int nbhcell, GUI_V_DISPO vdispo, int nbvcell)

void layout_end ()

void layout_form ()

void layout_group (const char *title)

void layout_newline ()

void layout_page (const char *title)