Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
MFXListIconItem Class Reference

#include <MFXListIconItem.h>

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

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
 
MFXListIconItemoperator= (const MFXListIconItem &)=delete
 invalidate assign constructor
 

Friends

class MFXListIcon
 FOX declaration.
 

Detailed Description

Definition at line 36 of file MFXListIconItem.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
SELECTED 
FOCUS 

Selected.

DISABLED 

Focus.

DRAGGABLE 

Disabled.

ICONOWNED 

Draggable.

Definition at line 44 of file MFXListIconItem.h.

Constructor & Destructor Documentation

◆ MFXListIconItem() [1/3]

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::~MFXListIconItem ( )

Destroy item and free icons if owned.

Definition at line 59 of file MFXListIconItem.cpp.

References icon, ICONOWNED, and state.

◆ MFXListIconItem() [2/3]

MFXListIconItem::MFXListIconItem ( )
protected

FOX need this.

Definition at line 212 of file MFXListIconItem.cpp.

◆ MFXListIconItem() [3/3]

MFXListIconItem::MFXListIconItem ( const MFXListIconItem )
privatedelete

invalidate copy constructor

Member Function Documentation

◆ create()

void MFXListIconItem::create ( )

Create server-side resources.

Definition at line 150 of file MFXListIconItem.cpp.

References create(), and icon.

Referenced by create().

Here is the caller graph for this function:

◆ destroy()

void MFXListIconItem::destroy ( )

Destroy server-side resources.

Definition at line 158 of file MFXListIconItem.cpp.

References icon, ICONOWNED, and state.

◆ detach()

void MFXListIconItem::detach ( )

Detach server-side resources.

Definition at line 166 of file MFXListIconItem.cpp.

References icon.

◆ draw()

void MFXListIconItem::draw ( const MFXListIcon list,
FXDC &  dc,
FXint  x,
FXint  y,
FXint  w,
FXint  h 
)
protected

◆ getBackGroundColor()

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().

Here is the caller graph for this function:

◆ getHeight()

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().

Here is the caller graph for this function:

◆ getIcon()

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().

Here is the caller graph for this function:

◆ getText()

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().

Here is the caller graph for this function:

◆ getWidth()

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.

◆ hasFocus()

FXbool MFXListIconItem::hasFocus ( ) const

Return true if item has focus.

Definition at line 78 of file MFXListIconItem.cpp.

References FOCUS, and state.

Referenced by draw().

Here is the caller graph for this function:

◆ hitItem()

FXint MFXListIconItem::hitItem ( const MFXListIcon list,
FXint  x,
FXint  y 
) const
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().

Here is the caller graph for this function:

◆ isDraggable()

FXbool MFXListIconItem::isDraggable ( ) const

Return true if this item is draggable.

Definition at line 126 of file MFXListIconItem.cpp.

References DRAGGABLE, and state.

◆ isEnabled()

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().

Here is the caller graph for this function:

◆ isSelected()

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().

Here is the caller graph for this function:

◆ operator=()

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

invalidate assign constructor

◆ setDraggable()

void MFXListIconItem::setDraggable ( FXbool  draggable)

Make item draggable.

Definition at line 116 of file MFXListIconItem.cpp.

References DRAGGABLE, and state.

◆ setEnabled()

void MFXListIconItem::setEnabled ( FXbool  enabled)

Enable or disable item.

Definition at line 100 of file MFXListIconItem.cpp.

References DISABLED, and state.

◆ setFocus()

void MFXListIconItem::setFocus ( FXbool  focus)

Make item draw as focused.

Definition at line 68 of file MFXListIconItem.cpp.

References FOCUS, and state.

Referenced by MFXListIcon::insertItem(), MFXListIcon::onFocusIn(), MFXListIcon::onFocusOut(), MFXListIcon::removeItem(), and MFXListIcon::setCurrentItem().

Here is the caller graph for this function:

◆ setSelected()

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().

Here is the caller graph for this function:

◆ setText()

void MFXListIconItem::setText ( const FXString &  txt)

Change item's text label.

Definition at line 132 of file MFXListIconItem.cpp.

References label.

Friends And Related Symbol Documentation

◆ MFXListIcon

friend class MFXListIcon
friend

FOX declaration.

declare friend class

Definition at line 41 of file MFXListIconItem.h.

Field Documentation

◆ data

void* MFXListIconItem::data = nullptr
protected

data

Definition at line 126 of file MFXListIconItem.h.

◆ icon

FXIcon* MFXListIconItem::icon = nullptr
protected

icon

Definition at line 123 of file MFXListIconItem.h.

Referenced by create(), destroy(), detach(), draw(), getHeight(), getIcon(), getWidth(), hitItem(), and ~MFXListIconItem().

◆ label

FXString MFXListIconItem::label
protected

label

Definition at line 120 of file MFXListIconItem.h.

Referenced by draw(), getHeight(), getText(), getWidth(), hitItem(), and setText().

◆ myBackGroundColor

FXColor MFXListIconItem::myBackGroundColor = 0
protected

backGround color

Definition at line 136 of file MFXListIconItem.h.

Referenced by draw(), and getBackGroundColor().

◆ show

bool MFXListIconItem::show = true
protected

flag for show/hidde element

Definition at line 139 of file MFXListIconItem.h.

◆ state

FXuint MFXListIconItem::state = 0
protected

◆ x

FXint MFXListIconItem::x = 0
protected

position

Definition at line 132 of file MFXListIconItem.h.

Referenced by MFXListIcon::hitItem().

◆ y

FXint MFXListIconItem::y = 0
protected

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