Eclipse SUMO - Simulation of Urban MObility
|
A list item which allows for custom coloring. More...
#include <MFXDynamicLabel.h>
Public Types | |
enum | { MID_LABEL_WIDTHCHANGE } |
FOX declaration. More... | |
Public Member Functions | |
FXint | getDefaultHeight () |
MFXDynamicLabel (FXComposite *p, const FXString &text, FXIcon *ic=0, FXuint opts=LABEL_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, std::string indent="- ") | |
Construct label with given text and icon. | |
long | onUpdate (FXObject *sender, FXSelector, void *) |
overload to be informed when the label text has to be reformatted due to width changes | |
void | position (FXint x, FXint y, FXint w, FXint h) |
overload position to be informed when the parent has done the layout | |
void | setText (const FXString &text) |
overload text label updates to store the original string as backup for when width changes again | |
virtual | ~MFXDynamicLabel () |
Protected Member Functions | |
MFXDynamicLabel () | |
fox needs this | |
Private Member Functions | |
void | computeIndentation () |
void | reformatLineBreaks (const int curWidth) |
Private Attributes | |
int | myIndent |
std::string | myIndentString |
std::string | myOriginalString |
int | myPreviousWidth |
A list item which allows for custom coloring.
Definition at line 27 of file MFXDynamicLabel.h.
anonymous enum |
FOX declaration.
enum for events
Enumerator | |
---|---|
MID_LABEL_WIDTHCHANGE |
Definition at line 33 of file MFXDynamicLabel.h.
MFXDynamicLabel::MFXDynamicLabel | ( | FXComposite * | p, |
const FXString & | text, | ||
FXIcon * | ic = 0 , |
||
FXuint | opts = LABEL_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 , |
||
std::string | indent = "- " |
||
) |
Construct label with given text and icon.
Definition at line 42 of file MFXDynamicLabel.cpp.
|
inlinevirtual |
Definition at line 40 of file MFXDynamicLabel.h.
|
protected |
fox needs this
Definition at line 164 of file MFXDynamicLabel.cpp.
|
private |
Definition at line 90 of file MFXDynamicLabel.cpp.
References myIndent, myIndentString, and myOriginalString.
Referenced by setText().
FXint MFXDynamicLabel::getDefaultHeight | ( | ) |
Definition at line 75 of file MFXDynamicLabel.cpp.
References reformatLineBreaks().
long MFXDynamicLabel::onUpdate | ( | FXObject * | sender, |
FXSelector | sel, | ||
void * | ptr | ||
) |
overload to be informed when the label text has to be reformatted due to width changes
Definition at line 49 of file MFXDynamicLabel.cpp.
References myPreviousWidth, and reformatLineBreaks().
Referenced by FXDEFMAP().
void MFXDynamicLabel::position | ( | FXint | x, |
FXint | y, | ||
FXint | w, | ||
FXint | h | ||
) |
overload position to be informed when the parent has done the layout
Definition at line 68 of file MFXDynamicLabel.cpp.
References reformatLineBreaks().
|
private |
Definition at line 100 of file MFXDynamicLabel.cpp.
References myIndent, myIndentString, and myOriginalString.
Referenced by getDefaultHeight(), onUpdate(), and position().
void MFXDynamicLabel::setText | ( | const FXString & | text | ) |
overload text label updates to store the original string as backup for when width changes again
Definition at line 60 of file MFXDynamicLabel.cpp.
References computeIndentation(), and myOriginalString.
|
private |
Definition at line 63 of file MFXDynamicLabel.h.
Referenced by computeIndentation(), and reformatLineBreaks().
|
private |
Definition at line 62 of file MFXDynamicLabel.h.
Referenced by computeIndentation(), and reformatLineBreaks().
|
private |
Definition at line 61 of file MFXDynamicLabel.h.
Referenced by computeIndentation(), reformatLineBreaks(), and setText().
|
private |
Definition at line 64 of file MFXDynamicLabel.h.
Referenced by onUpdate().