Rhino C++ API  8.14
Public Types | Public Member Functions | List of all members
IRhRdkAutomaticUI Class Referenceabstract

#include <RhRdkAutomaticUI.h>

Public Types

enum  : unsigned int { Generic = 0x0000, ForContent = 0x0001 }
 
enum  Styles : unsigned int { Styles::Plain, Styles::Flat, Styles::Sunken, Styles::Table }
 

Public Member Functions

virtual ~IRhRdkAutomaticUI ()
 
virtual void AddSection (CRhRdkControllerPtr con, unsigned int flags, int id, const wchar_t *local_caption, const wchar_t *english_caption, bool bExpand, IRhRdkHeaderButtonHandler *pHBH=nullptr)=0
 
virtual RDK_DEPRECATED void AddSection (int, IRhRdkParamTransport *, bool, bool, IRhRdkHeaderButtonHandler *=nullptr)
 
virtual_su void AddSection (IRhRdkParamTransportEx &param_transport, const UUID &plug_in_id, unsigned int flags, int section_id, const wchar_t *local_caption, const wchar_t *english_caption, IRhRdkHeaderButtonHandler *hb_handler=nullptr)
 
virtual void DisplayData (void)=0
 
virtual void * EVF (const wchar_t *, void *)=0
 
virtual IRhinoUiHolderHolder (void) const =0
 
virtual bool IsSectionExpanded (const UUID &uuidSection) const =0
 
virtual bool IsSectionExpanded (int id) const =0
 
virtual bool IsSectionHidden (int id) const =0
 
virtual void Move (const ON_4iRect &rect, bool bRepaint=true)=0
 
virtual void RemoveAllSections (void)=0
 
virtual int SectionCount (void) const =0
 
virtual bool SectionExists (int id) const =0
 
virtual void SetBackgroundColor (COLORREF col) const =0
 
virtual void SetSectionExpanded (const UUID &uuidSection, bool bExpanded, bool bEnsureVisible) const =0
 
virtual void SetSectionExpanded (int id, bool bExpanded, bool bEnsureVisible) const =0
 
virtual bool SetSectionHidden (int id, bool bHidden)=0
 
virtual void SetTextWhenBlank (const wchar_t *wszText)=0
 

Detailed Description

This interface allows you to use RDK's automatic user interface services from your RDK plug-in.

Call RhRdkNewAutomaticUI() to get a pointer to this interface. It represents the main user interface window. This window is the holder for any number of sections which can be added by calling AddSection(). Non-automatic sections can be added by calling Holder() and using the returned interface.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : unsigned int
Enumerator
Generic 
ForContent 

◆ Styles

enum IRhRdkAutomaticUI::Styles : unsigned int
strong

Auto UI styles.

See also
RhRdkNewAutomaticUI().
Enumerator
Plain 
Flat 
Sunken 
Table 

Constructor & Destructor Documentation

◆ ~IRhRdkAutomaticUI()

virtual IRhRdkAutomaticUI::~IRhRdkAutomaticUI ( )
inlinevirtual

Member Function Documentation

◆ AddSection() [1/3]

virtual void IRhRdkAutomaticUI::AddSection ( CRhRdkControllerPtr  con,
unsigned int  flags,
int  id,
const wchar_t *  local_caption,
const wchar_t *  english_caption,
bool  bExpand,
IRhRdkHeaderButtonHandler pHBH = nullptr 
)
pure virtual

◆ AddSection() [2/3]

virtual RDK_DEPRECATED void IRhRdkAutomaticUI::AddSection ( int  ,
IRhRdkParamTransport ,
bool  ,
bool  ,
IRhRdkHeaderButtonHandler = nullptr 
)
virtual

This method is deprecated in favor of the one below. NOT IMPLEMENTED.

◆ AddSection() [3/3]

virtual_su void IRhRdkAutomaticUI::AddSection ( IRhRdkParamTransportEx param_transport,
const UUID &  plug_in_id,
unsigned int  flags,
int  section_id,
const wchar_t *  local_caption,
const wchar_t *  english_caption,
IRhRdkHeaderButtonHandler hb_handler = nullptr 
)

Add an automatic parameter section to the UI.

Parameters
ptis a parameter transport. Pass your implementation of IRhRdkParamTransportEx.
plug_in_idis your plug-in's unique id.
flagsspecifies flags from the enum above.
idis a caller-defined identifier.
local_captionis the localized caption of the section.
english_captionis the English caption of the section.
hb_handleris an optional handler for header buttons. The RDK takes ownership of the handler.
Note
hb_handler can only be used for XP-Style sections.

◆ DisplayData()

virtual void IRhRdkAutomaticUI::DisplayData ( void  )
pure virtual

Calls DisplayData() on all the UI sections.

◆ EVF()

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

Emergency virtual function for future expansion.

◆ Holder()

virtual IRhinoUiHolder* IRhRdkAutomaticUI::Holder ( void  ) const
pure virtual

Get the section holder. Only works for XP-Style sections.

Returns
A pointer to the holder or null if the UI is 'Plain'.

◆ IsSectionExpanded() [1/2]

virtual bool IRhRdkAutomaticUI::IsSectionExpanded ( const UUID &  uuidSection) const
pure virtual
Returns
true if section is expanded, else false.
Parameters
uuidSectionis the identifier of the section to check.

◆ IsSectionExpanded() [2/2]

virtual bool IRhRdkAutomaticUI::IsSectionExpanded ( int  id) const
pure virtual
Returns
true if section is expanded, else false.
Parameters
idis the caller-defined identifier of the automatic section to check.
Note
This only works for automatic sections.

◆ IsSectionHidden()

virtual bool IRhRdkAutomaticUI::IsSectionHidden ( int  id) const
pure virtual
Returns
true if an automatic section is hidden, else false.
See also
SetSectionHidden()
Parameters
idis the caller-defined identifier of the automatic section to check.
Note
This only works for automatic sections.

◆ Move()

virtual void IRhRdkAutomaticUI::Move ( const ON_4iRect rect,
bool  bRepaint = true 
)
pure virtual

Move the UI's window.

Parameters
rectis the rect to move to in client coordinates of the parent window.

◆ RemoveAllSections()

virtual void IRhRdkAutomaticUI::RemoveAllSections ( void  )
pure virtual

Remove all the sections from the UI.

◆ SectionCount()

virtual int IRhRdkAutomaticUI::SectionCount ( void  ) const
pure virtual
Returns
The number of sections in the UI.
Note
The implementation of this method uses an iterator and is therefore 'slow'.

◆ SectionExists()

virtual bool IRhRdkAutomaticUI::SectionExists ( int  id) const
pure virtual
Returns
true if section exists, else false.
Parameters
idis the caller-defined identifier of the automatic section to check.
Note
This only works for automatic sections.

◆ SetBackgroundColor()

virtual void IRhRdkAutomaticUI::SetBackgroundColor ( COLORREF  col) const
pure virtual

Set the background color of the entire UI. Has no effect on XP style sections.

◆ SetSectionExpanded() [1/2]

virtual void IRhRdkAutomaticUI::SetSectionExpanded ( const UUID &  uuidSection,
bool  bExpanded,
bool  bEnsureVisible 
) const
pure virtual

Sets a section as expanded or collapsed.

Parameters
uuidSectionis the identifier of the section to change.
Note
This only works for automatic sections.

◆ SetSectionExpanded() [2/2]

virtual void IRhRdkAutomaticUI::SetSectionExpanded ( int  id,
bool  bExpanded,
bool  bEnsureVisible 
) const
pure virtual

Sets a section as expanded or collapsed.

Parameters
idis the caller-defined identifier of the automatic section to change.
Note
This only works for automatic sections.

◆ SetSectionHidden()

virtual bool IRhRdkAutomaticUI::SetSectionHidden ( int  id,
bool  bHidden 
)
pure virtual

Set an automatic section as hidden.

Parameters
idis the caller-defined identifier of the automatic section to set.
bHiddenis true to hide the section, else false.
Note
This only works for automatic sections. It can be called even before the section is created to ensure that the section controls will not be created before they are really needed.
Returns
true if successful, else false.

◆ SetTextWhenBlank()

virtual void IRhRdkAutomaticUI::SetTextWhenBlank ( const wchar_t *  wszText)
pure virtual

Set the text to display when the UI is blank.