![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <MFXListIconItem.h>
Public Types | |
| enum | { SELECTED = 1 , FOCUS = 2 , DISABLED = 4 , DRAGGABLE = 8 , ICONOWNED = 16 } |
Public Member Functions | |
| void | create () |
| Create server-side resources. | |
| void | destroy () |
| Destroy server-side resources. | |
| void | detach () |
| Detach server-side resources. | |
| const FXColor & | getBackGroundColor () const |
| get background color | |
| FXint | getHeight (const MFXListIcon *list) const |
| Return height of item as drawn in list. | |
| FXIcon * | getIcon () const |
| Return item's icon. | |
| const FXString & | getText () const |
| Return item's text label. | |
| FXint | getWidth (const MFXListIcon *list) const |
| Return width of item as drawn in list. | |
| FXbool | hasFocus () const |
| Return true if item has focus. | |
| FXbool | isDraggable () const |
| Return true if this item is draggable. | |
| FXbool | isEnabled () const |
| Return true if this item is enabled. | |
| FXbool | isSelected () const |
| Return true if this item is selected. | |
| MFXListIconItem (const FXString &text, FXIcon *ic=NULL, FXColor backGroundColor=0, void *ptr=NULL) | |
| Construct new item with given text, icon, and user-data. | |
| void | setDraggable (FXbool draggable) |
| Make item draggable. | |
| void | setEnabled (FXbool enabled) |
| Enable or disable item. | |
| void | setFocus (FXbool focus) |
| Make item draw as focused. | |
| void | setSelected (FXbool selected) |
| Select item. | |
| void | setText (const FXString &txt) |
| Change item's text label. | |
| ~MFXListIconItem () | |
| Destroy item and free icons if owned. | |
Protected Member Functions | |
| void | draw (const MFXListIcon *list, FXDC &dc, FXint x, FXint y, FXint w, FXint h) |
| daraw | |
| FXint | hitItem (const MFXListIcon *list, FXint x, FXint y) const |
| hit item | |
| MFXListIconItem () | |
| FOX need this. | |
Protected Attributes | |
| void * | data = nullptr |
| data | |
| FXIcon * | icon = nullptr |
| icon | |
| FXString | label |
| label | |
| FXColor | myBackGroundColor = 0 |
| backGround color | |
| bool | show = true |
| flag for show/hidde element | |
| FXuint | state = 0 |
| state | |
| FXint | x = 0 |
| position | |
| FXint | y = 0 |
Private Member Functions | |
| MFXListIconItem (const MFXListIconItem &)=delete | |
| invalidate copy constructor | |
| MFXListIconItem & | operator= (const MFXListIconItem &)=delete |
| invalidate assign constructor | |
Friends | |
| class | MFXListIcon |
| FOX declaration. | |
Definition at line 35 of file MFXListIconItem.h.
| anonymous enum |
| Enumerator | |
|---|---|
| SELECTED | |
| FOCUS | Selected. |
| DISABLED | Focus. |
| DRAGGABLE | Disabled. |
| ICONOWNED | Draggable. |
Definition at line 43 of file MFXListIconItem.h.
| MFXListIconItem::MFXListIconItem | ( | const FXString & | text, |
| FXIcon * | ic = NULL, |
||
| FXColor | backGroundColor = 0, |
||
| void * | ptr = NULL |
||
| ) |
Construct new item with given text, icon, and user-data.
Definition at line 51 of file MFXListIconItem.cpp.
| MFXListIconItem::~MFXListIconItem | ( | ) |
Destroy item and free icons if owned.
Definition at line 59 of file MFXListIconItem.cpp.
|
protected |
FOX need this.
Definition at line 212 of file MFXListIconItem.cpp.
|
privatedelete |
invalidate copy constructor
| void MFXListIconItem::create | ( | ) |
Create server-side resources.
Definition at line 150 of file MFXListIconItem.cpp.
References create(), and icon.
Referenced by create().
| void MFXListIconItem::destroy | ( | ) |
Destroy server-side resources.
Definition at line 158 of file MFXListIconItem.cpp.
| void MFXListIconItem::detach | ( | ) |
|
protected |
daraw
Definition at line 216 of file MFXListIconItem.cpp.
References MFXListIcon::getFont(), MFXListIcon::getSelBackColor(), MFXListIcon::getSelTextColor(), MFXListIcon::getTextColor(), hasFocus(), icon, ICON_SIZE, ICON_SPACING, isEnabled(), isSelected(), label, myBackGroundColor, and SIDE_SPACING.
| const FXColor & MFXListIconItem::getBackGroundColor | ( | ) | const |
get background color
Definition at line 207 of file MFXListIconItem.cpp.
References myBackGroundColor.
Referenced by MFXComboBoxIcon::onListClicked(), and MFXComboBoxIcon::setCurrentItem().
| FXint MFXListIconItem::getHeight | ( | const MFXListIcon * | list | ) | const |
Return height of item as drawn in list.
Definition at line 192 of file MFXListIconItem.cpp.
References MFXListIcon::getFont(), icon, label, and LINE_SPACING.
Referenced by MFXListIcon::isItemVisible(), MFXListIcon::makeItemVisible(), and MFXListIcon::updateItem().
| FXIcon * MFXListIconItem::getIcon | ( | ) | const |
Return item's icon.
Definition at line 144 of file MFXListIconItem.cpp.
References icon.
Referenced by MFXComboBoxIcon::onListClicked(), and MFXComboBoxIcon::setCurrentItem().
| const FXString & MFXListIconItem::getText | ( | ) | const |
Return item's text label.
Definition at line 138 of file MFXListIconItem.cpp.
References label.
Referenced by MFXComboBoxIcon::getItemText(), MFXComboBoxIcon::onListClicked(), MFXListIcon::onQueryTip(), MFXComboBoxIcon::onTextCommand(), MFXComboBoxIcon::setCurrentItem(), and MFXComboBoxIcon::setCurrentItem().
| FXint MFXListIconItem::getWidth | ( | const MFXListIcon * | list | ) | const |
Return width of item as drawn in list.
Definition at line 174 of file MFXListIconItem.cpp.
References MFXListIcon::getFont(), icon, ICON_SPACING, label, and SIDE_SPACING.
| FXbool MFXListIconItem::hasFocus | ( | ) | const |
Return true if item has focus.
Definition at line 78 of file MFXListIconItem.cpp.
Referenced by draw().
|
protected |
hit item
Definition at line 254 of file MFXListIconItem.cpp.
References MFXListIcon::getFont(), icon, ICON_SPACING, label, LINE_SPACING, and SIDE_SPACING.
Referenced by MFXListIcon::hitItem().
| FXbool MFXListIconItem::isDraggable | ( | ) | const |
Return true if this item is draggable.
Definition at line 126 of file MFXListIconItem.cpp.
| FXbool MFXListIconItem::isEnabled | ( | ) | const |
Return true if this item is enabled.
Definition at line 110 of file MFXListIconItem.cpp.
References DISABLED, and state.
Referenced by draw(), MFXListIcon::onKeyPress(), and MFXListIcon::onLeftBtnRelease().
| FXbool MFXListIconItem::isSelected | ( | ) | const |
Return true if this item is selected.
Definition at line 94 of file MFXListIconItem.cpp.
References SELECTED, and state.
Referenced by MFXListIcon::deselectItem(), draw(), MFXListIcon::selectItem(), and MFXListIcon::toggleItem().
|
privatedelete |
invalidate assign constructor
| void MFXListIconItem::setDraggable | ( | FXbool | draggable | ) |
Make item draggable.
Definition at line 116 of file MFXListIconItem.cpp.
| void MFXListIconItem::setEnabled | ( | FXbool | enabled | ) |
Enable or disable item.
Definition at line 100 of file MFXListIconItem.cpp.
| void MFXListIconItem::setFocus | ( | FXbool | focus | ) |
Make item draw as focused.
Definition at line 68 of file MFXListIconItem.cpp.
Referenced by MFXListIcon::insertItem(), MFXListIcon::onFocusIn(), MFXListIcon::onFocusOut(), MFXListIcon::removeItem(), and MFXListIcon::setCurrentItem().
| void MFXListIconItem::setSelected | ( | FXbool | selected | ) |
Select item.
Definition at line 84 of file MFXListIconItem.cpp.
References SELECTED, and state.
Referenced by MFXListIcon::deselectItem(), MFXListIcon::selectItem(), and MFXListIcon::toggleItem().
| void MFXListIconItem::setText | ( | const FXString & | txt | ) |
|
friend |
|
protected |
data
Definition at line 125 of file MFXListIconItem.h.
|
protected |
icon
Definition at line 122 of file MFXListIconItem.h.
Referenced by create(), destroy(), detach(), draw(), getHeight(), getIcon(), getWidth(), hitItem(), and ~MFXListIconItem().
|
protected |
label
Definition at line 119 of file MFXListIconItem.h.
Referenced by draw(), getHeight(), getText(), getWidth(), hitItem(), and setText().
|
protected |
backGround color
Definition at line 135 of file MFXListIconItem.h.
Referenced by draw(), and getBackGroundColor().
|
protected |
flag for show/hidde element
Definition at line 138 of file MFXListIconItem.h.
|
protected |
state
Definition at line 128 of file MFXListIconItem.h.
Referenced by destroy(), hasFocus(), isDraggable(), isEnabled(), isSelected(), setDraggable(), setEnabled(), setFocus(), MFXListIcon::setItem(), setSelected(), and ~MFXListIconItem().
|
protected |
|
protected |
Definition at line 132 of file MFXListIconItem.h.
Referenced by MFXListIcon::hitItem(), MFXListIcon::isItemVisible(), MFXListIcon::makeItemVisible(), and MFXListIcon::updateItem().