Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
hdi::core::ComboBox Class Reference

Combo box widget, which consists of a text-field for custom input and a popup menu for preset values. More...

#include <hdicoreComboBox.h>

Inheritance diagram for hdi::core::ComboBox:
Inheritance graph
[legend]
Collaboration diagram for hdi::core::ComboBox:
Collaboration graph
[legend]

Public Types

enum  Alignment { UnknownAlignment = 0 , LeftAlignment = 10 , CenterAlignment = 20 , RightAlignment = 30 }
 Text alignment options.
 
typedef std::vector< PopupEntryEntryVector
 
- Public Types inherited from hdi::core::Widget
enum  Type {
  UnknownType = 0 , BoxType = 10 , ButtonType = 20 , CheckboxType = 30 ,
  ColumnViewType = 40 , ComboBoxType = 50 , ColorWellType = 60 , CustomType = 70 ,
  DividerType = 80 , HierarchicalColumnViewType = 85 , HierarchicalViewType = 90 , LabelType = 100 ,
  ListViewType = 110 , PopupMenuType = 120 , RadioButtonType = 130 , SliderType = 140 ,
  StepperType = 150 , TextFieldType = 160 , TextViewType = 170 , WebViewType = 180
}
 Supported widget types.
 

Public Member Functions

 ComboBox ()
 Constructs an empty ComboBox object.
 
 ComboBox (const ComboBox &combobox_)
 Constructs a new ComboBox object from an existing ComboBox object (copy constructor)
 
 ComboBox (const Point &loc_, const double width_)
 Constructs a combo box.
 
 ComboBox (const Point &loc_, const double width_, const EntryVector &entries_, const int32_t initialIndex_)
 Constructs a combo box.
 
virtual ~ComboBox ()
 ComboBox destructor.
 
virtual ComboBoxoperator= (const ComboBox &rhs_)
 Allows one ComboBox object to be assigned from another.
 
virtual ComboBoxclone () const
 Convenience method to clone a ComboBox object on the heap.
 
virtual ComboBoxduplicate () const
 Convenience method to duplicate a ComboBox object, creating a new and identical UI element to the target (but not belonging to the same containing window)
 
virtual Alignment alignment () const
 Gets the current alignment of the text field.
 
virtual void setAlignment (const Alignment alignment_)
 Sets the current alignment of the text field.
 
virtual bool bold () const
 Gets whether the text is bold.
 
virtual void setBold (const bool bold_)
 Sets the font weight.
 
virtual bool italic () const
 Gets whether the text is italicized.
 
virtual void setItalic (const bool italic_)
 Sets the font style.
 
virtual int32_t currentIndex () const
 Gets the index of the currently selected entry.
 
virtual bool setCurrentIndex (const int32_t index_)
 Sets the currently selected entry by index.
 
virtual std::string currentID () const
 Gets the ID of the currently selected entry.
 
virtual bool setCurrentID (const std::string &id_)
 Sets the currently selected entry by ID.
 
virtual std::string currentValue () const
 Gets the string value of the currently selected entry (or the custom value, if the user has entered one)
 
virtual bool setCurrentValue (const std::string &value_)
 Sets the currently selected entry by string value.
 
virtual std::unique_ptr< PopupEntrycurrentEntry () const
 Gets the current entry object.
 
virtual bool currentUserData (void *&data__) const
 Gets the user data for the current entry.
 
virtual const std::vector< std::shared_ptr< PopupEntry > > *const entries () const
 Gets the entries vector.
 
virtual bool hasEntry (const std::string &id_) const
 Gets whether the entries vector already contains an entry, based on its ID.
 
virtual std::shared_ptr< PopupEntryentryWithID (const std::string &id_) const
 Gets the entry with the given ID, provided it exists within the widget.
 
virtual void setEntries (const EntryVector &entries_)
 Allows the entries in an combo box to be changed out entirely.
 
virtual bool pushEntry (const PopupEntry &entry_)
 Pushes an entry onto the list (i.e. at the end)
 
virtual bool popEntry (PopupEntry &entry__)
 Pops an entry off the list (i.e. from the end)
 
virtual bool insertEntry (const std::string &id_, const PopupEntry &entry_)
 Inserts an entry into the list of entries at a given position.
 
virtual bool removeEntry (const std::string &id_, PopupEntry &entry__)
 Removes a specific entry from the list of entries.
 
virtual void clearEntries ()
 Clears all entries contained by the widget.
 
virtual bool selectionRange (uint32_t &pos__, uint32_t &len__) const
 Gets the selection range of the text in the field, if any, in UTF-8.
 
virtual void setSelectionRange (const uint32_t pos_, const uint32_t len_)
 Sets the selection range of the text in the field, in UTF-8 (and focuses it)
 
virtual bool selectionRangeUTF32 (uint32_t &pos__, uint32_t &len__) const
 Gets the selection range of the text in the field, if any, in UTF-32.
 
virtual void setSelectionRangeUTF32 (const uint32_t pos_, const uint32_t len_)
 Sets the selection range of the text in the field, in UTF-32 (and focuses it)
 
virtual std::string lastCharTyped () const
 Gets the last character typed into the field.
 
virtual ModifierKey lastModifierKeys () const
 Gets the last set of modifier keys used when typing into the field.
 
virtual void valueChanging ()
 Simulates the value of the combo box changing.
 
virtual Callback *const valueChangingCallback () const
 Gets the value changing callback for the combo box.
 
virtual void setValueChangingCallback (const Callback &callback_)
 Sets the value changing callback.
 
virtual void valueChanged ()
 Simulates the combo box having its value changed.
 
virtual Callback *const valueChangedCallback () const
 Gets the value changed callback for the combo box.
 
virtual void setValueChangedCallback (const Callback &callback_)
 Sets the value changed callback.
 
virtual void update ()
 Force the combo box to update its entries.
 
virtual bool expanded () const
 Gets the expansion state of the combo box's popup menu.
 
virtual void setExpanded (const bool exp_)
 Sets the expansion state of the combo box's popup menu.
 
- Public Member Functions inherited from hdi::core::Widget
virtual ~Widget ()
 Destructs a Widget.
 
virtual Widgetclone () const =0
 Convenience method to clone a Widget object in memory, taking its subclass type into account.
 
virtual Widgetduplicate () const =0
 Convenience method to duplicate a Widget object, creating a new and identical UI element to the target (but not belonging to the same containing window)
 
virtual PlatformWidgetPtr platformWidget () const
 Gets the platform-specific widget, around which the target object is wrapped.
 
virtual bool isEmpty () const
 Gets whether the target Widget object is empty (constructed with the default ctor)
 
virtual bool operator== (const Widget &rhs_) const
 Tests whether a given Widget object is the same as another.
 
virtual bool operator!= (const Widget &rhs_) const
 Tests whether a given Widget object is not the same as another.
 
virtual Type type () const
 Gets the type of the widget.
 
virtual Window *const window () const
 Gets the parent window of the widget.
 
virtual Rect frame () const
 Gets the widget frame.
 
virtual void setFrame (const Rect &frame_)
 Sets the widget frame.
 
virtual void offset (const double x_, const double y_)
 Offsets the widget from its current location by the given amounts, in 1x resolution coordinates.
 
virtual std::string text () const
 Gets the current text value of the widget.
 
virtual void setText (const std::string &text_)
 Sets the current text value of the widget.
 
virtual bool enabled ()
 Gets whether the widget is enabled.
 
virtual void setEnabled (const bool enable_)
 Enables or disables the widget.
 
virtual bool visible ()
 Gets whether the widget is visible.
 
virtual void setVisible (const bool visible_)
 Shows or hides the widget.
 
virtual void setOrigin (const Point &p_)
 Convenience method to set just the origin of the target widget's frame.
 
virtual void setSize (const Size &s_)
 Convenience method to set just the size of the target widget's frame.
 
virtual void setWidth (const double w_)
 Convenience method to set just the width of the target widget's frame.
 
virtual void setHeight (const double h_)
 Convenience method to set just the height of the target widget's frame.
 
virtual bool hasFocus () const
 Gets whether the widget currently has focus.
 
virtual void focus () const
 Forces the widget to have focus, taking it from any other focused widget of the same window.
 
virtual Callback *const focusCallback () const
 Gets the current focus callback for the widget.
 
virtual void setFocusCallback (const Callback &callback_)
 Sets the focus callback for the widget.
 
virtual void blur () const
 Removes focus from the widget.
 
virtual Callback *const blurCallback () const
 Gets the current blur callback for the widget.
 
virtual void setBlurCallback (const Callback &callback_)
 Sets the blur callback for the widget.
 
virtual std::string tooltip () const
 Gets the tool tip string for the widget.
 
virtual void setTooltip (const std::string &tip_)
 Sets the tool tip string for the widget.
 
virtual void update ()
 Force the widget to update (i.e. cause it to redraw)
 

Static Public Member Functions

static ComboBox ComboBoxWithID (const Point &loc_, const double width_, const EntryVector &entries_, const std::string &initialID_)
 Named constructor for a combo box with an initial ID selected.
 
static ComboBox ComboBoxWithValue (const Point &loc_, const double width_, const EntryVector &entries_, const std::string &value_)
 Named constructor for a combo box with an initial string value (whether it's in the entries_ argument or not)
 
- Static Public Member Functions inherited from hdi::core::Widget
static bool isCoreWidget (const PlatformWidgetPtr widget_)
 Gets whether the given platform widget is a hdi_core widget.
 
static std::unique_ptr< WidgetlastClickedWidget ()
 Gets the last widget that received a click event (either by the user or programmatically)
 
static std::unique_ptr< WidgetlastValueChangingWidget ()
 Gets the last widget that received a value changing event (either by the user or programmatically)
 
static std::unique_ptr< WidgetlastValueChangedWidget ()
 Gets the last widget that received a value changed event (either by the user or programmatically)
 
static std::unique_ptr< WidgetlastDropWidget ()
 Gets the last widget that received a drag-and-drop drop event (either by the user or programmatically)
 
static std::unique_ptr< WidgetlastPotentialReorderWidget ()
 Gets the last widget that received a potential-reorder event.
 
static std::unique_ptr< WidgetlastReorderWidget ()
 Gets the last widget that received a reorder event.
 

Additional Inherited Members

- Protected Member Functions inherited from hdi::core::Widget
void * _impl () const
 Internal use only.
 
 Widget ()
 Constructs an empty Widget object.
 
 Widget (const Widget &w_)
 Constructs a new Widget object from an existing Widget object (copy constructor)
 
 Widget (pui::Widget *&)
 Internal use only.
 
virtual Widgetoperator= (const Widget &)
 Internal use only.
 
- Protected Attributes inherited from hdi::core::Widget
void * _data
 Private implementation data.
 

Detailed Description

Combo box widget, which consists of a text-field for custom input and a popup menu for preset values.

Constructor & Destructor Documentation

◆ ComboBox() [1/4]

hdi::core::ComboBox::ComboBox ( )

Constructs an empty ComboBox object.

Author
GW
Date
09/2013
Note
To test if a ComboBox object is empty, call isEmpty() on it
Empty ComboBox objects do not relate to any actual UI widget; they are designed to be "receivers" of some other ComboBox object via the overloaded assignment operator. Empty ComboBox objects are useless until such time (though it is safe to call any of their methods).

◆ ComboBox() [2/4]

hdi::core::ComboBox::ComboBox ( const ComboBox combobox_)

Constructs a new ComboBox object from an existing ComboBox object (copy constructor)

Author
GW
Date
09/2013
Parameters
combobox_Existing ComboBox object

◆ ComboBox() [3/4]

hdi::core::ComboBox::ComboBox ( const Point loc_,
const double  width_ 
)

Constructs a combo box.

Author
GW
Date
09/2013
Parameters
loc_Top-left location of the combo box, in 1x resolution coordinates
width_Width of the combo box

◆ ComboBox() [4/4]

hdi::core::ComboBox::ComboBox ( const Point loc_,
const double  width_,
const EntryVector &  entries_,
const int32_t  initialIndex_ 
)

Constructs a combo box.

Author
GW
Date
09/2013
Parameters
loc_Top-left location of the combo box, in 1x resolution coordinates
width_Width of the combo box, at 1x resolution
entries_Vector of string entries
initialIndex_Initial index to select (must exist in entries_, and must not be a separator)

◆ ~ComboBox()

virtual hdi::core::ComboBox::~ComboBox ( )
virtual

ComboBox destructor.

Author
GW
Date
09/2013

Member Function Documentation

◆ alignment()

virtual Alignment hdi::core::ComboBox::alignment ( ) const
virtual

Gets the current alignment of the text field.

Author
GW
Date
09/2013
Returns
Current text alignment

◆ bold()

virtual bool hdi::core::ComboBox::bold ( ) const
virtual

Gets whether the text is bold.

Author
GW
Date
09/2013
Returns
true if the text is bold, false otherwise

◆ clearEntries()

virtual void hdi::core::ComboBox::clearEntries ( )
virtual

Clears all entries contained by the widget.

Author
GW
Date
09/2013

◆ clone()

virtual ComboBox * hdi::core::ComboBox::clone ( ) const
virtual

Convenience method to clone a ComboBox object on the heap.

Author
GW
Date
10/2013
Returns
A pointer to the new ComboBox object
Note
If you subclass ComboBox, you MUST overload this method yourself! If you don't and/or your clone() method does not return an instance of your ComboBox subclass, you will experience "object slicing" when adding the widget to a window.
Warning
The caller must manage the memory for the returned ComboBox object.

Implements hdi::core::Widget.

◆ ComboBoxWithID()

static ComboBox hdi::core::ComboBox::ComboBoxWithID ( const Point loc_,
const double  width_,
const EntryVector &  entries_,
const std::string &  initialID_ 
)
static

Named constructor for a combo box with an initial ID selected.

Author
GW
Date
09/2013
Parameters
loc_Top-left location of the combo box, in 1x resolution coordinates
width_Width of the combo box, at 1x resolution
entries_Vector of string entries
initialID_Initial ID to select (must exist in entries_, and must not be a separator), as UTF-8
Returns
A ComboBox object with the specified entries and initially selected entry

◆ ComboBoxWithValue()

static ComboBox hdi::core::ComboBox::ComboBoxWithValue ( const Point loc_,
const double  width_,
const EntryVector &  entries_,
const std::string &  value_ 
)
static

Named constructor for a combo box with an initial string value (whether it's in the entries_ argument or not)

Author
GW
Date
09/2013
Parameters
loc_Top-left location of the combo box, in 1x resolution coordinates
width_Width of the combo box, at 1x resolution
entries_Vector of string entries
value_Initial value of combo box, as UTF-8
Returns
A ComboBox object with the specified entries and initially selected entry

◆ currentEntry()

virtual std::unique_ptr< PopupEntry > hdi::core::ComboBox::currentEntry ( ) const
virtual

Gets the current entry object.

Author
GW
Date
09/2013
Returns
The PopupEntry object for the currently selected item, or NULL for none (or a custom value)

◆ currentID()

virtual std::string hdi::core::ComboBox::currentID ( ) const
virtual

Gets the ID of the currently selected entry.

Author
GW
Date
09/2013
Returns
UTF-8 ID string of the currently selected entry, or "" if no entry is currently selected

◆ currentIndex()

virtual int32_t hdi::core::ComboBox::currentIndex ( ) const
virtual

Gets the index of the currently selected entry.

Author
GW
Date
09/2013
Returns
The index number of the currently selected entry, or -1 if no entry is selected (the combo box has a custom value)

◆ currentUserData()

virtual bool hdi::core::ComboBox::currentUserData ( void *&  data__) const
virtual

Gets the user data for the current entry.

Author
GW
Date
09/2013
Parameters
data__Return-by-reference for the current user data; ignore if false is returned
Returns
true if the method succeeds in acquiring the contained entry data, false otherwise

◆ currentValue()

virtual std::string hdi::core::ComboBox::currentValue ( ) const
virtual

Gets the string value of the currently selected entry (or the custom value, if the user has entered one)

Author
GW
Date
09/2013
Returns
Value string of the combo box, as UTF-8

◆ duplicate()

virtual ComboBox * hdi::core::ComboBox::duplicate ( ) const
virtual

Convenience method to duplicate a ComboBox object, creating a new and identical UI element to the target (but not belonging to the same containing window)

Author
GW
Date
11/2013
Returns
A pointer to the new ComboBox object (and new UI element)
Note
The new combo box will have copies of all entries present in the target, but be aware that copies of the user data in each entry cannot be made (because they are simply void* variables). As such, the user data in the copies will simply be set to NULL by this method.
Warning
The caller must manage the memory for the returned ComboBox object.

Implements hdi::core::Widget.

◆ entries()

virtual const std::vector< std::shared_ptr< PopupEntry > > *const hdi::core::ComboBox::entries ( ) const
virtual

Gets the entries vector.

Author
GW
Date
09/2013
Returns
The entries vector for the target widget, containing all currently known entries
Note
Modifying any value in an entry will not cause the widget to update automatically; call update() to update the UI for changes made to entry data.

◆ entryWithID()

virtual std::shared_ptr< PopupEntry > hdi::core::ComboBox::entryWithID ( const std::string &  id_) const
virtual

Gets the entry with the given ID, provided it exists within the widget.

Author
GW
Date
02/2023
Parameters
id_ID of the entry to search for
Returns
The entry with the given ID, or NULL if not found

◆ expanded()

virtual bool hdi::core::ComboBox::expanded ( ) const
virtual

Gets the expansion state of the combo box's popup menu.

Author
GW
Date
05/2023
Returns
true if the popup is showing, false otherwise

◆ hasEntry()

virtual bool hdi::core::ComboBox::hasEntry ( const std::string &  id_) const
virtual

Gets whether the entries vector already contains an entry, based on its ID.

Author
GW
Date
09/2013
Parameters
id_ID of the entry to search for, as UTF-8
Returns
true if the widget already contains an entry with the given ID, false otherwise

◆ insertEntry()

virtual bool hdi::core::ComboBox::insertEntry ( const std::string &  id_,
const PopupEntry entry_ 
)
virtual

Inserts an entry into the list of entries at a given position.

Author
GW
Date
09/2013
Parameters
id_Existing entry immediately before the position at which the new entry will be inserted, as UTF-8
entry_New entry object to insert into the list of entries
Returns
true if the entry is inserted successfully, false otherwise
Note
If the entry for id_ doesn't exist in the list, the new entry will not be inserted.
If the passed entry is already present in the list (based on its ID), it will not be inserted.

◆ italic()

virtual bool hdi::core::ComboBox::italic ( ) const
virtual

Gets whether the text is italicized.

Author
GW
Date
09/2013
Returns
true if the text is italicized, false otherwise

◆ lastCharTyped()

virtual std::string hdi::core::ComboBox::lastCharTyped ( ) const
virtual

Gets the last character typed into the field.

Author
GW
Date
05/2023
Returns
Last character typed, or "" if none
Note
The return value of this method is only valid when called from inside a value-changing or value-changed callback (and it's very useful to determine if the user pressed e.g. the enter or return key)

◆ lastModifierKeys()

virtual ModifierKey hdi::core::ComboBox::lastModifierKeys ( ) const
virtual

Gets the last set of modifier keys used when typing into the field.

Author
GW
Date
05/2023
Returns
Last set of modifier keys, or NoModifierKey for none
Note
The return value of this method is only valid when called from inside a value-changing or value-changed callback.
Some modifiers are difficult/impossible to detect here, such as ControlModifierKey on Windows. The reason is that such modifiers are usually captured by other parts of the UI event loop before the widget is even notified of the key strokes (picture e.g. ctrl+a on the Windows to "select all").

◆ operator=()

virtual ComboBox & hdi::core::ComboBox::operator= ( const ComboBox rhs_)
virtual

Allows one ComboBox object to be assigned from another.

Author
GW
Date
10/2013
Parameters
rhs_Righthand side of the = operator; the object to copy values from
Returns
The target ComboBox object, but with its value updated to match that of rhs_

◆ popEntry()

virtual bool hdi::core::ComboBox::popEntry ( PopupEntry entry__)
virtual

Pops an entry off the list (i.e. from the end)

Author
GW
Date
09/2013
Parameters
entry__Return-by-reference for the popped entry, so the caller can inspect which one was removed
Returns
true if an entry was popped and acquired, false otherwise

◆ pushEntry()

virtual bool hdi::core::ComboBox::pushEntry ( const PopupEntry entry_)
virtual

Pushes an entry onto the list (i.e. at the end)

Author
GW
Date
09/2013
Parameters
entry_New entry object to insert into the list of entries
Returns
true if the entry is pushed successfully, false otherwise
Note
If the entry is already present in the list (based on its ID), it will not be inserted.

◆ removeEntry()

virtual bool hdi::core::ComboBox::removeEntry ( const std::string &  id_,
PopupEntry entry__ 
)
virtual

Removes a specific entry from the list of entries.

Author
GW
Date
09/2013
Parameters
id_ID of the entry to be removed, as UTF-8
entry__Return-by-reference for the removed entry, so the caller can inspect which one was removed
Returns
true if an entry was removed and acquired, false otherwise

◆ selectionRange()

virtual bool hdi::core::ComboBox::selectionRange ( uint32_t &  pos__,
uint32_t &  len__ 
) const
virtual

Gets the selection range of the text in the field, if any, in UTF-8.

Author
GW
Date
05/2023
Parameters
pos__Return-by-reference for the starting position of the selection range
len__Return-by-reference for the length of the selection range
Returns
true if the field is focused and the selection range could be acquired, false otherwise
Warning
This method utilizes UTF-8 byte ranges, which can be useful in certain circumstances. If you require character ranges instead, use the UTF-32 version of this method.
Note
If len__ is zero then no text is selected, but pos__ indicates the position of the insertion point (text caret).

◆ selectionRangeUTF32()

virtual bool hdi::core::ComboBox::selectionRangeUTF32 ( uint32_t &  pos__,
uint32_t &  len__ 
) const
virtual

Gets the selection range of the text in the field, if any, in UTF-32.

Author
GW
Date
05/2023
Parameters
pos__Return-by-reference for the starting position of the selection range
len__Return-by-reference for the length of the selection range
Returns
true if the field is focused and the selection range could be acquired, false otherwise
Warning
This method utilizes UTF-32 character ranges, which can be useful in certain circumstances. If you require byte ranges instead, use the UTF-8 version of this method.
Note
If len__ is zero then no text is selected, but pos__ indicates the position of the insertion point (text caret).

◆ setAlignment()

virtual void hdi::core::ComboBox::setAlignment ( const Alignment  alignment_)
virtual

Sets the current alignment of the text field.

Author
GW
Date
09/2013
Parameters
alignment_New text alignment

◆ setBold()

virtual void hdi::core::ComboBox::setBold ( const bool  bold_)
virtual

Sets the font weight.

Author
GW
Date
09/2013
Parameters
bold_true for bold, false otherwise

◆ setCurrentID()

virtual bool hdi::core::ComboBox::setCurrentID ( const std::string &  id_)
virtual

Sets the currently selected entry by ID.

Author
GW
Date
09/2013
Parameters
id_ID of new value to select in the combo box, as UTF-8
Returns
true if the entry with the given ID was selected, or false if invalid

◆ setCurrentIndex()

virtual bool hdi::core::ComboBox::setCurrentIndex ( const int32_t  index_)
virtual

Sets the currently selected entry by index.

Author
GW
Date
09/2013
Parameters
index_New index to select
Returns
true if the selection occurred successfully, or false if e.g. out of range

◆ setCurrentValue()

virtual bool hdi::core::ComboBox::setCurrentValue ( const std::string &  value_)
virtual

Sets the currently selected entry by string value.

Author
GW
Date
09/2013
Parameters
value_New UTF-8 value to set for the combo box, and (if the same as a predefined value from the popup portion of the combo box) the entry to select
Returns
true if the value was set, false otherwise

◆ setEntries()

virtual void hdi::core::ComboBox::setEntries ( const EntryVector &  entries_)
virtual

Allows the entries in an combo box to be changed out entirely.

Author
GW
Date
09/2013
Parameters
entries_New set of entries that the widget will contain

◆ setExpanded()

virtual void hdi::core::ComboBox::setExpanded ( const bool  exp_)
virtual

Sets the expansion state of the combo box's popup menu.

Author
GW
Date
05/2023
Parameters
exp_true to show the popup, false otherwise

◆ setItalic()

virtual void hdi::core::ComboBox::setItalic ( const bool  italic_)
virtual

Sets the font style.

Author
GW
Date
09/2013
Parameters
italic_true for italics, false otherwise

◆ setSelectionRange()

virtual void hdi::core::ComboBox::setSelectionRange ( const uint32_t  pos_,
const uint32_t  len_ 
)
virtual

Sets the selection range of the text in the field, in UTF-8 (and focuses it)

Author
GW
Date
05/2023
Parameters
pos_The starting position of the selection range
len_The length of the selection range
Warning
This method utilizes UTF-8 byte ranges, which can be useful in certain circumstances. If you require character ranges instead, use the UTF-32 version of this method.
Note
If len_ is zero then no text will be selected, but the insertion point (text caret) will be moved to the pos_ value.

◆ setSelectionRangeUTF32()

virtual void hdi::core::ComboBox::setSelectionRangeUTF32 ( const uint32_t  pos_,
const uint32_t  len_ 
)
virtual

Sets the selection range of the text in the field, in UTF-32 (and focuses it)

Author
GW
Date
05/2023
Parameters
pos_The starting position of the selection range
len_The length of the selection range
Warning
This method utilizes UTF-32 character ranges, which can be useful in certain circumstances. If you require byte ranges instead, use the UTF-8 version of this method.
Note
If len_ is zero then no text will be selected, but the insertion point (text caret) will be moved to the pos_ value.

◆ setValueChangedCallback()

virtual void hdi::core::ComboBox::setValueChangedCallback ( const Callback callback_)
virtual

Sets the value changed callback.

Author
GW
Date
09/2013
Parameters
callback_New callback for when the combo box's value has changed

◆ setValueChangingCallback()

virtual void hdi::core::ComboBox::setValueChangingCallback ( const Callback callback_)
virtual

Sets the value changing callback.

Author
GW
Date
09/2013
Parameters
callback_New callback for when the combo box's value is changing

◆ update()

virtual void hdi::core::ComboBox::update ( )
virtual

Force the combo box to update its entries.

Author
GW
Date
12/2013

Reimplemented from hdi::core::Widget.

◆ valueChanged()

virtual void hdi::core::ComboBox::valueChanged ( )
virtual

Simulates the combo box having its value changed.

Author
GW
Date
09/2013

◆ valueChangedCallback()

virtual Callback *const hdi::core::ComboBox::valueChangedCallback ( ) const
virtual

Gets the value changed callback for the combo box.

Author
GW
Date
09/2013
Returns
A pointer to the currently registered value changed callback

◆ valueChanging()

virtual void hdi::core::ComboBox::valueChanging ( )
virtual

Simulates the value of the combo box changing.

Author
GW
Date
01/2017

◆ valueChangingCallback()

virtual Callback *const hdi::core::ComboBox::valueChangingCallback ( ) const
virtual

Gets the value changing callback for the combo box.

Author
GW
Date
01/2017
Returns
A pointer to the currently registered value changing callback