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 () |
| SelectionChanged ListModel * | getListModel () |
| returns the ListModel currently associated with it. | |
| void | setListModel (ListModel *model) |
| virtual void | paint (GraphicsContext *context) |
| the overriden paint method | |
| 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 * | insertItem (const uint32 &index, const String &caption, const uint32 imageIndex=0) |
| adds a new ListItem. | |
| ListItem * | addItem (const String &caption, const uint32 imageIndex=0) |
| ListItem * | getListItem (const uint32 &index) |
| void | setListItem (const uint32 &index, ListItem *item) |
| 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) |
| virtual bool | generatePropertyValue (const String &fullPropertyName, Property *property, VariantData *value, String &strValue) |
| virtual void | setViewModel (Model *viewModel) |
| sets a new model for the view Once set, the control fires a ControlModelChanged event. | |
| ListBoxControl * | getListBox () |
Public Attributes | |
| VCF::Delegate | ItemDelegate |
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_ |
| bool | arrowPressed_ |
| Rect | viewRect_ |
| bool | mouseOver_ |
| ComboBoxStyleType | comboBoxStyle_ |
| TextControl * | edit_ |
| ListBoxControl * | listBox_ |
| uint32 | dropDownCount_ |
| double | dropDownWidth_ |
| bool | dropDownExtendFullScreen_ |
| bool | discreteScroll_ |
| bool | dropDownSelected_ |
| bool | autoLookup_ |
| bool | autoLookupIgnoreCase_ |
| bool | internalModelChange_ |
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.
Note that as of the April 2008 this class is deprecated and should not be used. Instead please use the DropDownControl which does the same thing, only uses a native control wrapper. The next release of the Framework will get rid of this class completely.
- Event Delegates for this class:
- ComboBoxControl::SelectionChanged
- See also:
- DropDownControl
Constructor & Destructor Documentation
|
|
|
|
|
|
Member Function Documentation
|
||||||||||||
|
|
|
|
|
|
|
called by the free() method. Should be overriden and any clean up code performed here Reimplemented from VCF::Control. |
|
||||||||||||||||||||
|
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.
|
|
|
Reimplemented from VCF::CustomControl. |
|
||||||||||||||||
|
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.
|
|
|
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 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.
|
|
|
sets a new model for the view Once set, the control fires a ControlModelChanged event.
Reimplemented from VCF::Control. |
|
|
|
Member Data Documentation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The documentation for this class was generated from the following file:
- vcf/ApplicationKit/ComboBoxControl.h
