Rhino C++ API  9.0
Static Public Member Functions | List of all members
CRhinoUiFile Class Reference

#include <RhinoSdkUiFile.h>

Static Public Member Functions

static bool Bitmap (UUID idFile, UUID idBitmap, bool menuBitmap, CRhinoDib &bitmap)
 
static int BitmapCount (UUID idFile)
 
static UUID BitmapID (UUID idFile, int index)
 
static ON_wString FileAlias (UUID id)
 
static bool FileClose (UUID id)
 
static int FileCount ()
 File access methods. More...
 
static UUID FileID (const wchar_t *sFileName, bool bIsAlias)
 
static UUID FileID (int index)
 
static bool FileIsOpen (const wchar_t *sName, bool bIsAlias)
 
static ON_wString FileName (UUID id)
 
static UUID FileOpen (const wchar_t *sFileName)
 
static bool FileSave (UUID id)
 
static bool FileSaveAs (UUID id, const wchar_t *sSaveAs)
 
static UUID GroupActiveItem (UUID idFile, UUID idGroup)
 
static int GroupCount (UUID idFile)
 Group access methods. More...
 
static UUID GroupDockBarID (UUID idFile, UUID idGroup)
 
static UUID GroupID (UUID idFile, int index)
 
static bool GroupIsDocked (UUID idFile, UUID idGroup)
 
static bool GroupIsFloating (UUID idFile, UUID idGroup)
 
static bool GroupIsVisible (UUID idFile, UUID idGroup)
 
static int GroupItemCount (UUID idFile, UUID idGroup)
 
static UUID GroupItemID (UUID idFile, UUID idGroup, int index)
 
static UUID GroupItemToolBarID (UUID idFile, UUID idGroup, UUID idItem)
 
static ON_wString GroupName (UUID idFile, UUID idGroup)
 
static ON_wString GroupName (UUID idFile, UUID idGroup, unsigned int locale)
 
static UUID GroupSetActiveItem (UUID idFile, UUID idGroup, UUID idItem)
 
static bool GroupShow (UUID idFile, UUID idGroup, bool bShow)
 
static UUID MacroBitmapID (UUID idFile, UUID idMacro)
 
static ON_wString MacroButtonText (UUID idFile, UUID idMacro, unsigned int locale)
 
static int MacroCount (UUID idFile)
 
static ON_wString MacroHelpText (UUID idFile, UUID idMacro, unsigned int locale)
 
static UUID MacroID (UUID idFile, int index)
 
static ON_wString MacroMenuText (UUID idFile, UUID idMacro, unsigned int locale)
 
static ON_wString MacroName (UUID idFile, UUID idMacro, unsigned int locale)
 
static void MacroRunScript (UUID idFile, UUID idMacro, bool fromMenu)
 
static int Macros (UUID idFile, unsigned int locale, ON_ClassArray< CRhinoUiMacroInfo > &macros)
 
static ON_wString MacroScript (UUID idFile, UUID idMacro)
 
static ON_wString MacroToolTip (UUID idFile, UUID idMacro, unsigned int locale)
 
static bool Png (UUID idFile, UUID idImage, bool darkMode, int size, const ON_Color &background, ON_SimpleArray< unsigned char > &png)
 
static bool Png (UUID idFile, UUID idImage, bool darkMode, int size, ON_SimpleArray< unsigned char > &png)
 
static bool SetToolBarBitmapSize (const ON_2iSize &size)
 
static void ShowSidebar (bool mruSidebar, bool show)
 Sidebar access methods. More...
 
static bool SidebarIsVisible (bool mruSidebar)
 
static ON_wString Svg (UUID idFile, UUID idImage, bool darkMode)
 
static ON_2iSize TabBitmapSize ()
 
static ON_2iSize ToolBarBitmapSize ()
 
static int ToolBarCount (UUID idFile)
 Toolbar tab access methods. More...
 
static UUID ToolBarID (UUID idFile, int index)
 
static ON_wString ToolBarName (UUID idFile, UUID idToolBar)
 
static ON_wString ToolBarName (UUID idFile, UUID idToolBar, unsigned int locale)
 

Member Function Documentation

◆ Bitmap()

static bool CRhinoUiFile::Bitmap ( UUID  idFile,
UUID  idBitmap,
bool  menuBitmap,
CRhinoDib &  bitmap 
)
static

Description: Call this method to get the bitmap macro. Parameters: idFile[in] File Id idBitmap[in] Bitmap Id menuBitmap[in] If true the small bitmap used by custom menu items and tool bar tabs is returned otherwise; the large bitmap used by buttons is returned. bitmap[out] Will contain the extracted bitmap. Returns: Returns true of the bitmap was found and successfully extracted.

◆ BitmapCount()

static int CRhinoUiFile::BitmapCount ( UUID  idFile)
static

Description: Call this method to get the number of bitmaps in the specified file. Parameters: idFile[in] File Id to get the bitmap count from.

◆ BitmapID()

static UUID CRhinoUiFile::BitmapID ( UUID  idFile,
int  index 
)
static

Description: Call this method when iterating the bitmap table, it will return the Id for the specified index. Parameters: idFile[in] File Id to get the bitmap Id from. index[in] Zero based index of the Id to get. Returns: Returns ON_nil_uuid on error or the Id for the bitmap at the specified index on success.

◆ FileAlias()

static ON_wString CRhinoUiFile::FileAlias ( UUID  id)
static

◆ FileClose()

static bool CRhinoUiFile::FileClose ( UUID  id)
static

◆ FileCount()

static int CRhinoUiFile::FileCount ( )
static

File access methods.

◆ FileID() [1/2]

static UUID CRhinoUiFile::FileID ( const wchar_t *  sFileName,
bool  bIsAlias 
)
static

◆ FileID() [2/2]

static UUID CRhinoUiFile::FileID ( int  index)
static

◆ FileIsOpen()

static bool CRhinoUiFile::FileIsOpen ( const wchar_t *  sName,
bool  bIsAlias 
)
static

◆ FileName()

static ON_wString CRhinoUiFile::FileName ( UUID  id)
static

◆ FileOpen()

static UUID CRhinoUiFile::FileOpen ( const wchar_t *  sFileName)
static

◆ FileSave()

static bool CRhinoUiFile::FileSave ( UUID  id)
static

◆ FileSaveAs()

static bool CRhinoUiFile::FileSaveAs ( UUID  id,
const wchar_t *  sSaveAs 
)
static

◆ GroupActiveItem()

static UUID CRhinoUiFile::GroupActiveItem ( UUID  idFile,
UUID  idGroup 
)
static

◆ GroupCount()

static int CRhinoUiFile::GroupCount ( UUID  idFile)
static

Group access methods.

◆ GroupDockBarID()

static UUID CRhinoUiFile::GroupDockBarID ( UUID  idFile,
UUID  idGroup 
)
static

◆ GroupID()

static UUID CRhinoUiFile::GroupID ( UUID  idFile,
int  index 
)
static

◆ GroupIsDocked()

static bool CRhinoUiFile::GroupIsDocked ( UUID  idFile,
UUID  idGroup 
)
static

◆ GroupIsFloating()

static bool CRhinoUiFile::GroupIsFloating ( UUID  idFile,
UUID  idGroup 
)
static

◆ GroupIsVisible()

static bool CRhinoUiFile::GroupIsVisible ( UUID  idFile,
UUID  idGroup 
)
static

◆ GroupItemCount()

static int CRhinoUiFile::GroupItemCount ( UUID  idFile,
UUID  idGroup 
)
static

◆ GroupItemID()

static UUID CRhinoUiFile::GroupItemID ( UUID  idFile,
UUID  idGroup,
int  index 
)
static

◆ GroupItemToolBarID()

static UUID CRhinoUiFile::GroupItemToolBarID ( UUID  idFile,
UUID  idGroup,
UUID  idItem 
)
static

◆ GroupName() [1/2]

static ON_wString CRhinoUiFile::GroupName ( UUID  idFile,
UUID  idGroup 
)
static

◆ GroupName() [2/2]

static ON_wString CRhinoUiFile::GroupName ( UUID  idFile,
UUID  idGroup,
unsigned int  locale 
)
static

◆ GroupSetActiveItem()

static UUID CRhinoUiFile::GroupSetActiveItem ( UUID  idFile,
UUID  idGroup,
UUID  idItem 
)
static

◆ GroupShow()

static bool CRhinoUiFile::GroupShow ( UUID  idFile,
UUID  idGroup,
bool  bShow 
)
static

◆ MacroBitmapID()

static UUID CRhinoUiFile::MacroBitmapID ( UUID  idFile,
UUID  idMacro 
)
static

Description: Call this method to get the Id for the bitmap associated with this macro. Parameters: idFile[in] Id of the file containing the macro. idMacro[in] Id of the specific macro to query. Returns: Returns the bitmap Id for the specified macro or ON_nil_uuid on error.

◆ MacroButtonText()

static ON_wString CRhinoUiFile::MacroButtonText ( UUID  idFile,
UUID  idMacro,
unsigned int  locale 
)
static

Description: Call this method to get the tool-bar button text associated with the specified macro. Parameters: idFile[in] Id of the file containing the macro. idMacro[in] Id of the specific macro to query. Returns: Returns the tool-bar button text associated with the specified.

◆ MacroCount()

static int CRhinoUiFile::MacroCount ( UUID  idFile)
static

Description: Call this method to get the number of macros in the specified file. Parameters: idFile[in] File Id to get the macro count from.

◆ MacroHelpText()

static ON_wString CRhinoUiFile::MacroHelpText ( UUID  idFile,
UUID  idMacro,
unsigned int  locale 
)
static

Description: Parameters: idFile[in] Id of the file containing the macro. idMacro[in] Id of the specific macro to query. locale[in] Locale Id of the result string, will default to English if the locale is not specified in the RUI file. Returns: Returns the .

◆ MacroID()

static UUID CRhinoUiFile::MacroID ( UUID  idFile,
int  index 
)
static

Description: Call this method when iterating the macro table, it will return the Id for the specified index. Parameters: idFile[in] File Id to get the macro Id from. index[in] Zero based index of the Id to get. Returns: Returns ON_nil_uuid on error or the Id for the macro at the specified index on success.

◆ MacroMenuText()

static ON_wString CRhinoUiFile::MacroMenuText ( UUID  idFile,
UUID  idMacro,
unsigned int  locale 
)
static

Description: Call this method to get the menu item text associated with the specified macro. Parameters: idFile[in] Id of the file containing the macro. idMacro[in] Id of the specific macro to query. locale[in] Locale Id of the result string, will default to English if the locale is not specified in the RUI file. Returns: Returns the menu item text associated with the specified macro.

◆ MacroName()

static ON_wString CRhinoUiFile::MacroName ( UUID  idFile,
UUID  idMacro,
unsigned int  locale 
)
static

Description: Call this method to get the macro name. Parameters: idFile[in] Id of the file containing the macro. idMacro[in] Id of the specific macro to query. locale[in] Locale Id of the result string, will default to English if the locale is not specified in the RUI file. Returns: Returns the .

◆ MacroRunScript()

static void CRhinoUiFile::MacroRunScript ( UUID  idFile,
UUID  idMacro,
bool  fromMenu 
)
static

Description: Call this method to get the script associated with the specified macro. Parameters: idFile[in] Id of the file containing the macro. idMacro[in] Id of the specific macro to query. fromMenu[in] Set to true if the macro is being run as a result of a menu item click otherwise; set it to false. Returns: Returns the script associated with the specified macro.

◆ Macros()

static int CRhinoUiFile::Macros ( UUID  idFile,
unsigned int  locale,
ON_ClassArray< CRhinoUiMacroInfo > &  macros 
)
static

Description: Gets every macro in a file in one call, in the same order as MacroID(). Use this instead of MacroID(), MacroBitmapID(), MacroButtonText() and MacroToolTip() per macro when walking the whole macro table. Parameters: idFile[in] Id of the file containing the macros. locale[in] Locale Id of the result strings, will default to English if the locale is not specified in the RUI file. macros[out] Receives the macros; any previous contents are removed. Returns: Returns the number of macros.

◆ MacroScript()

static ON_wString CRhinoUiFile::MacroScript ( UUID  idFile,
UUID  idMacro 
)
static

Description: Call this method to get the script associated with the specified macro. Parameters: idFile[in] Id of the file containing the macro. idMacro[in] Id of the specific macro to query. Returns: Returns the script associated with the specified macro.

◆ MacroToolTip()

static ON_wString CRhinoUiFile::MacroToolTip ( UUID  idFile,
UUID  idMacro,
unsigned int  locale 
)
static

Description: Call this method to get the status bar help text associated with the specified macro. Parameters: idFile[in] Id of the file containing the macro. idMacro[in] Id of the specific macro to query. locale[in] Locale Id of the result string, will default to English if the locale is not specified in the RUI file. Returns: Returns the status bar help text associated with the specified macro.

◆ Png() [1/2]

static bool CRhinoUiFile::Png ( UUID  idFile,
UUID  idImage,
bool  darkMode,
int  size,
const ON_Color &  background,
ON_SimpleArray< unsigned char > &  png 
)
static

Description: Same as Png() above, with the image drawn on an opaque background, for callers whose images are shown on surfaces Rhino does not control. Parameters: background[in] Background color. ON_Color::UnsetColor keeps the image transparent.

◆ Png() [2/2]

static bool CRhinoUiFile::Png ( UUID  idFile,
UUID  idImage,
bool  darkMode,
int  size,
ON_SimpleArray< unsigned char > &  png 
)
static

Description: Call this method to get the image as PNG encoded bytes, rendered at the requested pixel size. This is the cross-platform counterpart to Bitmap(), whose HBITMAP is only available on Windows. Parameters: idFile[in] Id of the file containing the image. idImage[in] Id of the image (the same id returned by MacroBitmapID). darkMode[in] Set to true to render the dark-mode variant of the image. size[in] Requested width and height in pixels. Pass 0 for the default toolbar size. png[out] Receives the PNG encoded bytes. Emptied first. Returns: True if the image was found and rendered, false otherwise.

◆ SetToolBarBitmapSize()

static bool CRhinoUiFile::SetToolBarBitmapSize ( const ON_2iSize &  size)
static

◆ ShowSidebar()

static void CRhinoUiFile::ShowSidebar ( bool  mruSidebar,
bool  show 
)
static

Sidebar access methods.

◆ SidebarIsVisible()

static bool CRhinoUiFile::SidebarIsVisible ( bool  mruSidebar)
static

◆ Svg()

static ON_wString CRhinoUiFile::Svg ( UUID  idFile,
UUID  idImage,
bool  darkMode 
)
static

Description: Call this method to get the SVG string for the image with the specified id. Parameters: idFile[in] Id of the file containing the image. idImage[in] Id of the image (the same id returned by MacroBitmapID). darkMode[in] Set to true to get the dark-mode SVG. When the image only has a light SVG, its custom dark-mode attributes are applied to produce the result. Returns: Returns the SVG string for the image, or an empty string if the image was not found or has no SVG representation.

◆ TabBitmapSize()

static ON_2iSize CRhinoUiFile::TabBitmapSize ( )
static

◆ ToolBarBitmapSize()

static ON_2iSize CRhinoUiFile::ToolBarBitmapSize ( )
static

◆ ToolBarCount()

static int CRhinoUiFile::ToolBarCount ( UUID  idFile)
static

Toolbar tab access methods.

◆ ToolBarID()

static UUID CRhinoUiFile::ToolBarID ( UUID  idFile,
int  index 
)
static

◆ ToolBarName() [1/2]

static ON_wString CRhinoUiFile::ToolBarName ( UUID  idFile,
UUID  idToolBar 
)
static

◆ ToolBarName() [2/2]

static ON_wString CRhinoUiFile::ToolBarName ( UUID  idFile,
UUID  idToolBar,
unsigned int  locale 
)
static