Rhino C++ API  7.26
Public Member Functions | Protected Member Functions | List of all members
CRhinoGetString Class Reference

#include <rhinoSdkGetString.h>

Inheritance diagram for CRhinoGetString:
CRhinoGet CRhinoGetColor CRhinoGetNumber CRhinoGetOption CRhinoGetInteger

Public Member Functions

 CRhinoGetString ()
 CRhinoGetString (const CRhinoGet &)
 prompt and options inherited More...
 ~CRhinoGetString ()
CRhinoGet::result GetLiteralString ()
CRhinoGet::result GetString ()
CRhinoGetStringoperator= (const CRhinoGetString &)
 prompt and options inherited More...
- Public Member Functions inherited from CRhinoGet
 CRhinoGet (TYPE)
 CRhinoGet (TYPE, const CRhinoGet &)
virtual ~CRhinoGet ()
void AcceptColor (BOOL b=true)
bool AcceptCustomWindowsMessage (UINT winmsg_id)
void AcceptNothing (BOOL b=true)
void AcceptNumber (bool b=true, bool bAcceptZero=true)
void AcceptPoint (BOOL b=true)
void AcceptString (BOOL b=true)
void AcceptUndo (BOOL b=true)
 call to allow user undo previous selection. More...
int AddCommandOption (CRhinoCommandOptionName option_name, CRhinoCommandOptionValue option_value=CRhinoCommandOptionValue(nullptr, nullptr), BOOL bHiddenOption=false)
int AddCommandOption (CRhinoCommandOptionName option_name, double number_value)
int AddCommandOption (CRhinoCommandOptionName option_name, int number_value)
int AddCommandOptionColor (CRhinoCommandOptionName option_name, ON_Color *color_value, const wchar_t *option_prompt=nullptr)
int AddCommandOptionInteger (CRhinoCommandOptionName option_name, int *integer_value, const wchar_t *option_prompt=nullptr, double lower_limit=ON_UNSET_VALUE, double upper_limit=ON_UNSET_VALUE)
int AddCommandOptionList (CRhinoCommandOptionName option_name, const ON_SimpleArray< CRhinoCommandOptionValue > &list_values, int list_current_index)
int AddCommandOptionList (CRhinoCommandOptionName option_name, int list_current_index, CRhinoCommandOptionValue list0_value=CRhinoCommandOptionValue(nullptr, nullptr), CRhinoCommandOptionValue list1_value=CRhinoCommandOptionValue(nullptr, nullptr), CRhinoCommandOptionValue list2_value=CRhinoCommandOptionValue(nullptr, nullptr), CRhinoCommandOptionValue list3_value=CRhinoCommandOptionValue(nullptr, nullptr), CRhinoCommandOptionValue list4_value=CRhinoCommandOptionValue(nullptr, nullptr), CRhinoCommandOptionValue list5_value=CRhinoCommandOptionValue(nullptr, nullptr), CRhinoCommandOptionValue list6_value=CRhinoCommandOptionValue(nullptr, nullptr), CRhinoCommandOptionValue list7_value=CRhinoCommandOptionValue(nullptr, nullptr), CRhinoCommandOptionValue list8_value=CRhinoCommandOptionValue(nullptr, nullptr), CRhinoCommandOptionValue list9_value=CRhinoCommandOptionValue(nullptr, nullptr))
int AddCommandOptionList (CRhinoCommandOptionName option_name, int list_values_count, const CRhinoCommandOptionValue *list_values, int list_current_index)
int AddCommandOptionNumber (CRhinoCommandOptionName option_name, double *number_value, const wchar_t *option_prompt=nullptr, BOOL bIntegerValue=false, double lower_limit=ON_UNSET_VALUE, double upper_limit=ON_UNSET_VALUE, int number_format=0)
int AddCommandOptionToggle (CRhinoCommandOptionName option_name, CRhinoCommandOptionValue option_off_value, CRhinoCommandOptionValue option_on_value, BOOL bToggleState, BOOL *bCurrentToggleState=nullptr)
int AddCommandOptionToggle (CRhinoCommandOptionName option_name, CRhinoCommandOptionValue option_off_value, CRhinoCommandOptionValue option_on_value, bool bToggleState, bool *bCurrentToggleState=nullptr)
void AddHiddenCommandOptionAlias (int option_index, const wchar_t *alias1, const wchar_t *alias2=nullptr, const wchar_t *alias3=nullptr, const wchar_t *alias4=nullptr)
 low level tool More...
void ClearCommandOptions ()
 Clear all command line options. More...
void ClearDefault ()
ON_Color Color () const
 Used to get color if Get*() returns CRhinoGet::color. More...
CRhinoCommand::result CommandResult () const
const ON_ColorDefaultColor () const
unsigned int DocumentRuntimeSerialNumber () const
void EnableTransparentCommands (BOOL bEnableTransparentCommands)
BOOL GotDefault () const
bool In2dGet () const
 these functions are used by CRhinoView::OnMouseDown/Move/Up - pretend they don't exist More...
bool IsGetColor () const
bool IsGetMeshes () const
bool IsGetNumber () const
bool IsGetObject () const
bool IsGetOption () const
bool IsGetPoint () const
bool IsGetString () const
RH_LINE Line2d () const
double Number () const
const CRhinoCommandOptionOption () const
int OptionCurrentListOptionIndex () const
int OptionIndex () const
CRhinoCommandOption::COMMAND_OPTION_TYPE OptionType () const
ON_4iRect PickRect () const
ON_3dPoint Point () const
 Used to get point if Get*() returns CRhinoGet::point. More...
ON_2iPoint Point2d () const
ON_4iRect Rectangle2d () const
CRhinoGet::result Result () const
 returns result of the Get*() call More...
unsigned int SerialNumber () const
 low level tool used to identify the get More...
void SetCommandPrompt (const wchar_t *prompt)
void SetCommandPromptDefault (const wchar_t *default_value)
void SetDefaultColor (ON_Color default_color)
void SetDefaultColor (ON_Color default_color, bool bUseAlpha)
void SetDefaultInteger (int default_integer)
void SetDefaultNumber (double default_number, const wchar_t *format=nullptr)
void SetDefaultPoint (ON_3dPoint default_point)
void SetDefaultString (const wchar_t *default_string)
void SetDocument (unsigned int rhino_doc_sn)
void SetVector (const ON_3dVector &v)
void SetWaitDuration (double seconds)
const wchar_t * String () const
TYPE Type () const
ON_3dVector Vector () const
CRhinoViewView () const
MSG WindowsMessage () const
ON_3dPoint WorldPoint1 () const
ON_3dPoint WorldPoint2 () const

Protected Member Functions

 CRhinoGetString (TYPE)
 used by CRhinoGetColor, CRhinoGetNumber, and CRhinoGetOption More...
 CRhinoGetString (TYPE, const CRhinoGet &)
- Protected Member Functions inherited from CRhinoGet
CRhinoGet::result AutoProcessOption ()
const CRhinoCommandOptionCommandOptionAtIndex (int option_index) const
int CommandOptionCount () const
 see source for comments More...
virtual ON_Plane GetCS (bool bWorldCoordinates, bool bRelativeCoordinates)
 Helper used by IsAcceptableInput when parsing points. More...
CRhinoGet::result IsAcceptableInput (const class CRhEventToken &, BOOL bAcceptNumber, BOOL *bUpdatedOptionValue, CRhinoHistory *history)
CRhinoGetoperator= (const CRhinoGet &)
void PreGet ()
void RemoveCommandOptions (int option_index)
 see source for comments More...
virtual void SetCommandWndPrompt () const
void SetOptionAccelerators ()

Additional Inherited Members

- Public Types inherited from CRhinoGet
enum  result {
  no_result = 0, cancel = 1, nothing = 2, option,
  number, color, undo, miss,
  point, point2d, line2d, rect2d,
  object, string, winmsg, timeout,
  circle, plane, cylinder, sphere,
  angle, distance, direction, frame,
  number_preview, point_preview, user1 = 0xFFFFFFFF, user2 = 0xFFFFFFFE,
  user3 = 0xFFFFFFFD, user4 = 0xFFFFFFFC, user5 = 0xFFFFFFFB, exit_rhino = 0x0FFFFFFF
enum  TYPE {
  get_string = 1, get_point = 2, get_object = 3, get_meshes = 4,
  get_option = 5, get_number = 6, get_color = 7, force_32bit_enum = 0xFFFFFFFF
- Static Public Member Functions inherited from CRhinoGet
static BOOL IsValidOptionName (const wchar_t *option_name)
 base class for all Rhino SDK CRhinoGet* classes More...
static BOOL IsValidOptionValueName (const wchar_t *option_value)
static void PostCustomWindowsMessage (UINT Msg, WPARAM wParam, LPARAM lParam)
- Public Attributes inherited from CRhinoGet
class CRhGetSdkExtension * m__rhino_get_sdk_extension
- Protected Attributes inherited from CRhinoGet
bool m_2dClamp
 true to clamp 2d coordinates to window More...
int m_2dget_mode
int m_2dget_pen_style
ON_2iPoint m_2dget_point1
 first 2d rect corner-center / 2d line end More...
ON_2iPoint m_2dget_point2
 second 2d rect corner / 2d line end More...
ON_wString m_2dget_second_prompt
int m_2dget_step
 0 = none, 1 = get first point, 2 get second point, 3 = done More...
ON_3dPoint m_2dget_wpoint1
 first 3d world point input during 2d get point More...
ON_3dPoint m_2dget_wpoint2
 second 3d world point input during 2d get point More...
ON_2iPoint m_2dpoint
 2d window point (used by CRhinoGetPoint::Get2dPoint) More...
bool m_bAccept2dPoint
 2d screen point (used by CRhinoGet2dPoint) More...
BOOL m_bAcceptColor
BOOL m_bAcceptNothing
bool m_bAcceptNumber
bool m_bAcceptNumberZero
BOOL m_bAcceptPoint
 3d world point More...
BOOL m_bAcceptString
BOOL m_bAcceptString_0
BOOL m_bAcceptUndo
BOOL m_bEnableTransparentCommands
bool m_bGetPointOnMouseUp
 true if getting point on mouse up More...
ON_Color m_color
double m_number
 if not NULL, Get2dPoint()/Get2dRectangle() will use this view More...
ON_4iRect m_pick_rect
ON_3dPoint m_point
 3d world point More...
ON_wString m_prompt
ON_wString m_prompt_default
CRhinoGet::result m_result
unsigned int m_rhino_view_sn = 0
ON_wString m_string
const TYPE m_type
ON_3dVector m_vector
 3d world vector (from some digitizers) More...
UINT m_wait_duration
 milliseconds More...
ON_SimpleArray< UINT > m_winmsg_id_list

Detailed Description

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


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

Constructor & Destructor Documentation

◆ CRhinoGetString() [1/4]

CRhinoGetString::CRhinoGetString ( )

◆ ~CRhinoGetString()

CRhinoGetString::~CRhinoGetString ( )

◆ CRhinoGetString() [2/4]

CRhinoGetString::CRhinoGetString ( const CRhinoGet )

prompt and options inherited

◆ CRhinoGetString() [3/4]

CRhinoGetString::CRhinoGetString ( TYPE  )

used by CRhinoGetColor, CRhinoGetNumber, and CRhinoGetOption

STEP 4: Use result code returned by GetString() to determine what CRhinoGet function to call to get the input.

result function CRhinoGet::cancel user pressed ESCAPE CRhinoGet::nothing user pressed ENTER CRhinoGet::undo user want's to UNDO CRhinoGet::option CRhinoGet::Option() CRhinoGet::number CRhinoGet::Number() CRhinoGet::string CRhinoGet::String()

◆ CRhinoGetString() [4/4]

CRhinoGetString::CRhinoGetString ( TYPE  ,
const CRhinoGet  

Member Function Documentation

◆ GetLiteralString()

CRhinoGet::result CRhinoGetString::GetLiteralString ( )

◆ GetString()

CRhinoGet::result CRhinoGetString::GetString ( )

STEP 1: Use CRhinoGet member functions to specify command prompt and command options. STEP 2: Use CRhinoGet member functions to specify what types of alternate input can be accepted. STEP 3: Call GetString() or GetLiteralString() to get a string. GetString() is the standard and you should almost always use this. GetLiteralString() is used to get the entire line (up to an Enter key press or a new-line in a script file.). For example, GetLiteralString() is used to get input for lisp, python, etc. scripts.

◆ operator=()

CRhinoGetString& CRhinoGetString::operator= ( const CRhinoGetString )

prompt and options inherited