About
Communication between different parts of the Cinema 4D GUI happens through multiple messages. These messages are sent to GeDialog and GeUserArea elements:
- Messages are sent from Cinema 4D's GUI and event system to dialogs (GeDialog::Message())
- Messages are sent from dialogs to their gadgets (GeDialog::SendMessage())
- Messages are sent from dialogs to a parent dialog or the GUI and event system (GeDialog::SendParentMessage())
- Messages are sent from the GUI or dialogs to gadgets (GeUserArea::Message())
- Messages are sent from gadgets to the parent dialog. (GeUserArea::SendParentMessage() to GeDialog::Command())
Messages are represented by BaseContainer objects that store the parameters of the message. The ID of the message is typically the ID of the BaseContainer (BaseContainer::GetId()). See BaseContainer Manual.
For details on GeDialog and GeUserArea see GeDialog Manual and GeUserArea Manual.
{
{
{
return true;
}
}
}
PyObject PyObject * result
Definition: abstract.h:43
@ BFM_GETCURSORINFO
Definition: gui.h:561
@ RESULT_BUBBLEHELP
String Bubble help text.
Definition: gui.h:565
@ RESULT_CURSOR
Int32 Mouse cursor: MOUSE
Definition: gui.h:564
static const Int32 MOUSE_POINT_HAND
Point hand cursor.
Definition: ge_prepass.h:2733
maxon::Int32 Int32
Definition: ge_sys_math.h:51
const char const char * msg
Definition: object.h:438
Message Redirection
All message are first sent to the object's "Message" function (GeDialog::Message(), GeUserArea::Message()). If the messages are not handled in the implementation of the "Message" function they will be also handled in the base-class. Certain messages are re-directed to dedicated functions.
GeDialog
Several messages sent to a GeDialog will invoke these member functions:
Message | Function |
::BFM_INIT | GeDialog::CreateLayout() |
::BFM_DESTROY | GeDialog::DestroyWindow() |
::BFM_INITVALUES | GeDialog::InitValues() |
::BFM_SYNC_MESSAGE | GeDialog::CoreMessage() |
::BFM_CORE_MESSAGE | GeDialog::CoreMessage() |
::BFM_ACTION | GeDialog::Command() |
::BFM_CHECKCLOSE | GeDialog::AskClose() |
::BFM_TIMER_MESSAGE | GeDialog::Timer() |
GeUserArea
Several messages sent to a GeUserArea will invoke these member functions:
Message | Function |
::BFM_INIT | GeUserArea::Init() |
::BFM_INITVALUES | GeUserArea::InitValues() |
::BFM_CALCSIZE | GeUserArea::GetMinSize() |
::BFM_SIZED | GeUserArea::Sized() |
::BFM_DRAW | GeUserArea::DrawMsg() |
::BFM_INPUT | GeUserArea::InputEvent() |
::BFM_TIMER_MESSAGE | GeUserArea::Timer() |
::BFM_SYNC_MESSAGE | GeUserArea::CoreMessage() |
::BFM_CORE_MESSAGE | GeUserArea::CoreMessage() |
Return Values
Messages can be sent to receive information from the target element. In some cases the message must explicitly state that it requests a result.
- ::BFM_REQUIRESRESULT: This option has to be set to make sure a return value is delivered.
const GeData
res = this->SendMessage(3000,
message);
void Py_ssize_t * pos
Definition: dictobject.h:50
const char * message
Definition: pyerrors.h:189
Py_UCS4 * res
Definition: unicodeobject.h:1113
@ BFM_REQUIRESRESULT
Set to true in the passed container for GeDialog::SendMessage to return a value from the message.
Definition: gui.h:1033
@ BFM_EDITFIELD_GETCURSORPOS
Int32 Return the cursor position in an edit field.
Definition: gui.h:994
#define ApplicationOutput(formatString,...)
Definition: debugdiagnostics.h:204
User Interaction
Cursor
When the mouse cursor is moved over a GeDialog or GeUserArea a message is sent to these elements. The reaction to this message allows to define the cursor and some help text.
- ::BFM_GETCURSORINFO: Message is sent to a GUI element when the cursor is moved over it.
The parameters of the message are:
- ::RESULT_CURSOR: The cursor ID, see MOUSE.
- ::RESULT_BUBBLEHELP: The bubble help text.
- ::RESULT_BUBBLEHELP_TITLE: The bubble help title.
- ::RESULT_SUPPRESSBUBBLE: Set to true if the bubble help should be suppressed.
- Note
- The message ::BFM_GETCURSORINFO also contains ::BFM_DRAG_SCREENX and ::BFM_DRAG_SCREENY.
{
return true;
}
@ RESULT_BUBBLEHELP_TITLE
String Bubble help text title. Printed in bold for the bubble help, not visible in the status bar.
Definition: gui.h:575
Compare also ToolData::GetCursorInfo(), SceneHookData::GetCursorInfo(), etc.
The message ::BFM_CURSORINFO_REMOVE can be sent by a custom callback function to inform a user area that the cursor has left the area:
static void RemoveCursorInfo();
class RemoveCursorUserArea;
static RemoveCursorUserArea* g_userArea = nullptr;
class RemoveCursorUserArea : public GeUserArea
{
public:
RemoveCursorUserArea()
{
if (g_userArea == this)
g_userArea = nullptr;
};
~RemoveCursorUserArea() { };
{
{
{
g_userArea = this;
_cursorInside = true;
Redraw();
return true;
}
{
_cursorInside = false;
Redraw();
break;
}
}
}
{
OffScreenOn();
SetClippingRegion(x1, y1, x2, y2);
if (_cursorInside)
DrawSetPen(
Vector(1.0, 0.0, 0.0));
else
DrawSetPen(
Vector(0.0, 1.0, 0.0));
DrawRectangle(x1, y1, x2, y2);
}
private:
Bool _cursorInside =
false;
};
static void RemoveCursorInfo()
{
if (g_userArea == nullptr)
return;
BaseContainer bc;
}
@ BFM_CURSORINFO_REMOVE
Sent when mouse cursor has left a user area.
Definition: gui.h:577
Bool RemoveLastCursorInfo(LASTCURSORINFOFUNC func)
maxon::Bool Bool
Definition: ge_sys_math.h:46
maxon::Vec3< maxon::Float64, 1 > Vector
Definition: ge_math.h:140
Focus
A GeDialog or GeUserArea is informed when it receives or looses the focus:
- ::BFM_GOTFOCUS: Element got the focus.
- ::BFM_LOSTFOCUS: Element lost the focus.
{
Enable(1000, true);
break;
}
{
Enable(1000, false);
break;
}
@ BFM_LOSTFOCUS
Item lost the focus.
Definition: gui.h:644
@ BFM_GOTFOCUS
Item got the focus.
Definition: gui.h:643
Close Dialog
A GeDialog is informed when it is about to be closed. One has to return false if it is safe to close the dialog.
- ::BFM_CHECKCLOSE: Calls GeDialog::AskClose().
- ::BFM_CHECKCLOSE_LAYOUTSWITCH: Is stored in the BaseContainer of ::BFM_CHECKCLOSE. Check if a dialog is able to close when layouts are switched.
- ::BFM_ASKCLOSE: Calls GeDialog::AskClose().
- ::BFM_DESTROY: Calls GeDialog::DestroyWindow().
GeDialog Gadget Interaction
A GeDialog is informed when any kind of interaction with some hosted gadget starts or ends:
- ::BFM_INTERACTSTART: Sent when user interaction starts.
- ::BFM_INTERACTEND: Sent when user interaction ends.
- Note
- These messages are useful to stop threads that work on the scene or to create undo steps. See Undo System Manual.
{
break;
}
{
break;
}
@ BFM_INTERACTSTART
Definition: gui.h:926
@ BFM_INTERACTEND
Sent when user interaction ends.
Definition: gui.h:945
When a gadget or custom GUI element is changed by the user it sends the message ::BFM_ACTION to the parent dialog.
- ::BFM_ACTION: Calls GeDialog::Command().
The parameters of the message are:
- ::BFM_ACTION_ID: The ID of the dialog element that triggered the action.
- ::BFM_ACTION_VALUE: The action value.
- ::BFM_ACTION_INDRAG: Slider in dragging mode (not finished).
- ::BFM_ACTION_STRCHG: String in text field changed.
- ::BFM_ACTION_VALCHG: Edit/slider changed.
- ::BFM_ACTION_ESC: Action escaped.
- ::BFM_ACTION_RESET: Right-click to reset input fields.
- ::BFM_ACTION_UPDATE: Update without verify.
SendParentMessage(action);
@ BFM_ACTION_ID
Int32 ID of the dialog element that triggered the action.
Definition: gui.h:747
@ BFM_ACTION
One of the child elements made any action:
Definition: gui.h:746
@ BFM_ACTION_VALUE
::GeData Action value.
Definition: gui.h:748
if (id == ID_EDIT_NUMBER)
{
{
const Float defaultValue = 0.5;
SetPercent(ID_EDIT_NUMBER, defaultValue, 0.0, 100.0, 1.0);
}
else
{
SetPercent(ID_EDIT_NUMBER,
value, 0.0, 100.0, 1.0);
}
}
PyObject * value
Definition: abstract.h:715
@ BFM_ACTION_RESET
Bool Reset to default value on right-click of input field arrows.
Definition: gui.h:753
maxon::Float Float
Definition: ge_sys_math.h:57
Mouse and Keyboard Interaction
Both GeDialog and GeUserArea are informed on keyboard and mouse user interaction events.
- ::BFM_INPUT: Is sent to GeDialog::Message(). In a GeUserArea it will call GeUserArea::InputEvent().
The parameters of the message are:
- ::BFM_INPUT_DEVICE: The device:
- ::BFM_INPUT_MOUSE: Mouse.
- ::BFM_INPUT_KEYBOARD: Keyboard.
- ::BFM_INPUT_CHANNEL: The mouse button or key that was pressed:
- ::BFM_INPUT_MOUSELEFT: Left mouse button.
- ::BFM_INPUT_MOUSERIGHT: Right mouse button.
- ::BFM_INPUT_MOUSEMIDDLE: Middle mouse button.
- ::BFM_INPUT_MOUSEX1: Fourth mouse button.
- ::BFM_INPUT_MOUSEX2: Five mouse button.
- ::BFM_INPUT_MOUSEWHEEL: Mouse wheel. For wheel direction see ::BFM_INPUT_VALUE.
- ::BFM_INPUT_MOUSEMOVE: Mouse move.
- ::BFM_INPUT_QUALIFIER: A bit mask with the qualifiers at the time when the event occurred.
- ::QSHIFT: Shift.
- ::QCTRL: Control.
- ::QALT: Alt.
- ::QALT2: Alt Gr.
if (deviceIsMouse && channelIsRight)
{
return true;
}
@ BFM_INPUT_MOUSE
Mouse.
Definition: gui.h:711
@ BFM_INPUT_QUALIFIER
Int32 A bit mask with the qualifiers at the time when the event occurred: QUALIFIER
Definition: gui.h:708
@ BFM_INPUT_CHANNEL
Int32 Contains the key or mouse button. See also KEY.
Definition: gui.h:715
@ BFM_INPUT_DEVICE
Int32 Device:
Definition: gui.h:710
@ BFM_INPUT_MOUSERIGHT
Right mouse button.
Definition: gui.h:717
@ QCTRL
Definition: gui.h:41
The input from keyboard interactions is either a character or some special key:
- ::BFM_INPUT_ASC: Contains the Unicode input from the keyboard.
- For keys see KEY
{
return true;
}
PyObject * key
Definition: abstract.h:289
@ BFM_INPUT_KEYBOARD
Keyboard.
Definition: gui.h:712
@ BFM_INPUT_ASC
String Contains the Unicode input from keyboard.
Definition: gui.h:713
@ KEY_ENTER
Definition: gui.h:70
Further details on the event are stored in these parameters:
- ::BFM_INPUT_X: X value.
- ::BFM_INPUT_Y: Y value.
- ::BFM_INPUT_Z: Z value.
- ::BFM_INPUT_TILT: Pen tilt.
- ::BFM_INPUT_ORIENTATION: Pen rotation.
- ::BFM_INPUT_FINGERWHEEL: Finger wheel.
- ::BFM_INPUT_P_ROTATION : Pen rotation around its own axis.
- ::BFM_INPUT_DOUBLECLICK: Double click.
- ::INPUT_DBLCLK: Mouse qualifier flag for double click.
- ::BFM_INPUT_VALUE: Value of the input channel (true/false or an Int32 value, e.g. for scroll wheel data).
- ::BFM_INPUT_VALUE_REAL: Channel value (e.g. pressure or mouse wheel)
if (deviceIsMouse && channelIsLeft)
{
{
Global2Local(&mx, &my);
ApplicationOutput(
"Double click at " + String::IntToString(mx) +
" - " + String::IntToString(my));
return true;
}
}
@ BFM_INPUT_MOUSELEFT
Left mouse button.
Definition: gui.h:716
@ BFM_INPUT_Y
Float Y value.
Definition: gui.h:729
@ BFM_INPUT_DOUBLECLICK
Bool Double click.
Definition: gui.h:741
@ BFM_INPUT_X
Float X value.
Definition: gui.h:728
Drag and Drop
Both GeDialog and GeUserArea are informed on drag and drop operations onto their area:
- ::BFM_DRAGRECEIVE: Message sent on drag and drop events.
The parameters of the message are:
- ::BFM_DRAG_SCREENX: Screen position X.
- ::BFM_DRAG_SCREENY: Screen position Y.
- ::BFM_DRAG_FINISHED: Drag finished.
- ::BFM_DRAG_LOST: Drag lost.
- ::BFM_DRAG_ESC: Drag escaped.
- ::BFM_DRAG_DATA_NEW: Internal drag data.
Different types of elements can be dragged:
- ::DRAGTYPE_FILES: Files. The data is a string with the file name.
- ::DRAGTYPE_ICON: Icon.
- ::DRAGTYPE_MANAGER: Destination drag for C.O.F.F.E.E. manager.
- ::DRAGTYPE_COMMAND: Destination drag for command.
- ::DRAGTYPE_CMDPALETTE: Command palette.
- ::DRAGTYPE_DESCID: Description ID. The data is of type DescPropertyDragData.
- ::DRAGTYPE_ATOMARRAY: An AtomArray referencing dragged objects, tags, materials etc. See AtomArray Manual.
- ::DRAGTYPE_FILENAME_IMAGE: Texture file name.
- ::DRAGTYPE_RGB: RGB color.
- ::DRAGTYPE_FILENAME_SCENE: Scene file name.
- ::DRAGTYPE_FILENAME_OTHER: Other file name.
- ::DRAGTYPE_RGB_ARRAY: Color array. Data received is maxon::BaseArray<Vector>*.
See also Drag and Drop and Drag and Drop.
{
if (!CheckDropArea(
msg,
true,
true))
break;
void* data = nullptr;
if (!GetDragObject(
msg, &
type, &data))
return false;
{
{
return true;
}
else
{
}
}
return false;
}
@ BFM_DRAG_FINISHED
Bool Drag finished.
Definition: gui.h:797
@ BFM_DRAG_DATA_NEW
ANY Internal drag data.
Definition: gui.h:801
@ DRAGTYPE_COMMAND
Destination drag for command.
Definition: gui.h:781
@ BFM_DRAGRECEIVE
Drag receive. (See DragAndDrop.)
Definition: gui.h:774
static const Int32 MOUSE_QUESTION
Question cursor.
Definition: ge_prepass.h:2719
void CallCommand(Int32 id, Int32 subid=0)
PyObject ** type
Definition: pycore_pyerrors.h:34
Description Notifications
A custom GUI element can be used to display a parameter of a NodeData based plugin the in the Attribute Manager. It is possible to send a message from the custom GUI to that NodeData based plugin. This can be used to inform the plugin on what internal data specificity was changed.
See also Attribute Manager Interaction.
this->InitValues();
GetColorField(COLOR_ID, color, brightness);
BaseContainer messageContent;
messageContent.SetVector(MSG_DESCRIPTION_COLORSTRING_COLOR, color);
#define MSG_DESCRIPTION_CUSTOMGUI_NOTIFICATION_ID
The custom GUI ID in the message container for MSG_DESCRIPTION_CUSTOMGUI_NOTIFICATION.
Definition: c4d_baselist.h:439
#define MSG_DESCRIPTION_CUSTOMGUI_NOTIFICATION_CONTENT
The used data in the message container for MSG_DESCRIPTION_CUSTOMGUI_NOTIFICATION.
Definition: c4d_baselist.h:440
#define MSG_DESCRIPTION_CUSTOMGUI_NOTIFICATION
Sent by a custom GUI to the parent. The corresponding data is DescriptionCustomGuiNotification.
Definition: c4d_baselist.h:438
Layout Messages
Layout Change
A GeUserArea can inform the parent dialog when it changed its size:
- ::BFM_LAYOUT_CHANGED: Sent to parent about layout changes. Used internally by GeUserArea::LayoutChanged().
A GeDialog can be part of a layout and is created when that layout is loaded. To restore a given state of that GeDialog, internal data of that dialog must be stored with the layout. This internal data is received and reset using these messages:
- ::BFM_LAYOUT_GETDATA: Sent when saving the layout.
- ::BFM_LAYOUT_SETDATA: Receive the container saved with ::BFM_LAYOUT_GETDATA when loading a layout.
- Note
- Typically the group weights are stored here. See Weights.
{
return true;
}
{
if (bc)
{
const Int32 custom = bc->GetInt32(1000);
return true;
}
break;
}
@ BFM_LAYOUT_SETDATA
Receive the container saved with BFM_LAYOUT_GETDATA when loading a layout.
Definition: gui.h:986
@ BFM_LAYOUT_GETDATA
Definition: gui.h:984
Weights
A GeDialog defines its layout using groups with multiple columns/rows. The weights of a group define the relative scale of these columns/rows. When the user changes the scale a message is sent to the GeDialog:
- ::BFM_WEIGHTS_CHANGED: Sent when group weights changed. The group ID is stored with this message ID.
See also GeDialog Groups.
{
GroupWeightsSave(WEIGHT_GROUP, _weights);
break;
}
{
result.SetContainer(10000, _weights);
return true;
}
{
if (bc)
{
const BaseContainer* const weightsContainer = bc->GetContainerInstance(10000);
if (weightsContainer)
_weights = *weightsContainer;
GroupWeightsLoad(WEIGHT_GROUP, _weights);
return true;
}
break;
}
@ BFM_WEIGHTS_CHANGED
Group weights changed. The group ID is returned.
Definition: gui.h:990
Fading
A GeUserArea can support a dynamic fading effect. After GeUserArea::ActivateFading() was called, Cinema 4D sends the ::BFM_FADE message to the user area for the duration of the fading operation.
- ::BFM_FADE: Sent to a GeUserArea to blend a GUI color with GeUserArea::AdjustColor().
See Drawing Operations.
class FadingUserArea : public GeUserArea
{
public:
FadingUserArea() { };
~FadingUserArea() { };
{
{
{
ActivateFading(100);
return true;
}
{
Redraw();
return true;
}
}
}
{
OffScreenOn();
SetClippingRegion(x1, y1, x2, y2);
DrawRectangle(x1, y1, x2, y2);
}
};
@ COLOR_BG_HIGHLIGHT
Definition: c4d_colors.h:329
@ COLOR_TRANS
Definition: c4d_colors.h:14
@ COLOR_CONSOLE_TEXT
Definition: c4d_colors.h:94
@ COLOR_BG
Definition: c4d_colors.h:16
@ BFM_FADE
Definition: gui.h:1009
#define DRAWTEXT_HALIGN_LEFT
Align to the left.
Definition: c4d_gui.h:189
@ FONT_MONOSPACED
Monospaced font.
Definition: gui.h:25
Draw
The message ::BFM_DRAW is sent to a GeUserArea to draw into the Cinema 4D GUI. The message will call GeUserArea::DrawMsg().
The clipping dimensions are stored in these parameters:
- ::BFM_DRAW_LEFT: Left clipping.
- ::BFM_DRAW_TOP: Top clipping.
- ::BFM_DRAW_RIGHT: Right clipping.
- ::BFM_DRAW_BOTTOM: Bottom clipping.
The draw reason is also stored:
- ::BFM_DRAW_REASON: Message which started the redraw.
- ::BFM_GOTFOCUS: User area got the focus.
- ::BFM_LOSTFOCUS: User area lost the focus.
if (reasonGotFocus || reasonLostFocurs)
return;
wchar_t size_t const char ** reason
Definition: fileutils.h:23
@ BFM_DRAW_REASON
BaseContainer Message which started the redraw.
Definition: gui.h:588
Visibility
Dialogs and user areas are informed when they become visible:
- ::BFM_VISIBLE_ON: Sent when the element comes to front after tabbing invisible.
- ::BFM_VISIBLE_OFF: Sent when the element went back (another tab becomes visible).
Specific GUI Elements
Some messages can only be sent to specific elements or are only sent by specific elements.
Text Edit Fields
Text edit field messages:
- ::BFM_EDITFIELD_GETCURSORPOS: Return the cursor position in an edit field.
- ::BFM_EDITFIELD_GETBLOCKSTART: Returns the block start position in an edit field.
- ::BFM_EDITFIELD_SETCURSORPOS: Sets the cursor position in an edit field.
- ::BFM_SETCURSORINFO: Same as ::BFM_EDITFIELD_SETCURSORPOS.
const String
text {
"Hello World" };
SetString(ID_TEXTEDIT,
text);
SendMessage(ID_TEXTEDIT, bc);
Activate(ID_TEXTEDIT);
@ BFM_EDITFIELD_SETCURSORPOS
Definition: gui.h:996
PyObject * text
Definition: pycore_traceback.h:70
Multi-line edit fields messages:
- ::BFM_SPECIALMODE: Setting the scripting language mode. Used internally by GeDialog::SetMultiLineMode().
Messages to access the internally stored undo stack of a multi-line edit field:
- ::BFM_EDITFIELD_STOREUNDO: Stores the undo container for a multi-line edit text.
- ::BFM_EDITFIELD_RESTOREUNDO: Restore the undo container for a multi-line edit text.
- ::BFM_EDITFIELD_FLUSHUNDO: Flushes the undo stack for a multi-line edit text.
- ::BFM_EDITFIELD_UNDOSTAT_COUNT: Returns the undo stack size.
- ::BFM_EDITFIELD_UNDOSTAT_UNDOLEVEL: Returns the current undo level.
It is also possible to send messages from the IDM list to the multi-line edit field.
{
SetTitle("Simple Script Manager"_s);
AddMultiLineEditText(ID_MULTILINE_EDIT,
BFH_SCALEFIT, 0, 200, style);
SetString(ID_MULTILINE_EDIT, "import c4d\n\nprint(\"hello world\")\n"_s);
this->SetTimer(250);
return true;
}
{
if (id == ID_UNDO_BUTTON)
{
SendMessage(ID_MULTILINE_EDIT, BaseContainer(
IDM_UNDO));
CheckUndoState();
}
if (id == ID_REDO_BUTTON)
{
SendMessage(ID_MULTILINE_EDIT, BaseContainer(
IDM_REDO));
CheckUndoState();
}
return GeDialog::Command(
id,
msg);
}
void Timer(
const BaseContainer&
msg)
{
CheckUndoState();
}
void CheckUndoState()
{
const GeData
res = SendMessage(ID_MULTILINE_EDIT, getUndoLevelMsg);
{
const BaseContainer* stat =
res.GetContainer();
if (stat)
{
if (currentLevel > 0)
Enable(ID_UNDO_BUTTON, true);
else
Enable(ID_UNDO_BUTTON, false);
if (currentLevel < (undoStackCount - 1))
Enable(ID_REDO_BUTTON, true);
else
Enable(ID_REDO_BUTTON, false);
}
}
}
@ BFM_EDITFIELD_UNDOSTAT_UNDOLEVEL
Int32 The current undo level.
Definition: gui.h:1031
@ BFM_EDITFIELD_UNDOSTAT_COUNT
Int32 The undo stack size.
Definition: gui.h:1030
@ DA_CONTAINER
BaseContainer.
Definition: c4d_gedata.h:48
#define IDM_REDO
Redo.
Definition: ge_prepass.h:3890
#define IDM_UNDO
Undo.
Definition: ge_prepass.h:3889
@ DR_MULTILINE_MONOSPACED
Monospaced font.
Definition: gui.h:319
@ DR_MULTILINE_PYTHON
Python line return handling.
Definition: gui.h:326
@ DR_MULTILINE_SYNTAXCOLOR
Python syntax highlighting.
Definition: gui.h:320
@ DR_MULTILINE_STATUSBAR
Display a statusbar with the cursor position.
Definition: gui.h:321
@ DR_MULTILINE_WORDWRAP
Word wrap multi-line field.
Definition: gui.h:327
@ BFH_SCALEFIT
Scale fit. BFH_SCALE|BFH_FIT.
Definition: gui.h:316
@ DR_MULTILINE_HIGHLIGHTLINE
Highlight lines.
Definition: gui.h:322
Status Bar
The message ::BFM_SETSTATUSBAR can be sent to edit the status bar of a scroll group or a progress bar custom GUI element:
- ::BFM_SETSTATUSBAR: Status bar message.
The parameters of this message are:
- ::BFM_STATUSBAR_PROGRESSON: Status bar active.
- ::BFM_STATUSBAR_PROGRESS: Progress between 0.0 and 1.0.
- ::BFM_STATUSBAR_PROGRESSSPIN: Spinning bar.
- ::BFM_STATUSBAR_TXT: First text.
- ::BFM_STATUSBAR_HELP: Second text. (Help.)
- ::BFM_STATUSBAR_PROGRESSFULLSIZE: Use full-sized progress bar.
- ::BFM_STATUSBAR_TINT_COLOR: Color ID for the status bar, or as RGB value (Vector).
SendMessage(ID_STATUSBAR,
m);
const char * m
Definition: abstract.h:692
@ BFM_STATUSBAR_PROGRESSON
Bool Statusbar active.
Definition: gui.h:842
@ BFM_STATUSBAR_TINT_COLOR
Int32 Color ID for the status bar, or as RGB value (Vector).
Definition: gui.h:848
@ BFM_SETSTATUSBAR
To set a statusbar (e.g. inside a SCROLLGROUP (dialog element)):
Definition: gui.h:840
@ BFM_STATUSBAR_PROGRESS
Float Between 0.0 and 1.0.
Definition: gui.h:844
SendMessage(ID_SCROLLGROUP, bc);
@ BFM_STATUSBAR_HELP
String Second text. (Help.)
Definition: gui.h:846
@ BFM_STATUSBAR_TXT
String First text.
Definition: gui.h:843
Pop Up
A message is sent from a popup button:
- ::BFM_POPUPNOTIFY: Notification of popup before the menu opens.
AddPopupButton(ID_POPUP,
BFH_LEFT, 10, 10);
AddChild(ID_POPUP, 1, "Child 0"_s);
AddChild(ID_POPUP, 2, "Child 1"_s);
@ BFH_LEFT
Aligned to the left. 1<<3.
Definition: gui.h:312
{
if (ID == ID_POPUP)
{
}
break;
}
@ BFM_POPUPNOTIFY
Notification of popup before the menu opens.
Definition: gui.h:924
if (id == ID_POPUP)
{
ApplicationOutput(
"The item " + String::IntToString(selectedItem) +
" was selected");
}
Scroll Group
A scroll group informs the parent dialog when it was scrolled:
- ::BFM_SCROLLGROUP_SCROLLED: Sent to the parent dialog when a scroll group was scrolled.
Custom GUI Elements
The base class for custom GUI elements (used to display NodeData parameters in the Attribute Manager) is iCustomGui which is based on GeDialog. Such custom GUI elements receive these messages when the used "User Interface" is changed in the Attribute Manager. The custom GUI can then store the ID of the currently active gadget:
- ::BFM_GETFOCUSBEFOREUPDATE: Sent before the layout is changed.
- ::BFM_SETFOCUSAFTERUPDATE Sent after the layout is changed.
{
result.SetInt32(0, _activeID);
return true;
}
{
Activate(ID);
return true;
}
@ BFM_SETFOCUSAFTERUPDATE
Definition: gui.h:692
@ BFM_GETFOCUSBEFOREUPDATE
Definition: gui.h:654
Core Messages
Both GeDialog and GeUserArea receive core messages. These messages call GeDialog::CoreMessage() or GeUserArea::CoreMessage().
- ::BFM_SYNC_MESSAGE: Sync message.
- ::BFM_CORE_MESSAGE: Core message.
See the Core Messages Manual.
{
if (CheckCoreMessage(bc))
{
switch (movement)
{
}
}
break;
}
@ BFM_CORE_PAR1
ANY Parameter 1.
Definition: gui.h:903
#define MOVE_END
Move ended. par2 == ESC.
Definition: ge_prepass.h:2807
#define EVMSG_ASYNCEDITORMOVE
The user moved something in the editor window. Managers should update things like position fields.
Definition: ge_prepass.h:2801
#define MOVE_CONTINUE
Move continued.
Definition: ge_prepass.h:2806
#define MOVE_START
Move started.
Definition: ge_prepass.h:2805
maxon::Int Int
Definition: ge_sys_math.h:55
Further Reading