Rhino C++ API  8.7
Public Member Functions | List of all members
IRhRdkHeaderButtonHandler Class Referenceabstract

#include <IRhRdkHeaderButtonHandler.h>

Public Member Functions

virtual ~IRhRdkHeaderButtonHandler ()
 
virtual bool ButtonDetails (int index, CRhinoDib &iconOut, ON_wString &sToolTipOut) const =0
 
virtual ON_4iRect ButtonRect (int index, const ON_4iRect &rectHeader) const =0
 
virtual void DeleteThis (void)=0
 
virtual void * EVF (const wchar_t *, void *)=0
 
virtual bool OnButtonClicked (int index)=0
 

Detailed Description

This interface represents a handler for putting custom buttons on the header of IRhinoUiSection.

See also
IRhinoUiSection::HeaderButtonHandler().

Constructor & Destructor Documentation

◆ ~IRhRdkHeaderButtonHandler()

virtual IRhRdkHeaderButtonHandler::~IRhRdkHeaderButtonHandler ( )
inlinevirtual

Member Function Documentation

◆ ButtonDetails()

virtual bool IRhRdkHeaderButtonHandler::ButtonDetails ( int  index,
CRhinoDib iconOut,
ON_wString sToolTipOut 
) const
pure virtual

Implement this method to describe custom buttons on the section header. RDK calls this method continually increasing iIndex until it returns false.

Parameters
indexis the button index starting at zero and increasing with each call.
iconOutaccepts the button's imagery, or 'icon'. If an icon 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.
Returns
true if button is required, false to stop.

◆ ButtonRect()

virtual ON_4iRect IRhRdkHeaderButtonHandler::ButtonRect ( int  index,
const ON_4iRect rectHeader 
) const
pure virtual

Implement this method to get the rectangle of a button on the header window.

Parameters
indexis the index of the button.
rectHeaderis the usable area of the header where the buttons can be placed.
Returns
The rectangle of the button.

◆ DeleteThis()

virtual void IRhRdkHeaderButtonHandler::DeleteThis ( void  )
pure virtual

You must implement this method as

delete this;

◆ EVF()

virtual void* IRhRdkHeaderButtonHandler::EVF ( const wchar_t *  ,
void *   
)
pure virtual

Emergency virtual function for future expansion.

◆ OnButtonClicked()

virtual bool IRhRdkHeaderButtonHandler::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.