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

#include <IRhRdkSectionHolder.h>

Inheritance diagram for IRhinoUiSection:
IRhinoUiWithController IRhinoUiWindow IRhinoUiControllerEventWatcher

Public Types

enum  : unsigned int { updv_DisplayData = 0x0001, updv_EnableDisable = 0x0002, updv_UpdateLayout = 0x0004 }
 

Public Member Functions

virtual CRhinoCommandOptionName CommandOptionName (void) const =0
 
virtual bool EnableHeaderButton (int index, bool bEnable)=0
 
virtual ON_Color GetBackgroundColor (void) const =0
 
virtual int GetHeight (void) const =0
 
virtual bool IsCollapsible (void) const =0
 
virtual bool IsHidden (void) const =0
 
virtual bool IsInitiallyExpanded (void) const =0
 
virtual IRhRdkHeaderButtonHandlerNewHeaderButtonHandler (void)=0
 
virtual void OnAttachedToHolder (IRhinoUiHolder &h)=0
 
virtual void OnAttachingToHolder (IRhinoUiHolder &h)=0
 
virtual void OnDetachedFromHolder (IRhinoUiHolder &h)=0
 
virtual void OnDetachingFromHolder (IRhinoUiHolder &h)=0
 
virtual void OnExpandSection (bool bExpanding)=0
 
virtual UUID PlugInId (void) const =0
 
virtual CRhinoCommand::result RunScript (CRhRdkControllerPtr con)=0
 
virtual void SetBackgroundColor (const ON_Color &col)=0
 
virtual ON_wString SettingsTag (void) const =0
 
virtual bool ShowHeaderButton (int index, bool bShow)=0
 
virtual void UpdateView (unsigned int flags)=0
 
virtual UUID Uuid (void) const =0
 
- Public Member Functions inherited from IRhinoUiWithController
virtual std::shared_ptr< IRhinoUiControllerController (void) const =0
 
virtual ON_UUID ControllerId (void) const =0
 
virtual void SetController (std::shared_ptr< IRhinoUiController > con)=0
 
- Public Member Functions inherited from IRhinoUiWindow
virtual ON_wString Caption (bool bAlwaysEnglish=false) const =0
 
virtual void Delete (void)=0
 
virtual void Enable (bool bEnable)=0
 
virtual void * EVF (const wchar_t *wszFunc, void *pvData)=0
 
virtual void GetScreenCoords (ON_4iRect &rectOut) const =0
 
virtual HWND GetWindow (void)=0
 
virtual bool IsCreated (void) const =0
 
virtual bool IsEnabled (void) const =0
 
virtual bool IsShown (void) const =0
 
virtual void Move (const ON_4iRect &rect, bool bRepaint=false, bool bRepaintBorder=false)=0
 
virtual HWND Parent (void) const =0
 
virtual void Refresh (bool bImmediate=false)=0
 
virtual void SetFocus (void)=0
 
virtual void SetParent (HWND parent)=0
 
virtual void Show (bool bShow)=0
 
- Public Member Functions inherited from IRhinoUiControllerEventWatcher
virtual void * EVF (const wchar_t *wszFunc, void *pvData)=0
 
virtual void OnControllerActivatedEvent (IRhinoUiController &con)=0
 
virtual void OnEvent (IRhinoUiController &con, const UUID &uuidData, IRhinoUiController::EventPriority ep, const IRhinoUiEventInfo *pInfo)=0
 

Protected Member Functions

virtual ~IRhinoUiSection ()
 
- Protected Member Functions inherited from IRhinoUiWithController
virtual ~IRhinoUiWithController ()
 
- Protected Member Functions inherited from IRhinoUiWindow
virtual ~IRhinoUiWindow ()
 
- Protected Member Functions inherited from IRhinoUiControllerEventWatcher
virtual ~IRhinoUiControllerEventWatcher ()
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : unsigned int
Enumerator
updv_DisplayData 
updv_EnableDisable 
updv_UpdateLayout 

Constructor & Destructor Documentation

◆ ~IRhinoUiSection()

virtual IRhinoUiSection::~IRhinoUiSection ( )
inlineprotectedvirtual

Member Function Documentation

◆ CommandOptionName()

virtual CRhinoCommandOptionName IRhinoUiSection::CommandOptionName ( void  ) const
pure virtual

Implement this method to return the command option name for scripting. Used by Sun and RenderSettings sections. Should return L"" if no-scripting support.

◆ EnableHeaderButton()

virtual bool IRhinoUiSection::EnableHeaderButton ( int  index,
bool  bEnable 
)
pure virtual

Enable or disable a header button.

Parameters
indexis the index of the button.
bEnableis the enable state.

◆ GetBackgroundColor()

virtual ON_Color IRhinoUiSection::GetBackgroundColor ( void  ) const
pure virtual
Returns
the background color of the section.

◆ GetHeight()

virtual int IRhinoUiSection::GetHeight ( void  ) const
pure virtual
Returns
the height of the section in pixels. This is usually the same as the default height but can be overridden to enable variable-height sections.
Note
This method is called continuously by the holder and should be implemented to be as fast as possible.

◆ IsCollapsible()

virtual bool IRhinoUiSection::IsCollapsible ( void  ) const
pure virtual

If this method returns false, the holder will not allow the user to collapse the section.

Returns
true if the section is collapsible, else false.

◆ IsHidden()

virtual bool IRhinoUiSection::IsHidden ( void  ) const
pure virtual
Returns
true if the section should be hidden, else false.
Note
This is not to be confused with IRhinoUiWindow::IsShown(). IsHidden() tells the holder whether or not to completely hide the section and its header. IsShown() reports the current visible state of the section window which is invisible even if the section is only collapsed.
This method is called continuously by the holder and should be implemented to be as fast as possible.

◆ IsInitiallyExpanded()

virtual bool IRhinoUiSection::IsInitiallyExpanded ( void  ) const
pure virtual
Returns
true if the section is initially expanded. This is used to determine the section's default expanded state. Thereafter, the expanded state is remembered by the RDK in the persistent settings.

◆ NewHeaderButtonHandler()

virtual IRhRdkHeaderButtonHandler* IRhinoUiSection::NewHeaderButtonHandler ( void  )
pure virtual

If you want to create buttons on the header, you should override this method to return a pointer to a new instance of an object that implements IRhRdkHeaderButtonHandler.

Note
RDK takes ownership of this object. If you previously multiple-inherited your section from IRhRdkHeaderButtonHandler, you must change your code so that your header button handler is an independent lightweight object.
See also
IRhRdkHeaderButtonHandler

◆ OnAttachedToHolder()

virtual void IRhinoUiSection::OnAttachedToHolder ( IRhinoUiHolder h)
pure virtual

Optionally implement this method to handle just after the section is attached to a holder. If you don't want to handle this, just implement the method to do nothing.

◆ OnAttachingToHolder()

virtual void IRhinoUiSection::OnAttachingToHolder ( IRhinoUiHolder h)
pure virtual

Optionally implement this method to handle just before the section is attached to a holder. If you don't want to handle this, just implement the method to do nothing.

◆ OnDetachedFromHolder()

virtual void IRhinoUiSection::OnDetachedFromHolder ( IRhinoUiHolder h)
pure virtual

Optionally implement this method to handle just after the section is detached from a holder. If you don't want to handle this, just implement the method to do nothing.

◆ OnDetachingFromHolder()

virtual void IRhinoUiSection::OnDetachingFromHolder ( IRhinoUiHolder h)
pure virtual

Optionally implement this method to handle just before the section is detached from a holder. If you don't want to handle this, just implement the method to do nothing.

◆ OnExpandSection()

virtual void IRhinoUiSection::OnExpandSection ( bool  bExpanding)
pure virtual

Optionally implement this method to handle when the section is expanded or closed-up. This happens when the user clicks the section header. If you don't want to handle this, just implement the method to do nothing.

◆ PlugInId()

virtual UUID IRhinoUiSection::PlugInId ( void  ) const
pure virtual

Implement this method to return your plug-in id. Determines visibility for Sun and RenderSettings sections based on the current renderer.

◆ RunScript()

virtual CRhinoCommand::result IRhinoUiSection::RunScript ( CRhRdkControllerPtr  con)
pure virtual

Implement this method to do scripting.

Parameters
conis the controller to use to get and set your data items. Used by Sun and RenderSettings sections.

◆ SetBackgroundColor()

virtual void IRhinoUiSection::SetBackgroundColor ( const ON_Color col)
pure virtual

OBSOLETE. Always uses Rhino compliant colors.

◆ SettingsTag()

virtual ON_wString IRhinoUiSection::SettingsTag ( void  ) const
pure virtual

Implement this method to return a unique string used to identify the section when loading and saving the section's state. This can usually be implemented to return a string version of the section's Uuid() unless something special is needed.

◆ ShowHeaderButton()

virtual bool IRhinoUiSection::ShowHeaderButton ( int  index,
bool  bShow 
)
pure virtual

Show or hide a header button.

Parameters
indexis the index of the button.
bShowis the show state.

◆ UpdateView()

virtual void IRhinoUiSection::UpdateView ( unsigned int  flags)
pure virtual

Updates the 'view' of the section according to the specified flags.

Parameters
flagsspecifies what to update. See the enum above.

◆ Uuid()

virtual UUID IRhinoUiSection::Uuid ( void  ) const
pure virtual

Implement this method to return the section's unique identifier.