Eclipse SUMO - Simulation of Urban MObility
MFXComboBoxIcon Class Reference

ComboBox with icon. More...

#include <MFXComboBoxIcon.h>

Inheritance diagram for MFXComboBoxIcon:
[legend]
Collaboration diagram for MFXComboBoxIcon:
[legend]

Public Types

enum  { ID_LIST = FXPacker::ID_LAST , ID_TEXT , ID_SEARCH , ID_LAST }
 FOX declaration. More...
 

Public Member Functions

FXint appendIconItem (const FXString &text, FXIcon *icon=nullptr, FXColor bgColor=FXRGB(255, 255, 255), void *ptr=nullptr)
 append icon item in the last position More...
 
void clearItems ()
 Remove all items from the list. More...
 
void create ()
 Create server-side resources. More...
 
void destroy ()
 Destroy server-side resources. More...
 
void detach ()
 Detach server-side resources. More...
 
void disable ()
 Disable combo box. More...
 
void enable ()
 Enable combo box. More...
 
FXint findItem (const FXString &text) const
 find item More...
 
FXint getCurrentItem () const
 Get the current item's index. More...
 
FXint getDefaultHeight ()
 Return default height. More...
 
FXint getDefaultWidth ()
 Return default width. More...
 
std::string getItemText (FXint index) const
 Get text for specified item. More...
 
FXint getNumItems () const
 Return the number of items in the list. More...
 
FXString getText () const
 Get the text. More...
 
FXColor getTextColor () const
 Return text color. More...
 
const FXString & getTipText () const
 Get the tool tip message for this combobox. More...
 
FXint insertIconItem (FXint index, const FXString &text, FXIcon *icon=nullptr, FXColor bgColor=FXRGB(255, 255, 255), void *ptr=nullptr)
 insert icon item in the given position More...
 
FXbool isItemCurrent (FXint index) const
 Return true if current item. More...
 
void layout ()
 Perform layout. More...
 
 MFXComboBoxIcon (FXComposite *p, FXint cols, const bool canSearch, const int visibleItems, FXObject *tgt, 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)
 Construct a Combo Box widget with room to display cols columns of text. More...
 
void removeItem (FXint index)
 Remove this item from the list. More...
 
void setBackColor (FXColor clr)
 Set window background color. More...
 
long setCurrentItem (const FXint index, FXbool notify=FALSE)
 Set the current item (index is zero-based) More...
 
long setCurrentItem (const FXString &text, FXbool notify=FALSE)
 Set the current item. More...
 
void setNumVisible (FXint nvis)
 Set the number of visible items in the drop down list. More...
 
void setText (const FXString &text)
 Set the text in the textField. More...
 
void setTextColor (FXColor clr)
 Change text color. More...
 
void setTipText (const FXString &txt)
 Set the tool tip message for this combobox. More...
 
FXint updateIconItem (FXint index, const FXString &text, FXIcon *icon=nullptr, FXColor bgColor=FXRGB(255, 255, 255), void *ptr=nullptr)
 Replace the item at index. More...
 
 ~MFXComboBoxIcon ()
 Destructor. More...
 
long onFocusUp (FXObject *, FXSelector, void *)
 Commands. More...
 
long onFocusDown (FXObject *, FXSelector, void *)
 
long onFocusSelf (FXObject *, FXSelector, void *)
 
long onMouseWheel (FXObject *, FXSelector, void *)
 
long onTextButton (FXObject *, FXSelector, void *)
 
long onTextChanged (FXObject *, FXSelector, void *)
 
long onTextCommand (FXObject *, FXSelector, void *)
 
long onListClicked (FXObject *, FXSelector, void *)
 
long onFwdToText (FXObject *, FXSelector, void *)
 
long onUpdFmText (FXObject *, FXSelector, void *)
 
long onCmdFilter (FXObject *, FXSelector, void *)
 

Protected Member Functions

 MFXComboBoxIcon ()
 FOX need this. More...
 

Protected Attributes

FXMenuButton * myButton = nullptr
 myButton More...
 
MFXListIconmyList = nullptr
 list with all items More...
 
FXLabel * myNoItemsLabel = nullptr
 no items label More...
 
FXPopup * myPane = nullptr
 popup in which place search label and list More...
 
MFXTextFieldIconmyTextFieldIcon = nullptr
 textField icon More...
 
MFXTextFieldSearchmyTextFieldSearch = nullptr
 text field search More...
 

Private Member Functions

 MFXComboBoxIcon (const MFXComboBoxIcon &)
 invalidate copy constructor More...
 
MFXComboBoxIconoperator= (const MFXComboBoxIcon &)=delete
 invalidate assignment operator More...
 

Detailed Description

ComboBox with icon.

Definition at line 30 of file MFXComboBoxIcon.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

FOX declaration.

enum for ID

Enumerator
ID_LIST 
ID_TEXT 
ID_SEARCH 
ID_LAST 

Definition at line 36 of file MFXComboBoxIcon.h.

Constructor & Destructor Documentation

◆ MFXComboBoxIcon() [1/3]

MFXComboBoxIcon::MFXComboBoxIcon ( FXComposite *  p,
FXint  cols,
const bool  canSearch,
const int  visibleItems,
FXObject *  tgt,
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 
)

Construct a Combo Box widget with room to display cols columns of text.

Definition at line 71 of file MFXComboBoxIcon.cpp.

References ID_LIST, ID_TEXT, and TL.

◆ ~MFXComboBoxIcon()

MFXComboBoxIcon::~MFXComboBoxIcon ( )

Destructor.

Definition at line 107 of file MFXComboBoxIcon.cpp.

References myButton, myList, myNoItemsLabel, myPane, myTextFieldIcon, and myTextFieldSearch.

◆ MFXComboBoxIcon() [2/3]

MFXComboBoxIcon::MFXComboBoxIcon ( )
protected

FOX need this.

Definition at line 524 of file MFXComboBoxIcon.cpp.

◆ MFXComboBoxIcon() [3/3]

MFXComboBoxIcon::MFXComboBoxIcon ( const MFXComboBoxIcon )
private

invalidate copy constructor

Member Function Documentation

◆ appendIconItem()

FXint MFXComboBoxIcon::appendIconItem ( const FXString &  text,
FXIcon *  icon = nullptr,
FXColor  bgColor = FXRGB(255, 255, 255),
void *  ptr = nullptr 
)

append icon item in the last position

Definition at line 297 of file MFXComboBoxIcon.cpp.

References MFXListIcon::appendItem(), getNumItems(), isItemCurrent(), myList, myTextFieldIcon, MFXTextFieldIcon::setIcon(), and MFXTextFieldIcon::setText().

Referenced by GUISettingsHandler::addSettings(), GUIDialog_ViewSettings::buildContainersFrame(), GUIDialog_ViewSettings::buildHeader(), GUIDialog_ViewSettings::buildPersonsFrame(), GUIParameterTracker::buildToolBar(), GUIDialog_ViewSettings::buildVehiclesFrame(), GUIViewTraffic::buildViewToolBars(), GNEViewNet::buildViewToolBars(), GNEVehicleTypeDialog::CarFollowingModelParameters::CarFollowingModelParameters(), GNEMatchGenericDataAttribute::enableMatchGenericDataAttribute(), GUIPropertySchemeStorage< T >::fill(), GUITLLogicPhasesTrackerWindow::initToolBar(), GUIDialog_ViewSettings::loadSettings(), GNEMeanDataFrame::MeanDataSelector::MeanDataSelector(), GUIDialog_ViewSettings::onCmdColorChange(), GUIDialog_ViewSettings::onCmdSaveSetting(), GNEMatchGenericDataAttribute::onCmdSelectTag(), GUIDialog_ViewSettings::rebuildColorMatrices(), GNEDemandElementSelector::refreshDemandElementSelector(), GNEAttributesCreatorRow::refreshRow(), GNESelectorFrame::SelectionHierarchy::SelectionHierarchy(), GNETagSelector::setCurrentTagType(), GNEDemandElementSelector::setDemandElements(), GNEFlowEditor::showFlowEditor(), GNEMatchAttribute::updateAttribute(), GNEMatchAttribute::updateTag(), GNEMatchGenericDataAttribute::updateTAZComboBox(), GNEVehicleTypeDialog::VTypeAttributes::VShapeRow::VShapeRow(), and GNEVehicleTypeDialog::VTypeAttributes::VTypeAttributeRow::VTypeAttributeRow().

Here is the caller graph for this function:

◆ clearItems()

◆ create()

void MFXComboBoxIcon::create ( )

Create server-side resources.

Definition at line 121 of file MFXComboBoxIcon.cpp.

References myPane.

◆ destroy()

void MFXComboBoxIcon::destroy ( )

Destroy server-side resources.

Definition at line 135 of file MFXComboBoxIcon.cpp.

References myPane.

◆ detach()

void MFXComboBoxIcon::detach ( )

Detach server-side resources.

Definition at line 128 of file MFXComboBoxIcon.cpp.

References myPane.

◆ disable()

◆ enable()

◆ findItem()

FXint MFXComboBoxIcon::findItem ( const FXString &  text) const

find item

Definition at line 333 of file MFXComboBoxIcon.cpp.

References MFXListIcon::findItem(), and myList.

Referenced by GUIApplicationWindow::eventOccurred(), GUIApplicationWindow::handleEvent_SimulationLoaded(), GUIDialog_ViewSettings::onCmdColorChange(), GUIDialog_ViewSettings::onCmdSaveSetting(), GNEAttributesCreatorRow::refreshRow(), and GNECalibratorFlowDialog::updateCalibratorFlowValues().

Here is the caller graph for this function:

◆ getCurrentItem()

◆ getDefaultHeight()

FXint MFXComboBoxIcon::getDefaultHeight ( )

Return default height.

Definition at line 170 of file MFXComboBoxIcon.cpp.

References MFXTextFieldIcon::getDefaultHeight(), myButton, and myTextFieldIcon.

◆ getDefaultWidth()

FXint MFXComboBoxIcon::getDefaultWidth ( )

Return default width.

Definition at line 162 of file MFXComboBoxIcon.cpp.

References MFXTextFieldIcon::getDefaultWidth(), myButton, myPane, and myTextFieldIcon.

◆ getItemText()

std::string MFXComboBoxIcon::getItemText ( FXint  index) const

Get text for specified item.

Definition at line 339 of file MFXComboBoxIcon.cpp.

References MFXListIcon::getItem(), MFXListIconItem::getText(), and myList.

Referenced by GUIDialog_ViewSettings::getCurrentScheme(), GUIDialog_ViewSettings::onCmdDeleteSetting(), GUIDialog_ViewSettings::onCmdNameChange(), GUIDialog_ViewSettings::rebuildColorMatrices(), GNEDemandElementSelector::refreshDemandElementSelector(), and GUIDialog_ViewSettings::setCurrentScheme().

Here is the caller graph for this function:

◆ getNumItems()

FXint MFXComboBoxIcon::getNumItems ( ) const

◆ getText()

◆ getTextColor()

FXColor MFXComboBoxIcon::getTextColor ( ) const

Return text color.

Definition at line 359 of file MFXComboBoxIcon.cpp.

References MFXTextFieldIcon::getTextColor(), and myTextFieldIcon.

Referenced by GNEAttributesCreatorRow::isAttributeValid(), GNEPlanSelector::isPlanValid(), GNEMatchGenericDataAttribute::onCmdProcessString(), GNEFlowEditor::refreshMultipleFlows(), and GNEFlowEditor::refreshSingleFlow().

Here is the caller graph for this function:

◆ getTipText()

const FXString & MFXComboBoxIcon::getTipText ( ) const

Get the tool tip message for this combobox.

Definition at line 371 of file MFXComboBoxIcon.cpp.

References MFXTextFieldIcon::getTipText(), and myTextFieldIcon.

◆ insertIconItem()

FXint MFXComboBoxIcon::insertIconItem ( FXint  index,
const FXString &  text,
FXIcon *  icon = nullptr,
FXColor  bgColor = FXRGB(255, 255, 255),
void *  ptr = nullptr 
)

insert icon item in the given position

Definition at line 284 of file MFXComboBoxIcon.cpp.

References MFXListIcon::insertItem(), isItemCurrent(), myList, myTextFieldIcon, MFXTextFieldIcon::setIcon(), and MFXTextFieldIcon::setText().

Referenced by GUIDialog_ViewSettings::onCmdSaveSetting().

Here is the caller graph for this function:

◆ isItemCurrent()

FXbool MFXComboBoxIcon::isItemCurrent ( FXint  index) const

Return true if current item.

Definition at line 219 of file MFXComboBoxIcon.cpp.

References MFXListIcon::isItemCurrent(), and myList.

Referenced by appendIconItem(), insertIconItem(), and updateIconItem().

Here is the caller graph for this function:

◆ layout()

void MFXComboBoxIcon::layout ( )

Perform layout.

Definition at line 179 of file MFXComboBoxIcon.cpp.

References myButton, myNoItemsLabel, myPane, myTextFieldIcon, and myTextFieldSearch.

◆ onCmdFilter()

long MFXComboBoxIcon::onCmdFilter ( FXObject *  ,
FXSelector  ,
void *  ptr 
)

Definition at line 383 of file MFXComboBoxIcon.cpp.

References MFXTextFieldIcon::getText(), myList, myNoItemsLabel, myPane, myTextFieldSearch, and MFXListIcon::setFilter().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onFocusDown()

long MFXComboBoxIcon::onFocusDown ( FXObject *  ,
FXSelector  ,
void *   
)

Definition at line 481 of file MFXComboBoxIcon.cpp.

References getCurrentItem(), getNumItems(), and setCurrentItem().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onFocusSelf()

long MFXComboBoxIcon::onFocusSelf ( FXObject *  sender,
FXSelector  ,
void *  ptr 
)

Definition at line 457 of file MFXComboBoxIcon.cpp.

References myTextFieldIcon.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onFocusUp()

long MFXComboBoxIcon::onFocusUp ( FXObject *  ,
FXSelector  ,
void *   
)

Commands.

Definition at line 463 of file MFXComboBoxIcon.cpp.

References getCurrentItem(), getNumItems(), and setCurrentItem().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onFwdToText()

long MFXComboBoxIcon::onFwdToText ( FXObject *  sender,
FXSelector  sel,
void *  ptr 
)

Definition at line 393 of file MFXComboBoxIcon.cpp.

References myTextFieldIcon.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onListClicked()

long MFXComboBoxIcon::onListClicked ( FXObject *  ,
FXSelector  sel,
void *  ptr 
)

Definition at line 399 of file MFXComboBoxIcon.cpp.

References MFXListIconItem::getBackGroundColor(), MFXListIconItem::getIcon(), getText(), MFXListIconItem::getText(), myButton, myTextFieldIcon, MFXTextFieldIcon::selectAll(), MFXTextFieldIcon::setIcon(), and MFXTextFieldIcon::setText().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onMouseWheel()

long MFXComboBoxIcon::onMouseWheel ( FXObject *  ,
FXSelector  ,
void *  ptr 
)

Definition at line 498 of file MFXComboBoxIcon.cpp.

References getCurrentItem(), getNumItems(), and setCurrentItem().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onTextButton()

long MFXComboBoxIcon::onTextButton ( FXObject *  ,
FXSelector  ,
void *   
)

Definition at line 422 of file MFXComboBoxIcon.cpp.

References myButton.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onTextChanged()

long MFXComboBoxIcon::onTextChanged ( FXObject *  ,
FXSelector  ,
void *  ptr 
)

Definition at line 433 of file MFXComboBoxIcon.cpp.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onTextCommand()

long MFXComboBoxIcon::onTextCommand ( FXObject *  ,
FXSelector  ,
void *  ptr 
)

Definition at line 439 of file MFXComboBoxIcon.cpp.

References CANCEL, GUIIconSubSys::getIcon(), MFXListIcon::getItem(), MFXListIcon::getNumItems(), MFXListIconItem::getText(), MFXTextFieldIcon::getText(), myList, myTextFieldIcon, setCurrentItem(), MFXTextFieldIcon::setIcon(), and MFXListIcon::tolowerString().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onUpdFmText()

long MFXComboBoxIcon::onUpdFmText ( FXObject *  ,
FXSelector  ,
void *   
)

Definition at line 377 of file MFXComboBoxIcon.cpp.

References myPane.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ operator=()

MFXComboBoxIcon& MFXComboBoxIcon::operator= ( const MFXComboBoxIcon )
privatedelete

invalidate assignment operator

◆ removeItem()

void MFXComboBoxIcon::removeItem ( FXint  index)

Remove this item from the list.

Definition at line 310 of file MFXComboBoxIcon.cpp.

References MFXListIcon::getNumItems(), MFXListIcon::isItemCurrent(), myList, MFXListIcon::removeItem(), and setCurrentItem().

Referenced by GUIDialog_ViewSettings::onCmdDeleteSetting(), and GUIDialog_ViewSettings::onCmdNameChange().

Here is the caller graph for this function:

◆ setBackColor()

void MFXComboBoxIcon::setBackColor ( FXColor  clr)

Set window background color.

Definition at line 345 of file MFXComboBoxIcon.cpp.

References myList, and myTextFieldIcon.

Referenced by GNENeteditAttributes::onCmdSetNeteditAttribute().

Here is the caller graph for this function:

◆ setCurrentItem() [1/2]

long MFXComboBoxIcon::setCurrentItem ( const FXint  index,
FXbool  notify = FALSE 
)

Set the current item (index is zero-based)

Definition at line 225 of file MFXComboBoxIcon.cpp.

References MFXListIconItem::getBackGroundColor(), MFXListIconItem::getIcon(), MFXListIcon::getItem(), getNumItems(), MFXListIconItem::getText(), MFXListIcon::makeItemVisible(), myList, myTextFieldIcon, MFXListIcon::setCurrentItem(), MFXTextFieldIcon::setIcon(), and MFXTextFieldIcon::setText().

Referenced by GUISettingsHandler::addSettings(), GUIDialog_ViewSettings::buildContainersFrame(), GUIDialog_ViewSettings::buildHeader(), GUIDialog_ViewSettings::buildPersonsFrame(), GUIDialog_ViewSettings::buildVehiclesFrame(), GUIViewTraffic::buildViewToolBars(), GNEViewNet::buildViewToolBars(), GNEMatchGenericDataAttribute::enableMatchGenericDataAttribute(), GUIApplicationWindow::eventOccurred(), GUIPropertySchemeStorage< T >::fill(), GUIApplicationWindow::handleEvent_SimulationLoaded(), GUITLLogicPhasesTrackerWindow::loadSettings(), GUIDialog_ViewSettings::loadSettings(), GUIDialog_ViewSettings::onCmdColorChange(), GUIDialog_ViewSettings::onCmdNameChange(), GUIDialog_ViewSettings::onCmdSaveSetting(), GNETagSelector::onCmdSelectTag(), onFocusDown(), onFocusUp(), onMouseWheel(), onTextCommand(), GNEDemandElementSelector::refreshDemandElementSelector(), GNEFlowEditor::refreshMultipleFlows(), GNEPlanSelector::refreshPlanSelector(), GNEAttributesCreatorRow::refreshRow(), GNEFlowEditor::refreshSingleFlow(), removeItem(), setCurrentItem(), GUIDialog_ViewSettings::setCurrentScheme(), GNETagSelector::setCurrentTag(), GNEDemandElementSelector::setDemandElement(), GNEDemandElementSelector::showDemandElementSelector(), GNEMatchAttribute::updateAttribute(), GNECalibratorFlowDialog::updateCalibratorFlowValues(), GNEMatchAttribute::updateTag(), and GNEMatchGenericDataAttribute::updateTAZComboBox().

Here is the caller graph for this function:

◆ setCurrentItem() [2/2]

long MFXComboBoxIcon::setCurrentItem ( const FXString &  text,
FXbool  notify = FALSE 
)

◆ setNumVisible()

void MFXComboBoxIcon::setNumVisible ( FXint  nvis)

Set the number of visible items in the drop down list.

Definition at line 207 of file MFXComboBoxIcon.cpp.

References myList, and MFXListIcon::setNumVisible().

◆ setText()

void MFXComboBoxIcon::setText ( const FXString &  text)

Set the text in the textField.

Definition at line 213 of file MFXComboBoxIcon.cpp.

References myTextFieldIcon, and MFXTextFieldIcon::setText().

Referenced by GNEFlowEditor::refreshMultipleFlows().

Here is the caller graph for this function:

◆ setTextColor()

◆ setTipText()

void MFXComboBoxIcon::setTipText ( const FXString &  txt)

Set the tool tip message for this combobox.

Definition at line 365 of file MFXComboBoxIcon.cpp.

References myTextFieldIcon, and MFXTextFieldIcon::setTipText().

◆ updateIconItem()

FXint MFXComboBoxIcon::updateIconItem ( FXint  index,
const FXString &  text,
FXIcon *  icon = nullptr,
FXColor  bgColor = FXRGB(255, 255, 255),
void *  ptr = nullptr 
)

Field Documentation

◆ myButton

FXMenuButton* MFXComboBoxIcon::myButton = nullptr
protected

◆ myList

◆ myNoItemsLabel

FXLabel* MFXComboBoxIcon::myNoItemsLabel = nullptr
protected

no items label

Definition at line 173 of file MFXComboBoxIcon.h.

Referenced by layout(), onCmdFilter(), and ~MFXComboBoxIcon().

◆ myPane

FXPopup* MFXComboBoxIcon::myPane = nullptr
protected

popup in which place search label and list

Definition at line 170 of file MFXComboBoxIcon.h.

Referenced by create(), destroy(), detach(), getDefaultWidth(), layout(), onCmdFilter(), onUpdFmText(), and ~MFXComboBoxIcon().

◆ myTextFieldIcon

◆ myTextFieldSearch

MFXTextFieldSearch* MFXComboBoxIcon::myTextFieldSearch = nullptr
protected

text field search

Definition at line 167 of file MFXComboBoxIcon.h.

Referenced by layout(), onCmdFilter(), and ~MFXComboBoxIcon().


The documentation for this class was generated from the following files: