customgui_fontchooser.h File Reference

Classes

class  FontchooserCustomGui
 
class  FontData
 

Macros

#define CUSTOMGUI_FONTCHOOSER
 
#define FONTCHOOSER_DATA
 

Enumerations

enum  {
  FONTCHOOSER_ENABLE_SIZE ,
  FONTCHOOSER_USE_REDUCED_FONT_LIST ,
  FONTCHOOSER_ENABLE_FILTER
}
 
enum class  FONTCHOOSER_POPUP_RESULT {
  OK ,
  CANCEL
}
 

Functions

enum FONTCHOOSER_POPUP_RESULT MAXON_ENUM_LIST (FONTCHOOSER_POPUP_RESULT)
 
Bool OpenFontChooserPopup (const BaseContainer &font, maxon::Delegate< void(FONTCHOOSER_POPUP_RESULT, const BaseContainer &)> callback, Bool useReducedFontList=false, Int32 screenPositionX=-1, Int32 screenPositionY=-1)
 

Variables

 OK
 
 CANCEL
 
FontData MAXON_ENUM_LIST
 

Macro Definition Documentation

◆ CUSTOMGUI_FONTCHOOSER

#define CUSTOMGUI_FONTCHOOSER

Font chooser custom GUI ID.

◆ FONTCHOOSER_DATA

#define FONTCHOOSER_DATA

Font chooser custom data ID.

Enumeration Type Documentation

◆ FONTCHOOSER_POPUP_RESULT

Enumerator
OK 

User has selected a font.

CANCEL 

User has cancelled popup, either by pressing ESC key or by clicking outside.

Function Documentation

◆ MAXON_ENUM_LIST()

◆ OpenFontChooserPopup()

Bool OpenFontChooserPopup ( const BaseContainer font,
maxon::Delegate< void(FONTCHOOSER_POPUP_RESULT, const BaseContainer &)>  callback,
Bool  useReducedFontList = false,
Int32  screenPositionX = -1,
Int32  screenPositionY = -1 
)

Opens a font chooser popup at the specified position that can be closed by clicking outside or with ESC.

Note
If screenPositionX=-1 and screenPositionY=-1 the popup will be opened at the current mouse position.
If screenPositionX=-2 and screenPositionY=-2 the popup will be opened at the center of the screen.
Parameters
[in]fontThe initial font container.
[out]callbackFunction called on user action with the result and the choosen font data. If FONTCHOOSER_POPUP_RESULT is OK, then choosen font is stored in the BaseContainer. If FONTCHOOSER_POPUP_RESULT is CANCEL, BaseContainer received is empty.
[in]useReducedFontListIf true, restrict the available fonts to 'core' families only
[in]screenPositionXThe Y position of the popup. See note above.
[in]screenPositionYThe Y position of the popup. See note above.
Returns
true if the popup opened successfully, otherwise false.

Variable Documentation

◆ OK

OK

User has selected a font.

◆ CANCEL

CANCEL

< User has cancelled popup, either by pressing ESC key or by clicking outside.

◆ MAXON_ENUM_LIST

FontData MAXON_ENUM_LIST