Rhino C++ API  8.6
Public Member Functions | List of all members
CRhRdkCustomRenderFrameToolBar Class Referenceabstract

#include <RhRdkContentEditorCustomButtonProvider.h>

Inheritance diagram for CRhRdkCustomRenderFrameToolBar:
CRhRdkExtension CRhRdkObject

Public Member Functions

virtual int ButtonCount (void) const =0
 
virtual const wchar_t * Caption (void) const =0
 
virtual CRhRdkCustomRenderFrameToolBarClone (void) const =0
 
virtual bool GetGrayBitmap (CRhinoDib &dibOut)=0
 
virtual bool GetHotBitmap (CRhinoDib &dibOut)=0
 
virtual const wchar_t * GetMessageString (UINT_PTR nID) const =0
 
virtual bool GetNormalBitmap (CRhinoDib &dibOut)=0
 
virtual bool GetPressedBitmap (CRhinoDib &dibOut)=0
 
virtual const wchar_t * GetToolTipText (UINT_PTR nID) const =0
 
virtual UUID InterfaceId (void) const final override
 
virtual bool IsSeparator (int iIndex) const =0
 
virtual bool OnCommand (UINT_PTR nID)=0
 
virtual void OnUpdateCommandUI (IRhRdkCommandUpdate &cu) const =0
 
virtual UUID RenderEngineID (void) const =0
 
virtual void SetFirstCommandId (UINT_PTR nID)=0
 
virtual void SetRenderSessionId (const UUID &uuidRenderSession)=0
 
virtual RDK_DEPRECATED void SetRenderWindow (class IRhRdkRenderWindow *)
 
virtual UUID ToolBarID (void) const =0
 
- Public Member Functions inherited from CRhRdkExtension
 CRhRdkExtension ()
 
virtual ~CRhRdkExtension ()
 
virtual UUID PlugInId (void) const =0
 
bool Unregister (void)
 
- Public Member Functions inherited from CRhRdkObject
 CRhRdkObject ()
 
virtual ~CRhRdkObject ()
 
virtual void * EVF (const wchar_t *wszFunc, void *pvData)
 
void operator delete (void *buf)
 
void operator delete[] (void *buf)
 
void * operator new (size_t size)
 
void * operator new[] (size_t size)
 

Additional Inherited Members

- Static Public Member Functions inherited from CRhRdkObject
static void CheckMemory (void)
 
static void PopulateDebuggingInfo (void)
 

Detailed Description

This interface allows a client to add custom tool bars to the render frame.

The custom tool bar system is based on the MFC tool bars and uses the same bitmap format. The image for each button is 24 by 24 pixels, and the bitmap is a 'strip' of images. This strip is 24 pixels high and its width must be 24 times the number of buttons on the tool bar. This is the same as the value you return from ButtonCount() minus any separators. There can be up to four bitmaps for each tool bar, one for each of normal, hot, pressed and gray.

Member Function Documentation

◆ ButtonCount()

virtual int CRhRdkCustomRenderFrameToolBar::ButtonCount ( void  ) const
pure virtual

Implement this method to return the number of buttons you need on the tool bar.

Returns
The number of buttons, including separators.
Note
Separators are not included in the tool bar's bitmap.

◆ Caption()

virtual const wchar_t* CRhRdkCustomRenderFrameToolBar::Caption ( void  ) const
pure virtual

Implement this method to return the tool bar's caption.

Returns
The caption that appears when the tool bar is floating.

◆ Clone()

virtual CRhRdkCustomRenderFrameToolBar* CRhRdkCustomRenderFrameToolBar::Clone ( void  ) const
pure virtual

Implement this method to return a clone of the tool bar. The tool bars that are registered by CRhRdkPlugIn::RegisterCustomPlugIns() are only prototypes. Each render frame clones the prototypes to create per-frame tool bars.

◆ GetGrayBitmap()

virtual bool CRhRdkCustomRenderFrameToolBar::GetGrayBitmap ( CRhinoDib dibOut)
pure virtual

Implement this method to return the tool bar's gray (disabled) bitmap. This is the bitmap of images used for buttons that are disabled (grayed-out).

Parameters
dibOutaccepts the bitmap. The width of the bitmap must be 24 times the number of buttons. The height must be 24 pixels and the bit depth can be anything up to 24 bits.
Returns
The true if successful, else false.

◆ GetHotBitmap()

virtual bool CRhRdkCustomRenderFrameToolBar::GetHotBitmap ( CRhinoDib dibOut)
pure virtual

Implement this method to return the tool bar's hot (hover) bitmap. This is the bitmap of images used for buttons that are pressed or being hovered over.

Parameters
dibOutaccepts the bitmap. The width of the bitmap must be 24 times the number of buttons. The height must be 24 pixels and the bit depth can be anything up to 24 bits.
Returns
The true if successful, else false.

◆ GetMessageString()

virtual const wchar_t* CRhRdkCustomRenderFrameToolBar::GetMessageString ( UINT_PTR  nID) const
pure virtual

Implement this method to return a hint string for a command. This string is typically displayed on the status bar when the user hovers over a tool button. If you do not recognise the command id, return NULL.

Parameters
nIDis the command id of the command for which a string is required.
Returns
The status bar message for the tool button that executes the given command.

◆ GetNormalBitmap()

virtual bool CRhRdkCustomRenderFrameToolBar::GetNormalBitmap ( CRhinoDib dibOut)
pure virtual

Implement this method to return the tool bar's normal bitmap. This is the bitmap of images used for buttons that are not pressed or being hovered over.

Parameters
dibOutaccepts the bitmap. The width of the bitmap must be 24 times the number of buttons. The height must be 24 pixels and the bit depth can be anything up to 24 bits.
Returns
The true if successful, else false.

◆ GetPressedBitmap()

virtual bool CRhRdkCustomRenderFrameToolBar::GetPressedBitmap ( CRhinoDib dibOut)
pure virtual

Implement this method to return the tool bar's pressed bitmap. This is the bitmap of images used for buttons that are pressed.

Parameters
dibOutaccepts the bitmap. The width of the bitmap must be 24 times the number of buttons. The height must be 24 pixels and the bit depth can be anything up to 24 bits.
Returns
The true if successful, else false.

◆ GetToolTipText()

virtual const wchar_t* CRhRdkCustomRenderFrameToolBar::GetToolTipText ( UINT_PTR  nID) const
pure virtual

Implement this method to return a tool tip string for a command. If you do not recognise the command id, return NULL.

Parameters
nIDis the command id of the command for which a string is required.
Returns
The tool-tip for the tool button that executes the given command.

◆ InterfaceId()

virtual UUID CRhRdkCustomRenderFrameToolBar::InterfaceId ( void  ) const
finaloverridevirtual

Returns the unique interface id of this extension.

Implements CRhRdkExtension.

◆ IsSeparator()

virtual bool CRhRdkCustomRenderFrameToolBar::IsSeparator ( int  iIndex) const
pure virtual

Implement this method to specify if the tool button at a given index is a separator.

Parameters
iIndexis the index of the button which goes from zero to ButtonCount()-1.
Returns
true if the button is a separator, else false.

◆ OnCommand()

virtual bool CRhRdkCustomRenderFrameToolBar::OnCommand ( UINT_PTR  nID)
pure virtual

Implement this method to execute a tool bar command.

Parameters
nIDis the command id of the command to execute.
Returns
true if successful, else false.

◆ OnUpdateCommandUI()

virtual void CRhRdkCustomRenderFrameToolBar::OnUpdateCommandUI ( IRhRdkCommandUpdate cu) const
pure virtual

Implement this method to update a tool bar button.

◆ RenderEngineID()

virtual UUID CRhRdkCustomRenderFrameToolBar::RenderEngineID ( void  ) const
pure virtual

Implement this method to return your render engine's id.

Returns
The unique identifier of your render engine.

◆ SetFirstCommandId()

virtual void CRhRdkCustomRenderFrameToolBar::SetFirstCommandId ( UINT_PTR  nID)
pure virtual

RDK assigns a range of contiguous command ids to the tool buttons and then notifies the tool bar of the first command id. Implement this method to store this first id. You can then use it as a base in OnCommand() and OnUpdateCommandUI().

Parameters
nIDis the command id of the first command on this tool bar.

◆ SetRenderSessionId()

virtual void CRhRdkCustomRenderFrameToolBar::SetRenderSessionId ( const UUID &  uuidRenderSession)
pure virtual

Implement this to store the render session id.

◆ SetRenderWindow()

virtual RDK_DEPRECATED void CRhRdkCustomRenderFrameToolBar::SetRenderWindow ( class IRhRdkRenderWindow )
inlinevirtual

OBSOLETE Never called.

◆ ToolBarID()

virtual UUID CRhRdkCustomRenderFrameToolBar::ToolBarID ( void  ) const
pure virtual

Implement this method to return the tool bar's id.

Returns
The unique identifier of this tool bar.