VCF::ListBoxControl Class Reference
#include <vcf/ApplicationKit/ListBoxControl.h>
Inheritance diagram for VCF::ListBoxControl:

Public Types | |
| enum | ListBoxControlEvents { lbeItemStateChangeRequested = CUSTOM_EVENT_TYPES + ITEM_CONST + 100 } |
Public Member Functions | |
| ListBoxControl () | |
| ListBoxControl (ListModel *listModel) | |
| virtual | ~ListBoxControl () |
| void | setSelectedItem (ListItem *item) |
| virtual void | setLargeImageList (ImageList *imageList) |
| virtual void | setSmallImageList (ImageList *imageList) |
| virtual void | setStateImageList (ImageList *imageList) |
| virtual Rect | getItemImageRect (const uint32 &index) |
| virtual void | selectItem (const uint32 &index) |
| virtual Enumerator< uint32 > * | getSelectedItemsByIndex () |
| Enumerator< ListItem * > * | getSelectedItems () |
| virtual void | rangeSelect (const Rect &selectionRect) |
| virtual uint32 | getFocusedItem () |
| virtual uint32 | getSelectedItem () |
| virtual bool | allowsMultiSelect () |
| virtual void | setAllowsMultiSelect (const bool &allowsMultiSelect) |
| virtual uint32 | hitTest (const Point &point) |
| virtual Rect | getItemRect (ListItem *item) |
| virtual void | rangeSelect (const bool &isSelected, ListItem *first, ListItem *last) |
| virtual void | paint (GraphicsContext *ctx) |
| Paints the control. | |
| virtual void | mouseDown (MouseEvent *event) |
| Called when one (or more) of the mouse buttons are held down. | |
| virtual void | mouseMove (MouseEvent *event) |
| Called when the mouse moves over the control. | |
| virtual void | mouseUp (MouseEvent *event) |
| Called when one (or more) of the mouse buttons are released. | |
| virtual void | mouseClick (MouseEvent *event) |
| Called when one or mouse buttons are held down and immediately released ( a "mouse click" ). | |
| virtual void | mouseDblClick (MouseEvent *event) |
| Called when one or mouse buttons are held down and immediately released ( a "mouse double click" ) twice, within some specific time period, as determined on the windowing system. | |
| virtual void | keyDown (KeyboardEvent *event) |
| called when the user presses the key down | |
| virtual void | keyUp (KeyboardEvent *event) |
| called when the user releases the key | |
| virtual void | keyPressed (KeyboardEvent *event) |
| called when the user simply presses the key and represents a full key cycle having occurred, in other words the key has been pressed down and then released | |
| double | getDefaultItemHeight () |
| void | setDefaultItemHeight (const double &defaultItemHeight) |
| bool | getAllowsExtendedSelect () |
| void | setAllowsExtendedSelect (const bool &allowsExtendedSelect) |
| Enables/disables the ability to have extended selection functionality, by handling Ctrl + mouseDown and Shift + mouseDown. | |
| void | setLeftGutter (const double &leftgutter) |
| Sets the spacing between the innermost-edge of the left border and the beginning of the Item captions when scrolled all the way to the left. | |
| double | getLeftGutter () |
| void | setRightGutter (const double &rightgutter) |
| Sets the spacing between the innermost-edge of the right border and the end of the longest Item caption when scrolled all the way to the right. | |
| double | getRightGutter () |
| void | setTextBounded (const bool &istextbounded) |
| void | deselectAllItems () |
| void | eraseFromSelectedItems (ListItem *item) |
| virtual void | setScrollable (Scrollable *scrollable) |
| sets the scrollable for the listbox control, and sets it for a discrete scrolling, item by item. | |
| bool | stateHitTest (Point *point, ListItem *item) |
| void | setUseColorForBackground (const bool &val) |
| sets if we want to use the control's color to draw the control's background; otherwise the theme background is drawn. | |
| bool | getUseColorForBackground () |
| gets if we use the control's color to draw the control's background | |
| virtual void | handleEvent (Event *event) |
| This gets called by the ControlPeer for any windowing system mouse events, as well as for any windowing system keyboard events and for any windowing system events like size changes, position changes, etc. | |
Public Attributes | |
| VCF::Delegate | ItemDelegate |
| ItemStateChangeRequested | |
Protected Member Functions | |
| virtual void | destroy () |
| called by the free() method. | |
| void | paintSelectionRect (GraphicsContext *ctx, Rect *rect, ListItem *item) |
| ListItem * | findSingleSelectedItem (Point *pt) |
| void | selectionChanged (ListItem *item) |
| void | paintItem (GraphicsContext *ctx, Rect &itemRect, double currentTop, Color *selectedTextColor, const Rect &bounds, double scrollWidth, double offsetX, ListItem *item) |
| void | paintItemState (GraphicsContext *ctx, Rect &itemRect, ListItem *item) |
| void | paintItemImage (GraphicsContext *ctx, Rect &itemRect, ListItem *item) |
| Rect | getStateRect (ListItem *item) |
| void | recalcBoundsForItem (ListItem *item) |
| void | removeItem (ListItem *item, const uint32 &itemIndex) |
| virtual void | onItemAdded (ListModelEvent *event) |
| virtual void | onItemDeleted (ListModelEvent *event) |
Protected Attributes | |
| double | defaultItemHeight_ |
| double | currentMaxWidth_ |
| double | currentMaxHeight_ |
| double | leftGutter_ |
| double | rightGutter_ |
| bool | textBounded_ |
| bool | allowsMultiSelect_ |
| bool | allowsExtendedSelect_ |
| Array< ListItem * > | selectedItems_ |
| Array< uint32 > | selectedIndices_ |
| double | stateItemIndent_ |
| bool | useColorForBackground_ |
Member Enumeration Documentation
|
|
|
Constructor & Destructor Documentation
|
|
|
|
|
|
|
|
|
Member Function Documentation
|
|
Reimplemented from VCF::ListControl. |
|
|
|
|
|
called by the free() method. Should be overriden and any clean up code performed here Reimplemented from VCF::Control. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reimplemented from VCF::ListControl. |
|
|
Reimplemented from VCF::ListControl. |
|
|
Reimplemented from VCF::ListControl. |
|
|
|
|
|
|
|
|
Reimplemented from VCF::ListControl. |
|
|
|
|
|
Reimplemented from VCF::ListControl. |
|
|
|
|
|
gets if we use the control's color to draw the control's background
|
|
|
This gets called by the ControlPeer for any windowing system mouse events, as well as for any windowing system keyboard events and for any windowing system events like size changes, position changes, etc. Once inside the event the Control determines the type, and behaves accordingly, as well as notifying any appropriate listeners. Reimplemented from VCF::ListControl. |
|
|
Reimplemented from VCF::ListControl. |
|
|
called when the user presses the key down
Reimplemented from VCF::Control. |
|
|
called when the user simply presses the key and represents a full key cycle having occurred, in other words the key has been pressed down and then released
Reimplemented from VCF::Control. |
|
|
called when the user releases the key
Reimplemented from VCF::Control. |
|
|
Called when one or mouse buttons are held down and immediately released ( a "mouse click" ). override this to provide specific behaviours when a mouse click occurs Reimplemented from VCF::Control. |
|
|
Called when one or mouse buttons are held down and immediately released ( a "mouse double click" ) twice, within some specific time period, as determined on the windowing system. override this to provide specific behaviours when a mouse double click occurs Reimplemented from VCF::Control. |
|
|
Called when one (or more) of the mouse buttons are held down. override this to provide specific behaviours when the mouse buttons are held down Reimplemented from VCF::Control. |
|
|
Called when the mouse moves over the control. override this to provide specific behaviours when the mouse moves over the control. Reimplemented from VCF::Control. |
|
|
Called when one (or more) of the mouse buttons are released. override this to provide specific behaviours when the mouse buttons are released. Reimplemented from VCF::Control. |
|
|
Reimplemented from VCF::ListControl. |
|
|
Reimplemented from VCF::ListControl. |
|
|
Paints the control. Called by the underlying windowing system whenever the control needs to be painted. Note that in some cases the GraphicsContext passed in to this method may not be the same pointer as the GraphicsContext that the control holds itself. During the paint() method you should only use the context value for all your drawing and not the one returned in getContext(). The value returned by getContext() should be used for drawing that takes place outside of the paint() method. If the control allows paint notification, then the framework will fire an event to the BeforeControlPainted delegate prior to calling the control's paint() method. After the paint() method has returned, if the control allows paint notification, the framework will fire an event to the AfterControlPainted delegate. This allows outside observers to take part in the paint cycle, but beware that this does come at a bit of a cost, so use this feature sparingly. Note: This should NEVER be called by programmers using the VCF, it will be called for you during the course of your applications native event loop, and is only here for providing custom drawing routines for controls. In other words: you implement it, you never call it yourself.
Implements VCF::Control. |
|
||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
|
Reimplemented from VCF::ListControl. |
|
|
|
|
||||||||||||
|
|
|
|
|
|
|
Reimplemented from VCF::ListControl. |
|
|
Enables/disables the ability to have extended selection functionality, by handling Ctrl + mouseDown and Shift + mouseDown. Item pointers are automatically added and removed from the selectedItems_ container as they are selected and deselected, respectively. If you set allowsExtendedSelect to true, allowsMultiSelect_ is automatically set to true for you. Therefore, don't forget to set allowsMultiSelect to false if you want to switch from extended selection behaviour to single selection behavior. |
|
|
Reimplemented from VCF::ListControl. |
|
|
|
|
|
Reimplemented from VCF::ListControl. |
|
|
Sets the spacing between the innermost-edge of the left border and the beginning of the Item captions when scrolled all the way to the left. Default value is currently 2.0 |
|
|
Sets the spacing between the innermost-edge of the right border and the end of the longest Item caption when scrolled all the way to the right. Default value is currently 2.0 |
|
|
sets the scrollable for the listbox control, and sets it for a discrete scrolling, item by item.
Reimplemented from VCF::Control. |
|
|
|
|
|
Reimplemented from VCF::ListControl. |
|
|
Reimplemented from VCF::ListControl. |
|
|
|
|
|
sets if we want to use the control's color to draw the control's background; otherwise the theme background is drawn.
|
|
||||||||||||
|
|
Member Data Documentation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reimplemented from VCF::ListControl. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The documentation for this class was generated from the following file:
- vcf/ApplicationKit/ListBoxControl.h
