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

#include <rhinoSdkCommandOption.h>

Public Types

enum  COMMAND_OPTION_TYPE {
  simple_option = 0, number_option = 1, toggle_option = 2, color_option = 3,
  list_option = 4, hidden_option = 5, force_32bit_enum = 0xFFFFFFFF
}
 

Public Member Functions

 CRhinoCommandOption ()
 
 CRhinoCommandOption (const CRhinoCommandOption &)
 
 ~CRhinoCommandOption ()
 
void Clear ()
 
CRhinoCommandOptionoperator= (const CRhinoCommandOption &)
 
void SetDisplayString (int nUniqueChars) const
 sets m_display_string More...
 
bool UpdateValue (const wchar_t *)
 
bool ValidNumber (double value) const
 

Public Attributes

bool m_bIntegerNumberValue
 if TRUE, number must be an integer More...
 
ON_Color m_color_option_value
 
ON_Colorm_color_option_value_ptr
 used for "automatic" color options More...
 
RECT m_display_rect
 (volatile) for hit testing mouse picks More...
 
ON_wString m_display_string
 (volatile) contains formatting instructions More...
 
ON_ClassArray< ON_wStringm_english_list_option_values
 this is for _english script processing More...
 
ON_wString m_english_option_name
 this is for _english script processing More...
 
ON_wString m_english_simple_option_value
 
ON_wString m_english_toggle_option_OffOn [2]
 this is for _english script processing More...
 
int * m_integer_option_value_ptr
 used for "automatic" integer options More...
 
int m_list_option_current
 0 based index into m_list_option_values[] array More...
 
ON_ClassArray< ON_wStringm_local_list_option_values
 list options More...
 
ON_wString m_local_option_alias [4]
 option aliases (for hidden options) More...
 
ON_wString m_local_option_name
 option names More...
 
ON_wString m_local_simple_option_value
 
ON_wString m_local_toggle_option_OffOn [2]
 <- this one shows up on command window prompt More...
 
double m_number_lower_limit
 if != ON_UNSET_VALUE, number value must be >= lower_limit More...
 
int m_number_option_format
 
double m_number_option_value
 number options More...
 
double * m_number_option_value_ptr
 used for "automatic" number options More...
 
double m_number_upper_limit
 if != ON_UNSET_VALUE, number value must be <= upper_limit More...
 
wchar_t m_option_accelerator_char
 
int m_option_accelerator_index
 
int m_option_index
 Index assigned by CRhinoGet::AddOption();. More...
 
ON_wString m_option_prompt
 option prompts used when a built-in number/color/string/toggle/list get happens More...
 
ON_wString m_option_value
 
BOOL * m_toggle_BOOL_option_value_ptr
 used for "automatic" toggle options More...
 
bool * m_toggle_bool_option_value_ptr
 used for "automatic" toggle options More...
 
int m_toggle_option_value
 toggle options More...
 
enum CRhinoCommandOption::COMMAND_OPTION_TYPE m_type
 

Detailed Description

Copyright (c) 1993-2017 Robert McNeel & Associates. All rights reserved. Rhinoceros is a registered trademark of Robert McNeel & Associates.

THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.

For complete Rhino SDK copyright information see http://www.rhino3d.com/developer.

Member Enumeration Documentation

◆ COMMAND_OPTION_TYPE

Enumerator
simple_option 
number_option 
toggle_option 
color_option 
list_option 
hidden_option 

full name required to activate - does not appear on command line

force_32bit_enum 

Constructor & Destructor Documentation

◆ CRhinoCommandOption() [1/2]

CRhinoCommandOption::CRhinoCommandOption ( )

◆ ~CRhinoCommandOption()

CRhinoCommandOption::~CRhinoCommandOption ( )

◆ CRhinoCommandOption() [2/2]

CRhinoCommandOption::CRhinoCommandOption ( const CRhinoCommandOption )

Member Function Documentation

◆ Clear()

void CRhinoCommandOption::Clear ( )

◆ operator=()

CRhinoCommandOption& CRhinoCommandOption::operator= ( const CRhinoCommandOption )

◆ SetDisplayString()

void CRhinoCommandOption::SetDisplayString ( int  nUniqueChars) const

sets m_display_string

command line display information - set/used by the command line formatter

◆ UpdateValue()

bool CRhinoCommandOption::UpdateValue ( const wchar_t *  )

◆ ValidNumber()

bool CRhinoCommandOption::ValidNumber ( double  value) const

Returns: TRUE if this is a number option and the value passes the m_bIntegerNumberValue, m_number_lower_limit, and m_number_upper_limit tests.

Member Data Documentation

◆ m_bIntegerNumberValue

bool CRhinoCommandOption::m_bIntegerNumberValue

if TRUE, number must be an integer

◆ m_color_option_value

ON_Color CRhinoCommandOption::m_color_option_value

◆ m_color_option_value_ptr

ON_Color* CRhinoCommandOption::m_color_option_value_ptr

used for "automatic" color options

◆ m_display_rect

RECT CRhinoCommandOption::m_display_rect

(volatile) for hit testing mouse picks

◆ m_display_string

ON_wString CRhinoCommandOption::m_display_string

(volatile) contains formatting instructions

◆ m_english_list_option_values

ON_ClassArray<ON_wString> CRhinoCommandOption::m_english_list_option_values

this is for _english script processing

◆ m_english_option_name

ON_wString CRhinoCommandOption::m_english_option_name

this is for _english script processing

◆ m_english_simple_option_value

ON_wString CRhinoCommandOption::m_english_simple_option_value

◆ m_english_toggle_option_OffOn

ON_wString CRhinoCommandOption::m_english_toggle_option_OffOn[2]

this is for _english script processing

◆ m_integer_option_value_ptr

int* CRhinoCommandOption::m_integer_option_value_ptr

used for "automatic" integer options

◆ m_list_option_current

int CRhinoCommandOption::m_list_option_current

0 based index into m_list_option_values[] array

◆ m_local_list_option_values

ON_ClassArray<ON_wString> CRhinoCommandOption::m_local_list_option_values

list options

list option stuff prompt looks like " local_option_name=m_list_option_values[m_list_option_current] " <- this one shows up on command window prompt

◆ m_local_option_alias

ON_wString CRhinoCommandOption::m_local_option_alias[4]

option aliases (for hidden options)

◆ m_local_option_name

ON_wString CRhinoCommandOption::m_local_option_name

option names

<- this one shows up on command window prompt

◆ m_local_simple_option_value

ON_wString CRhinoCommandOption::m_local_simple_option_value

simple option value if empty string prompt looks like " local_option_name " if not empty string prompt looks like " local_option_name=value "

◆ m_local_toggle_option_OffOn

ON_wString CRhinoCommandOption::m_local_toggle_option_OffOn[2]

<- this one shows up on command window prompt

◆ m_number_lower_limit

double CRhinoCommandOption::m_number_lower_limit

if != ON_UNSET_VALUE, number value must be >= lower_limit

◆ m_number_option_format

int CRhinoCommandOption::m_number_option_format

format used to display the number option 0 = general 1 = distance 2 = angle in degrees 3 = angle in radians

◆ m_number_option_value

double CRhinoCommandOption::m_number_option_value

number options

number option value

◆ m_number_option_value_ptr

double* CRhinoCommandOption::m_number_option_value_ptr

used for "automatic" number options

◆ m_number_upper_limit

double CRhinoCommandOption::m_number_upper_limit

if != ON_UNSET_VALUE, number value must be <= upper_limit

◆ m_option_accelerator_char

wchar_t CRhinoCommandOption::m_option_accelerator_char

option accelerator characters are automatically set in CRhinoGet::SetOptionAccelerators()

If m_option_accelerator_char is not zero, this is the single char accelerator. If m_option_accelerator_char is zero, then the option does not have a single char accelerator. If m_option_accelerator_char is not zero and m_option_accelerator_index >= 0, then m_option_accelerator_index is the index of the accelerator character in the m_local_option_name. The m_option_accelerator_index value is used for formatting m_local_option_name display. For languages that are far from ASCII (Asian languages), m_option_accelerator is typically a letter from the m_english_option_name and m_option_accelerator_index will be -1. For languages that are (nearly) ASCII, m_option_accelerator_index>=0 and m_option_accelerator is a character from m_local_option_name

◆ m_option_accelerator_index

int CRhinoCommandOption::m_option_accelerator_index

◆ m_option_index

int CRhinoCommandOption::m_option_index

Index assigned by CRhinoGet::AddOption();.

◆ m_option_prompt

ON_wString CRhinoCommandOption::m_option_prompt

option prompts used when a built-in number/color/string/toggle/list get happens

<- this one shows up then user types the number/toggle/list option name and presses Enter

◆ m_option_value

ON_wString CRhinoCommandOption::m_option_value

Assigned by CRhinoGet::Get*() if an option value specified in script or by a fancy command window control

◆ m_toggle_BOOL_option_value_ptr

BOOL* CRhinoCommandOption::m_toggle_BOOL_option_value_ptr

used for "automatic" toggle options

◆ m_toggle_bool_option_value_ptr

bool* CRhinoCommandOption::m_toggle_bool_option_value_ptr

used for "automatic" toggle options

◆ m_toggle_option_value

int CRhinoCommandOption::m_toggle_option_value

toggle options

prompt looks like " local_option_name=m_toggle_option_OnOff[m_toggle_option_value?1:0] " -1 = unset, 1 = true, 0 = false

◆ m_type

enum CRhinoCommandOption::COMMAND_OPTION_TYPE CRhinoCommandOption::m_type