#include <RhRdkContentEditorCustomButtonProvider.h>
|
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 |
|
| CRhRdkExtension () |
|
virtual | ~CRhRdkExtension () |
|
virtual UUID | PlugInId (void) const =0 |
|
bool | Unregister (void) |
|
| 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) |
|
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.
◆ Style
Enumerator |
---|
Simple | |
Flat | |
FlatPopup | |
◆ 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
-
iIndex | is the button index starting at zero and increasing with each call. |
kind | is the kind of content being displayed in the associated editor. |
dibOut | accepts the button's imagery (or 'icon'). If an icon is not required, do not set this parameter. |
sCaptionOut | accepts the button's caption. If a caption is not required, do not set this parameter. |
sToolTipOut | accepts the button's tool-tip. If a tool-tip is not required, do not set this parameter. |
iWidthOut | accepts the button's width. If you do not set this parameter, the width will be 23 pixels. |
iGapOut | accepts the gap after the button. If you do not set this parameter, the gap will be 2 pixels. |
colBackOut | is the button's background color. If a special color is not required, do not set this parameter. |
styleOut | specifies the button style. |
- See also
- enum class Style.
- Parameters
-
dwFlagsOut | is currently unused. |
reserved | is 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
-
index | is 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.