|
NXWidgets
1.19
|
#include <cscrollinglistbox.hxx>

Public Member Functions | |
| CScrollingListBox (CWidgetControl *pWidgetControl, nxgl_coord_t x, nxgl_coord_t y, nxgl_coord_t width, nxgl_coord_t height, CWidgetStyle *style=(CWidgetStyle *) NULL) | |
| virtual void | addOption (const CNxString &text, const uint32_t value) |
| virtual void | addOption (CListBoxDataItem *option) |
| virtual void | addOption (const CNxString &text, const uint32_t value, const nxwidget_pixel_t normalTextColor, const nxwidget_pixel_t normalBackColor, const nxwidget_pixel_t selectedTextColor, const nxwidget_pixel_t selectedBackColor) |
| virtual void | removeOption (const int index) |
| virtual void | removeAllOptions (void) |
| virtual void | selectOption (const int index) |
| virtual void | deselectOption (const int index) |
| virtual void | selectAllOptions (void) |
| virtual void | deselectAllOptions (void) |
| virtual const int | getSelectedIndex (void) const |
| virtual void | setSelectedIndex (const int index) |
| virtual const CListBoxDataItem * | getSelectedOption (void) const |
| virtual void | setAllowMultipleSelections (const bool allowMultipleSelections) |
| virtual const bool | allowsMultipleSelections (void) const |
| virtual void | resizeCanvas (void) |
| virtual const CListBoxDataItem * | getOption (const int index) |
| virtual const CListBoxDataItem * | getOption (const int index) const |
| virtual void | sort (void) |
| virtual const int | getOptionCount (void) const |
| virtual const nxgl_coord_t | getOptionHeight (void) const |
| virtual void | handleValueChangeEvent (const CWidgetEventArgs &e) |
| virtual void | handleActionEvent (const CWidgetEventArgs &e) |
| virtual void | handleScrollEvent (const CWidgetEventArgs &e) |
| virtual void | handleClickEvent (const CWidgetEventArgs &e) |
| virtual void | handleDoubleClickEvent (const CWidgetEventArgs &e) |
| virtual void | handleReleaseEvent (const CWidgetEventArgs &e) |
| virtual void | handleReleaseOutsideEvent (const CWidgetEventArgs &e) |
| virtual void | setFont (CNxFont *font) |
| virtual void | setSortInsertedItems (const bool sortInsertedItems) |
| virtual void | getPreferredDimensions (CRect &rect) const |
Public Member Functions inherited from NXWidgets::IListBox | |
| virtual | ~IListBox (void) |
Public Member Functions inherited from NXWidgets::CNxWidget | |
| CNxWidget (CWidgetControl *pWidgetControl, nxgl_coord_t x, nxgl_coord_t y, nxgl_coord_t width, nxgl_coord_t height, uint32_t flags, FAR const CWidgetStyle *style=(FAR const CWidgetStyle *) NULL) | |
| virtual | ~CNxWidget (void) |
| nxgl_coord_t | getX (void) const |
| nxgl_coord_t | getY (void) const |
| nxgl_coord_t | getRelativeX (void) const |
| nxgl_coord_t | getRelativeY (void) const |
| bool | hasFocus (void) const |
| bool | isDeleted (void) const |
| bool | isDrawingEnabled (void) const |
| bool | isHidden (void) const |
| bool | isEnabled (void) const |
| bool | isPermeable (void) const |
| bool | isDoubleClickable (void) const |
| bool | isBorderless (void) const |
| bool | isClicked (void) const |
| bool | isBeingDragged (void) const |
| nxgl_coord_t | getWidth (void) const |
| nxgl_coord_t | getHeight (void) const |
| void | getSize (struct nxgl_size_s &size) const |
| void | getPos (struct nxgl_point_s &pos) const |
| CRect | getBoundingBox (void) |
| void | getBorderSize (WidgetBorderSize &borderSize) |
| CNxWidget * | getParent (void) const |
| CNxWidget * | getFocusedWidget (void) |
| void | getClientRect (CRect &rect) const |
| void | getRect (CRect &rect) const |
| CNxFont * | getFont (void) const |
| nxgl_mxpixel_t | getBackgroundColor (void) const |
| nxgl_mxpixel_t | getSelectedBackgroundColor (void) const |
| nxgl_mxpixel_t | getShineEdgeColor (void) const |
| nxgl_mxpixel_t | getShadowEdgeColor (void) const |
| nxgl_mxpixel_t | getHighlightColor (void) const |
| nxgl_mxpixel_t | getDisabledTextColor (void) const |
| nxgl_mxpixel_t | getEnabledTextColor (void) const |
| nxgl_mxpixel_t | getSelectedTextColor (void) const |
| const CWidgetStyle * | getWidgetStyle () const |
| void | setBorderless (bool isBorderless) |
| void | setDraggable (bool isDraggable) |
| void | setPermeable (bool permeable) |
| void | setDoubleClickable (bool doubleClickable) |
| void | addWidgetEventHandler (CWidgetEventHandler *eventHandler) |
| void | removeWidgetEventHandler (CWidgetEventHandler *eventHandler) |
| int | nWidgetEventHandlers (void) const |
| void | setRaisesEvents (bool raises) |
| bool | raisesEvents (void) const |
| void | disableDrawing (void) |
| void | enableDrawing (void) |
| void | setBackgroundColor (nxgl_mxpixel_t color) |
| void | setSelectedBackgroundColor (nxgl_mxpixel_t color) |
| void | setShineEdgeColor (nxgl_mxpixel_t color) |
| void | setShadowEdgeColor (nxgl_mxpixel_t color) |
| void | setHighlightColor (nxgl_mxpixel_t color) |
| void | setDisabledTextColor (nxgl_mxpixel_t color) |
| void | setEnabledTextColor (nxgl_mxpixel_t color) |
| void | setSelectedTextColor (nxgl_mxpixel_t color) |
| void | redraw (void) |
| bool | enable (void) |
| bool | disable (void) |
| void | close (void) |
| bool | show (void) |
| bool | hide (void) |
| virtual bool | click (nxgl_coord_t x, nxgl_coord_t y) |
| virtual bool | isDoubleClick (nxgl_coord_t x, nxgl_coord_t y) |
| bool | doubleClick (nxgl_coord_t x, nxgl_coord_t y) |
| bool | release (nxgl_coord_t x, nxgl_coord_t y) |
| bool | drag (nxgl_coord_t x, nxgl_coord_t y, nxgl_coord_t vX, nxgl_coord_t vY) |
| bool | keyPress (nxwidget_char_t key) |
| bool | cursorControl (ECursorControl control) |
| bool | focus (void) |
| bool | blur (void) |
| bool | moveTo (nxgl_coord_t x, nxgl_coord_t y) |
| bool | resize (nxgl_coord_t width, nxgl_coord_t height) |
| bool | changeDimensions (nxgl_coord_t x, nxgl_coord_t y, nxgl_coord_t width, nxgl_coord_t height) |
| void | moveChildToDeleteQueue (CNxWidget *widget) |
| void | setFocusedWidget (CNxWidget *widget) |
| virtual bool | checkCollision (nxgl_coord_t x, nxgl_coord_t y) const |
| virtual bool | checkCollision (nxgl_coord_t x, nxgl_coord_t y, nxgl_coord_t width, nxgl_coord_t height) const |
| bool | checkCollision (CNxWidget *widget) const |
| void | addWidget (CNxWidget *widget) |
| void | insertWidget (CNxWidget *widget) |
| void | setParent (CNxWidget *parent) |
| void | destroy (void) |
| bool | remove (void) |
| bool | removeChild (CNxWidget *widget) |
| const CNxWidget * | getChild (int index) const |
| int | getChildCount (void) const |
| void | setBorderSize (const WidgetBorderSize &borderSize) |
Public Member Functions inherited from NXWidgets::CWidgetEventHandler | |
| CWidgetEventHandler () | |
| virtual | ~CWidgetEventHandler () |
| virtual void | handleDragEvent (const CWidgetEventArgs &e) |
| virtual void | handleDropEvent (const CWidgetEventArgs &e) |
| virtual void | handleKeyPressEvent (const CWidgetEventArgs &e) |
| virtual void | handleCursorControlEvent (const CWidgetEventArgs &e) |
| virtual void | handleFocusEvent (const CWidgetEventArgs &e) |
| virtual void | handleBlurEvent (const CWidgetEventArgs &e) |
| virtual void | handleCloseEvent (const CWidgetEventArgs &e) |
| virtual void | handleHideEvent (const CWidgetEventArgs &e) |
| virtual void | handleShowEvent (const CWidgetEventArgs &e) |
| virtual void | handleEnableEvent (const CWidgetEventArgs &e) |
| virtual void | handleDisableEvent (const CWidgetEventArgs &e) |
| virtual void | handleResizeEvent (const CWidgetEventArgs &e) |
| virtual void | handleMoveEvent (const CWidgetEventArgs &e) |
Protected Member Functions | |
| virtual void | drawContents (CGraphicsPort *port) |
| virtual void | onResize (nxgl_coord_t width, nxgl_coord_t height) |
| virtual | ~CScrollingListBox (void) |
| CScrollingListBox (const CScrollingListBox &scrollingListBox) | |
Protected Member Functions inherited from NXWidgets::CNxWidget | |
| void | useWidgetStyle (const CWidgetStyle *style) |
| virtual void | drawBorder (CGraphicsPort *port) |
| void | drawChildren (void) |
| void | closeChild (CNxWidget *widget) |
| void | startDragging (nxgl_coord_t x, nxgl_coord_t y) |
| void | stopDragging (nxgl_coord_t x, nxgl_coord_t y) |
| CNxWidget (const CNxWidget &widget) | |
| virtual void | onClick (nxgl_coord_t x, nxgl_coord_t y) |
| virtual void | onDoubleClick (nxgl_coord_t x, nxgl_coord_t y) |
| virtual void | onPreRelease (nxgl_coord_t x, nxgl_coord_t y) |
| virtual void | onRelease (nxgl_coord_t x, nxgl_coord_t y) |
| virtual void | onReleaseOutside (nxgl_coord_t x, nxgl_coord_t y) |
| virtual void | onDrag (nxgl_coord_t x, nxgl_coord_t y, nxgl_coord_t vX, nxgl_coord_t vY) |
| virtual void | onDragStart (void) |
| virtual void | onDragStop (void) |
| virtual void | onFocus (void) |
| virtual void | onBlur (void) |
| virtual void | onEnable (void) |
| virtual void | onDisable (void) |
Protected Attributes | |
| CListBox * | m_listbox |
| CScrollbarVertical * | m_scrollbar |
| uint8_t | m_scrollbarWidth |
Protected Attributes inherited from NXWidgets::CNxWidget | |
| CWidgetControl * | m_widgetControl |
| CRect | m_rect |
| nxgl_coord_t | m_grabPointX |
| nxgl_coord_t | m_grabPointY |
| nxgl_coord_t | m_newX |
| nxgl_coord_t | m_newY |
| CWidgetStyle | m_style |
| Flags | m_flags |
| CWidgetEventHandlerList * | m_widgetEventHandlers |
| struct timespec | m_lastClickTime |
| nxgl_coord_t | m_lastClickX |
| nxgl_coord_t | m_lastClickY |
| int | m_doubleClickBounds |
| CNxWidget * | m_parent |
| CNxWidget * | m_focusedChild |
| TNxArray< CNxWidget * > | m_children |
| WidgetBorderSize | m_borderSize |
Additional Inherited Members | |
Public Types inherited from NXWidgets::CNxWidget | |
| enum | WidgetFlagType { WIDGET_BORDERLESS = 0x0001, WIDGET_DRAGGABLE = 0x0002, WIDGET_PERMEABLE = 0x0004, WIDGET_DOUBLE_CLICKABLE = 0x0008, WIDGET_NO_RAISE_EVENTS = 0x0010 } |
Widget containing a CListBox and a vertical scrollbar. Exposed methods are more or less identical to the methods exposed by the CListBox to ensure that the two are interchangeable.
Definition at line 113 of file cscrollinglistbox.hxx.
|
inlineprotectedvirtual |
Destructor.
Definition at line 144 of file cscrollinglistbox.hxx.
|
inlineprotected |
Copy constructor is protected to prevent usage.
Definition at line 150 of file cscrollinglistbox.hxx.
| CScrollingListBox::CScrollingListBox | ( | CWidgetControl * | pWidgetControl, |
| nxgl_coord_t | x, | ||
| nxgl_coord_t | y, | ||
| nxgl_coord_t | width, | ||
| nxgl_coord_t | height, | ||
| CWidgetStyle * | style = (CWidgetStyle *)NULL |
||
| ) |
Constructor.
| pWidgetControl | The widget control for the display. |
| x | The x coordinate of the widget. |
| y | The y coordinate of the widget. |
| width | The width of the widget. |
| height | The height of the widget. |
| style | The style that the widget should use. If this is not specified, the widget will use the values stored in the global g_defaultWidgetStyle object. The widget will copy the properties of the style into its own internal style object. |
Definition at line 107 of file cscrollinglistbox.cxx.
|
virtual |
Add a new option to the widget using default colors.
| text | Text to show in the option. |
| value | The value of the option. |
Implements NXWidgets::IListBox.
Definition at line 145 of file cscrollinglistbox.cxx.
|
virtual |
Add an option to the widget.
| option | The option to add. |
Implements NXWidgets::IListBox.
Definition at line 157 of file cscrollinglistbox.cxx.
|
virtual |
Add a new option to the widget.
| text | Text to show in the option. |
| value | The value of the option. |
| normalTextColor | Color to draw the text with when not selected. |
| normalBackColor | Color to draw the background with when not selected. |
| selectedTextColor | Color to draw the text with when selected. |
| selectedBackColor | Color to draw the background with when selected. |
Implements NXWidgets::IListBox.
Definition at line 174 of file cscrollinglistbox.cxx.
|
inlinevirtual |
Sets whether multiple selections are possible or not.
Implements NXWidgets::IListBox.
Definition at line 320 of file cscrollinglistbox.hxx.
|
inlinevirtual |
Deselect all options. Redraws the widget and raises a value changed event.
Implements NXWidgets::IListBox.
Definition at line 261 of file cscrollinglistbox.hxx.
|
inlinevirtual |
Select an option by its index. Does not deselect any other selected options. Redraws the widget and raises a value changed event.
| index | The index of the option to select. |
Implements NXWidgets::IListBox.
Definition at line 241 of file cscrollinglistbox.hxx.
|
protectedvirtual |
Draw the area of this widget that falls within the clipping region. Called by the redraw() function to draw all visible regions.
| port | The CGraphicsPort to draw to. |
Reimplemented from NXWidgets::CNxWidget.
Definition at line 383 of file cscrollinglistbox.cxx.
|
inlinevirtual |
Get the specified option.
Implements NXWidgets::IListBox.
Definition at line 340 of file cscrollinglistbox.hxx.
|
inlinevirtual |
Get the selected index. Returns -1 if nothing is selected.
Definition at line 351 of file cscrollinglistbox.hxx.
|
inlinevirtual |
Get the total number of options.
Implements NXWidgets::IListBox.
Definition at line 371 of file cscrollinglistbox.hxx.
|
inlinevirtual |
Get the height of a single option.
Implements NXWidgets::IListBox.
Definition at line 382 of file cscrollinglistbox.hxx.
|
virtual |
Insert the dimensions that this widget wants to have into the rect passed in as a parameter. All coordinates are relative to the widget's parent. Value is based on the length of the largest string in the set of options.
| rect | Reference to a rect to populate with data. |
Reimplemented from NXWidgets::CNxWidget.
Definition at line 363 of file cscrollinglistbox.cxx.
|
inlinevirtual |
Get the selected index. Returns -1 if nothing is selected. If more than one option is selected, the index of the first selected option is returned.
Implements NXWidgets::IListBox.
Definition at line 273 of file cscrollinglistbox.hxx.
|
inlinevirtual |
Get the selected option. Returns NULL if nothing is selected.
Implements NXWidgets::IListBox.
Definition at line 297 of file cscrollinglistbox.hxx.
|
virtual |
Handle a widget action event.
| e | The event data. |
Reimplemented from NXWidgets::CWidgetEventHandler.
Definition at line 247 of file cscrollinglistbox.cxx.
|
virtual |
Handle a mouse button click event.
| e | The event data. |
Reimplemented from NXWidgets::CWidgetEventHandler.
Definition at line 291 of file cscrollinglistbox.cxx.
|
virtual |
Handles events raised by its sub-widgets.
| e | Event arguments. |
Reimplemented from NXWidgets::CWidgetEventHandler.
Definition at line 302 of file cscrollinglistbox.cxx.
|
virtual |
Handle a mouse button release event that occurred within the bounds of the source widget.
| e | The event data. |
Reimplemented from NXWidgets::CWidgetEventHandler.
Definition at line 314 of file cscrollinglistbox.cxx.
|
virtual |
Handle a mouse button release event that occurred outside the bounds of the source widget.
| e | The event data. |
Reimplemented from NXWidgets::CWidgetEventHandler.
Definition at line 326 of file cscrollinglistbox.cxx.
|
virtual |
Handles events raised by its sub-widgets.
| e | Event arguments. |
Reimplemented from NXWidgets::CWidgetEventHandler.
Definition at line 266 of file cscrollinglistbox.cxx.
|
virtual |
Handles events raised by its sub-widgets.
| e | Event arguments. |
Reimplemented from NXWidgets::CWidgetEventHandler.
Definition at line 221 of file cscrollinglistbox.cxx.
|
protectedvirtual |
Resize the listbox to the new dimensions.
| width | The new width. |
| height | The new height. |
Reimplemented from NXWidgets::CNxWidget.
Definition at line 395 of file cscrollinglistbox.cxx.
|
virtual |
Remove all options from the widget.
Implements NXWidgets::IListBox.
Definition at line 208 of file cscrollinglistbox.cxx.
|
virtual |
Remove an option from the widget by its index.
| index | The index of the option to remove. |
Implements NXWidgets::IListBox.
Definition at line 191 of file cscrollinglistbox.cxx.
|
inlinevirtual |
Resize the scrolling canvas to encompass all options.
Definition at line 329 of file cscrollinglistbox.hxx.
|
inlinevirtual |
Select all options. Does nothing if the listbox does not allow multiple selections. Redraws the widget and raises a value changed event.
Implements NXWidgets::IListBox.
Definition at line 251 of file cscrollinglistbox.hxx.
|
inlinevirtual |
Select an option by its index. Does not deselect any other selected options. Redraws the widget and raises a value changed event.
| index | The index of the option to select. |
Implements NXWidgets::IListBox.
Definition at line 229 of file cscrollinglistbox.hxx.
|
inlinevirtual |
Sets whether multiple selections are possible or not.
| allowMultipleSelections | True to allow multiple selections. |
Implements NXWidgets::IListBox.
Definition at line 309 of file cscrollinglistbox.hxx.
|
virtual |
Set the font used in the textbox.
| font | Pointer to the new font. |
Reimplemented from NXWidgets::CNxWidget.
Definition at line 347 of file cscrollinglistbox.cxx.
|
inlinevirtual |
Sets the selected index. Specify -1 to select nothing. Resets any other selected items to deselected. Redraws the widget and raises a value changed event.
| index | The selected index. |
Implements NXWidgets::IListBox.
Definition at line 286 of file cscrollinglistbox.hxx.
|
inlinevirtual |
Sets whether or not items added to the list are automatically sorted on insert or not.
| sortInsertedItems | True to enable sort on insertion. |
Implements NXWidgets::IListBox.
Definition at line 460 of file cscrollinglistbox.hxx.
|
inlinevirtual |
Sort the options alphabetically by the text of the options.
Implements NXWidgets::IListBox.
Definition at line 360 of file cscrollinglistbox.hxx.
|
protected |
Pointer to the list box.
Definition at line 117 of file cscrollinglistbox.hxx.
|
protected |
Pointer to the scrollbar.
Definition at line 118 of file cscrollinglistbox.hxx.
|
protected |
Width of the scrollbar.
Definition at line 119 of file cscrollinglistbox.hxx.
1.8.13