|
Rhino C++ API
9.1
|
#include <rhinoSdkUserInterfaceObject.h>
Public Member Functions | |
| CRhinoUserInterfaceDropDown () | |
| virtual | ~CRhinoUserInterfaceDropDown () |
| bool | AcceptsKeyboardFocus () const override |
| int | AddItem (const wchar_t *text) |
| void | CloseList () |
| ON_4fRect | ComputedRect (const CRhinoDisplayPipeline *pipeline, bool logicalPixels) const override |
| ON_2fSize | ComputeSize () const override |
| void | Draw (CRhinoDisplayPipeline &dp) override |
| bool | InsertItem (int index, const wchar_t *text) |
| bool | IsListOpen () const |
| bool | IsMouseOver (const CRhinoMouseEventArgs &mouse) override |
| ON_wString | Item (int index) const |
| int | ItemCount () const |
| int | MaximumVisibleItems () const |
| bool | OnCharacter (unsigned int character, unsigned int flags) override |
| void | OnKeyboardFocusChanged (bool hasFocus) override |
| bool | OnKeyDown (unsigned int virtualKey, unsigned int flags) override |
| void | OnMouseDown (const CRhinoMouseEventArgs &mouse) override |
| void | OnMouseEnter (const CRhinoMouseEventArgs &mouse) override |
| void | OnMouseLeave (const CRhinoMouseEventArgs &mouse) override |
| virtual void | OnSelectionChanged () |
| bool | OpenList () |
| const ON_wString & | PlaceholderText () const |
| void | RemoveAllItems () |
| bool | RemoveItem (int index) |
| int | SelectedIndex () const |
| ON_wString | SelectedItem () const |
| bool | SetItem (int index, const wchar_t *text) |
| void | SetMaximumVisibleItems (int count) |
| void | SetPlaceholderText (const wchar_t *text) |
| void | SetSelectedIndex (int index) |
Public Member Functions inherited from CRhinoUserInterfaceControl | |
| CRhinoUserInterfaceControl () | |
| virtual | ~CRhinoUserInterfaceControl () |
| ON_Color | BackgroundColor () 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 | SetBackgroundColor (const ON_Color &color) |
| 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 | OnMouseDoubleClick (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 |
Friends | |
| class | CRhUserInterfaceDropDownPrivate |
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 drop-down list: a box that shows the item chosen, and the list of items that opens under it when the box is clicked. Choosing an item in the list, with the mouse or the keyboard, changes the selection and calls OnSelectionChanged, the virtual to override to do something about the change.
The open list is drawn over every other user interface object and over the edges of the grid the drop-down sits in. While it is open it has the mouse to itself: a click on an item chooses it, and a click anywhere else in the view closes the list and goes no further. The mouse wheel scrolls a list that is longer than MaximumVisibleItems.
The keyboard, once the drop-down has focus: Up and Down, Home and End move through the items - choosing as they go when the list is closed, the way a combo box in a dialog does, and only moving the highlight when it is open. Alt+Down, F4 or Space opens the list; Enter or Space chooses the highlighted item, Escape closes the list without changing anything and Tab moves on. A letter goes to the next item that starts with it.
The box shows the selected item, or the placeholder text when nothing is selected. CRhinoUserInterfaceControl::Text is not used.
| CRhinoUserInterfaceDropDown::CRhinoUserInterfaceDropDown | ( | ) |
|
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.
| int CRhinoUserInterfaceDropDown::AddItem | ( | const wchar_t * | text | ) |
| void CRhinoUserInterfaceDropDown::CloseList | ( | ) |
|
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.
|
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.
| bool CRhinoUserInterfaceDropDown::InsertItem | ( | int | index, |
| const wchar_t * | text | ||
| ) |
| bool CRhinoUserInterfaceDropDown::IsListOpen | ( | ) | const |
Description: Is the list open? OpenList opens it in the view the drop-down was last drawn in, or in the active view before it has been drawn, and returns false when the drop-down is hidden or has no items. Only one list is open at a time: opening one closes any other. CloseList closes it without changing the selection.
|
overridevirtual |
Description: Return true if the input mouse is considered to be over this object
Reimplemented from CRhinoUserInterfaceObject.
| ON_wString CRhinoUserInterfaceDropDown::Item | ( | int | index | ) | const |
| int CRhinoUserInterfaceDropDown::ItemCount | ( | ) | const |
Description: The items in the list, in the order they are shown. AddItem returns the index the item went in at. Inserting or removing items keeps the same item selected; removing the selected item leaves nothing selected. None of these call OnSelectionChanged.
| int CRhinoUserInterfaceDropDown::MaximumVisibleItems | ( | ) | 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.
|
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 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.
|
virtual |
Description: Called after the user chose a different item, from the list or with the keys. The base implementation does nothing.
| bool CRhinoUserInterfaceDropDown::OpenList | ( | ) |
| const ON_wString& CRhinoUserInterfaceDropDown::PlaceholderText | ( | ) | const |
| void CRhinoUserInterfaceDropDown::RemoveAllItems | ( | ) |
| bool CRhinoUserInterfaceDropDown::RemoveItem | ( | int | index | ) |
| int CRhinoUserInterfaceDropDown::SelectedIndex | ( | ) | const |
Description: Index of the item chosen, -1 when nothing is. Setting it does not call OnSelectionChanged; that is only for a choice the user made. An index out of range selects nothing. SelectedItem is the text of the item chosen, empty when nothing is.
| ON_wString CRhinoUserInterfaceDropDown::SelectedItem | ( | ) | const |
| bool CRhinoUserInterfaceDropDown::SetItem | ( | int | index, |
| const wchar_t * | text | ||
| ) |
| void CRhinoUserInterfaceDropDown::SetMaximumVisibleItems | ( | int | count | ) |
Description: Most items the open list shows at once; a longer list scrolls. The default is
| void CRhinoUserInterfaceDropDown::SetPlaceholderText | ( | const wchar_t * | text | ) |
Description: Text drawn, dimmed, in the box when nothing is selected
| void CRhinoUserInterfaceDropDown::SetSelectedIndex | ( | int | index | ) |
|
friend |
1.8.17