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