Eclipse SUMO - Simulation of Urban MObility
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
MFXComboBoxAttrProperty Class Reference

#include <MFXComboBoxAttrProperty.h>

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

Public Types

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

Public Member Functions

FXint appendAttrItem (const GNEAttributeProperties *attrProperties, FXColor bgColor=FXRGB(255, 255, 255), void *ptr=nullptr)
 append item
 
void clearItems ()
 Remove all items from the list.
 
void create ()
 Create server-side resources.
 
void destroy ()
 Destroy server-side resources.
 
void detach ()
 Detach server-side resources.
 
void disable ()
 Disable combo box.
 
void enable ()
 Enable combo box.
 
FXint findItem (const FXString &text) const
 find item
 
const GNEAttributePropertiesgetAttrProperties (FXint index) const
 get attribute properties
 
const GNEAttributePropertiesgetCurrentAttrProperty () const
 get current attribute property
 
FXint getCurrentItem () const
 Get the current item's index.
 
FXint getDefaultHeight ()
 Return default height.
 
FXint getDefaultWidth ()
 Return default width.
 
std::string getItemText (FXint index) const
 Get text for specified item.
 
FXint getNumItems () const
 Return the number of items in the list.
 
FXString getText () const
 Get the text.
 
FXColor getTextColor () const
 Return text color.
 
const FXString & getTipText () const
 Get the tool tip message for this combobox.
 
bool hasAttrProperty (const GNEAttributeProperties *attrProperties)
 check if the given attribute exist in comboBox
 
FXbool isItemCurrent (FXint index) const
 Return true if current item.
 
void layout ()
 Perform layout.
 
 MFXComboBoxAttrProperty (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.
 
void removeItem (FXint index)
 Remove this item from the list.
 
void setBackColor (FXColor clr)
 Set window background color.
 
long setCurrentItem (const FXint index, FXbool notify=FALSE)
 Set the current item (index is zero-based)
 
long setCurrentItem (const FXString &text, FXbool notify=FALSE)
 Set the current item.
 
long setCurrentItem (const GNEAttributeProperties *attrProperties, FXbool notify=FALSE)
 Set the current item.
 
void setNumVisible (FXint nvis)
 Set the number of visible items in the drop down list.
 
void setText (const FXString &text, FXbool notify=FALSE)
 Set the text in the textField.
 
void setTextColor (FXColor clr)
 Change text color.
 
void setTipText (const FXString &txt)
 Set the tool tip message for this combobox.
 
 ~MFXComboBoxAttrProperty ()
 Destructor.
 
long onFocusUp (FXObject *, FXSelector, void *)
 Commands.
 
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 Attributes

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

Private Member Functions

FXint appendIconItem (const FXString &text, FXIcon *icon=nullptr, FXColor bgColor=FXRGB(255, 255, 255), void *ptr=nullptr)=delete
 delete original append icon item in the last position
 
FXint insertIconItem (FXint index, const FXString &text, FXIcon *icon=nullptr, FXColor bgColor=FXRGB(255, 255, 255), void *ptr=nullptr)=delete
 delete original insert icon item in the given position
 
 MFXComboBoxAttrProperty (const MFXComboBoxAttrProperty &)=delete
 invalidate copy constructor
 
MFXComboBoxAttrPropertyoperator= (const MFXComboBoxAttrProperty &)=delete
 invalidate assignment operator
 
FXint updateIconItem (FXint index, const FXString &text, FXIcon *icon=nullptr, FXColor bgColor=FXRGB(255, 255, 255), void *ptr=nullptr)=delete
 delete original replace the item at index
 

Private Attributes

std::vector< const GNEAttributeProperties * > myAttrProperties
 vector with tag properties
 

Detailed Description

Definition at line 35 of file MFXComboBoxAttrProperty.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
inherited

FOX declaration.

enum for ID

Enumerator
ID_LIST 
ID_TEXT 
ID_SEARCH 
ID_LAST 

Definition at line 37 of file MFXComboBoxIcon.h.

Constructor & Destructor Documentation

◆ MFXComboBoxAttrProperty() [1/2]

MFXComboBoxAttrProperty::MFXComboBoxAttrProperty ( 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 30 of file MFXComboBoxAttrProperty.cpp.

◆ ~MFXComboBoxAttrProperty()

MFXComboBoxAttrProperty::~MFXComboBoxAttrProperty ( )

Destructor.

Definition at line 36 of file MFXComboBoxAttrProperty.cpp.

◆ MFXComboBoxAttrProperty() [2/2]

MFXComboBoxAttrProperty::MFXComboBoxAttrProperty ( const MFXComboBoxAttrProperty )
privatedelete

invalidate copy constructor

Member Function Documentation

◆ appendAttrItem()

FXint MFXComboBoxAttrProperty::appendAttrItem ( const GNEAttributeProperties attrProperties,
FXColor  bgColor = FXRGB(255, 255, 255),
void *  ptr = nullptr 
)

append item

Definition at line 40 of file MFXComboBoxAttrProperty.cpp.

References MFXComboBoxIcon::appendIconItem(), GNEAttributeProperties::getAttrStr(), and myAttrProperties.

Referenced by GNEMatchAttribute::refreshMatchAttribute().

Here is the caller graph for this function:

◆ appendIconItem()

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

delete original append icon item in the last position

◆ clearItems()

void MFXComboBoxAttrProperty::clearItems ( )
virtual

Remove all items from the list.

Reimplemented from MFXComboBoxIcon.

Definition at line 81 of file MFXComboBoxAttrProperty.cpp.

References MFXComboBoxIcon::clearItems(), and myAttrProperties.

Referenced by GNEMatchAttribute::refreshMatchAttribute().

Here is the caller graph for this function:

◆ create()

void MFXComboBoxIcon::create ( )
inherited

Create server-side resources.

Definition at line 121 of file MFXComboBoxIcon.cpp.

References MFXComboBoxIcon::myPane.

◆ destroy()

void MFXComboBoxIcon::destroy ( )
inherited

Destroy server-side resources.

Definition at line 135 of file MFXComboBoxIcon.cpp.

References MFXComboBoxIcon::myPane.

◆ detach()

void MFXComboBoxIcon::detach ( )
inherited

Detach server-side resources.

Definition at line 128 of file MFXComboBoxIcon.cpp.

References MFXComboBoxIcon::myPane.

◆ disable()

void MFXComboBoxIcon::disable ( )
inherited

◆ enable()

void MFXComboBoxIcon::enable ( )
inherited

Enable combo box.

Definition at line 142 of file MFXComboBoxIcon.cpp.

References MFXTextFieldIcon::enable(), MFXComboBoxIcon::myButton, and MFXComboBoxIcon::myTextFieldIcon.

Referenced by GNEMatchAttribute::enableMatchAttribute(), GUIDialog_ViewSettings::rebuildColorMatrices(), GNEMatchAttribute::refreshMatchAttribute(), GNEAttributesEditorRow::showValueComboBox(), and GNETagSelector::updateTagTypes().

Here is the caller graph for this function:

◆ findItem()

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

find item

Definition at line 333 of file MFXComboBoxIcon.cpp.

References MFXListIcon::findItem(), and MFXComboBoxIcon::myList.

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

Here is the caller graph for this function:

◆ getAttrProperties()

const GNEAttributeProperties * MFXComboBoxAttrProperty::getAttrProperties ( FXint  index) const

get attribute properties

Definition at line 47 of file MFXComboBoxAttrProperty.cpp.

References myAttrProperties.

◆ getCurrentAttrProperty()

const GNEAttributeProperties * MFXComboBoxAttrProperty::getCurrentAttrProperty ( ) const

get current attribute property

Definition at line 53 of file MFXComboBoxAttrProperty.cpp.

References MFXComboBoxIcon::getCurrentItem(), and myAttrProperties.

Referenced by GNEMatchAttribute::onCmdAttributeSelected(), and GNEMatchAttribute::refreshMatchAttribute().

Here is the caller graph for this function:

◆ getCurrentItem()

◆ getDefaultHeight()

FXint MFXComboBoxIcon::getDefaultHeight ( )
inherited

◆ getDefaultWidth()

FXint MFXComboBoxIcon::getDefaultWidth ( )
inherited

◆ getItemText()

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

◆ getNumItems()

◆ getText()

◆ getTextColor()

FXColor MFXComboBoxIcon::getTextColor ( ) const
inherited

Return text color.

Definition at line 359 of file MFXComboBoxIcon.cpp.

References MFXTextFieldIcon::getTextColor(), and MFXComboBoxIcon::myTextFieldIcon.

Referenced by GNEAttributesEditorRow::fillSumoBaseObject(), GNEPlanSelector::isPlanValid(), and GNEAttributesEditorRow::isValueValid().

Here is the caller graph for this function:

◆ getTipText()

const FXString & MFXComboBoxIcon::getTipText ( ) const
inherited

Get the tool tip message for this combobox.

Definition at line 371 of file MFXComboBoxIcon.cpp.

References MFXTextFieldIcon::getTipText(), and MFXComboBoxIcon::myTextFieldIcon.

◆ hasAttrProperty()

bool MFXComboBoxAttrProperty::hasAttrProperty ( const GNEAttributeProperties attrProperties)

check if the given attribute exist in comboBox

Definition at line 76 of file MFXComboBoxAttrProperty.cpp.

References myAttrProperties.

Referenced by GNEMatchAttribute::refreshMatchAttribute().

Here is the caller graph for this function:

◆ insertIconItem()

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

delete original insert icon item in the given position

◆ isItemCurrent()

FXbool MFXComboBoxIcon::isItemCurrent ( FXint  index) const
inherited

Return true if current item.

Definition at line 219 of file MFXComboBoxIcon.cpp.

References MFXListIcon::isItemCurrent(), and MFXComboBoxIcon::myList.

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

Here is the caller graph for this function:

◆ layout()

void MFXComboBoxIcon::layout ( )
inherited

◆ onCmdFilter()

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

Definition at line 383 of file MFXComboBoxIcon.cpp.

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

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onFocusDown()

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

Definition at line 481 of file MFXComboBoxIcon.cpp.

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

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onFocusSelf()

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

Definition at line 457 of file MFXComboBoxIcon.cpp.

References MFXComboBoxIcon::myTextFieldIcon.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onFocusUp()

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

Commands.

Definition at line 463 of file MFXComboBoxIcon.cpp.

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

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onFwdToText()

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

Definition at line 393 of file MFXComboBoxIcon.cpp.

References MFXComboBoxIcon::myTextFieldIcon.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onListClicked()

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

Definition at line 399 of file MFXComboBoxIcon.cpp.

References MFXListIconItem::getBackGroundColor(), MFXListIconItem::getIcon(), MFXComboBoxIcon::getText(), MFXListIconItem::getText(), MFXComboBoxIcon::myButton, MFXComboBoxIcon::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 
)
inherited

Definition at line 498 of file MFXComboBoxIcon.cpp.

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

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onTextButton()

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

Definition at line 422 of file MFXComboBoxIcon.cpp.

References MFXComboBoxIcon::myButton.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onTextChanged()

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

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 
)
inherited

Definition at line 439 of file MFXComboBoxIcon.cpp.

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

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onUpdFmText()

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

Definition at line 377 of file MFXComboBoxIcon.cpp.

References MFXComboBoxIcon::myPane.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ operator=()

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

invalidate assignment operator

◆ removeItem()

void MFXComboBoxIcon::removeItem ( FXint  index)
inherited

Remove this item from the list.

Definition at line 310 of file MFXComboBoxIcon.cpp.

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

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

Here is the caller graph for this function:

◆ setBackColor()

void MFXComboBoxIcon::setBackColor ( FXColor  clr)
inherited

Set window background color.

Definition at line 345 of file MFXComboBoxIcon.cpp.

References MFXComboBoxIcon::myList, and MFXComboBoxIcon::myTextFieldIcon.

Referenced by GNEAttributesEditorRow::onCmdSetAttribute(), and GNEAttributesEditorRow::showValueComboBox().

Here is the caller graph for this function:

◆ setCurrentItem() [1/3]

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

Set the current item (index is zero-based)

Definition at line 225 of file MFXComboBoxIcon.cpp.

References MFXListIconItem::getBackGroundColor(), MFXListIconItem::getIcon(), MFXListIcon::getItem(), MFXComboBoxIcon::getNumItems(), MFXListIconItem::getText(), MFXListIcon::makeItemVisible(), MFXComboBoxIcon::myList, MFXComboBoxIcon::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(), GUIApplicationWindow::eventOccurred(), GUIPropertySchemeStorage< T >::fill(), GUIApplicationWindow::handleEvent_SimulationLoaded(), GUITLLogicPhasesTrackerWindow::loadSettings(), GUIDialog_ViewSettings::loadSettings(), GUIDialog_ViewSettings::onCmdColorChange(), GUIDialog_ViewSettings::onCmdNameChange(), GUIDialog_ViewSettings::onCmdSaveSetting(), MFXComboBoxIcon::onFocusDown(), MFXComboBoxIcon::onFocusUp(), MFXComboBoxIcon::onMouseWheel(), MFXComboBoxIcon::onTextCommand(), GNEDemandElementSelector::refreshDemandElementSelector(), GNEPlanSelector::refreshPlanSelector(), MFXComboBoxIcon::removeItem(), MFXComboBoxIcon::setCurrentItem(), setCurrentItem(), MFXComboBoxTagProperty::setCurrentItem(), GUIDialog_ViewSettings::setCurrentScheme(), GNETagSelector::setCurrentTag(), GNEDemandElementSelector::setDemandElement(), GNEDemandElementSelector::showDemandElementSelector(), GNEAttributesEditorRow::showValueComboBox(), and GNECalibratorFlowDialog::updateCalibratorFlowValues().

Here is the caller graph for this function:

◆ setCurrentItem() [2/3]

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

◆ setCurrentItem() [3/3]

long MFXComboBoxAttrProperty::setCurrentItem ( const GNEAttributeProperties attrProperties,
FXbool  notify = FALSE 
)

Set the current item.

Definition at line 64 of file MFXComboBoxAttrProperty.cpp.

References myAttrProperties, and MFXComboBoxIcon::setCurrentItem().

Referenced by GNEMatchAttribute::refreshMatchAttribute().

Here is the caller graph for this function:

◆ setNumVisible()

void MFXComboBoxIcon::setNumVisible ( FXint  nvis)
inherited

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

Definition at line 207 of file MFXComboBoxIcon.cpp.

References MFXComboBoxIcon::myList, and MFXListIcon::setNumVisible().

◆ setText()

void MFXComboBoxIcon::setText ( const FXString &  text,
FXbool  notify = FALSE 
)
inherited

Set the text in the textField.

Definition at line 213 of file MFXComboBoxIcon.cpp.

References MFXComboBoxIcon::myTextFieldIcon, and MFXTextFieldIcon::setText().

◆ setTextColor()

◆ setTipText()

void MFXComboBoxIcon::setTipText ( const FXString &  txt)
inherited

Set the tool tip message for this combobox.

Definition at line 365 of file MFXComboBoxIcon.cpp.

References MFXComboBoxIcon::myTextFieldIcon, and MFXTextFieldIcon::setTipText().

◆ updateIconItem()

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

delete original replace the item at index

Field Documentation

◆ myAttrProperties

std::vector<const GNEAttributeProperties*> MFXComboBoxAttrProperty::myAttrProperties
private

vector with tag properties

Definition at line 68 of file MFXComboBoxAttrProperty.h.

Referenced by appendAttrItem(), clearItems(), getAttrProperties(), getCurrentAttrProperty(), hasAttrProperty(), and setCurrentItem().

◆ myButton

◆ myList

◆ myNoItemsLabel

FXLabel* MFXComboBoxIcon::myNoItemsLabel = nullptr
protectedinherited

◆ myPane

FXPopup* MFXComboBoxIcon::myPane = nullptr
protectedinherited

◆ myTextFieldIcon

◆ myTextFieldSearch

MFXTextFieldSearch* MFXComboBoxIcon::myTextFieldSearch = nullptr
protectedinherited

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