c4d_gui.h File Reference

Classes

class   C4DGadget
class   GadgetPtr
class   GeUserArea
class   TriState< TYPE >
class   UpdateDialogHelper
class   GeDialog
class   GeModalDialog
class   SubDialog
class   iCustomGui
class   ProgressThread
class   ProgressDialog

Macros

#define  IDC_OK
#define  IDC_CANCEL
#define  FIRST_POPUP_ID
#define  MENU_ALLOWSUBMENUCOMMAND
#define  IDM_CM_CLOSEWINDOW
#define  MAXTIME
#define  COREMSG_CINEMA_GETCOMMANDNAME
#define  COREMSG_CINEMA_GETCOMMANDENABLED
#define  COREMSG_CINEMA_GETCOMMANDCHECKED
#define  COREMSG_CINEMA_EXECUTEEDITORCOMMAND
#define  COREMSG_CINEMA_EXECUTESUBID
#define  COREMSG_CINEMA_EXECUTEOPTIONMODE
#define  COREMSG_CINEMA_GETCOMMANDHELP
#define  COREMSG_CINEMA_FORCE_AM_UPDATE
#define  COREMSG_UPDATECOMMANDSMESSAGE
#define  C4DGUIPTR
#define  C4DGUINOPTR
#define  C4DGUISCROLLPARENT
#define  DRAWTEXT_HALIGN_LEFT
#define  DRAWTEXT_HALIGN_CENTER
#define  DRAWTEXT_HALIGN_RIGHT
#define  DRAWTEXT_HALIGN_MASK
#define  DRAWTEXT_VALIGN_TOP
#define  DRAWTEXT_VALIGN_CENTER
#define  DRAWTEXT_VALIGN_BOTTOM
#define  DRAWTEXT_VALIGN_MASK
#define  DRAWTEXT_STD_ALIGN
#define  MOUSEMOVE_DELTA_TABLET
#define  MOUSEMOVE_DELTA_MOUSE
#define  GUI_MAXRANGE
#define  GUI_MINRANGE
#define  GROUPWEIGHTS_PERCENT_W_CNT
#define  GROUPWEIGHTS_PERCENT_W_VAL
#define  GROUPWEIGHTS_PERCENT_H_CNT
#define  GROUPWEIGHTS_PERCENT_H_VAL
#define  LAYOUTMODE_NONE
#define  LAYOUTMODE_MINIMIZED
#define  LAYOUTMODE_MAXIMIZED
#define  MOUSEPOS
#define  INTERFACE_ICON_TYPE_NORMAL
#define  INTERFACE_ICON_TYPE_DISABLED
#define  INTERFACE_ICON_TYPE_FOCUS

Typedefs

typedef UChar   OBSOLETE

Enumerations

enum   {
   FORMAT_FLOAT ,
   FORMAT_INT ,
   FORMAT_PERCENT ,
   FORMAT_DEGREE ,
   FORMAT_METER ,
   FORMAT_FRAMES ,
   FORMAT_SECONDS ,
   FORMAT_SMPTE
}

函数

Int32   SizePixChr ( Int32 pixels, Int32 chars)
Int32   SizePix ( Int32 pixels)
Int32   SizeChr ( Int32 chars)
void  MessageDialog (const maxon::String &str)
void  MessageDialog ( Int32 id)
void  MessageDialog ( Int32 id, const maxon::String &p1)
void  MessageDialog ( Int32 id, const maxon::String &p1, const maxon::String &p2)
Bool   QuestionDialog (const maxon::String &str)
Bool   QuestionDialog ( Int32 id)
Bool   QuestionDialog ( Int32 id, const maxon::String &p1)
Bool   QuestionDialog ( Int32 id, const maxon::String &p1, const maxon::String &p2)
Bool   GetInputEvent ( Int32 askdevice, BaseContainer &res)
Bool   GetInputState ( Int32 askdevice, Int32 askchannel, BaseContainer &res)
Int32   ShowPopupMenu (CDialog *cd, Int32 screenx, Int32 screeny, const BaseContainer &bc, Int32 flags= POPUP_RIGHT | POPUP_EXECUTECOMMANDS , Int32 *res_mainid=nullptr)
Bool   RemoveLastCursorInfo ( LASTCURSORINFOFUNC func)
String   Shortcut2String ( Int32 shortqual, Int32 shortkey)
String   Shortcut2String (const BaseContainer &sc)
向量   GetGuiWorldColor ( Int32 cid)
Bool   GetIconCoordInfo ( Int32 &id, const Char *ident)
Bool   GetInterfaceIcon ( Int32 type, Int32 id_x, Int32 id_y, Int32 id_w, Int32 id_h, IconData &d)
Bool   GeIsTabletMode ()
Float   GetMouseMoveDelta ()
void  SetBakeStatus ( Bool state)
Bool   GetBakeStatus ()

TriState Set

#define  FLAG_CENTER_HORIZ
#define  FLAG_CENTER_VERT
#define  FLAG_ALIGN_RIGHT

Macro Definition Documentation

◆  IDC_OK

#define IDC_OK

◆  IDC_CANCEL

#define IDC_CANCEL

◆  FIRST_POPUP_ID

#define FIRST_POPUP_ID

The first valid sub-menu item ID.

另请参阅
ShowPopupMenu

◆  MENU_ALLOWSUBMENUCOMMAND

#define MENU_ALLOWSUBMENUCOMMAND

◆  IDM_CM_CLOSEWINDOW

#define IDM_CM_CLOSEWINDOW

The menu ID for a close menu item. Can be used in dialog menus.

◆  MAXTIME

#define MAXTIME

The default maximum time value. Equal to 1.0 hours at 30 fps i.e. about 2.77 hours.

◆  C4DGUIPTR

#define C4DGUIPTR

ID used for GadgetPtr when initialized with a gadget pointer.

◆  C4DGUINOPTR

#define C4DGUINOPTR

ID used for GadgetPtr when not initialized with a gadget pointer.

◆  C4DGUISCROLLPARENT

#define C4DGUISCROLLPARENT

ID used for parent GadgetPtr when retrieving the dimensions of the Dialog within a scrollgroup.

◆  MOUSEPOS

#define MOUSEPOS

Mouse position constant for ShowPopupMenu() .

Typedef Documentation

◆  OBSOLETE

typedef UChar OBSOLETE

Function Documentation

◆  SizePixChr()

Int32 SizePixChr ( Int32   pixels ,
Int32   chars  
)

Combines SizePix() and SizeChr() functions. The returned value is interpreted as a number of characters/lines plus a number of pixels.

注意
The number of characters for chars has to be multiplied by 10 .
For example if a size of 3 characters is needed, pass 3 * 10 ,或 30 for chars .
参数
[in] pixels The pixel dimension.
[in] chars The number of characters.
返回
The size.

◆  SizePix()

Int32 SizePix ( Int32   pixels )

Bakes a pixel size so that it can be used to specify dialog control dimension.

参数
[in] pixels The pixel dimension.
返回
The size.

◆  SizeChr()

Int32 SizeChr ( Int32   chars )

Bakes a character count so that it can be used to specify dialog control dimension.
Calculates how many characters will fit in a control for widths, and how many standard lines will fit for heights.

注意
The number of characters for chars has to be multiplied by 10 .
For example if a size of 3 characters is needed, pass 3 * 10 ,或 30 for chars .
参数
[in] chars The number of characters.
返回
The size.

◆  MessageDialog() [1/4]

void MessageDialog ( const maxon::String str )

Opens a standard message dialog with an exclamation point icon and an OK button.

参数
[in] str The message to show.

◆  MessageDialog() [2/4]

void MessageDialog ( Int32   id )

Opens a standard dialog with an exclamation point icon and an OK button.

参数
[in] id The message to show, specified as a string ID in the global ::resource object.

◆  MessageDialog() [3/4]

void MessageDialog ( Int32   id ,
const maxon::String p1  
)

Opens a standard dialog with an exclamation point icon and an OK button.

参数
[in] id The message to show, specified as a string ID in the global ::resource object, including one phrase that is inserted at #'s in the string.
[in] p1 The phrase to insert.

◆  MessageDialog() [4/4]

void MessageDialog ( Int32   id ,
const maxon::String p1 ,
const maxon::String p2  
)

Opens a standard dialog with an exclamation point icon and an OK button.

参数
[in] id The message to show, specified as a string ID in the global ::resource object, including two phrases that are inserted at #'s in the string.
[in] p1 The first phrase to insert.
[in] p2 The second phrase to insert.

◆  QuestionDialog() [1/4]

Bool QuestionDialog ( const maxon::String str )

Opens a standard question dialog with a question mark icon and Yes/ No buttons .

参数
[in] str The message to show.
返回
true if the user answered Yes , otherwise false .

◆  QuestionDialog() [2/4]

Bool QuestionDialog ( Int32   id )

Opens a standard question dialog with a question mark icon and Yes/ No buttons .

参数
[in] id The message to show, specified as a string ID in the global ::resource object.
返回
true if the user answered Yes , otherwise false .

◆  QuestionDialog() [3/4]

Bool QuestionDialog ( Int32   id ,
const maxon::String p1  
)

Opens a standard question dialog with a question mark icon and Yes/ No buttons .

参数
[in] id The message to show, specified as a string ID in the global ::resource object, including one phrase that is inserted at #'s in the string.
[in] p1 The phrase to insert.
返回
true if the user answered Yes , otherwise false .

◆  QuestionDialog() [4/4]

Bool QuestionDialog ( Int32   id ,
const maxon::String p1 ,
const maxon::String p2  
)

Opens a standard question dialog with a question mark icon and Yes/ No buttons .

参数
[in] id The message to show, specified as a string ID in the global ::resource object, including two phrases that are inserted at #'s in the string.
[in] p1 The first phrase to insert.
[in] p2 The second phrase to insert.
返回
true if the user answered Yes , otherwise false .

◆  GetInputEvent()

Bool GetInputEvent ( Int32   askdevice ,
BaseContainer res  
)

Gets the next input event for a certain device from the event queue.
If the return value is true , the container stored in res is like an input event message, otherwise no state was available.
For a list of valid devices and channels, see Input Events .

参数
[in] askdevice The device to poll.
[in] res The result container.
返回
true if an input event could be retrieved, otherwise false .

◆  GetInputState()

Bool GetInputState ( Int32   askdevice ,
Int32   askchannel ,
BaseContainer res  
)

Polls a certain channel of a device for the current input state.
If the return value is true , the container stored in res is like an input event message, otherwise no state was available.
For a list of valid devices and channels, see Input Events .

参数
[in] askdevice The device to poll.
[in] askchannel The channel of the device.
[in] res The result container.
返回
true if an input state could be retrieved, otherwise false .

◆  ShowPopupMenu()

Int32 ShowPopupMenu ( CDialog *  cd ,
Int32   screenx ,
Int32   screeny ,
const BaseContainer bc ,
Int32   flags = POPUP_RIGHT|POPUP_EXECUTECOMMANDS ,
Int32 res_mainid = nullptr  
)

Displays a popup menu.
The menu is defined by adding string items sequentially to a base container. (The order the items are set in the container determines their order in the menu.)
The ID of the string item determines its function:

◆  RemoveLastCursorInfo()

Bool RemoveLastCursorInfo ( LASTCURSORINFOFUNC   func )

Sets the callback invoked when mouse cursor leaves a user area.

注意
Useful to remove any highlighted element on mouse over.
参数
[in] func The last mouse cursor info callback. It should simply send BFM_CURSORINFO_REMOVE to the user area for the mouse leave event.

◆  Shortcut2String() [1/2]

String Shortcut2String ( Int32   shortqual ,
Int32   shortkey  
)

Converts a shortcut to a readable string.

参数
[in] shortqual The shortcut qualifier.
[in] shortkey The shortcut key.
返回
The shortcut string.

◆  Shortcut2String() [2/2]

String Shortcut2String ( const BaseContainer sc )

Converts a shortcut to a readable string.

参数
[in] sc The shortcut container.
返回
The shortcut string.

◆  GetGuiWorldColor()

向量 GetGuiWorldColor ( Int32   cid )

Gets a GUI color from its constant ID.

参数
[in] cid The color ID. See COLOR constants.
返回
The GUI color.

◆  GetIconCoordInfo()

Bool GetIconCoordInfo ( Int32 id ,
const Char ident  
)

Converts an icon resource identity string into an ID.

参数
[in] id The ID of the icon resource string.
[in] ident The icon resource identity string. Look them up in the resource file for schemes.
返回
true if the icon resource identity string was found, otherwise false .

◆  GetInterfaceIcon()

Bool GetInterfaceIcon ( Int32   type ,
Int32   id_x ,
Int32   id_y ,
Int32   id_w ,
Int32   id_h ,
IconData d  
)

Retrieves the icon for an interface element.

参数
[in] type The icon type: INTERFACE_ICON_TYPE
[in] id_x The X position ID of the icon.
[in] id_y The Y position ID of the icon.
[in] id_w The width ID of the icon.
[in] id_h The height ID of the icon.
[out] d Assigned the retrieved icon resource data.
返回
The icon could be retrieved.

◆  GeIsTabletMode()

Bool GeIsTabletMode ( )

Returns true when the current/preferred input device is a graphic tablet.

由于
R20
返回
True for tablet input.

◆  GetMouseMoveDelta()

Float GetMouseMoveDelta ( )

Retrieves the mouse move delta (threshold) depending on the input device.

由于
R19
返回
The mouse move delta.

◆  SetBakeStatus()

void SetBakeStatus ( Bool   state )

Private .

由于
R16

◆  GetBakeStatus()

Bool GetBakeStatus ( )

Private .

由于
R16
BaseContainer::SetString
void SetString(Int32 id, const maxon::String &s)
定义: c4d_basecontainer.h:569
String
定义: c4d_string.h:38
BaseContainer::InsData
GeData * InsData(Int32 id, const GeData &n)
定义: c4d_basecontainer.h:238
BaseContainer::SetContainer
void SetContainer(Int32 id, const BaseContainer &s)
定义: c4d_basecontainer.h:597
FIRST_POPUP_ID
#define FIRST_POPUP_ID
定义: c4d_gui.h:62
BaseContainer
定义: c4d_basecontainer.h:46