Rhino C++ API  8.13
Protected Member Functions | List of all members
CRhRdkCustomTask Class Reference

#include <RhRdkTask.h>

Inheritance diagram for CRhRdkCustomTask:
CRhRdkTask CRhRdkExtension CRhRdkObject

Protected Member Functions

virtual bool Query (const IRhRdkTaskOrigin &origin, bool bOnItem) const override
 
virtual SubMenus SubMenu (void) const final override
 
- Protected Member Functions inherited from CRhRdkTask
void FullUndoString (const IRhRdkTaskOrigin &origin, ON_wString &sOut) const
 
virtual bool GetSureMessage (const IRhRdkTaskOrigin &origin, ON_wString &sMessageOut, ON_wString &sYesVerbOut, ON_wString &sNoVerbOut, ON_wString &sDontShowAgainIdOut) const
 
virtual void GetUndoString (const IRhRdkTaskOrigin &origin, ON_wString &sOut) const
 
virtual void SetSelection (const IRhRdkTaskOrigin &origin, const CRhRdkContentArray &aContent) const
 

Additional Inherited Members

- Public Types inherited from CRhRdkTask
enum  Result : unsigned int { Result::Success, Result::Failure, Result::Cancel }
 
enum  Separator : unsigned int { Separator::None, Separator::Before, Separator::After, Separator::Both }
 
enum  SubMenus { SubMenus::None, SubMenus::CreateNew, SubMenus::Thumbnails, SubMenus::PlugIn }
 
- Public Member Functions inherited from CRhRdkTask
 CRhRdkTask ()
 
virtual ~CRhRdkTask ()
 
Result Error (const wchar_t *wszMessage) const
 
virtual Result Execute (const IRhRdkTaskOrigin &origin) const =0
 
virtual bool IconIn (CRhRdkContent::Kinds kind, int width, int height, CRhinoDib &dibOut) const
 
virtual bool IconOut (CRhRdkContent::Kinds kind, int width, int height, CRhinoDib &dibOut) const
 
virtual UUID Id (void) const =0
 
virtual UUID InterfaceId (void) const final override
 
virtual bool IsEnabled (const IRhRdkTaskOrigin &origin) const =0
 
virtual bool IsForTopLevelContent (void) const
 
virtual int MenuOrder (const IRhRdkTaskOrigin &origin) const =0
 
virtual Separator MenuSeparators (void) const
 
virtual const wchar_t * MenuString (const IRhRdkTaskOrigin &origin, CRhRdkContent::Kinds kind) const =0
 
virtual UUID RenderEngineId (void) const
 
virtual void SetError (const wchar_t *wszMessage, RhRdkMbSeverity severity) const
 
virtual bool SupportsSandbox (void) const
 
virtual void Update (IRhRdkTaskUpdate &tu) const
 
virtual Result UserExecute (const IRhRdkTaskOrigin &origin) const
 
virtual void UserUpdate (IRhRdkTaskUpdate &tu) const
 
- 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)
 
- Static Public Member Functions inherited from CRhRdkTask
static void RequiredDataSources (OUT ON_SimpleArray< ON_UUID > &aId)
 
- Static Public Member Functions inherited from CRhRdkObject
static void CheckMemory (void)
 
static void PopulateDebuggingInfo (void)
 

Member Function Documentation

◆ Query()

virtual bool CRhRdkCustomTask::Query ( const IRhRdkTaskOrigin origin,
bool  bOnItem 
) const
overrideprotectedvirtual

Query if the task should be displayed to the user in a menu etc. The default implementation returns the result of calling origin.SupportsTask().

Parameters
originrepresents the UI that the menu was invoked in.
bOnItemis true if the user right-clicked on one or more items (thumbnail, tree node etc). It will be false if the menu was not a context menu, nothing was selected or the user right-clicked on a blank area of the UI. For content/sub-node controls, this is always true.
Returns
true if a UI element (e.g., a menu item) should be created for the task, else false.

Reimplemented from CRhRdkTask.

◆ SubMenu()

virtual SubMenus CRhRdkCustomTask::SubMenu ( void  ) const
finaloverrideprotectedvirtual
Returns
a value from the SubMenus enum which determines if the task can appear on a sub-menu, and which sub-menu it will appear on. The default is 'None'.

Reimplemented from CRhRdkTask.