|
Rhino C++ API
9.0
|
#include <rhinoSdkUserInterfaceObject.h>
Public Member Functions | |
| CRhinoUserInterfaceTextBox () | |
| CRhinoUserInterfaceTextBox (const wchar_t *text) | |
| virtual | ~CRhinoUserInterfaceTextBox () |
| bool | AcceptsKeyboardFocus () const override |
| ON_Color | BackgroundColor () const |
| ON_Color | BorderColor () const |
| int | CaretPosition () const |
| void | ClearSelection () |
| ON_4fRect | ComputedRect (const CRhinoDisplayPipeline *pipeline, bool logicalPixels) const override |
| ON_2fSize | ComputeSize () const override |
| bool | CopyToClipboard () const |
| bool | CutToClipboard () |
| void | Draw (CRhinoDisplayPipeline &dp) override |
| bool | IsMouseOver (const CRhinoMouseEventArgs &mouse) override |
| int | MaximumLength () const |
| bool | OnCharacter (unsigned int character, unsigned int flags) override |
| virtual void | OnEditCanceled () |
| void | OnKeyboardFocusChanged (bool hasFocus) override |
| bool | OnKeyDown (unsigned int virtualKey, unsigned int flags) override |
| void | OnMouseDoubleClick (const CRhinoMouseEventArgs &mouse) override |
| void | OnMouseDown (const CRhinoMouseEventArgs &mouse) override |
| void | OnMouseEnter (const CRhinoMouseEventArgs &mouse) override |
| void | OnMouseLeave (const CRhinoMouseEventArgs &mouse) override |
| void | OnMouseMove (const CRhinoMouseEventArgs &mouse) override |
| void | OnMouseUp (const CRhinoMouseEventArgs &mouse) override |
| virtual void | OnTextChanged () |
| virtual void | OnTextCommitted () |
| bool | PasteFromClipboard () |
| const ON_wString & | PlaceholderText () const |
| bool | ReadOnly () const |
| void | SelectAll () |
| ON_wString | SelectedText () const |
| ON_Color | SelectionColor () const |
| int | SelectionLength () const |
| int | SelectionStart () const |
| void | SetBackgroundColor (const ON_Color &color) |
| void | SetBorderColor (const ON_Color &color) |
| void | SetCaretPosition (int position) |
| void | SetMaximumLength (int maximumLength) |
| void | SetPlaceholderText (const wchar_t *text) |
| void | SetReadOnly (bool readOnly) |
| void | SetSelection (int start, int length) |
| void | SetSelectionColor (const ON_Color &color) |
| void | TakeKeyboardFocus (CRhinoDoc *doc) |
Public Member Functions inherited from CRhinoUserInterfaceControl | |
| CRhinoUserInterfaceControl () | |
| virtual | ~CRhinoUserInterfaceControl () |
| 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 () |
| 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 |
| 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 |
| bool | MoveKeyboardFocusToSibling (bool forward, CRhinoDoc *doc) |
| virtual void | OnMouseClick (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 |
Friends | |
| class | CRhUserInterfaceTextBoxPrivate |
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) |
Protected Attributes inherited from CRhinoUserInterfaceControl | |
| class CRhUserInterfaceControlPrivate * | m_ui_control_private = nullptr |
Protected Attributes inherited from CRhinoUserInterfaceObject | |
| class CRhUserInterfaceObjectPrivate * | m_private = nullptr |
Description: A single line text box. Click it to give it keyboard focus, then type. The characters go into the box instead of to the command line for as long as it has focus; Enter commits what was typed, Escape puts back the text the box started with, and both give the focus back to the viewport.
| CRhinoUserInterfaceTextBox::CRhinoUserInterfaceTextBox | ( | ) |
| CRhinoUserInterfaceTextBox::CRhinoUserInterfaceTextBox | ( | const wchar_t * | text | ) |
|
virtual |
|
overridevirtual |
Description: Can this object take keyboard focus? This is what Tab looks at when it goes looking for the next control to move to. The base class returns false.
Reimplemented from CRhinoUserInterfaceObject.
| ON_Color CRhinoUserInterfaceTextBox::BackgroundColor | ( | ) | const |
| ON_Color CRhinoUserInterfaceTextBox::BorderColor | ( | ) | const |
| int CRhinoUserInterfaceTextBox::CaretPosition | ( | ) | const |
Description: Where the insertion point sits, as a count of characters from the start of the text. Setting it clamps to the length of the text, and drops whatever was selected: a caret on its own is a selection of nothing.
| void CRhinoUserInterfaceTextBox::ClearSelection | ( | ) |
|
overridevirtual |
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 from CRhinoUserInterfaceControl.
|
overridevirtual |
Description: Compute the size of this control in logical pixels.
Reimplemented from CRhinoUserInterfaceControl.
| bool CRhinoUserInterfaceTextBox::CopyToClipboard | ( | ) | const |
Description: Clipboard. Ctrl+C, Ctrl+X and Ctrl+V call these while the box has keyboard focus. Copy and cut work on the selected run and do nothing when nothing is selected. Paste replaces the selection, or puts what is on the clipboard in at the caret when there is none, with anything that would break the line flattened to a space. Cut takes nothing out of a read only box, and paste puts nothing into one. Returns: True if the clipboard or the text changed.
| bool CRhinoUserInterfaceTextBox::CutToClipboard | ( | ) |
|
overridevirtual |
Description: All user interface objects must implement a Draw function. This is where drawing using the input display pipeline is performed. The base class Draw function does nothing.
Reimplemented from CRhinoUserInterfaceObject.
|
overridevirtual |
Description: Return true if the input mouse is considered to be over this object
Reimplemented from CRhinoUserInterfaceObject.
| int CRhinoUserInterfaceTextBox::MaximumLength | ( | ) | const |
|
overridevirtual |
Description: Called when a character is typed while this object has keyboard focus. Parameters: character - [in] the character that was typed flags - [in] platform key state flags Returns: True when this object used the character. A character this object does not use carries on to the command line, the way typing in a viewport normally works. The base class returns false.
Reimplemented from CRhinoUserInterfaceObject.
|
virtual |
Description: Called when Escape is pressed. The text has already been put back to what it was when the box took focus.
|
overridevirtual |
Description: Called when this object gains or loses keyboard focus. The base class implementation does nothing. KeyboardFocusReason says how focus arrived.
Reimplemented from CRhinoUserInterfaceObject.
|
overridevirtual |
Description: Called when a key goes down while this object has keyboard focus. This is where the keys that do not produce characters arrive: the arrows, Home, End, Backspace, Delete, Enter and Escape. Parameters: virtualKey - [in] virtual key code, VK_LEFT and friends flags - [in] platform key state flags Returns: True when this object used the key. The base class returns false.
Reimplemented from CRhinoUserInterfaceObject.
|
overridevirtual |
Description: Called when a mouse double clicks on this UI element Parameters: mouse - mouse position, button and view
Reimplemented from CRhinoUserInterfaceObject.
|
overridevirtual |
Description: Called when a mouse button goes down over this UI element Parameters: mouse - mouse position, button and view
Reimplemented from CRhinoUserInterfaceObject.
|
overridevirtual |
Description: Called when first goes over this object (IsMouseOver returns true)
Reimplemented from CRhinoUserInterfaceObject.
|
overridevirtual |
Description: Called when mouse leaves this object (IsMouseOver returns false)
Reimplemented from CRhinoUserInterfaceObject.
|
overridevirtual |
Description: Called when a mouse moves over this UI element Parameters: mouse - mouse position, button and view
Reimplemented from CRhinoUserInterfaceObject.
|
overridevirtual |
Description: Called when a mouse button goes up over this UI element Parameters: mouse - mouse position, button and view
Reimplemented from CRhinoUserInterfaceObject.
|
virtual |
Description: Called every time the text changes, once per keystroke.
|
virtual |
Description: Called when Enter is pressed, and when the box loses focus with the text changed from what it started with. This is where a caller does something about the new text.
| bool CRhinoUserInterfaceTextBox::PasteFromClipboard | ( | ) |
| const ON_wString& CRhinoUserInterfaceTextBox::PlaceholderText | ( | ) | const |
| bool CRhinoUserInterfaceTextBox::ReadOnly | ( | ) | const |
| void CRhinoUserInterfaceTextBox::SelectAll | ( | ) |
| ON_wString CRhinoUserInterfaceTextBox::SelectedText | ( | ) | const |
| ON_Color CRhinoUserInterfaceTextBox::SelectionColor | ( | ) | const |
| int CRhinoUserInterfaceTextBox::SelectionLength | ( | ) | const |
| int CRhinoUserInterfaceTextBox::SelectionStart | ( | ) | const |
Description: The run of text that is selected: where it starts and how many characters long it is. A length of zero means nothing is selected. Dragging across the text selects, as do shift and the arrow keys, Ctrl+A, and a double click on a word. Typing, or pasting, replaces what is selected.
SetSelection clamps to the text and leaves the caret at the end of the run. Both ends survive a text change no worse than the caret does: they are clamped when they are read.
| void CRhinoUserInterfaceTextBox::SetBackgroundColor | ( | const ON_Color & | color | ) |
Description: The box the text sits in: the color it is filled with, and the color of the outline around it. Both default to ON_UNSET_COLOR, which means use standard colors for the theme in use. The outline is drawn thicker and brighter while the box has keyboard focus, whatever color it is given.
| void CRhinoUserInterfaceTextBox::SetBorderColor | ( | const ON_Color & | color | ) |
| void CRhinoUserInterfaceTextBox::SetCaretPosition | ( | int | position | ) |
| void CRhinoUserInterfaceTextBox::SetMaximumLength | ( | int | maximumLength | ) |
Description: Most characters the text will hold. 0, the default, means no limit.
| void CRhinoUserInterfaceTextBox::SetPlaceholderText | ( | const wchar_t * | text | ) |
Description: Text drawn, dimmed, when the box is empty and does not have focus.
| void CRhinoUserInterfaceTextBox::SetReadOnly | ( | bool | readOnly | ) |
Description: A read only text box can take focus and be scrolled through, but typing does not change it. Off by default.
| void CRhinoUserInterfaceTextBox::SetSelection | ( | int | start, |
| int | length | ||
| ) |
| void CRhinoUserInterfaceTextBox::SetSelectionColor | ( | const ON_Color & | color | ) |
Description: Color drawn behind the selected run of text. ON_UNSET_COLOR, the default, means use a standard highlight color for the theme in use.
| void CRhinoUserInterfaceTextBox::TakeKeyboardFocus | ( | CRhinoDoc * | doc | ) |
Description: Give this text box keyboard focus, as clicking it does. The document is used to redraw and can be nullptr.
|
friend |
1.8.17