Rhino C++ API  6.29
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
CRhinoGet Class Reference

#include <rhinoSdkGet.h>

Inheritance diagram for CRhinoGet:
CRhinoGetMeshes CRhinoGetObject CRhinoGetPoint CRhinoGetString CRhGetSubCurvePoint CRhinoGetAngle CRhinoGetDirection CRhinoGetDistance CRhinoGetFrameOnObject CRhinoGetRectangle CRhinoGetRectangle3Point CRhinoGetRectangleRounded CRhinoGetView CRhinoGetXform CRhinoGumballDragger CRhinoGetColor CRhinoGetNumber CRhinoGetOption

Public Types

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
}
 

Public Member Functions

 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 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 OptionIndex () 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 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
 

Static Public Member Functions

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

class CRhGetSdkExtension * m__rhino_get_sdk_extension
 

Protected Member Functions

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 ()
 

Protected Attributes

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
 
CRhinoViewm_p2dPointView
 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


CLASS CRhinoGet

OVERVIEW TEXT Base class for CRhinoGetObject, CRhinoGetPoint, CRhinoGetSphere, etc.

You will never directly create a CRhinoGet but you will use its member functions after calling CRhinoGetObject::GetObject(), CRhinoGetPoint::GetPoint(), and so on.

Provides tools to set command prompt, set command options, and specify if the "get" can optionally accept numbers, nothing (pressing enter), and undo. You never directoy

KEYWORDS

get_object, get_point, get_sphere, get_cylinder

Member Enumeration Documentation

◆ result

Possible results from CRhinoGetObject::GetObject(), CRhinoGetPoint::GetPoint(), etc.

Enumerator
no_result 
cancel 

user wants to cancel current command

nothing 

user pressed enter - typically used to accpt defaults

option 

user specified an option - call Option() to get option index

number 

user entered a real number - call Number() to get value

color 

user entered a color - call Color() to get value

undo 

user pressed undo

miss 

user clicked and missed

point 

user picked 3d point - call Point() to get 3d point

point2d 

user picked 2d window point in CRhinoGetPoint::Get2dPoint() call Point2d() to get the point and View() to get the view.

line2d 

user picked a 2d line in CRhinoGetPoint::Get2dLine() call Line2d() to get the line and View() to get the view.

rect2d 

user picked a 2d rectangle in CRhinoGetPoint::Get2dRectangle() call Rectangle2d() to get the rectangle and View() to get the view.

object 

user selected an object - call Object() to get object

string 

user typed a string - call String() to get the string

winmsg 

Windows posted a message id that was in the list passed to CRhinoGet::AcceptWindowsMessage(). Call CRhinoGet::WndMsg() to get the message.

timeout 

The getter waited for the amount of time specifed in CRhinoGet::SetWaitDuration() and then gave up.

circle 

call CRhinoGetCircle::GetCircle() to get the circle

higher level stuff

plane 

call CRhinoGetPlane::GetPlane() to get the plane

cylinder 

call CRhinoGetCylinder::GetCylinder() to get the cylinder

sphere 

call CRhinoGetSphere::GetSphere() to get the sphere

angle 

call CRhinoGetAngle::Angle() to get the angle in radians (CRhinoGetAngle() returns this for typed number, too)

distance 

call CRhinoGetDistance::Distance() to get the distance value

direction 

call CRhinoGetDirection::Direction() to get the direction vector

frame 

call CRhinoGetFrame::Frame() to get the frame that was picked

number_preview 

internal, user is typing a number - call Number() to get value

point_preview 

internal, user is typing a 3d point - call Point() to get 3d point

user1 
user2 
user3 
user4 
user5 
exit_rhino 

stop now, do not cleaup, just return ASAP.

◆ TYPE

Enumerator
get_string 
get_point 
get_object 
get_meshes 
get_option 
get_number 
get_color 
force_32bit_enum 

Constructor & Destructor Documentation

◆ CRhinoGet() [1/2]

CRhinoGet::CRhinoGet ( TYPE  )

◆ ~CRhinoGet()

virtual CRhinoGet::~CRhinoGet ( )
virtual

◆ CRhinoGet() [2/2]

CRhinoGet::CRhinoGet ( TYPE  ,
const CRhinoGet  
)

Member Function Documentation

◆ AcceptColor()

void CRhinoGet::AcceptColor ( BOOL  b = true)

If you want to allow the user to be able to type in a color r,g,b or name during CRhinoGetPoint::GetPoint(), CRhinoGetObject::GetObject(), etc., then call AcceptNumber() before calling GetPoint()/GetObject(). If the user chooses to type in a color, then the result code CRhinoGet::color is returned and you can use CRhinoGet::Color() to get the value of the color. If the get accepts points, then the user will not be able to type in r,g,b colors but will be able to type color names.

◆ AcceptCustomWindowsMessage()

bool CRhinoGet::AcceptCustomWindowsMessage ( UINT  winmsg_id)

Description: Expert user tool that allows GetPoint, GetObject, GetString, etc., to return if a registered Windows message is posted by the static function CRhinoGet::PostCustomWindowsMessage Parameters: winmsg_id - [in] Windows message id in the range 0xC000 throught 0xFFFF. Returns: true if the message id is in the permitted range. Remarks: Study the Windows documentation for RegisterWindowMessage. AcceptWindowsMessage is intended to be used by experts. Support is not available. If Windows posts a message with matching id while GetPoint, etc., is waiting for input, the the getter returns CRhinoGet::winmsg.
Call CRhinoGet::WndMsg() to get the message. See Also: CRhinoGet::PostCustomWindowsMessage ::RegisterWindowMessage

◆ AcceptNothing()

void CRhinoGet::AcceptNothing ( BOOL  b = true)

If you want to allow the user to be able to press enter in order to skip selecting a something in CRhinoGetPoint::GetPoint(), CRhinoGetObject::GetObject(), etc., then call AcceptNothing() before calling GetPoint()/GetObject().

◆ AcceptNumber()

void CRhinoGet::AcceptNumber ( bool  b = true,
bool  bAcceptZero = true 
)

If you want to allow the user to be able to type in a number during CRhinoGetPoint::GetPoint(), CRhinoGetObject::GetObject(), etc., then call AcceptNumber() before calling GetPoint()/GetObject(). If the user chooses to type in a number, then the result code CRhinoGet::number is returned and you can use CRhinoGet::Number() to get the value of the number. If you are using GetPoint and you want "0" to return (0,0,0) instead of the number zero, then set bAcceptZero = false.

◆ AcceptPoint()

void CRhinoGet::AcceptPoint ( BOOL  b = true)

If you want to allow the user to be able to type in a point then call AcceptNumber() before calling GetPoint()/GetObject(). If the user chooses to type in a number, then the result code CRhinoGet::point is returned and you can use CRhinoGet::Point() to get the value of the point.

◆ AcceptString()

void CRhinoGet::AcceptString ( BOOL  b = true)

If you want to allow the user to be able to type in a string during CRhinoGetPoint::GetPoint(), CRhinoGetObject::GetObject(), etc., then call AcceptString() before calling GetPoint()/GetObject(). If the user chooses to type in a string, then the result code CRhinoGet::string is returned and you can use CRhinoGet::String() to get the value of the string.

◆ AcceptUndo()

void CRhinoGet::AcceptUndo ( BOOL  b = true)

call to allow user undo previous selection.

If you want to allow the user to have an undo option in CRhinoGetPoint::GetPoint(), CRhinoGetObject::GetObject(), etc., then call AcceptUndo() before calling GetPoint()/GetObject().

◆ AddCommandOption() [1/2]

int CRhinoGet::AddCommandOption ( CRhinoCommandOptionName  option_name,
CRhinoCommandOptionValue  option_value = CRhinoCommandOptionValue(nullptr, nullptr),
BOOL  bHiddenOption = false 
)

Description: Add a command line option. If you are adding an option to get a number, string, toggle, or list value, then use the tools listed in the see also section. Parameters: option_name - [in] option_value - [in] optional description of current value (not automaically localized - use RHSTR() when appropriate.) bHiddenOption - [in] if true, the option is not displayed on the command line and the full option name must be typed in order to activate the option.
Returns: option index value (>0) or 0 if option cannot be added. Example:

    CRhinoGetPoint gp;
    int grain_option_index = gp.AddCommandOption( 
                  RHCMDOPTNAME(L"Grain"), 
                  RHCMDOPTVALUE(L"rice") );
    int fruit_option_index = gp.AddCommandOption( 
                  RHCMDOPTNAME(L"Fruit"), 
                  RHCMDOPTVALUE(L"banana") 
                  );
    gp.GetPoint();
    if ( gp.Result() == CRhinoGet::option ) 
    {
      CRhinoCommandOption* opt = gp.Option();
      if ( opt->m_option_index == grain_option_index )
      {
        ... ask about grains 
      }
      else if ( opt->m_option_index == grain_option_index )
      {
        ... ask about fruits 
      }
    }

See Also: CRhinoGet::AddCommandOptionInteger CRhinoGet::AddCommandOptionNumber CRhinoGet::AddCommandOptionString CRhinoGet::AddCommandOptionColor CRhinoGet::AddCommandOptionToggle CRhinoGet::AddCommandOptionList

◆ AddCommandOption() [2/2]

int CRhinoGet::AddCommandOption ( CRhinoCommandOptionName  option_name,
double  number_value 
)

Description: Add a simple command line option with a number as a value. Parameters: option_name - [in] english option description automatic localization uses command option string table number_value - [in] current value Returns: option index value (>0) or 0 if option cannot be added. Remarks: In most cases it is easier to use AddCommandOptionNumber(). Example:

    ON_3dPoint center;
    static radius r = 1.0;
    for(;;)
    {
      CRhinoGetPoint gp;
      gp.SetCommandPrompt(RHSTR(L"Center point"));
      int radius_option_index = gp.AddCommandOption( RHCMDOPTNAME(L"Radius"), r );
      gp.GetPoint();
      if ( gp.Result() == CRhinoGet::option ) 
      {
        CRhinoCommandOption* opt = gp.Option();
        if ( opt->m_option_index == radius_option_index )
        {

/user typed "Radius" - manually prompt for new number CRhinoGetNumber gn; gn.SetCommandPrompt(RHSTR("Radius")); gn.SetDefault(r); gn.GetNumber(); if ( gn.Result() == CRhinoGet::number ) r = gn.Number(); } continue; } if ( gp.Result() == CRhinoGet::point ) { center = gp.Point(); break; } }

See Also: CRhinoGet::AddCommandOption

◆ AddCommandOptionColor()

int CRhinoGet::AddCommandOptionColor ( CRhinoCommandOptionName  option_name,
ON_Color color_value,
const wchar_t *  option_prompt = nullptr 
)

Description: Add a command line option to get colors and automatically save the value. Parameters: option_name - [in] english option description Automatic localization uses command option string table. color_value - [in/out] pointer to current value of the number. If the user changes the integer's value, the value of integer_value is changed but the current call to GetPoint/GetString/... does not return. option_prompt - [in] option prompt shown if the user selects this option. If NULL, then option_name.m_local_option_name is used as the get number prompt.

Example:

 CRhinoGetPoint gp;
 ...
 ON_Color favorite_color(0,0,0);
 gp.AddCommandOptionColor(
     RHCMDOPTNAME(L"FavoriteColor"),
     &favorite_color,
     RHSTR(L"What is your favorite color?")
     );
 ...

Returns: option index value (>0) or 0 if option cannot be added. See Also: CRhinoGet::AddCommandOption

◆ AddCommandOptionInteger()

int CRhinoGet::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 
)

Description: Add a command line option to get integers and automatically save the value. Parameters: option_name - [in] english option description Automatic localization uses command option string table. integer_value - [in/out] pointer to current value of the number. If the user changes the integer's value, the value of integer_value is changed but the current call to GetPoint/GetString/... does not return. option_prompt - [in] option prompt shown if the user selects this option. If NULL, then option_name.m_local_option_name is used as the get number prompt. lower_limit - [in] (default=ON_UNSET_VALUE which means no lower limit) if set, the returned integer must be >= lower_limit upper_limit - [in] (default=ON_UNSET_VALUE which means no upper limit) if set, the returned integer must be <= upper_limit Returns: option index value (>0) or 0 if option cannot be added.

Example:

 CRhinoGetPoint gp;
 ...
 int favorite_integer = 8;
 gp.AddCommandOptionInteger(
     RHCMDOPTNAME(L"FavoriteInteger"),
     &favorite_integer,
     RHSTR(L"What is your favorite integer?")
     );
 ...

Remarks: If you need to explicitly react to a changed number, then use override of CRhinoGet::AddCommandOption that takes a number as an option value. See the CRhinoGet::AddCommandOption examples. See Also: CRhinoGet::AddCommandOption

◆ AddCommandOptionList() [1/3]

int CRhinoGet::AddCommandOptionList ( CRhinoCommandOptionName  option_name,
const ON_SimpleArray< CRhinoCommandOptionValue > &  list_values,
int  list_current_index 
)

◆ AddCommandOptionList() [2/3]

int CRhinoGet::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) 
)

Description: Add a command line list option. This version of AddCommandOptionList simply makes the appropriate array out of list0_value, ..., list9_value and Parameters: option_name - [in] english option description automatic localization uses command option string table list_current_index - [in] zero based index of current option All the listN_value parameters for N <= list_current_index must be provided. list0_value - [in] NULL or value for list_values[0] list1_value - [in] NULL or value for list_values[1] list2_value - [in] NULL or value for list_values[2] list3_value - [in] NULL or value for list_values[3] list4_value - [in] NULL or value for list_values[4] list5_value - [in] NULL or value for list_values[5] list6_value - [in] NULL or value for list_values[6] list7_value - [in] NULL or value for list_values[7] list8_value - [in] NULL or value for list_values[8] list9_value - [in] NULL or value for list_values[9] Returns: option index value (>0) or 0 if option cannot be added. Example:

    ON_3dPoint center;
    int fruit_index = 0;
    const wchar_t* fruits[3] = {L"banana",L"apple",L"orange"};
    for(;;)
    {
      CRhinoGetPoint gp;
      gp.SetCommandPrompt(RHSTR(L"Center point"));
      int fruit_option_index = gp.AddCommandOptionList(
                                    RHCMDOPTNAME(L"Fruit"),
                                    fruit_index,
                                    RHCMDOPTVALUE(L"banana"),
                                    RHCMDOPTVALUE(L"apple"),
                                    RHCMDOPTVALUE(L"orange")
                                    );
      gp.GetPoint();
      if ( gp.Result() == CRhinoGet::option ) 
      {
        CRhinoCommandOption* opt = gp.Option();
        if ( opt->m_option_index == fruit_option_index )
        {
          .. get new fruit from list
        }
        continue;
      }
      if ( gp.Result() == CRhinoGet::point ) 
      {
        center = gp.Point();
        break;
      }
    }

See Also: CRhinoGet::AddCommandOption

◆ AddCommandOptionList() [3/3]

int CRhinoGet::AddCommandOptionList ( CRhinoCommandOptionName  option_name,
int  list_values_count,
const CRhinoCommandOptionValue list_values,
int  list_current_index 
)

Description: Add a command line list option Parameters: option_name - [in] english option description automatic localization uses command option string table list_values_count - [in] number of values option_values[] array list_values - [in] array of english option values automatic localization uses command option string table list_current_index - [in] zero based index of current option Returns: option index value (>0) or 0 if option cannot be added. Example:

    ON_3dPoint center;
    int fruit_index = 0;
    CRhinoCommandOptionValue fruits[3];
    fruits[0] = RHCMDOPTVALUE(L"banana");
    fruits[1] = RHCMDOPTVALUE(L"apple");
    fruits[2] = RHCMDOPTVALUE(L"orange");
    for(;;)
    {
      CRhinoGetPoint gp;
      gp.SetCommandPrompt(RHSTR(L"Center point"));
      int fruit_option_index = gp.AddCommandOptionList( RHCMDOPTNAME(L"Fruit"), 3, fruits, fruit_index );
      gp.GetPoint();
      if ( gp.Result() == CRhinoGet::option ) 
      {
        const CRhinoCommandOption* opt = gp.Option();
        if ( opt->m_option_index == fruit_option_index )
        {

/ .. get new fruit from list fruit_index = opt->m_list_option_current; } continue; } if ( gp.Result() == CRhinoGet::point ) { center = gp.Point(); break; } }

See Also: CRhinoGet::AddCommandOption

◆ AddCommandOptionNumber()

int CRhinoGet::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 
)

Description: Add a command line option to get numbers and automatically save the value. Parameters: option_name - [in] english option description Automatic localization uses command option string table. number_value - [in/out] pointer to current value of the number. If the user changes the nubmer's value, the value of number_value is changed but the current call to GetPoint/GetString/... does not return. option_prompt - [in] option prompt shown if the user selects this option. If NULL, then option_name.m_local_option_name is used as the get number prompt. bIntegerValue - [in] (default=false) if true, number must be an integer lower_limit - [in] (default=ON_UNSET_VALUE which means no lower limit) if set, the returned number must be >= lower_limit upper_limit - [in] (default=ON_UNSET_VALUE which means no upper limit) if set, the returned number must be <= upper_limit number_format - [in] This controls how strings are parsed to get a number and how the number is displayed in the command prompt.

0 = general - RhinoParseNumber - decimal display 1 = distance - RhinoParseNumber - decimal display with doc units 2 = angle in degrees - RhinoParseAngleDegrees - decimal degrees display 3 = angle in radians - RhinoParseAngle - decimal radians display Returns: option index value (>0) or 0 if option cannot be added. Remarks: If you need to explicitly react to a changed number, then use override of CRhinoGet::AddCommandOption that takes a number as an option value. See the CRhinoGet::AddCommandOption examples. Example:

    ON_3dPoint center;
    static radius r = 1.0;
    double min_radius = 1.0e-12;
    for(;;)
    {
      CRhinoGetPoint gp;
      gp.SetCommandPrompt(RHSTR(L"Center point"));
      int radius_option_index = gp.AddCommandOptionNumber( 
                                        RHCMDOPTNAME(L"Radius"), 
                                        &r, 
                                        RHSTR(L"New radius"), 
                                        false, 
                                        min_radius 
                                        );
      gp.GetPoint();
      if ( gp.Result() == CRhinoGet::point ) 
      {
        center = gp.Point();
        break;
      }
      if ( gp.Result() == CRhinoGet::option )
      {
        const CRhinoCommandOption* opt = gp.Option();
        if ( opt->m_option_index == radius_option_index )
        {

/ r has been changed to a number >= min_radius. Do / any additional validation or changes here. } } if ( gp.Result() == CRhinoGet::cancel ) break; ///< user pressed ESCAPE to cancel get point ... }

See Also: CRhinoGet::AddCommandOption

◆ AddCommandOptionToggle() [1/2]

int CRhinoGet::AddCommandOptionToggle ( CRhinoCommandOptionName  option_name,
CRhinoCommandOptionValue  option_off_value,
CRhinoCommandOptionValue  option_on_value,
BOOL  bToggleState,
BOOL *  bCurrentToggleState = nullptr 
)

Description: Add a command line option to toggle a setting. Parameters: option_name - [in] english option description automatic localization uses command option string table option_off_value - [in] english "off" value automatic localization uses command option string table option_on_value - [in] english "on" value automatic localization uses command option string table bToggleState - [in] current toggle state (true = on) pbCurrentState - [in/out] if not NULL, then the value of pbCurrentState is kept set to the current state. Returns: option index value (>0) or 0 if option cannot be added. Example:

    ON_3dPoint center;
    static bLights = true;
    for(;;)
    {
      CRhinoGetPoint gp;
      gp.SetCommandPrompt(RHSTR(L"Center point"));
      int togglelights_option_index = gp.AddCommandOptionToggle( 
                                          RHCMDOPTNAME(L"Lights"), 
                                          RHCMDOPTVALUE(L"Off"), 
                                          RHCMDOPTVALUE(L"On"), 
                                          bLights, 
                                          &bLights );
      gp.GetPoint();
      if ( gp.Result() == CRhinoGet::option ) 
      {
        CRhinoCommandOption* opt = gp.Option();
        if ( opt->m_option_index == togglelights_option_index )
        {

/ opt->m_toggle_option_value = current state of toggle / because we passed &bLights as the last argument, bLights / is automatically set to opt->m_toggle_option_value. / Do whatever else needs to be done here. ... } continue; } if ( gp.Result() == CRhinoGet::point ) { center = gp.Point(); break; } }

See Also: CRhinoGet::AddCommandOption

◆ AddCommandOptionToggle() [2/2]

int CRhinoGet::AddCommandOptionToggle ( CRhinoCommandOptionName  option_name,
CRhinoCommandOptionValue  option_off_value,
CRhinoCommandOptionValue  option_on_value,
bool  bToggleState,
bool *  bCurrentToggleState = nullptr 
)

◆ AddHiddenCommandOptionAlias()

void CRhinoGet::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

◆ AutoProcessOption()

CRhinoGet::result CRhinoGet::AutoProcessOption ( )
protected

Helper for used by IsAcceptableInput for autoprocessing number/toggle/list command options

◆ ClearCommandOptions()

void CRhinoGet::ClearCommandOptions ( )

Clear all command line options.

clear all command options

◆ ClearDefault()

void CRhinoGet::ClearDefault ( )

Description: Clears any defalts se using SetDefaultPoint, SetDefaultNumber, SetDefaultString, or SetCommandPromptDefault Remarks: See Also: CRhinoGet::SetDefaultPoint CRhinoGet::SetDefaultString CRhinoGet::SetDefaultNumber CRhinoGet::ClearDefault CRhinoGet::SetCommandPromptDefault CRhinoGet::AcceptNothing

◆ Color()

ON_Color CRhinoGet::Color ( ) const

Used to get color if Get*() returns CRhinoGet::color.

◆ CommandOptionAtIndex()

const CRhinoCommandOption* CRhinoGet::CommandOptionAtIndex ( int  option_index) const
protected

◆ CommandOptionCount()

int CRhinoGet::CommandOptionCount ( ) const
protected

see source for comments

◆ CommandResult()

CRhinoCommand::result CRhinoGet::CommandResult ( ) const

Description: Handy tool for getting command result value from getter results. Returns: @untitled table CRhinoCommand::cancel if CRhinoGet::Result() == CRhinoGet::cancel CRhinoCommand::exit_rhino if CRhinoGet::Result() == CRhinoGet::exit_rhino CRhinoCommand::success otherwise

◆ DefaultColor()

const ON_Color& CRhinoGet::DefaultColor ( ) const

Returns: Get the default color value that will be returned if the user presses ENTER key during the get.

◆ DocumentRuntimeSerialNumber()

unsigned int CRhinoGet::DocumentRuntimeSerialNumber ( ) const

Returns; 0 or the specific document for this get. Remarks: If no document is specified and no event has happened in something specifically associated with a document, then 0 is returned.

◆ EnableTransparentCommands()

void CRhinoGet::EnableTransparentCommands ( BOOL  bEnableTransparentCommands)

STEP 2: specify types of keyboard input can be accepted Description: Control the availability of transparent commands during the get. Parameters: bEnableTransparentCommands - [in] If true, then transparent commands can be run during the get. If false, then transparent commands cannot be run during the get. Remarks: Some Rhino commands are "transparent" and can be run inside of other commands. Examples of transparent commands include the view manipulation commands like ZoomExtents, Top, etc., and the selection commands like SelAll, SelPoint, etc. By default transparent commands can be run during any get. If you want to disable this feature, then call EnableTransparentCommands(false) before calling GetString, GetPoint, GetObject, etc.

◆ GetCS()

virtual ON_Plane CRhinoGet::GetCS ( bool  bWorldCoordinates,
bool  bRelativeCoordinates 
)
protectedvirtual

Helper used by IsAcceptableInput when parsing points.

Reimplemented in CRhinoGetPoint.

◆ GotDefault()

BOOL CRhinoGet::GotDefault ( ) const

Returns: true if user pressed ENTER to accept a default point, number, or string set using SetDefaultPoint, SetDefaultNumber, or SetDefaultString. Remarks: See Also: CRhinoGet::SetDefaultPoint CRhinoGet::SetDefaultString CRhinoGet::SetDefaultNumber CRhinoGet::ClearDefault CRhinoGet::SetCommandPromptDefault CRhinoGet::AcceptNothing

◆ In2dGet()

bool CRhinoGet::In2dGet ( ) const

these functions are used by CRhinoView::OnMouseDown/Move/Up - pretend they don't exist

true if getting 2d point

◆ IsAcceptableInput()

CRhinoGet::result CRhinoGet::IsAcceptableInput ( const class CRhEventToken &  ,
BOOL  bAcceptNumber,
BOOL *  bUpdatedOptionValue,
CRhinoHistory history 
)
protected

Parameters: token - [in] event token to test bAcceptNumber - [in] if true, then a number is acceptable, even when m_bAcceptNumber is false. This happens with GetPoint ortho distance constraints and automatic number options. bUpdatedOptionValue - [out] if an option with a valid value is specified, then *bUpdatedOptionValue is set to true. history - [out] (can be NULL) updated as needed. returns CRhinoGet::no_result if token is not acceptable input. CRhinoGet::option and sets m_option_index if token is a valid option. Use CRhinoGet::Option() to get option index. CRhinoGet::number if user typed a number and a number is acceptable input. CRhinoGet::string if user typed a string and a string is acceptable input. CRhinoGet::undo if user typed ^Z or "Undo" and undo is an acceptable option.

◆ IsGetColor()

bool CRhinoGet::IsGetColor ( ) const

Returns: true if the get is or will be a CRhinoGetString::GetColor()

◆ IsGetMeshes()

bool CRhinoGet::IsGetMeshes ( ) const

Returns: true if the get is or will be getting meshes.

◆ IsGetNumber()

bool CRhinoGet::IsGetNumber ( ) const

Returns: true if the get is or will be a CRhinoGetString::GetNumber()

◆ IsGetObject()

bool CRhinoGet::IsGetObject ( ) const

Returns: true if the get is or will be a CRhinoGetObject::GetObject()

◆ IsGetOption()

bool CRhinoGet::IsGetOption ( ) const

Returns: true if the get is or will be a CRhinoGetString::GetOption()

◆ IsGetPoint()

bool CRhinoGet::IsGetPoint ( ) const

Returns: true if the get is or will be a CRhinoGetPoint::GetPoint()

◆ IsGetString()

bool CRhinoGet::IsGetString ( ) const

Returns: true if the get is or will be a CRhinoGetString::GetString()

◆ IsValidOptionName()

static BOOL CRhinoGet::IsValidOptionName ( const wchar_t *  option_name)
static

base class for all Rhino SDK CRhinoGet* classes

Description: Test a string to see if it can be used as an option name in any of the CRhinoGet::AddCommandOption...() functions. Returns: true if string can be used as an option name.

◆ IsValidOptionValueName()

static BOOL CRhinoGet::IsValidOptionValueName ( const wchar_t *  option_value)
static

Description: Test a string to see if it can be used as an option value in CRhinoGet::AddCommandOption, CRhinoGet::AddCommandOptionToggle, or CRhinoGet::AddCommandOptionList. Returns: true if string can be used as an option value.

◆ Line2d()

RH_LINE CRhinoGet::Line2d ( ) const

Returns: Location in view window of 2d line selected in CRhinoGetPoint::Get2dLine(). (0,0) = upper left corner of window Remarks: Call CRhinoGet::View() to get the view window.

◆ Number()

double CRhinoGet::Number ( ) const

Used to get number if CRhinoGetPoint::GetPoint(), CRhinoGetObject::GetObject(), etc., returns CRhinoGet::number.

◆ operator=()

CRhinoGet& CRhinoGet::operator= ( const CRhinoGet )
protected

◆ Option()

const CRhinoCommandOption* CRhinoGet::Option ( ) const

Used to get option if CRhinoGetPoint::GetPoint(), CRhinoGetObject::GetObject(), etc., returns CRhinoGet::option.

◆ OptionIndex()

int CRhinoGet::OptionIndex ( ) const

Returns: 0: An option was not selected in the get. >0: CRhinoGet::Result() is CRhinoGet::option, CRhinoGet::Option() returns a non-null pointer, and the returned value is CRhinoGet::Option()->m_option_index.

◆ PickRect()

ON_4iRect CRhinoGet::PickRect ( ) const

Returns: If the get was a GetObjects() and the mouse was used to select the objects, then the returned rect has left < right and top < bottom. This rect is the Windows GDI screen coordinates of the picking rectangle. View()->Viewport().GetPickXform( m_pick_rect, pick_xform ) will calculate the picking transformation that was used. In all other cases, left=right=top=bottom=0;

◆ Point()

ON_3dPoint CRhinoGet::Point ( ) const

Used to get point if Get*() returns CRhinoGet::point.

◆ Point2d()

ON_2iPoint CRhinoGet::Point2d ( ) const

Returns: Location in view of point in selected in CRhinoGetPoint::GetPoint() or CRhinoGetPoint::Get2dPoint(). (0,0) = upper left corner of window Remarks: Call CRhinoGet::View() to get the view window.

◆ PostCustomWindowsMessage()

static void CRhinoGet::PostCustomWindowsMessage ( UINT  Msg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Description: Posts a Windows message that can terminate a call tooGetPoint, GetObject, GetString, etc. Parameters: Msg - [in] Windows message id in the range 0xC000 throught 0xFFFF. wParam - [in] lParam - [in] See Also: CRhinoGet::AcceptCustomWindowsMessage ::RegisterWindowMessage

◆ PreGet()

void CRhinoGet::PreGet ( )
protected

◆ Rectangle2d()

ON_4iRect CRhinoGet::Rectangle2d ( ) const

Returns: Location in view of 2d rectangle selected in CRhinoGetPoint::Get2dRectangle(). rect.left < rect.right and rect.top < rect.bottom (0,0) = upper left corner of window Remarks: Call CRhinoGet::View() to get the view window.

◆ RemoveCommandOptions()

void CRhinoGet::RemoveCommandOptions ( int  option_index)
protected

see source for comments

◆ Result()

CRhinoGet::result CRhinoGet::Result ( ) const

returns result of the Get*() call

STEP N: Get options/numbers if user specified on of the alternate objects. Used to get result code returned by CRhinoGetPoint::GetPoint(), CRhinoGetObject::GetObject(), etc.

◆ SerialNumber()

unsigned int CRhinoGet::SerialNumber ( ) const

low level tool used to identify the get

◆ SetCommandPrompt()

void CRhinoGet::SetCommandPrompt ( const wchar_t *  prompt)

STEP 1: specify optional command prompt and command options Description: Set prompt message that appears in the command prompt window. Parameters: prompt - [in] command prompt message. Use the RHSTR macro if you want the message to be automatically localized. Example: CRhinoGetPoint gp; gp.SetCommandPrompt( RHSTR(L"Center point") );

◆ SetCommandPromptDefault()

void CRhinoGet::SetCommandPromptDefault ( const wchar_t *  default_value)

Description: Set message that describes what default value will be used if the user presses enter. This description appears in angle brackets <> in the command prompt window. You do not need to provide a default value description unless you explicity enable AcceptNothing. Parameters: default_value - [in] description of default value. Example: ON_3dPoint default_center(2,3,4); CRhinoGetPoint gp; gp.SetCommandPrompt( RHSTR(L"Center point") ); gp.SetCommandPromptDefault( L"(2,3,4)" ); gp.AcceptNothing(true); gp.GetPoint(); if ( gp.Result() == CRhinoGet::nothing ) point = default_center; Remarks: If you have a simple default point, number, or string, it is easier to use SetDefaultPoint, SetDefaultNumber, or SetDefaultString. SetCommandPromptDefault and AcceptNothing can be used for providing more advanced UI behavior. See Also: CRhinoGet::SetDefaultPoint CRhinoGet::SetDefaultString CRhinoGet::SetDefaultNumber CRhinoGet::ClearDefault CRhinoGet::AcceptNothing CRhinoGet::SetCommandPrompt

◆ SetCommandWndPrompt()

virtual void CRhinoGet::SetCommandWndPrompt ( ) const
protectedvirtual

◆ SetDefaultColor()

void CRhinoGet::SetDefaultColor ( ON_Color  default_color)

Description: Set a color as default value that will be returned if the user presses ENTER key during the get. Parameters: default_color - [in] value for default color Remarks: Calling SetDefaultColor will automatically handle setting the command prompt default and reacting to the user pressing ENTER. If the user presses ENTER to accept the default color, CRhinoGet::color is returned and CRhinoGet::GotDefault() will return true. Calling SetDefaultColor will clear any previous calls to SetDefaultString or SetDefaultPoint. See Also: CRhinoGet::SetDefaultPoint CRhinoGet::SetDefaultString CRhinoGet::SetDefaultNumber CRhinoGet::SetDefaultColor CRhinoGet::ClearDefault CRhinoGet::SetCommandPromptDefault CRhinoGet::AcceptNothing

◆ SetDefaultInteger()

void CRhinoGet::SetDefaultInteger ( int  default_integer)

Description: Set a number as default value that will be returned if the user presses ENTER key during the get. Parameters: default_integer - [in] value for default number Remarks: Calling SetDefaultInteger will automatically handle setting the command prompt default and reacting to the user pressing ENTER. If the user presses ENTER to accept the default integer, CRhinoGet::number is returned and CRhinoGet::GotDefault() will return true. Calling SetDefaultNumber will clear any previous calls to SetDefaultString or SetDefaultPoint. See Also: CRhinoGet::SetDefaultNumber

◆ SetDefaultNumber()

void CRhinoGet::SetDefaultNumber ( double  default_number,
const wchar_t *  format = nullptr 
)

Description: Set a number as default value that will be returned if the user presses ENTER key during the get. Parameters: default_number - [in] value for default number format - [in] If null, RhinoFormatNumber() is used to format the number. If not null, format is used to format the number. For example, if you want the default to always have "%g" format, then you would pass L"%g" as the format string. A non-null format string must have EXACTLY one %...e, %...f, or %...g in it. Remarks: Calling SetDefaultNumber will automatically handle setting the command prompt default and reacting to the user pressing ENTER. If the user presses ENTER to accept the default number, CRhinoGet::number is returned and CRhinoGet::GotDefault() will return true. Calling SetDefaultNumber will clear any previous calls to SetDefaultString or SetDefaultPoint. See Also: RhinoFormatNumber CRhinoGet::SetDefaultInteger CRhinoGet::SetDefaultPoint CRhinoGet::SetDefaultString CRhinoGet::SetDefaultNumber CRhinoGet::SetDefaultColor CRhinoGet::ClearDefault CRhinoGet::SetCommandPromptDefault CRhinoGet::AcceptNothing

◆ SetDefaultPoint()

void CRhinoGet::SetDefaultPoint ( ON_3dPoint  default_point)

Description: Set a point as default value that will be returned if the user presses the ENTER key during the get. Parameters: default_point - [in] value for default point Remarks: Calling SetDefaultPoint will automatically handle setting the command prompt default and reacting to the user pressing ENTER. If the user presses enter to accept the default point, CRhinoGet::point is returned and CRhinoGet::GotDefault() will return true. Calling SetDefaultPoint will clear any previous calls to SetDefaultString or SetDefaultNumber. See Also: CRhinoGet::SetDefaultPoint CRhinoGet::SetDefaultString CRhinoGet::SetDefaultNumber CRhinoGet::ClearDefault CRhinoGet::SetCommandPromptDefault CRhinoGet::AcceptNothing

◆ SetDefaultString()

void CRhinoGet::SetDefaultString ( const wchar_t *  default_string)

Description: Set a string as default value that will be returned if the user presses ENTER key during the get. Parameters: default_string - [in] value for default string Remarks: Calling SetDefaultString will automatically handle setting the command prompt default and reacting to the user pressing ENTER. If the user presses ENTER to accept the default string, CRhinoGet::string is returned and CRhinoGet::GotDefault() will return true. Calling SetDefaultString will clear any previous calls to SetDefaultNumber or SetDefaultPoint. See Also: CRhinoGet::SetDefaultPoint CRhinoGet::SetDefaultString CRhinoGet::SetDefaultNumber CRhinoGet::ClearDefault CRhinoGet::SetCommandPromptDefault CRhinoGet::AcceptNothing

◆ SetDocument()

void CRhinoGet::SetDocument ( unsigned int  rhino_doc_sn)

Description: Set the document targeted by this get. Parameters: rhino_doc_sn - [in]

◆ SetOptionAccelerators()

void CRhinoGet::SetOptionAccelerators ( )
protected

◆ SetVector()

void CRhinoGet::SetVector ( const ON_3dVector v)

Description: Set m_vector field. Parameters: v - [in];

◆ SetWaitDuration()

void CRhinoGet::SetWaitDuration ( double  seconds)

Description: Expert user function to limit the amount of time GetPoint, GetObjects, GetString, etc., will wait for input. Parameters: seconds - [in] number of seconds to wait. By default the getters will wait indefinitely. Remarks: If a getter times out, then CRhinoGet::timeout is returned by GetPoint, GetObjects, GetString, etc.

◆ String()

const wchar_t* CRhinoGet::String ( ) const

Used to get string if CRhinoGetPoint::GetPoint(), CRhinoGetObject::GetObject(), etc., returns CRhinoGet::string.

◆ Type()

TYPE CRhinoGet::Type ( ) const

◆ Vector()

ON_3dVector CRhinoGet::Vector ( ) const

Used to get direction if Get*() returns CRhinoGet::point. (Set by some digitizers, but in general it's (0,0,0);

◆ View()

CRhinoView* CRhinoGet::View ( ) const

Used to get view user clicked in during CRhinoGetPoint::GetPoint(), CRhinoGetObject::GetObject(), etc.

◆ WindowsMessage()

MSG CRhinoGet::WindowsMessage ( ) const

Description: Used to get Windows message if Get*() returns CRhinoGet::winmsg. Returns: Windows message.

◆ WorldPoint1()

ON_3dPoint CRhinoGet::WorldPoint1 ( ) const

Returns: Value of first 3d world point typed in the command line during a Get2dPoint()....if not set, value will be ON_unset_point

◆ WorldPoint2()

ON_3dPoint CRhinoGet::WorldPoint2 ( ) const

Returns: Value of second 3d world point typed in the command line during a Get2dPoint()....if not set, value will be ON_unset_point

Member Data Documentation

◆ m_2dClamp

bool CRhinoGet::m_2dClamp
protected

true to clamp 2d coordinates to window

◆ m_2dget_mode

int CRhinoGet::m_2dget_mode
protected

0 = none, 1 = corner-to-corner rect, 2 = center-to-corner rect, 3 = start-to-end line, 4 = middle-to-end line

◆ m_2dget_pen_style

int CRhinoGet::m_2dget_pen_style
protected

◆ m_2dget_point1

ON_2iPoint CRhinoGet::m_2dget_point1
protected

first 2d rect corner-center / 2d line end

◆ m_2dget_point2

ON_2iPoint CRhinoGet::m_2dget_point2
protected

second 2d rect corner / 2d line end

◆ m_2dget_second_prompt

ON_wString CRhinoGet::m_2dget_second_prompt
protected

◆ m_2dget_step

int CRhinoGet::m_2dget_step
protected

0 = none, 1 = get first point, 2 get second point, 3 = done

◆ m_2dget_wpoint1

ON_3dPoint CRhinoGet::m_2dget_wpoint1
protected

first 3d world point input during 2d get point

◆ m_2dget_wpoint2

ON_3dPoint CRhinoGet::m_2dget_wpoint2
protected

second 3d world point input during 2d get point

◆ m_2dpoint

ON_2iPoint CRhinoGet::m_2dpoint
protected

2d window point (used by CRhinoGetPoint::Get2dPoint)

◆ m__rhino_get_sdk_extension

class CRhGetSdkExtension* CRhinoGet::m__rhino_get_sdk_extension

◆ m_bAccept2dPoint

bool CRhinoGet::m_bAccept2dPoint
protected

2d screen point (used by CRhinoGet2dPoint)

◆ m_bAcceptColor

BOOL CRhinoGet::m_bAcceptColor
protected

◆ m_bAcceptNothing

BOOL CRhinoGet::m_bAcceptNothing
protected

◆ m_bAcceptNumber

bool CRhinoGet::m_bAcceptNumber
protected

◆ m_bAcceptNumberZero

bool CRhinoGet::m_bAcceptNumberZero
protected

◆ m_bAcceptPoint

BOOL CRhinoGet::m_bAcceptPoint
protected

3d world point

◆ m_bAcceptString

BOOL CRhinoGet::m_bAcceptString
protected

◆ m_bAcceptString_0

BOOL CRhinoGet::m_bAcceptString_0
protected

◆ m_bAcceptUndo

BOOL CRhinoGet::m_bAcceptUndo
protected

◆ m_bEnableTransparentCommands

BOOL CRhinoGet::m_bEnableTransparentCommands
protected

◆ m_bGetPointOnMouseUp

bool CRhinoGet::m_bGetPointOnMouseUp
protected

true if getting point on mouse up

◆ m_color

ON_Color CRhinoGet::m_color
protected

◆ m_number

double CRhinoGet::m_number
protected

◆ m_p2dPointView

CRhinoView* CRhinoGet::m_p2dPointView
protected

if not NULL, Get2dPoint()/Get2dRectangle() will use this view

◆ m_pick_rect

ON_4iRect CRhinoGet::m_pick_rect
protected

if left < right and top < bottom, this is the Windows GDI screen coordinates of the picking rectangle. m_view->Viewport().GetPickXform( m_pick_rect, pick_xform ) will calculate the picking transformation that was used.

◆ m_point

ON_3dPoint CRhinoGet::m_point
protected

3d world point

◆ m_prompt

ON_wString CRhinoGet::m_prompt
protected

◆ m_prompt_default

ON_wString CRhinoGet::m_prompt_default
protected

◆ m_result

CRhinoGet::result CRhinoGet::m_result
protected

◆ m_rhino_view_sn

unsigned int CRhinoGet::m_rhino_view_sn = 0
protected

◆ m_string

ON_wString CRhinoGet::m_string
protected

◆ m_type

const TYPE CRhinoGet::m_type
protected

◆ m_vector

ON_3dVector CRhinoGet::m_vector
protected

3d world vector (from some digitizers)

◆ m_wait_duration

UINT CRhinoGet::m_wait_duration
protected

milliseconds

◆ m_winmsg_id_list

ON_SimpleArray<UINT> CRhinoGet::m_winmsg_id_list
protected

list of windows message ids (in the range 0xC000 - 0xFFFF) to wait for. These are set by calling CRhinoGet::AcceptWindowsMessage() before calling GetPoint/GetObjects/GetOption/GetString/...