User interface components
General GUI framework
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.
Helper to layout menubar
Register a top menu in the menubar.
Register a help menu with an about and index entry in it.
Register one entry in the menubar pull-down.
Register a sub-menu in a pull-down.
Mark the end of a submenu or topmenu or helpmenu.
This is called when a taskbar button is selected
Not much
But it will get better with time
Register a new button in tbe task bar
Called to define the disposition of the 5 areas
You anchor the areas you want to use in your framework using
the layout_areaN() fhelper. You use the various layout_xxx() fhelper
to place various GUI components (forms, groups, book) and insert
position the layout_areaN() in the right position. By default
a framework has just one area (area1) with nothing around.
Called to define the menubar content
This is called when a menu option is selected
Not much
Define documents for area one
Define document for area two
Define documents for area three
Define documents for area four
Define documents for area five
document is called if the areaN tag is not defined
Default document handling functag
Must present information about this program
A PRIVATE_MESSAGE may be passed to the FRAMEWORK constructor.
Whenever a message is received, this functag is called.
Called when the user supplied message is received
The application may use this to create setup a default document.
Called when there is no more document displayed
Set this to true to end the framework
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.
The dialog should wait for this message to end
Manage the status bar
Called when a framework message is received
This usually happen when a framework is used inside another
framework and receives in its constructor a FRAMEWORK_MSGS object.
This is generally useful to process taskbar and menubar event.
Request the edition of a new document
Request the edition of a new document in one area
Main constructor, normally used for the first FRAMEWORK of
a program
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.
Set this to true to abort
Record an identifier used later to restart the edit session on the document
Multiple documents or views program need a way to restart in the exact
state they were when the user quitted. The program usually record a set of
strings in a resource database and read them back at startup time.
The program use FRAMEWORK::getdocumentids to learn the IDs of all
active documents.
String identifying the document and whatever information
you wish to remember from one session
to another.
Give control to the FRAMEWORK.
This function ends when all documents (areas) have ended.
Various specialized dialogs and frameworks
Use this to introduce the software with a small description
You use the printf fhelper to send lines
Program name
Program version
Use this to present the various contributors
You use the printf fhelper to send lines.
Usually, you enumerate names and email address.
Program name
Program version
Use this to present the software license
You use the printf fhelper to send lines or to simply use the
setgpl fhelper if your program is GPL.
Program name
Program version
Use this to present extra information such as URL
You use the printf fhelper to send lines
Program name
Program version
Record format lines in the dialog
Control string like ordinary printf
Will format information about the GPL in the license section
Normally, this is all you have to tell in the license area.
package or program name
major version number
minor version number (0-99)
You use this to present an about window in a consistent
and complete way. This includes a small description, the
authors, the license and so on.
Present the about window of the application
software or package name
Version of the package or utility