MGui Designer allows you to set both C and C++ callbacks to all objects
in the layout window.
You may open the C Callback dialog for a given object by first selecting
the object with a mouse in the hierarchycal area or the actual layout window
and then selecting item 'C Callbacks...' from the menu 'Attributes'. Such
menu can be opened simply by clicking the right mouse button on the desired
object in both the hierarchycal area and the actual layout window.
The figure above shows the Callback dialog window for the SpinEdit object.
First column provides the types of available callbacks. Second column
allows you to enable a given callback and to set a name for it. Last column
can be used to pass some user data to the callback. Such value is defaulted
to NULL.
To activate a callback you have to input the callback name in the 'Callback
Name' column.
You can optionally input the function code corresponding to a callback
using the dialog window shown below, opened by a click on the button reporting
the callback type.
The C++ callbacks are generated as methods of the C++ class associated with the SHELL containing the object. The C++ Callback dialog is similar to the one available for the C callbacks, however it doesn't provide the 'user data' fields since C++ callbacks in MGui don't use them.
The figure below shows the 'C++ Callback Code' input dialog for a SpinEdit
object belonging to a SHELL named FEdit.
A template text is automatically generated to help you start defining
the callback code.