VCF::ComboBoxControl Class Reference
A combo box control is a control that is used to display a selection from a list of choices in a single field. More...
#include <vcf/ApplicationKit/ComboBoxControl.h>
Inheritance diagram for VCF::ComboBoxControl:

Public Member Functions | |
| ComboBoxControl () | |
| virtual | ~ComboBoxControl () |
| void | init () |
| This is going to be removed from the bext release. | |
| ListModel * | getListModel () |
| returns the ListModel currently associated with it. | |
| void | setListModel (ListModel *model) |
| sets the ListModel for the Control. | |
| virtual void | paint (GraphicsContext *context) |
| the overriden paint method | |
| void | onListModelContentsChanged (ListModelEvent *event) |
| void | onItemAdded (ListModelEvent *event) |
| void | onItemDeleted (ListModelEvent *event) |
| 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 | mouseEnter (MouseEvent *event) |
| Called when the mouse first enters the control's bounds. | |
| virtual void | mouseLeave (MouseEvent *event) |
| Called when the mouse leaves the control's bounds. | |
| 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 | |
| ListItem * | getSelectedItem () |
| returns the currently selected item. | |
| void | setSelectedItem (ListItem *selectedItem) |
| sets the currently selected item. | |
| void | setSelectedItemIndex (const uint32 &selectedIndex) |
| sets the currently selected item as specified by the index. | |
| ComboBoxStyleType | getComboBoxStyle () |
| returns the combo box style. | |
| void | setComboBoxStyle (const ComboBoxStyleType &comboBoxStyle) |
| sets the style of the combo box | |
| ListItem * | addItem (const String &caption, const uint32 imageIndex=0) |
| adds a new ListItem. | |
| void | addItem (ListItem *item) |
| adds a new ListItem. | |
| void | setDropDownCount (const uint32 &dropDownCount) |
| sets the drop down count. | |
| uint32 | getDropDownCount () |
| returns the current drop down count | |
| void | setDropDownWidth (const uint32 &dropDownCount) |
| sets the drop down width. | |
| uint32 | getDropDownWidth () |
| returns the current drop down witdh | |
| void | setDropDownExtendFullScreen (const bool &dropDownExtendFullScreen) |
| sets true to allow the drop down list to extend to the full screen height | |
| bool | getDropDownExtendFullScreen () |
| returns true if the drop down list is allowed to extend to the full screen height | |
| void | setDiscreteScroll (const bool &discreteScroll) |
| sets true to allow the drop down list to be scrolled only by discrete amounts. | |
| bool | getDiscreteScroll () |
| returns true if only a scrolling by discrete amounts are allowed. | |
| void | setDropDownSelected (const bool &dropDownSelected) |
| sets if the item has been selected through the drop down list ( i.e. | |
| bool | getDropDownSelected () |
| returns the current state telling if the item has been selected by clicking the drop down list | |
| ListItem * | lookupItem (const String &text, const bool &ignoreCase=false) |
| lookup for an item in the dropdown list starting by a given text string. | |
| void | setAutoLookup (const bool &autoLookup) |
| sets if the autoLookup of typed items is enabled | |
| bool | getAutoLookup () |
| returns the current state telling if the autoLookup is enabled | |
| void | setAutoLookupIgnoreCase (const bool &ignoreCase) |
| sets if the autoLookup is done ignoring then letter's case | |
| bool | getAutoLookupIgnoreCase () |
| returns the current state telling if the autoLookup is done ignoring then letter's case | |
| virtual bool | keepsArrowKeys () |
| This function determines whether or not the control should have precedence and prevent the the arrow keys from switching focus to another control. | |
| void | setEnabled (const bool &enabled) |
| sets whether the control is enabled or not. | |
| String | getCurrentText () |
| virtual void | setCurrentText (const String &text) |
| Rect | getEditBounds () |
| virtual double | getPreferredHeight () |
| returns the preferred height for this control. | |
| virtual void | selectItems (const bool &select) |
Public Attributes | |
| VCF::Delegate | SelectionChanged |
Protected Member Functions | |
| void | onDropDownLostFocus (WindowEvent *event) |
| void | closeDropDown (Event *event) |
| void | onEditKeyPressed (KeyboardEvent *event) |
| void | onEditReturnKeyPressed (KeyboardEvent *event) |
| void | onFocusGained (FocusEvent *event) |
| void | onPostSelect (ItemEvent *e) |
| virtual void | destroy () |
| called by the free() method. | |
| void | updateEditBounds () |
Protected Attributes | |
| Window * | dropDown_ |
| ListModel * | listModel_ |
| ListItem * | selectedItem_ |
| uint32 | selectedIndex_ |
| bool | arrowPressed_ |
| Rect | viewRect_ |
| bool | mouseOver_ |
| ComboBoxStyleType | comboBoxStyle_ |
| TextControl * | edit_ |
| uint32 | dropDownCount_ |
| double | dropDownWidth_ |
| bool | dropDownExtendFullScreen_ |
| bool | discreteScroll_ |
| bool | dropDownSelected_ |
| bool | autoLookup_ |
| bool | autoLookupIgnoreCase_ |
Detailed Description
A combo box control is a control that is used to display a selection from a list of choices in a single field.When the down arrow is clicked on a popup list is displayed that shows all the possible choices for the control.
The ComboBoxControl uses the ListModel, same abstract model as the ListBoxControl and ListViewControl controls, to store it's presentation data in.
- Event Delegates for this class:
Constructor & Destructor Documentation
|
|
|
|
|
|
Member Function Documentation
|
|
adds a new ListItem. This method simply calls the models ListModel::addItem() method. |
|
||||||||||||
|
adds a new ListItem. This method simply calls the models ListModel::addItem() method and returns the newly created ListItem. Currently the default implementation creates a DefaultListItem to add.
|
|
|
|
|
|
called by the free() method. Should be overriden and any clean up code performed here Reimplemented from VCF::Control. |
|
|
returns the current state telling if the autoLookup is enabled
|
|
|
returns the current state telling if the autoLookup is done ignoring then letter's case
|
|
|
returns the combo box style. The style may be cbsDropDown, which means the entry in the combo box field is non editable, or cbsDropDownWithEdit, which means the user can edit the fields data.
|
|
|
|
|
|
returns true if only a scrolling by discrete amounts are allowed.
|
|
|
returns the current drop down count
|
|
|
returns true if the drop down list is allowed to extend to the full screen height
|
|
|
returns the current state telling if the item has been selected by clicking the drop down list
|
|
|
returns the current drop down witdh
|
|
|
|
|
|
returns the ListModel currently associated with it.
|
|
|
returns the preferred height for this control. This is used when determing the height of the control when it is first created. Override it to provide a different value that is more acceptable for your control's initial display size. Reimplemented from VCF::Control. |
|
|
returns the currently selected item.
|
|
|
This is going to be removed from the bext release.
Reimplemented from VCF::CustomControl. |
|
|
This function determines whether or not the control should have precedence and prevent the the arrow keys from switching focus to another control. Typically this will return false, with the exception of keyboard entry controls like the TextControl. To prevent the tab key from causing a the framework to switch to another control, override this and return true.
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. |
|
||||||||||||
|
lookup for an item in the dropdown list starting by a given text string.
|
|
|
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 first enters the control's bounds. override this to provide specific behaviours when the control is first entered, like highlighting the control Reimplemented from VCF::Control. |
|
|
Called when the mouse leaves the control's bounds. override this to provide specific behaviours when the control is left, like highlighting the control 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. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
the overriden paint method
Reimplemented from VCF::CustomControl. |
|
|
|
|
|
sets if the autoLookup of typed items is enabled
|
|
|
sets if the autoLookup is done ignoring then letter's case
|
|
|
sets the style of the combo box
|
|
|
|
|
|
sets true to allow the drop down list to be scrolled only by discrete amounts.
|
|
|
sets the drop down count. This is used to specify how many items are visible in the drop down list before scrollbars become neccessary
|
|
|
sets true to allow the drop down list to extend to the full screen height
|
|
|
sets if the item has been selected through the drop down list ( i.e. manually by the user ) or through calls by source code by using the function setSelectedItem
|
|
|
sets the drop down width. This is used to specify the width of the drop down list if the user prefers it bigger then the ComboBoxControl's width itself
|
|
|
sets whether the control is enabled or not.
Reimplemented from VCF::Control. |
|
|
sets the ListModel for the Control. If there was a previous ListModel already associated with the control, then the old ListModel's release() method will be called prior to setting the new ListModel. The control will call the newly set ListModel's addRef() after setting.
|
|
|
sets the currently selected item. Causes a SelectionChanged event to be fired.
|
|
|
sets the currently selected item as specified by the index. Causes a SelectionChanged event to be fired.
|
|
|
|
Member Data Documentation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The documentation for this class was generated from the following file:
- vcf/ApplicationKit/ComboBoxControl.h
