43 MFXComboBoxIcon(FXComposite* p, FXint cols,
const bool haveIcons, FXObject* tgt = NULL, FXSelector sel = 0, FXuint opts = COMBOBOX_NORMAL, FXint x = 0, FXint y = 0, FXint w = 0, FXint h = 0, FXint pl = DEFAULT_PAD, FXint pr = DEFAULT_PAD, FXint pt = DEFAULT_PAD, FXint pb = DEFAULT_PAD);
115 FXString
getItem(FXint index)
const;
118 FXint
setIconItem(FXint index,
const FXString& text, FXIcon* icon =
nullptr, FXColor bgColor = FXRGB(255, 255, 255),
void* ptr =
nullptr);
121 FXint
insertIconItem(FXint index,
const FXString& text, FXIcon* icon =
nullptr, FXColor bgColor = FXRGB(255, 255, 255),
void* ptr =
nullptr);
124 FXint
appendIconItem(
const FXString& text, FXIcon* icon =
nullptr, FXColor bgColor = FXRGB(255, 255, 255),
void* ptr =
nullptr);
127 bool setItem(
const FXString& text, FXIcon* icon);
133 FXint
prependItem(
const FXString& text,
void* ptr = NULL);
136 FXint
moveItem(FXint newindex, FXint oldindex);
154 FXint
findItem(
const FXString& text, FXint start = -1, FXuint flags = SEARCH_FORWARD | SEARCH_WRAP)
const;
163 FXint
findItemByData(
const void* ptr, FXint start = -1, FXuint flags = SEARCH_FORWARD | SEARCH_WRAP)
const;
236 long onFocusUp(FXObject*, FXSelector,
void*);
FXbool isItemCurrent(FXint index) const
Return true if current item.
FXint findItemByData(const void *ptr, FXint start=-1, FXuint flags=SEARCH_FORWARD|SEARCH_WRAP) const
void setSelTextColor(FXColor clr)
Change selected text color.
FXint insertIconItem(FXint index, const FXString &text, FXIcon *icon=nullptr, FXColor bgColor=FXRGB(255, 255, 255), void *ptr=nullptr)
Insert a new item at index.
virtual void layout()
Perform layout.
FXuint getJustify() const
Return text justification mode.
FXint getCurrentItem() const
Get the current item's index.
void setItemData(FXint index, void *ptr) const
Set data pointer for specified item.
virtual void destroy()
Destroy server-side resources.
FXint getNumVisible() const
Return the number of visible items.
FXuint getComboStyle() const
Get the combobox style.
FXint findItem(const FXString &text, FXint start=-1, FXuint flags=SEARCH_FORWARD|SEARCH_WRAP) const
long onTextChanged(FXObject *, FXSelector, void *)
const FXString & getHelpText() const
Get the combobox help text.
void removeItem(FXint index)
Remove this item from the list.
long onFwdToText(FXObject *, FXSelector, void *)
void setCurrentItem(FXint index, FXbool notify=FALSE)
Set the current item (index is zero-based)
FXint getNumItems() const
Return the number of items in the list.
const FXString & getTipText() const
Get the tool tip message for this combobox.
long onMouseWheel(FXObject *, FXSelector, void *)
virtual FXint getDefaultWidth()
Return default width.
FXbool isEditable() const
Return true if combobox is editable.
FXString getItemText(FXint index) const
Get text for specified item.
void * getItemData(FXint index) const
Get data pointer for specified item.
virtual void setBackColor(FXColor clr)
Set window background color.
long onListClicked(FXObject *, FXSelector, void *)
FXFont * getFont() const
Get text font.
void setHelpText(const FXString &txt)
Set the combobox help text.
FXLabel * myIconLabel
label for icon
FXMenuButton * myButton
myButton
FXString getText() const
Get the text.
MFXComboBoxIcon & operator=(const MFXComboBoxIcon &)=delete
invalidate assignment operator
void setText(FXString text)
Set text.
MFXComboBoxIcon(const MFXComboBoxIcon &)
invalidate copy constructor
FXColor getSelBackColor() const
Return selected background color.
void setNumColumns(FXint cols)
Set the number of columns.
void setTextColor(FXColor clr)
Change text color.
FXColor getSelTextColor() const
Return selected text color.
void setNumVisible(FXint nvis)
Set the number of visible items in the drop down list.
virtual ~MFXComboBoxIcon()
Destructor.
void clearItems()
Remove all items from the list.
void setSortFunc(FXListSortFunc func)
Change sort function.
virtual FXint getDefaultHeight()
Return default height.
FXString getItem(FXint index) const
Return the item at the given index.
long onTextButton(FXObject *, FXSelector, void *)
FXint prependItem(const FXString &text, void *ptr=NULL)
Prepend an item to the list.
void setTipText(const FXString &txt)
Set the tool tip message for this combobox.
void sortItems()
Sort items using current sort function.
FXbool isPaneShown() const
Is the pane shown.
FXint moveItem(FXint newindex, FXint oldindex)
Move item from oldindex to newindex.
virtual void disable()
Disable combo box.
FXColor getBackColor() const
Get background color.
void setSelBackColor(FXColor clr)
Change selected background color.
void setJustify(FXuint mode)
Change text justification mode; default is JUSTIFY_LEFT.
const bool myHaveIcons
check if this iconComboBox have icons
MFXComboBoxIcon()
FOX need this.
FXColor getTextColor() const
Return text color.
long onUpdFmText(FXObject *, FXSelector, void *)
FXint getNumColumns() const
Get the number of columns.
FXListSortFunc getSortFunc() const
Return sort function.
FXint appendIconItem(const FXString &text, FXIcon *icon=nullptr, FXColor bgColor=FXRGB(255, 255, 255), void *ptr=nullptr)
append icon
bool setItem(const FXString &text, FXIcon *icon)
set Item
virtual void enable()
Enable combo box.
MFXTextFieldIcon * myTextFieldIcon
textField with icon
void setComboStyle(FXuint mode)
Set the combobox style.
FXint setIconItem(FXint index, const FXString &text, FXIcon *icon=nullptr, FXColor bgColor=FXRGB(255, 255, 255), void *ptr=nullptr)
Replace the item at index.
long onTextCommand(FXObject *, FXSelector, void *)
void setEditable(FXbool edit=TRUE)
Set editable state.
void setFont(FXFont *fnt)
Set text font.
virtual void detach()
Detach server-side resources.
virtual void create()
Create server-side resources.
long onFocusDown(FXObject *, FXSelector, void *)
long onFocusSelf(FXObject *, FXSelector, void *)
void setCustomText(const FXString text)
set custom text
long onFocusUp(FXObject *, FXSelector, void *)
Commands.
A list item which allows for custom coloring.
FXTextFieldIcon (based on FXTextFieldIcon)