Rhino C++ API  8.13
Public Types | Public Member Functions | List of all members
CRhRdkContentEditorCustomButtonProvider Class Referenceabstract

#include <RhRdkContentEditorCustomButtonProvider.h>

Inheritance diagram for CRhRdkContentEditorCustomButtonProvider:
CRhRdkExtension CRhRdkObject

Public Types

enum  Style : unsigned int { Style::Simple = 0, Style::Flat = 1, Style::FlatPopup = 2 }
 

Public Member Functions

virtual bool ButtonDetails (int iIndex, CRhRdkContent::Kinds kind, CRhinoDib &dibOut, ON_wString &sCaptionOut, ON_wString &sToolTipOut, int &iWidthOut, int &iGapOut, COLORREF &colBackOut, Style &styleOut, DWORD &dwFlagsOut, DWORD_PTR reserved) const =0
 
virtual int ButtonHeight (void) const =0
 
virtual UUID InterfaceId (void) const final override
 
virtual int LeftMargin (void) const =0
 
virtual bool OnButtonClicked (int index)=0
 
virtual UUID RenderEngineID (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 class allows a client to add custom buttons to the bottom of content editor windows. You can implement the abstract interface to provide custom buttons on the content editors.

Note
This class replaces IRhRdkContentBrowserDockBarButtonInterface in Rhino 5 and IRhRdkContentEditorCustomButtonInterface in earlier versions of Rhino 6 WIP.

Member Enumeration Documentation

◆ Style

Enumerator
Simple 
Flat 
FlatPopup 

Member Function Documentation

◆ ButtonDetails()

virtual bool CRhRdkContentEditorCustomButtonProvider::ButtonDetails ( int  iIndex,
CRhRdkContent::Kinds  kind,
CRhinoDib dibOut,
ON_wString sCaptionOut,
ON_wString sToolTipOut,
int &  iWidthOut,
int &  iGapOut,
COLORREF &  colBackOut,
Style styleOut,
DWORD &  dwFlagsOut,
DWORD_PTR  reserved 
) const
pure virtual

Implement this method to describe your custom buttons. For each content kind, RDK sets iIndex to zero and calls this method continually increasing iIndex until it returns false.

Parameters
iIndexis the button index starting at zero and increasing with each call.
kindis the kind of content being displayed in the associated editor.
dibOutaccepts the button's imagery (or 'icon'). If an icon is not required, do not set this parameter.
sCaptionOutaccepts the button's caption. If a caption is not required, do not set this parameter.
sToolTipOutaccepts the button's tool-tip. If a tool-tip is not required, do not set this parameter.
iWidthOutaccepts the button's width. If you do not set this parameter, the width will be 23 pixels.
iGapOutaccepts the gap after the button. If you do not set this parameter, the gap will be 2 pixels.
colBackOutis the button's background color. If a special color is not required, do not set this parameter.
styleOutspecifies the button style.
See also
enum class Style.
Parameters
dwFlagsOutis currently unused.
reservedis reserved for future use.
Returns
true if button is required, false to stop.

◆ ButtonHeight()

virtual int CRhRdkContentEditorCustomButtonProvider::ButtonHeight ( void  ) const
pure virtual

Implement this method to return the height of your custom buttons.

◆ InterfaceId()

virtual UUID CRhRdkContentEditorCustomButtonProvider::InterfaceId ( void  ) const
finaloverridevirtual

Returns the unique interface id of this extension.

Implements CRhRdkExtension.

◆ LeftMargin()

virtual int CRhRdkContentEditorCustomButtonProvider::LeftMargin ( void  ) const
pure virtual

Implement this method to return the left margin before the first button.

◆ OnButtonClicked()

virtual bool CRhRdkContentEditorCustomButtonProvider::OnButtonClicked ( int  index)
pure virtual

Implement this method to handle a button click.

Parameters
indexis the index of the button that was clicked.
Returns
true if handled successfully, else false.

◆ RenderEngineID()

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

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