Rhino C++ API  8.5
Public Member Functions | Protected Attributes | List of all members
CRhinoSelCommand Class Referenceabstract

#include <rhinoSdkCommand.h>

Inheritance diagram for CRhinoSelCommand:
CRhinoCommand CRhinoSelSubObjectCommand

Public Member Functions

 CRhinoSelCommand (const class CRhinoPlugIn *pPlugIn=nullptr, bool bTestCommand=false)
 
void BeQuiet (bool bQuiet)
 
CRhinoCommand::result RunCommand (const CRhinoCommandContext &)
 
virtual bool SelFilter (const CRhinoObject *)=0
 
void TestGrips (bool bTestGrips)
 
void TestLights (bool bTestLights)
 
- Public Member Functions inherited from CRhinoCommand
 CRhinoCommand (bool bTransparent=false, bool bDoNotRepeat=false, const class CRhinoPlugIn *pPlugIn=nullptr, bool bTestCommand=false)
 
virtual ~CRhinoCommand ()
 
const unsigned int & CommandFlags () const
 
UUID CommandId () const
 
virtual UUID CommandUUID ()=0
 !! See cmdExample.cpp for instructions on the use of this class. !! ///< More...
 
virtual bool ContextHelpURL (ON_wString &url) const
 
virtual void DoHelp ()
 Override this function to display help for this command. More...
 
virtual void DynamicDraw (class CRhinoView &)
 
virtual CRhinoObjectEditObjects (const class CRhinoHistoryRecord &history_record, ON_SimpleArray< CRhinoObjectPair > &results)
 
void EnableHistoryReplayOnObjectAttributeChange (bool bEnable=true)
 
void EnableRepeatable (BOOL32 bRepeatable=true)
 
void EnableUndo (bool bUndoable=true)
 
virtual const wchar_t * EnglishCommandName () const
 
virtual const wchar_t * EnglishCommandName ()=0
 
bool HistoryReplayOnObjectAttributeChange () const
 
bool IsAlphaCommand () const
 Returns true if a command is an "alpha" command. More...
 
bool IsRepeatable () const
 
bool IsScriptRunnerCommand () const
 
bool IsSystem () const
 
bool IsTestCommand () const
 
bool IsTransparent () const
 
bool IsUndoable () const
 
virtual void LoadProfile (LPCTSTR lpszSection, CRhinoProfileContext &pc)
 
virtual const wchar_t * LocalCommandName () const
 
const class CRhinoPlugInPlugIn () const
 
virtual CRhinoObjectReplayHistory (const class CRhinoHistoryRecord &history_record)
 
virtual bool ReplayHistory (const class CRhinoHistoryRecord &history_record, ON_SimpleArray< CRhinoObjectPair > &results)
 
virtual void SaveProfile (LPCTSTR lpszSection, CRhinoProfileContext &pc)
 
CRhinoSettingsSettings ()
 

Protected Attributes

bool m_bIgnoreGripsState
 
bool m_bIgnoreLayerLocking
 
bool m_bIgnoreLayerVisibility
 
bool m_bQuiet
 
bool m_bReserved0
 
bool m_bReserved1
 
bool m_bTestGrips
 
bool m_bTestLights
 
int m_reserved1
 
int m_reserved2
 
ON__UINT_PTR m_sdk_reserved = 0
 

Additional Inherited Members

- Public Types inherited from CRhinoCommand
enum  result {
  success = 0, cancel = 1, nothing = 2, failure,
  unknown_command, cancel_modeless_dialog, exit_rhino = 0x0FFFFFFF
}
 
- Static Public Member Functions inherited from CRhinoCommand
static bool IsValidCommandName (const wchar_t *)
 

Detailed Description

Description: For adding nestable selection commands that work like the native Rhino SelCrv command, derive your command from CRhinoSelCommand and override the virtual SelFilter function.

Constructor & Destructor Documentation

◆ CRhinoSelCommand()

CRhinoSelCommand::CRhinoSelCommand ( const class CRhinoPlugIn pPlugIn = nullptr,
bool  bTestCommand = false 
)

Member Function Documentation

◆ BeQuiet()

void CRhinoSelCommand::BeQuiet ( bool  bQuiet)

Description: By default, a summary message is printed in the command prompt that list the number and kind of objects that were selected. If you want to suppress this message, then call BeQuiet(true) in your constructor. Parameters: bQuiet - [in]

◆ RunCommand()

CRhinoCommand::result CRhinoSelCommand::RunCommand ( const CRhinoCommandContext )
virtual

Description: Do not need to override CRhinoSelCommand::RunCommand().

Implements CRhinoCommand.

Reimplemented in CRhinoSelSubObjectCommand.

◆ SelFilter()

virtual bool CRhinoSelCommand::SelFilter ( const CRhinoObject )
pure virtual

Description: Override this virtual function and Return true if object should be selected. Returns: true if the object should be selected.

◆ TestGrips()

void CRhinoSelCommand::TestGrips ( bool  bTestGrips)

Description: By default, grip objects are not passed to SelFilter(). If your command wants to be able to test grip objects for selection, then call TestGrips(true) in your constructor. Parameters: bTestGrips - [in]

◆ TestLights()

void CRhinoSelCommand::TestLights ( bool  bTestLights)

Description: By default, light objects are not passed to SelFilter(). If your command wants to be able to test light objects for selection, then call TestLights(true) in your constructor. Parameters: bTestLights - [in]

Member Data Documentation

◆ m_bIgnoreGripsState

bool CRhinoSelCommand::m_bIgnoreGripsState
protected

◆ m_bIgnoreLayerLocking

bool CRhinoSelCommand::m_bIgnoreLayerLocking
protected

◆ m_bIgnoreLayerVisibility

bool CRhinoSelCommand::m_bIgnoreLayerVisibility
protected

◆ m_bQuiet

bool CRhinoSelCommand::m_bQuiet
protected

◆ m_bReserved0

bool CRhinoSelCommand::m_bReserved0
protected

These fields are fur use after the SDK is frozen. The defaults are zero.

◆ m_bReserved1

bool CRhinoSelCommand::m_bReserved1
protected

◆ m_bTestGrips

bool CRhinoSelCommand::m_bTestGrips
protected

◆ m_bTestLights

bool CRhinoSelCommand::m_bTestLights
protected

◆ m_reserved1

int CRhinoSelCommand::m_reserved1
protected

◆ m_reserved2

int CRhinoSelCommand::m_reserved2
protected

◆ m_sdk_reserved

ON__UINT_PTR CRhinoSelCommand::m_sdk_reserved = 0
protected