|
Rhino C++ API
9.0
|
#include <rhinoSdkUserInterfaceObject.h>
Public Member Functions | |
| CRhinoUserInterfaceControl () | |
| virtual | ~CRhinoUserInterfaceControl () |
| virtual ON_4fRect | ComputedRect (const CRhinoDisplayPipeline *pipeline, bool logicalPixels) const |
| virtual ON_2fSize | ComputeSize () const |
| void | GetAlignment (ControlHorizontalAlignment &h, ControlVerticalAlignment &v) const |
| void | GetTextAlignment (ControlHorizontalAlignment &h, ControlVerticalAlignment &v) const |
| const ON_wString & | ImageSVG () const |
| ON_2fPoint | Location () const |
| void | SetAlignment (ControlHorizontalAlignment h, ControlVerticalAlignment v) |
| void | SetImageSVG (const wchar_t *svg) |
| void | SetLocation (float x, float y) |
| void | SetLocation (ON_2fPoint location) |
| void | SetLocation (ON_2fPoint location, ControlHorizontalAlignment hAlign, ControlVerticalAlignment vAlign) |
| void | SetSize (const ON_2fSize &size) |
| void | SetSize (float width, float height) |
| void | SetText (const wchar_t *text) |
| void | SetTextAlignment (ControlHorizontalAlignment h, ControlVerticalAlignment v) |
| void | SetTextColor (const ON_Color &color) |
| void | SetTextHeight (float height) |
| void | SetTrackingPoint (const ON_3dPoint &pt) |
| ON_2fSize | Size () const |
| const ON_wString & | Text () const |
| ON_Color | TextColor () const |
| float | TextHeight () const |
| ON_3dPoint | TrackingPoint () const |
Public Member Functions inherited from CRhinoUserInterfaceObject | |
| CRhinoUserInterfaceObject () | |
| virtual | ~CRhinoUserInterfaceObject () |
| virtual bool | AcceptsKeyboardFocus () const |
| void | Animate (CRhinoAnimatingDouble &value, double target, double duration, AnimationStyle style, CRhinoDoc *doc) |
| void | BindToActiveViewport (bool on) |
| void | BindToViewport (unsigned int viewport_sn) |
| virtual double | CameraDepth (const ON_Plane &cameraPlane) const |
| int | DisplayOrder () const |
| ON_UUID | DocumentGroupId () const |
| unsigned int | DocumentRuntimeSerialNumber () const |
| virtual void | Draw (CRhinoDisplayPipeline &dp) |
| bool | GetData (const wchar_t *key, bool &value) const |
| bool | GetData (const wchar_t *key, double &value) const |
| bool | GetData (const wchar_t *key, int &value) const |
| bool | GetData (const wchar_t *key, ON_UUID &value) const |
| bool | GetData (const wchar_t *key, ON_wString &value) const |
| bool | HasKeyboardFocus () const |
| bool | HasMouseCapture () const |
| bool | IsBoundToActiveViewport () const |
| unsigned int | IsBoundToViewport () const |
| virtual bool | IsMouseOver (const CRhinoMouseEventArgs &mouse) |
| bool | MoveKeyboardFocusToSibling (bool forward, CRhinoDoc *doc) |
| virtual bool | OnCharacter (unsigned int character, unsigned int flags) |
| virtual void | OnKeyboardFocusChanged (bool hasFocus) |
| virtual bool | OnKeyDown (unsigned int virtualKey, unsigned int flags) |
| virtual void | OnMouseClick (const CRhinoMouseEventArgs &mouse) |
| virtual void | OnMouseDoubleClick (const CRhinoMouseEventArgs &mouse) |
| virtual void | OnMouseDown (const CRhinoMouseEventArgs &mouse) |
| virtual void | OnMouseEnter (const CRhinoMouseEventArgs &mouse) |
| virtual void | OnMouseLeave (const CRhinoMouseEventArgs &mouse) |
| virtual void | OnMouseMove (const CRhinoMouseEventArgs &mouse) |
| virtual void | OnMouseUp (const CRhinoMouseEventArgs &mouse) |
| virtual void | OnMouseWheel (const CRhinoMouseEventArgs &mouse, int delta) |
| virtual CRhinoCommand::result | OnRunCommand (const CRhinoCommandContext &context, const CRhinoMouseEventArgs &mouse) |
| virtual void | OnTrackpadScroll (const CRhinoMouseEventArgs &mouse, float horizontal, float vertical) |
| CRhinoUserInterfaceObject * | Parent () |
| const CRhinoUserInterfaceObject * | Parent () const |
| bool | ReceivesMouseWheelEvents () const |
| bool | ReceivesTrackpadScrollEvents () const |
| bool | RegisterForAllDocuments () |
| void | RunCommand (const CRhinoMouseEventArgs &mouse) |
| unsigned int | RuntimeSerialNumber () const |
| void | SetCursor (HCURSOR cursor) |
| void | SetData (const wchar_t *key, bool value) |
| void | SetData (const wchar_t *key, const wchar_t *value) |
| void | SetData (const wchar_t *key, double value) |
| void | SetData (const wchar_t *key, int value) |
| void | SetData (const wchar_t *key, ON_UUID value) |
| void | SetDisplayOrder (int order) |
| void | SetReceivesMouseWheelEvents (bool enable) |
| void | SetReceivesTrackpadScrollEvents (bool enable) |
| void | SetTooltip (const wchar_t *tooltip) |
| void | SetVisible (bool visible) |
| bool | UnregisterFromAllDocuments () |
| bool | Visible () const |
Protected Attributes | |
| class CRhUserInterfaceControlPrivate * | m_ui_control_private = nullptr |
Protected Attributes inherited from CRhinoUserInterfaceObject | |
| class CRhUserInterfaceObjectPrivate * | m_private = nullptr |
Additional Inherited Members | |
Public Types inherited from CRhinoUserInterfaceObject | |
| enum | FocusReason : int { FocusReason::Unknown = 0, FocusReason::Pointer = 1, FocusReason::Navigation = 2 } |
Static Public Member Functions inherited from CRhinoUserInterfaceObject | |
| static void | ClearKeyboardFocus (CRhinoDoc *doc) |
| static FocusReason | KeyboardFocusReason () |
Protected Member Functions inherited from CRhinoUserInterfaceObject | |
| virtual void | ContinueAnimate (CRhinoDoc *doc) |
| void | ReleaseKeyboardFocus (CRhinoDoc *doc) |
| void | SetKeyboardFocus (CRhinoDoc *doc, FocusReason reason=FocusReason::Unknown) |
| void | SetMouseCapture (CRhinoDoc *doc) |
Description: Controls are traditional 2d user interface elements that can be drawn and respond to mouse events in a rhino view.
| CRhinoUserInterfaceControl::CRhinoUserInterfaceControl | ( | ) |
|
virtual |
|
virtual |
Description: Compute the location and size of this control in the coordinates of the thing that is drawing it. Parameters: pipeline - the display pipeline to compute location and size inside of. The same control can end up in different places in different pipelines, because of how it is aligned or because it is tracking a 3d point. Take the pipeline rather than the view it belongs to: a detail on a layout is drawn by its own nested pipeline whose view is the page view, so a view cannot say which of the two is being drawn. logicalPixels - should the rectangle be return in device or logical pixels
Reimplemented in CRhinoUserInterfaceGrid, CRhinoUserInterfaceTextBox, CRhinoUserInterfaceSlider, CRhinoUserInterfaceRadioButton, CRhinoUserInterfaceCheckBox, CRhinoUserInterfaceIcon, CRhinoUserInterfaceButton, and CRhinoUserInterfaceLabel.
|
virtual |
Description: Compute the size of this control in logical pixels.
Reimplemented in CRhinoUserInterfaceGrid, CRhinoUserInterfaceTextBox, CRhinoUserInterfaceSlider, CRhinoUserInterfaceRadioButton, CRhinoUserInterfaceCheckBox, CRhinoUserInterfaceIcon, CRhinoUserInterfaceButton, and CRhinoUserInterfaceLabel.
| void CRhinoUserInterfaceControl::GetAlignment | ( | ControlHorizontalAlignment & | h, |
| ControlVerticalAlignment & | v | ||
| ) | const |
| void CRhinoUserInterfaceControl::GetTextAlignment | ( | ControlHorizontalAlignment & | h, |
| ControlVerticalAlignment & | v | ||
| ) | const |
| const ON_wString& CRhinoUserInterfaceControl::ImageSVG | ( | ) | const |
| ON_2fPoint CRhinoUserInterfaceControl::Location | ( | ) | const |
| void CRhinoUserInterfaceControl::SetAlignment | ( | ControlHorizontalAlignment | h, |
| ControlVerticalAlignment | v | ||
| ) |
Description: How this control is aligned in its parent
| void CRhinoUserInterfaceControl::SetImageSVG | ( | const wchar_t * | svg | ) |
| void CRhinoUserInterfaceControl::SetLocation | ( | float | x, |
| float | y | ||
| ) |
Description: Location of this control in logical pixels. The actual location where the control ends up on the screen is determined by a combination of location, alignment and optionally a 3d teacking point.
| void CRhinoUserInterfaceControl::SetLocation | ( | ON_2fPoint | location | ) |
| void CRhinoUserInterfaceControl::SetLocation | ( | ON_2fPoint | location, |
| ControlHorizontalAlignment | hAlign, | ||
| ControlVerticalAlignment | vAlign | ||
| ) |
Description: Convenience function to set both location and alignment in one call
| void CRhinoUserInterfaceControl::SetSize | ( | const ON_2fSize & | size | ) |
| void CRhinoUserInterfaceControl::SetSize | ( | float | width, |
| float | height | ||
| ) |
Description: The size of this control in logical pixels. If size is 0 (default) for width or height, then a size is computed for the control based on it's contents.
| void CRhinoUserInterfaceControl::SetText | ( | const wchar_t * | text | ) |
| void CRhinoUserInterfaceControl::SetTextAlignment | ( | ControlHorizontalAlignment | h, |
| ControlVerticalAlignment | v | ||
| ) |
Description: Where the text sits inside the control's rectangle. This is not the same as SetAlignment, which is where the control's rectangle sits inside its parent. The default is left / center.
| void CRhinoUserInterfaceControl::SetTextColor | ( | const ON_Color & | color | ) |
Description: Color used to draw the text. The default is ON_UNSET_COLOR, which means use the standard text color for the theme that is in use.
| void CRhinoUserInterfaceControl::SetTextHeight | ( | float | height | ) |
Description: Height of the text in logical pixels. A value <= 0 (default) means use the standard control font height. Controls that draw no text ignore this.
| void CRhinoUserInterfaceControl::SetTrackingPoint | ( | const ON_3dPoint & | pt | ) |
Description: Controls can be made to "track" 3d locations in a viewport. In other words, the control will move around the viewport as if it were glued to a 3d location. By default the tracking point is unset which means the control will not track a 3d location
| ON_2fSize CRhinoUserInterfaceControl::Size | ( | ) | const |
| const ON_wString& CRhinoUserInterfaceControl::Text | ( | ) | const |
| ON_Color CRhinoUserInterfaceControl::TextColor | ( | ) | const |
| float CRhinoUserInterfaceControl::TextHeight | ( | ) | const |
| ON_3dPoint CRhinoUserInterfaceControl::TrackingPoint | ( | ) | const |
|
protected |
1.8.17