Rhino C++ API
8.13
|
#include <RhinoSdkUiPointEdit.h>
Public Types | |
enum | edit_field_styles { efs_borders = 1, force_32bit_edit_field_styles = 0xFFFFFFFF } |
enum | edit_fields { x_field = 0, y_field, z_field, edit_wnd_cnt = 3, force_32bit_edit_fields = 0xFFFFFFFF } |
Public Member Functions | |
CRhinoUiPointEdit () | |
virtual | ~CRhinoUiPointEdit () |
bool | CreatePointEdit (CWnd *pParent, DWORD dwStyle, DWORD dwStyleEx, const CRect &r, UINT nID=0) |
const wchar_t * | EditFieldLabelText (int ef) const |
ON_3dPoint | GetPoint () const |
void | GetPoint (CString &x, CString &y, CString &z) const |
void | GetPoint (double &x, double &y, double &z) const |
COLORREF | LabelBkGrndColor () const |
COLORREF | LabelTextColor () const |
void | ModifyEditFieldsStyle (int remove, int add) |
virtual BOOL32 | OnCommand (WPARAM wParam, LPARAM lParam) |
afx_msg int | OnCreate (LPCREATESTRUCT lpCreateStruct) |
afx_msg void | OnLButtonDown (UINT nFlags, CPoint point) |
afx_msg void | OnLButtonUp (UINT nFlags, CPoint point) |
afx_msg void | OnMouseMove (UINT nFlags, CPoint point) |
virtual BOOL32 | OnNotify (WPARAM wParam, LPARAM lParam, LRESULT *pResult) |
afx_msg void | OnPaint () |
afx_msg void | OnSize (UINT nType, int cx, int cy) |
bool | ReplaceDlgItem (CDialog *pParent, UINT nID) |
COLORREF | SetLabelBkGrndColor (COLORREF cr) |
COLORREF | SetLabelTextColor (COLORREF cr) |
void | SetNumber (int ef, double d) |
void | SetPoint (double x, double y, double z) |
void | SetPoint (ON_3dPoint pt) |
int | TextPadding () const |
virtual LRESULT | WindowProc (UINT message, WPARAM wParam, LPARAM lParam) |
CWnd overrides. More... | |
Protected Member Functions | |
void | ComputeControlRects (CDC &dc, CRect rCtrl) |
void | DrawItemLabels (CDC &dc, CRect rClient) const |
Protected Attributes | |
COLORREF | m_crLabelBkGrndColor |
COLORREF | m_crLabelTextColor |
int | m_iEditFieldStyles |
CRect | m_redit [edit_wnd_cnt] |
CRect | m_rtext [edit_wnd_cnt] |
CRhinoUiEdit | m_xyz [edit_wnd_cnt] |
/ / Copyright (c) 1993-2007 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. / //////////////////////////////////////////////////////////////
CRhinoUiPointEdit::CRhinoUiPointEdit | ( | ) |
|
virtual |
|
protected |
Description: Initialize m_redit and m_rtext arrays
Parameters: dc [in] Device context used to compute text sizes rCtrl [in] Bounding rectangle, in dc coordinate system, for this control
bool CRhinoUiPointEdit::CreatePointEdit | ( | CWnd * | pParent, |
DWORD | dwStyle, | ||
DWORD | dwStyleEx, | ||
const CRect & | r, | ||
UINT | nID = 0 |
||
) |
Description: Create a point edit control.
Parameters: pParent [in] The parent window. dwStyle [in] Specifies the window style attributes. dwStyleEx [in] Specifies extended windows style attributes. r [in] The size and position of the window, in client coordinates of pParentWnd. nID [in] The ID of the child window.
Returns: Returns true if control is created or false if it was not.
See Also: CWnd::Create
|
protected |
Description: Draw item labels to specified DC
Parameters: dc [in] Device context to draw into rClient [in] Bounding rectangle for control elements in dc coordinate system
const wchar_t* CRhinoUiPointEdit::EditFieldLabelText | ( | int | ef | ) | const |
Description: Get label associated with specified X, Y or Z edit control
Parameters: ef [in] Edit field to get label for, see edit_field_styles for possible values
Returns: Returns label associated with ef or NULL if ef is invalid
ON_3dPoint CRhinoUiPointEdit::GetPoint | ( | ) | const |
Description: Get current value of X, Y and Z edit controls
Returns: Returns 3d point containing current edit control values
void CRhinoUiPointEdit::GetPoint | ( | CString & | x, |
CString & | y, | ||
CString & | z | ||
) | const |
Description: Get current X, Y and Z edit control strings
Parameters: x [out] Variable to hold the X edit control string value y [out] Variable to hold the Y edit control string value z [out] Variable to hold the Z edit control string value
void CRhinoUiPointEdit::GetPoint | ( | double & | x, |
double & | y, | ||
double & | z | ||
) | const |
Description: Get current value of X, Y and Z edit controls
Parameters: x [out] Variable to hold the X edit control value y [out] Variable to hold the Y edit control value z [out] Variable to hold the Z edit control value
Returns: Returns
COLORREF CRhinoUiPointEdit::LabelBkGrndColor | ( | ) | const |
Description: Current item label background color.
Returns: Returns color used to fill edit label backgrounds. If SetLabelBkGrndColor( CRhinoUiPaintManager::unset_color) is called then the current window color will be used. To change call SetLabelBkGrndColor( RGB( r, g, b)) with new background color. By default the label background color is CRhinoUiPaintManager::unset_color which causes the window background color to be returned.
See Also: CRhinoUiOptionsListCtrl::SetLabelBkGrndColor() CRhinoUiOptionsListCtrl::LabelTextColor() CRhinoUiOptionsListCtrl::SetLabelTextColor()
COLORREF CRhinoUiPointEdit::LabelTextColor | ( | ) | const |
Description: This method is used to identify the edit label text color. The default value is CRhinoUiPaintManager::unset_color which causes the default window text color to be used.
Returns: Returns color to be used to to draw edit label text. If color is CRhinoUiPaintManager::unset_color then default color is assumed.
See Also: CRhinoUiOptionsListCtrl::SetLabelTextColor() CRhinoUiOptionsListCtrl::SetLabelBackGroundColor() CRhinoUiOptionsListCtrl::LabelBackGroundColor() CRhinoUiOptionsListCtrl::OnDrawItem()
void CRhinoUiPointEdit::ModifyEditFieldsStyle | ( | int | remove, |
int | add | ||
) |
Description: Modify edit_field_styles associated with this control
Parameters: remove [in] edit_field_styles Style flags to remove from control add [in] edit_field_styles Style flags to add to control
|
virtual |
Reimplemented in CRhinoUiOptionsListCtrlPointEditBox.
afx_msg int CRhinoUiPointEdit::OnCreate | ( | LPCREATESTRUCT | lpCreateStruct | ) |
afx_msg void CRhinoUiPointEdit::OnLButtonDown | ( | UINT | nFlags, |
CPoint | point | ||
) |
afx_msg void CRhinoUiPointEdit::OnLButtonUp | ( | UINT | nFlags, |
CPoint | point | ||
) |
afx_msg void CRhinoUiPointEdit::OnMouseMove | ( | UINT | nFlags, |
CPoint | point | ||
) |
|
virtual |
afx_msg void CRhinoUiPointEdit::OnPaint | ( | ) |
afx_msg void CRhinoUiPointEdit::OnSize | ( | UINT | nType, |
int | cx, | ||
int | cy | ||
) |
bool CRhinoUiPointEdit::ReplaceDlgItem | ( | CDialog * | pParent, |
UINT | nID | ||
) |
Description: Replace a dialog item with this control
Parameters: pParent [in] Dialog to embed point edit control inside of. nID [in] The ID of the dialog control to replace. The new point edit control will be created using this ID.
Returns: Returns true if successful; otherwise false
See Also: CRhinoUiPointEdit::CreatePointEdit()
COLORREF CRhinoUiPointEdit::SetLabelBkGrndColor | ( | COLORREF | cr | ) |
Description: Used to override default label back ground color for unselected items. Default value is CRhinoUiPaintManager::unset_color which causes the dialog background color to be used. Set to valid RGB value to change label background color.
Parameters: cr [in] New unselected label background color or CRhinoUiPaintManager::unset_color for default color.
Returns: Returns previous value
See Also: CRhinoUiOptionsListCtrl::LabelBkGrndColor() CRhinoUiOptionsListCtrl::LabelTextColor() CRhinoUiOptionsListCtrl::SetLabelTextColor() CRhinoUiOptionsListCtrl::GridLineColor() CRhinoUiOptionsListCtrl::SetGridLineColor()
COLORREF CRhinoUiPointEdit::SetLabelTextColor | ( | COLORREF | cr | ) |
Description: Used to override default label text color for unselected items. Default value is CRhinoUiPaintManager::unset_color which causes the dialog text color to be used. Set to valid RGB value to change label text color.
Parameters: cr [in] New label text color CRhinoUiPaintManager::unset_color for default color.
Returns: Returns previous value
See Also: CRhinoUiOptionsListCtrl::LabelTextColor() CRhinoUiOptionsListCtrl::LabelBkGrndColor() CRhinoUiOptionsListCtrl::SetLabelBkGrndColor() CRhinoUiOptionsListCtrl::GridLineColor() CRhinoUiOptionsListCtrl::SetGridLineColor()
void CRhinoUiPointEdit::SetNumber | ( | int | ef, |
double | d | ||
) |
Description: Set value for X, Y or Z edit control.
Parameters: ef [in] Field to set, see edit_fields enum for field IDs d [in] Value to place in edit control
void CRhinoUiPointEdit::SetPoint | ( | double | x, |
double | y, | ||
double | z | ||
) |
Description: Set X, Y and Z edit control values
Parameters: x [in] X value used to initialize edit control y [in] Y value used to initialize edit control z [in] Z value used to initialize edit control
void CRhinoUiPointEdit::SetPoint | ( | ON_3dPoint | pt | ) |
Description: Set X, Y and Z edit control values
Parameters: pt [in] X, Y and Z values used to initialize edit controls
int CRhinoUiPointEdit::TextPadding | ( | ) | const |
Description: Padding between labels and edit controls
Returns: Returns padding between labels and edit controls
|
virtual |
CWnd overrides.
Reimplemented in CRhinoUiOptionsListCtrlPointEditBox.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |