







|


|
[Page 1]
[Page 2]
[Page 3]
[Page 4]
The Application Programming Interface (API).
Creating user interface for a plugin (adding menu buttons etc.)
EQUINOX-3D uses the platform-independent GUI library, called EGUI.
This library is capable of creating menus, dialog boxes etc.
The most common GUI element you will need is probably a menu or ToolPanel button that activates a function in your plugin.
For example:
MyButton = EGUI_AddPushButton("Tool->Transform", "Origin to ctr",
'\0', NULL, NULL,
"Move Model's local origin to the center of its Objects",
_OriginToCenter, (EPointer)0);
The above call will add a button to the "Transform" folder of the ToolPanel, labeled "Origin to ctr".
"Move Model's local origin to\nthe center of its geometries" is the tool-tip
(bubble help) that will appear around the button if the user rests the pointer on
the button for a few seconds. Note that the '\n' (new line) code is accepted in strings.
The function _OriginToCenter() will be called when the user activates this button.
_OriginToCenter() has to be defined like this:
void _OriginToCenter(EguiItem LItem, EPointer LClientData,
EPointer LCallData)
{
.
.
}
The string, "Tool->Transform" is the so called location name.
These are the valid GUI location names:
| Top (main) menubar |
| "Menu->File"
|
| Vertical menubar |
| "Menu->Info"
|
| "Menu->Display"
|
| "Menu->Camera"
|
| "Menu->Light"
|
| "Menu->Create"
|
| "Menu->Spline"
|
| "Menu->Surface"
|
| "Menu->Transform"
|
| "Menu->Hierarchy"
|
| "Menu->Geometry"
|
| "Menu->Material"
|
| "Menu->Clone"
|
| "Menu->Delete"
|
| "Menu->Effect"
|
| "Menu->Render"
|
| "Menu->Select"
|
| "Menu->Select->Polygon"
|
| "Menu->Skeleton"
|
| "Menu->History"
|
| ToolPanel |
| "Tool->Light"
|
| "Tool->Create"
|
| "Tool->Surface"
|
| "Tool->Clone"
|
| "Tool->Transform"
|
| "Tool->Hierarchy"
|
| "Tool->Geometry"
|
< Previous
© 1992-2007 By Gabor Nagy
|