Rhino C++ API  8.11
Public Types | Public Member Functions | Public Attributes | List of all members
CRhinoCommandContext Class Reference

#include <rhinoSdkCommand.h>

Public Types

enum  COMMAND_STYLE { interactive_ui = 0, script_ui = 1, batch_ui = 2, force_32bit_size = 0xFFFFFFFF }
 

Public Member Functions

 CRhinoCommandContext (const unsigned int rhino_doc_sn)
 
 CRhinoCommandContext (CRhinoDoc &)
 
 ~CRhinoCommandContext ()=default
 
CRhinoDocDocument () const
 Check for null return. More...
 
bool IsInteractive () const
 

Public Attributes

CRhinoDocm_doc
 The CRhinoCommandContext::m_doc field will be deleted ASAP. More...
 
const unsigned int m_rhino_doc_sn
 Document command is using. More...
 
enum CRhinoCommandContext::COMMAND_STYLE m_style
 

Member Enumeration Documentation

◆ COMMAND_STYLE

m_style determines what kind of user interface (ui) the command can use and how serious errors should be reported.

interative_ui: Can use dialogs for input. Must use message boxes to report serious error conditions.

script_ui: All input must come from command line, GetPoint, GetObject, GetString, etc. Must use message boxes to report serious error conditions. Script mode gets used when a command is run with a hyphen (-) prefix.

batch_ui: All input must come from command line, GetPoint, GetObject, GetString, etc. Must use RhinoApp().Print() to report serious error conditions. NO dialog boxes are permitted. Batch mode is enabled by calling the Rhino BatchModeOn command in a command script.

Enumerator
interactive_ui 
script_ui 
batch_ui 
force_32bit_size 

Constructor & Destructor Documentation

◆ CRhinoCommandContext() [1/2]

CRhinoCommandContext::CRhinoCommandContext ( CRhinoDoc )

◆ CRhinoCommandContext() [2/2]

CRhinoCommandContext::CRhinoCommandContext ( const unsigned int  rhino_doc_sn)

◆ ~CRhinoCommandContext()

CRhinoCommandContext::~CRhinoCommandContext ( )
default

Member Function Documentation

◆ Document()

CRhinoDoc* CRhinoCommandContext::Document ( ) const

Check for null return.

◆ IsInteractive()

bool CRhinoCommandContext::IsInteractive ( ) const

Description: Tests if the command is being run in interactive mode

Returns: @untitled table true: Command is running in interactive mode. Commands are allowed to display dialog boxes for user input when running in interactive mode.

false: Command is not running in interactive mode. Commands should get user input using command-line options, and should never display dialog boxes or other non-scriptable UI elements. The user indicates non-interactive mode by preceeding the command name with a "-" (eg. "-Layer") on the command line.

Member Data Documentation

◆ m_doc

CRhinoDoc& CRhinoCommandContext::m_doc

The CRhinoCommandContext::m_doc field will be deleted ASAP.

◆ m_rhino_doc_sn

const unsigned int CRhinoCommandContext::m_rhino_doc_sn

Document command is using.

◆ m_style

enum CRhinoCommandContext::COMMAND_STYLE CRhinoCommandContext::m_style