Eclipse SUMO - Simulation of Urban MObility
|
A widget which has the seven-segment display used as the drawing object for each letter in the label. Supports display of leading zeros, such as when you need to display a number. Also supports the 'JUSTIFY_RIGHT' option, for right alignment. More...
#include <MFXLCDLabel.h>
Public Types | |
enum | { LCDLABEL_NORMAL = FRAME_SUNKEN | FRAME_THICK , LCDLABEL_LEADING_ZEROS = 0x01000000 } |
FOX-declaration. More... | |
enum | { ID_SEVENSEGMENT = FXHorizontalFrame::ID_LAST , ID_LAST } |
call messages More... | |
Public Member Functions | |
virtual void | create () |
create resrouces | |
virtual void | destroy () |
destroy resources | |
virtual void | detach () |
detach resources | |
FXColor | getBgColor () const |
get background color | |
virtual FXint | getDefaultHeight () |
return minimum height | |
virtual FXint | getDefaultWidth () |
return minimum width | |
FXColor | getFgColor () const |
get forground color | |
FXint | getGroove () const |
get groove width - must be less than segment width | |
FXint | getHorizontal () const |
get segment horizontal length - must be more than twice the segment width | |
FXString | getText () const |
get text | |
FXint | getThickness () const |
get segment width - must be less than half the segment length | |
FXint | getVertical () const |
get segment vertical length - must be more than twice the segment width | |
virtual void | load (FXStream &store) |
load resources | |
MFXLCDLabel (FXComposite *p, MFXStaticToolTip *staticToolTip, FXuint nfig, FXObject *tgt, FXSelector sel, FXuint opts=LCDLABEL_NORMAL, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD, FXint hs=DEFAULT_PAD) | |
constructor | |
long | onCmdGetIntValue (FXObject *, FXSelector, void *ptr) |
Obtain int value from text field. | |
long | onCmdGetRealValue (FXObject *, FXSelector, void *ptr) |
Obtain real value from text field. | |
long | onCmdGetStringValue (FXObject *, FXSelector, void *ptr) |
Obtain string value from text field. | |
long | onCmdSetIntValue (FXObject *, FXSelector, void *ptr) |
Update int value from a message. | |
long | onCmdSetRealValue (FXObject *, FXSelector, void *ptr) |
Update real value from a message. | |
long | onCmdSetStringValue (FXObject *, FXSelector, void *ptr) |
Update string value from a message. | |
long | onCmdSetValue (FXObject *, FXSelector, void *ptr) |
Update value from a message. | |
long | onEnter (FXObject *obj, FXSelector sel, void *ptr) |
called when mouse enter in MFXMenuButtonTooltip | |
long | onLeave (FXObject *obj, FXSelector sel, void *ptr) |
called when mouse leaves in MFXMenuButtonTooltip | |
long | onMotion (FXObject *obj, FXSelector sel, void *ptr) |
called when mouse motion in MFXMenuButtonTooltip | |
long | onPaint (FXObject *, FXSelector, void *) |
handle paint event | |
long | onQueryHelp (FXObject *, FXSelector, void *ptr) |
let parent show help if appropriate | |
long | onQueryTip (FXObject *, FXSelector, void *ptr) |
let parent show tip if appropriate | |
long | onRedirectEvent (FXObject *, FXSelector, void *ptr) |
redirect events to main window | |
virtual void | save (FXStream &store) const |
save resources | |
void | setBgColor (FXColor clr) |
set background color | |
void | setFgColor (FXColor clr) |
set forground color | |
void | setGroove (const FXint w) |
set groove width - must be less than segment width | |
void | setHorizontal (const FXint len) |
set segment horizontal length - must be more than twice the segment width | |
void | setText (FXString lbl) |
manipulate text in LCD label | |
void | setThickness (const FXint w) |
set segment width - must be less than half the segment length | |
void | setToolTipText (const FXString &text) |
set tooltip text | |
void | setVertical (const FXint len) |
set segment vertical length - must be more than twice the segment width | |
virtual | ~MFXLCDLabel () |
destructor | |
Protected Member Functions | |
void | drawString (const FXString &lbl) |
Draw a string. | |
Protected Attributes | |
FXString | myLabel |
FOX constructor. | |
FXint | myNFigures |
The number of shown figuresi, greater than zero. | |
MFXStaticToolTip * | myStaticToolTip |
pointer to staticToolTip | |
FXString | myToolTipText |
toolTip text | |
A widget which has the seven-segment display used as the drawing object for each letter in the label. Supports display of leading zeros, such as when you need to display a number. Also supports the 'JUSTIFY_RIGHT' option, for right alignment.
Definition at line 34 of file MFXLCDLabel.h.
anonymous enum |
FOX-declaration.
LCD Label styles
Enumerator | |
---|---|
LCDLABEL_NORMAL | |
LCDLABEL_LEADING_ZEROS |
Definition at line 40 of file MFXLCDLabel.h.
anonymous enum |
MFXLCDLabel::MFXLCDLabel | ( | FXComposite * | p, |
MFXStaticToolTip * | staticToolTip, | ||
FXuint | nfig, | ||
FXObject * | tgt, | ||
FXSelector | sel, | ||
FXuint | opts = LCDLABEL_NORMAL , |
||
FXint | pl = DEFAULT_PAD , |
||
FXint | pr = DEFAULT_PAD , |
||
FXint | pt = DEFAULT_PAD , |
||
FXint | pb = DEFAULT_PAD , |
||
FXint | hs = DEFAULT_PAD |
||
) |
constructor
Definition at line 64 of file MFXLCDLabel.cpp.
|
virtual |
destructor
Definition at line 80 of file MFXLCDLabel.cpp.
|
virtual |
create resrouces
Definition at line 90 of file MFXLCDLabel.cpp.
|
virtual |
destroy resources
Definition at line 108 of file MFXLCDLabel.cpp.
|
virtual |
detach resources
Definition at line 99 of file MFXLCDLabel.cpp.
|
protected |
Draw a string.
Definition at line 407 of file MFXLCDLabel.cpp.
References LCDLABEL_LEADING_ZEROS, myNFigures, MFXSevenSegment::setGroove(), MFXSevenSegment::setHorizontal(), MFXSevenSegment::setText(), MFXSevenSegment::setThickness(), and MFXSevenSegment::setVertical().
Referenced by onPaint().
FXColor MFXLCDLabel::getBgColor | ( | ) | const |
get background color
Definition at line 135 of file MFXLCDLabel.cpp.
References MFXSevenSegment::getBgColor().
|
virtual |
return minimum height
Definition at line 361 of file MFXLCDLabel.cpp.
|
virtual |
FXColor MFXLCDLabel::getFgColor | ( | ) | const |
get forground color
Definition at line 117 of file MFXLCDLabel.cpp.
References MFXSevenSegment::getFgColor().
FXint MFXLCDLabel::getGroove | ( | ) | const |
get groove width - must be less than segment width
Definition at line 229 of file MFXLCDLabel.cpp.
References MFXSevenSegment::getGroove().
FXint MFXLCDLabel::getHorizontal | ( | ) | const |
get segment horizontal length - must be more than twice the segment width
Definition at line 169 of file MFXLCDLabel.cpp.
References MFXSevenSegment::getHorizontal().
FXString MFXLCDLabel::getText | ( | ) | const |
get text
Definition at line 163 of file MFXLCDLabel.cpp.
References myLabel.
Referenced by onCmdGetIntValue(), onCmdGetRealValue(), and onCmdGetStringValue().
FXint MFXLCDLabel::getThickness | ( | ) | const |
get segment width - must be less than half the segment length
Definition at line 209 of file MFXLCDLabel.cpp.
References MFXSevenSegment::getThickness().
FXint MFXLCDLabel::getVertical | ( | ) | const |
get segment vertical length - must be more than twice the segment width
Definition at line 189 of file MFXLCDLabel.cpp.
References MFXSevenSegment::getVertical().
|
virtual |
long MFXLCDLabel::onCmdGetIntValue | ( | FXObject * | , |
FXSelector | , | ||
void * | ptr | ||
) |
Obtain int value from text field.
Definition at line 277 of file MFXLCDLabel.cpp.
References getText().
Referenced by FXDEFMAP().
long MFXLCDLabel::onCmdGetRealValue | ( | FXObject * | , |
FXSelector | , | ||
void * | ptr | ||
) |
Obtain real value from text field.
Definition at line 284 of file MFXLCDLabel.cpp.
References getText().
Referenced by FXDEFMAP().
long MFXLCDLabel::onCmdGetStringValue | ( | FXObject * | , |
FXSelector | , | ||
void * | ptr | ||
) |
Obtain string value from text field.
Definition at line 291 of file MFXLCDLabel.cpp.
References getText().
Referenced by FXDEFMAP().
long MFXLCDLabel::onCmdSetIntValue | ( | FXObject * | , |
FXSelector | , | ||
void * | ptr | ||
) |
Update int value from a message.
Definition at line 256 of file MFXLCDLabel.cpp.
References setText().
Referenced by FXDEFMAP().
long MFXLCDLabel::onCmdSetRealValue | ( | FXObject * | , |
FXSelector | , | ||
void * | ptr | ||
) |
Update real value from a message.
Definition at line 263 of file MFXLCDLabel.cpp.
References setText().
Referenced by FXDEFMAP().
long MFXLCDLabel::onCmdSetStringValue | ( | FXObject * | , |
FXSelector | , | ||
void * | ptr | ||
) |
Update string value from a message.
Definition at line 270 of file MFXLCDLabel.cpp.
References setText().
Referenced by FXDEFMAP().
long MFXLCDLabel::onCmdSetValue | ( | FXObject * | , |
FXSelector | , | ||
void * | ptr | ||
) |
Update value from a message.
Definition at line 249 of file MFXLCDLabel.cpp.
References setText().
Referenced by FXDEFMAP().
long MFXLCDLabel::onEnter | ( | FXObject * | obj, |
FXSelector | sel, | ||
void * | ptr | ||
) |
called when mouse enter in MFXMenuButtonTooltip
Definition at line 314 of file MFXLCDLabel.cpp.
References MFXStaticToolTip::hideStaticToolTip(), myStaticToolTip, myToolTipText, and MFXStaticToolTip::showStaticToolTip().
Referenced by FXDEFMAP().
long MFXLCDLabel::onLeave | ( | FXObject * | obj, |
FXSelector | sel, | ||
void * | ptr | ||
) |
called when mouse leaves in MFXMenuButtonTooltip
Definition at line 327 of file MFXLCDLabel.cpp.
References MFXStaticToolTip::hideStaticToolTip(), and myStaticToolTip.
Referenced by FXDEFMAP().
long MFXLCDLabel::onMotion | ( | FXObject * | obj, |
FXSelector | sel, | ||
void * | ptr | ||
) |
called when mouse motion in MFXMenuButtonTooltip
Definition at line 335 of file MFXLCDLabel.cpp.
References myStaticToolTip, and MFXStaticToolTip::onUpdate().
Referenced by FXDEFMAP().
long MFXLCDLabel::onPaint | ( | FXObject * | , |
FXSelector | , | ||
void * | ptr | ||
) |
handle paint event
Definition at line 298 of file MFXLCDLabel.cpp.
References drawString(), MFXSevenSegment::getBgColor(), MFXSevenSegment::getFgColor(), and myLabel.
Referenced by FXDEFMAP().
long MFXLCDLabel::onQueryHelp | ( | FXObject * | sender, |
FXSelector | sel, | ||
void * | ptr | ||
) |
let parent show help if appropriate
Definition at line 398 of file MFXLCDLabel.cpp.
long MFXLCDLabel::onQueryTip | ( | FXObject * | sender, |
FXSelector | sel, | ||
void * | ptr | ||
) |
let parent show tip if appropriate
Definition at line 389 of file MFXLCDLabel.cpp.
long MFXLCDLabel::onRedirectEvent | ( | FXObject * | , |
FXSelector | sel, | ||
void * | ptr | ||
) |
redirect events to main window
Definition at line 343 of file MFXLCDLabel.cpp.
Referenced by FXDEFMAP().
|
virtual |
void MFXLCDLabel::setBgColor | ( | FXColor | clr | ) |
set background color
Definition at line 142 of file MFXLCDLabel.cpp.
References MFXSevenSegment::getBgColor(), and MFXSevenSegment::setBgColor().
void MFXLCDLabel::setFgColor | ( | FXColor | clr | ) |
set forground color
Definition at line 124 of file MFXLCDLabel.cpp.
References MFXSevenSegment::getFgColor(), and MFXSevenSegment::setFgColor().
Referenced by GUIApplicationWindow::onCmdGaming().
void MFXLCDLabel::setGroove | ( | const FXint | w | ) |
set groove width - must be less than segment width
Definition at line 236 of file MFXLCDLabel.cpp.
References MFXSevenSegment::getGroove(), and MFXSevenSegment::setGroove().
Referenced by GUIApplicationWindow::buildToolBars().
void MFXLCDLabel::setHorizontal | ( | const FXint | len | ) |
set segment horizontal length - must be more than twice the segment width
Definition at line 176 of file MFXLCDLabel.cpp.
References MFXSevenSegment::getHorizontal(), and MFXSevenSegment::setHorizontal().
Referenced by GUIApplicationWindow::buildToolBars().
void MFXLCDLabel::setText | ( | FXString | lbl | ) |
manipulate text in LCD label
Definition at line 153 of file MFXLCDLabel.cpp.
References myLabel.
Referenced by GUIApplicationWindow::buildToolBars(), GUIApplicationWindow::checkGamingEvents(), GUIApplicationWindow::checkGamingEventsDRT(), GUIApplicationWindow::closeAllWindows(), GUIApplicationWindow::handleEvent_SimulationLoaded(), onCmdSetIntValue(), onCmdSetRealValue(), onCmdSetStringValue(), onCmdSetValue(), and GUIApplicationWindow::updateTimeLCD().
void MFXLCDLabel::setThickness | ( | const FXint | w | ) |
set segment width - must be less than half the segment length
Definition at line 216 of file MFXLCDLabel.cpp.
References MFXSevenSegment::getThickness(), and MFXSevenSegment::setThickness().
Referenced by GUIApplicationWindow::buildToolBars().
void MFXLCDLabel::setToolTipText | ( | const FXString & | text | ) |
set tooltip text
Definition at line 367 of file MFXLCDLabel.cpp.
References myToolTipText.
Referenced by GUIApplicationWindow::updateTimeLCDTooltip().
void MFXLCDLabel::setVertical | ( | const FXint | len | ) |
set segment vertical length - must be more than twice the segment width
Definition at line 196 of file MFXLCDLabel.cpp.
References MFXSevenSegment::getVertical(), and MFXSevenSegment::setVertical().
Referenced by GUIApplicationWindow::buildToolBars().
|
protected |
|
protected |
The number of shown figuresi, greater than zero.
Definition at line 174 of file MFXLCDLabel.h.
Referenced by drawString(), getDefaultWidth(), load(), and save().
|
protected |
pointer to staticToolTip
Definition at line 177 of file MFXLCDLabel.h.
Referenced by onEnter(), onLeave(), and onMotion().
|
protected |
toolTip text
Definition at line 180 of file MFXLCDLabel.h.
Referenced by onEnter(), and setToolTipText().