Crazy Eddie's GUI System
0.8.7
|
29 #ifndef _CEGUICombobox_h_
30 #define _CEGUICombobox_h_
32 #include "CEGUI/Base.h"
33 #include "CEGUI/Window.h"
34 #include "CEGUI/RegexMatcher.h"
37 # pragma warning(push)
38 # pragma warning(disable : 4251)
189 const bool allow_disabled =
false)
const;
906 bool new_state,
bool old_state);
911 bool editbox_ReadOnlyChangedHandler(
const EventArgs& e);
912 bool editbox_ValidationStringChangedHandler(
const EventArgs& e);
913 bool editbox_MaximumTextLengthChangedHandler(
const EventArgs& e);
914 bool editbox_TextValidityChangedHandler(
const EventArgs& e);
915 bool editbox_CaretMovedHandler(
const EventArgs& e);
916 bool editbox_TextSelectionChangedHandler(
const EventArgs& e);
917 bool editbox_EditboxFullEventHandler(
const EventArgs& e);
918 bool editbox_TextAcceptedEventHandler(
const EventArgs& e);
919 bool editbox_TextChangedEventHandler(
const EventArgs& e);
920 bool listbox_ListContentsChangedHandler(
const EventArgs& e);
921 bool listbox_ListSelectionChangedHandler(
const EventArgs& e);
922 bool listbox_SortModeChangedHandler(
const EventArgs& e);
923 bool listbox_VertScrollModeChangedHandler(
const EventArgs& e);
924 bool listbox_HorzScrollModeChangedHandler(
const EventArgs& e);
1059 bool d_autoSizeHeight;
1060 bool d_autoSizeWidth;
1066 void addComboboxProperties(
void);
1071 #if defined(_MSC_VER)
1072 # pragma warning(pop)
1075 #endif // end of guard _CEGUICombobox_h_
static const String EventTextSelectionChanged
Definition: Combobox.h:105
bool isHorzScrollbarAlwaysShown(void) const
Return whether the horizontal scroll bar is always shown.
bool button_PressHandler(const EventArgs &e)
Handler function for button clicks.
bool isSortEnabled(void) const
return whether list sorting is enabled
bool isVertScrollbarAlwaysShown(void) const
Return whether the vertical scroll bar is always shown.
void setAutoSizeListHeightToContent(bool auto_size)
Sets whether the Combobox drop-down list will automatically resize it's height according to the total...
void hideDropList(void)
Hide the drop-down list.
void setMaxTextLength(size_t max_len)
set the maximum text length for this Editbox.
virtual void onVertScrollbarModeChanged(WindowEventArgs &e)
Handler called internally when the 'force' setting for the vertical scrollbar within the Combobox's d...
bool isItemSelected(size_t index) const
return whether the string at index position index is selected
virtual void onValidationStringChanged(WindowEventArgs &e)
Handler called internally when the Combobox's Editbox validation string has been changed.
size_t getItemCount(void) const
Return number of items attached to the list box.
static const String EditboxName
Widget name for the editbox component.
Definition: Combobox.h:183
void insertItem(ListboxItem *item, const ListboxItem *position)
Insert an item into the list box after a specified item already in the list.
Base class for the Combobox widget.
Definition: Combobox.h:51
void setItemSelectState(ListboxItem *item, bool state)
Set the select state of an attached ListboxItem.
virtual void onMaximumTextLengthChanged(WindowEventArgs &e)
Handler called internally when the Combobox's Editbox maximum text length is changed.
size_t getSelectionLength(void) const
return the length of the current selection (in code points / characters).
bool d_singleClickOperation
true if user can show and select from list in a single click.
Definition: Combobox.h:1058
EventArgs based class that is used for objects passed to handlers triggered for events concerning som...
Definition: Element.h:211
Combobox(const String &type, const String &name)
Constructor for Combobox base class.
MatchState getTextMatchState() const
return the validation MatchState for the current Combobox text, given the currently set validation st...
void removeItem(const ListboxItem *item)
Removes the given item from the list box.
void setCaretIndex(size_t caret_pos)
Set the current position of the caret.
static const String EventTextValidityChanged
Definition: Combobox.h:93
void setSortingEnabled(bool setting)
Set whether the list should be sorted.
virtual void onTextSelectionChanged(WindowEventArgs &e)
Handler called internally when the selection within the Combobox's Editbox changes.
ListboxItem * getSelectedItem(void) const
Return a pointer to the currently selected item.
virtual void onDropListDisplayed(WindowEventArgs &e)
Handler called internally when the Combobox's drop-down list has been displayed.
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
bool isListboxItemInList(const ListboxItem *item) const
Return whether the specified ListboxItem is in the List.
size_t getMaxTextLength(void) const
return the maximum text length set for this Editbox.
virtual void initialiseComponents(void)
Initialise the Window based object ready for use.
static const String EventNamespace
Namespace for global events.
Definition: Combobox.h:55
Definition: RegexMatcher.h:70
EventArgs based class that is used for objects passed to handlers triggered for events concerning som...
Definition: InputEvent.h:252
void handleUpdatedListItemData(void)
Causes the list box to update it's internal state after changes have been made to one or more attache...
static const String WidgetTypeName
Window factory name.
Definition: Combobox.h:56
static const String EventVertScrollbarModeChanged
Definition: Combobox.h:151
virtual void onEditboxFullEvent(WindowEventArgs &e)
Handler called internally when the maximum length is reached for text in the Combobox's Editbox.
ComboDropList * getDropList() const
Return a pointer to the ComboDropList component widget for this Combobox.
ListboxItem * getListboxItemFromIndex(size_t index) const
Return the item at index position index.
bool isHit(const Vector2f &position, const bool allow_disabled=false) const
check if the given pixel position would hit this window.
static const String EventHorzScrollbarModeChanged
Definition: Combobox.h:158
size_t getSelectionEndIndex(void) const
return the current selection end point.
Base class for an Editbox widget.
Definition: widgets/Editbox.h:70
bool droplist_SelectionAcceptedHandler(const EventArgs &e)
Handler for selections made in the drop-list.
static const String EventListSelectionChanged
Definition: Combobox.h:138
EventArgs based class that is used for Activated and Deactivated window events.
Definition: InputEvent.h:330
void resetList(void)
Remove all items from the list.
virtual void onReadOnlyChanged(WindowEventArgs &e)
Handler called internally when the read only state of the Combobox's Editbox has been changed.
virtual void onDroplistRemoved(WindowEventArgs &e)
Handler called internally when the Combobox's drop-down list has been hidden.
void setShowVertScrollbar(bool setting)
Set whether the vertical scroll bar should always be shown.
bool isDropDownListVisible(void) const
returns true if the drop down list is visible.
void addItem(ListboxItem *item)
Add the given ListboxItem to the list.
virtual void onListSelectionChanged(WindowEventArgs &e)
Handler called internally when the selection within the Combobox's drop-down list changes (this is no...
static const String EventListSelectionAccepted
Definition: Combobox.h:178
MatchState
Enumeration of possible states when cosidering a regex match.
Definition: RegexMatcher.h:45
static const String EventMaximumTextLengthChanged
Definition: Combobox.h:79
static const String EventCaretMoved
Definition: Combobox.h:99
ListboxItem * findItemWithText(const String &text, const ListboxItem *start_item)
Search the list for an item with the specified text.
virtual void onTextValidityChanged(RegexMatchStateEventArgs &e)
Handler called when something has caused the validity state of the current text to change.
virtual void onCaretMoved(WindowEventArgs &e)
Handler called internally when the caret in the Comboxbox's Editbox moves.
static const String EventDropListDisplayed
Definition: Combobox.h:166
virtual void onFontChanged(WindowEventArgs &e)
Handler called when the window's font is changed.
bool getSingleClickEnabled(void) const
returns the mode of operation for the combo box.
PushButton * getPushButton() const
Return a pointer to the PushButton component widget for this Combobox.
void setSingleClickEnabled(bool setting)
Set the mode of operation for the combo box.
static const String ButtonName
Widget suffix for the button component.
Definition: Combobox.h:185
void setItemSelectState(size_t item_index, bool state)
Set the select state of an attached ListboxItem.
void setShowHorzScrollbar(bool setting)
Set whether the horizontal scroll bar should always be shown.
static const String EventTextAccepted
Definition: Combobox.h:119
bool getAutoSizeListWidthToContent() const
return whether the drop-list will horizontally auto size to content.
static const String EventValidationStringChanged
Definition: Combobox.h:73
virtual void onSortModeChanged(WindowEventArgs &e)
Handler called fired internally when the sort mode for the Combobox's drop-down list is changed.
An abstract base class providing common functionality and specifying the required interface for deriv...
Definition: Window.h:151
void selectListItemWithEditboxText()
Select item in list matching editbox text, clear selection if none match.
size_t getItemIndex(const ListboxItem *item) const
Return the index of ListboxItem item.
void setValidationString(const String &validation_string)
Set the text validation string.
void showDropList(void)
Show the drop-down list.
void setSelection(size_t start_pos, size_t end_pos)
Define the current selection for the Editbox.
virtual void onListContentsChanged(WindowEventArgs &e)
Handler called internally when the Combobox's Drop-down list contents are changed.
virtual void onHorzScrollbarModeChanged(WindowEventArgs &e)
Handler called internally when the 'force' setting for the horizontal scrollbar within the Combobox's...
void setSelectionLength(size_t length)
Define the current selection for the Editbox.
virtual void onTextAcceptedEvent(WindowEventArgs &e)
Handler called internally when the text in the Combobox's Editbox is accepted (by various means).
void setAutoSizeListWidthToContent(bool auto_size)
Sets whether the Combobox drop-down list will automatically resize it's width according to the width ...
size_t getSelectionStartIndex(void) const
return the current selection start point.
static const String EventSortModeChanged
Definition: Combobox.h:144
bool hasInputFocus(void) const
return true if the Editbox has input focus.
void updateAutoSizedDropList()
update drop list size according to auto-size options.
void itemSelectChangeTextUpdate(const ListboxItem *const item, bool new_state, bool old_state)
Update the Combobox text to reflect programmatically made changes to selected list item.
static const String EventDropListRemoved
Definition: Combobox.h:172
void setReadOnly(bool setting)
Specify whether the Editbox is read-only.
String class used within the GUI system.
Definition: String.h:64
virtual void onActivated(ActivationEventArgs &e)
Handler called when this window has become the active window.
void activateEditbox(void)
Activate the edit box component of the Combobox.
bool editbox_MouseDownHandler(const EventArgs &e)
Mouse button down handler attached to edit box.
bool droplist_HiddenHandler(const EventArgs &e)
Handler for when drop-list hides itself.
static const String EventReadOnlyModeChanged
Definition: Combobox.h:67
void clearAllSelections(void)
Clear the selected state for all items.
bool getAutoSizeListHeightToContent() const
return whether the drop-list will vertically auto size to content.
void setSelectionStart(size_t start_pos)
Define the current selection start for the Editbox.
virtual ~Combobox(void)
Destructor for Combobox base class.
Base class for the combo box drop down list. This is a specialisation of the Listbox class.
Definition: ComboDropList.h:49
size_t getCaretIndex(void) const
return the current position of the caret.
virtual void onTextChanged(WindowEventArgs &e)
Handler called when the window's text is changed.
void onSized(ElementEventArgs &e)
Handler called when the window's size changes.
virtual void onListSelectionAccepted(WindowEventArgs &e)
Handler called internally when the user has confirmed a selection within the Combobox's drop-down lis...
static const String EventEditboxFull
Definition: Combobox.h:112
Editbox * getEditbox() const
Return a pointer to the Editbox component widget for this Combobox.
bool isReadOnly(void) const
return true if the Editbox is read-only.
Base class used as the argument to all subscribers Event object.
Definition: EventArgs.h:51
const String & getValidationString(void) const
return the currently set validation string
static const String DropListName
Widget name for the drop list component.
Definition: Combobox.h:184
static const String EventListContentsChanged
Definition: Combobox.h:127
Base class for list box items.
Definition: ListboxItem.h:53