#include <mmslabelwidget.h>

Public Member Functions | |
| MMSLabelWidget (MMSWindow *root, string className, MMSTheme *theme=NULL) | |
| ~MMSLabelWidget () | |
| MMSWidget * | copyWidget () |
| int | getStringWidth (const char *text=NULL) |
| string | getFontPath () |
| string | getFontName (MMSLanguage lang=MMSLANG_NONE) |
| unsigned int | getFontSize () |
| MMSALIGNMENT | getAlignment () |
| MMSFBColor | getColor () |
| MMSFBColor | getSelColor () |
| MMSFBColor | getColor_p () |
| MMSFBColor | getSelColor_p () |
| MMSFBColor | getColor_i () |
| MMSFBColor | getSelColor_i () |
| string | getText () |
| void | getText (string &text) |
| bool | getSlidable () |
| unsigned char | getSlideSpeed () |
| bool | getTranslate () |
| MMSFBColor | getShadowColor (MMSPOSITION position) |
| MMSFBColor | getSelShadowColor (MMSPOSITION position) |
| void | setFontPath (string fontpath, bool load=true, bool refresh=true) |
| void | setFontName (MMSLanguage lang, string fontname, bool load=true, bool refresh=true) |
| void | setFontName (string fontname, bool load=true, bool refresh=true) |
| void | setFontSize (unsigned int fontsize, bool load=true, bool refresh=true) |
| void | setFont (MMSLanguage lang, string fontpath, string fontname, unsigned int fontsize, bool load=true, bool refresh=true) |
| void | setFont (string fontpath, string fontname, unsigned int fontsize, bool load=true, bool refresh=true) |
| void | setAlignment (MMSALIGNMENT alignment, bool refresh=true) |
| void | setColor (MMSFBColor color, bool refresh=true) |
| void | setSelColor (MMSFBColor selcolor, bool refresh=true) |
| void | setColor_p (MMSFBColor color_p, bool refresh=true) |
| void | setSelColor_p (MMSFBColor selcolor_p, bool refresh=true) |
| void | setColor_i (MMSFBColor color_i, bool refresh=true) |
| void | setSelColor_i (MMSFBColor selcolor_i, bool refresh=true) |
| void | setText (string text, bool refresh=true) |
| void | setSlidable (bool slidable) |
| void | setSlideSpeed (unsigned char slidespeed) |
| void | setTranslate (bool translate, bool refresh=true) |
| void | setShadowColor (MMSPOSITION position, MMSFBColor color, bool refresh=true) |
| void | setSelShadowColor (MMSPOSITION position, MMSFBColor selcolor, bool refresh=true) |
| void | updateFromThemeClass (MMSLabelWidgetClass *themeClass) |
Private Member Functions | |
| bool | create (MMSWindow *root, string className, MMSTheme *theme) |
| void | initLanguage (MMSLabelWidget *widget=NULL) |
| void | loadFont (MMSLabelWidget *widget=NULL) |
| bool | init () |
| bool | release () |
| bool | prepareText (int *width, int *height, bool recalc=false) |
| void | calcContentSize () |
| Internal method: Should be overridden by widgets which have a dynamic size based on content. | |
| void | getForeground (MMSFBColor *color) |
| bool | enableRefresh (bool enable=true) |
| Internal method: (re-)enable refresh status. | |
| bool | checkRefreshStatus () |
| Internal method: check drawn background against new background and (re-)enable refresh status if needed. | |
| bool | draw (bool *backgroundFilled=NULL) |
| void | targetLangChanged (MMSLanguage lang) |
| Internal method: Inform the widget, that the language has changed. | |
Private Attributes | |
| string | className |
| MMSLabelWidgetClass * | labelWidgetClass |
| MMSLabelWidgetClass | myLabelWidgetClass |
| MMSLanguage | lang |
| language in which the text is to be translated | |
| MMSFBFont * | font |
| loaded font | |
| string | fontpath |
| path to the loaded font file | |
| string | fontname |
| name of the loaded font file | |
| unsigned int | fontsize |
| requested size of the font | |
| bool | load_font |
| have to (re)load font? | |
| int | slide_width |
| int | slide_offset |
| unsigned int | frame_delay |
| unsigned int | frame_delay_set |
| class MMSLabelWidgetThread * | labelThread |
| string | translated_text |
| the translated text will be stored here, this is used in the draw() method | |
| bool | translated |
| if true the translated_text is valid | |
| bool | swap_left_right |
| swap left-right alignment | |
| bool | current_fgset |
| current foreground values set? | |
| MMSFBColor | current_fgcolor |
| current foreground color | |
Friends | |
| class | MMSWindow |
| class | MMSLabelWidgetThread |
You can display one line of text. If you want to have more the one line, you should use the MMSTextBox widget. The label widget cannot be focused.
Definition at line 45 of file mmslabelwidget.h.
Definition at line 37 of file mmslabelwidget.cpp.
| MMSLabelWidget::~MMSLabelWidget | ( | ) |
Definition at line 41 of file mmslabelwidget.cpp.
Definition at line 48 of file mmslabelwidget.cpp.
| void MMSLabelWidget::initLanguage | ( | MMSLabelWidget * | widget = NULL |
) | [private] |
Definition at line 122 of file mmslabelwidget.cpp.
| void MMSLabelWidget::loadFont | ( | MMSLabelWidget * | widget = NULL |
) | [private] |
Definition at line 128 of file mmslabelwidget.cpp.
| bool MMSLabelWidget::init | ( | ) | [private, virtual] |
| bool MMSLabelWidget::release | ( | ) | [private, virtual] |
| bool MMSLabelWidget::prepareText | ( | int * | width, | |
| int * | height, | |||
| bool | recalc = false | |||
| ) | [private] |
Definition at line 194 of file mmslabelwidget.cpp.
| void MMSLabelWidget::calcContentSize | ( | ) | [private, virtual] |
Internal method: Should be overridden by widgets which have a dynamic size based on content.
Reimplemented from MMSWidget.
Definition at line 296 of file mmslabelwidget.cpp.
| void MMSLabelWidget::getForeground | ( | MMSFBColor * | color | ) | [private] |
Definition at line 306 of file mmslabelwidget.cpp.
| bool MMSLabelWidget::enableRefresh | ( | bool | enable = true |
) | [private, virtual] |
Internal method: (re-)enable refresh status.
Reimplemented from MMSWidget.
Definition at line 338 of file mmslabelwidget.cpp.
| bool MMSLabelWidget::checkRefreshStatus | ( | ) | [private, virtual] |
Internal method: check drawn background against new background and (re-)enable refresh status if needed.
Reimplemented from MMSWidget.
Definition at line 347 of file mmslabelwidget.cpp.
| bool MMSLabelWidget::draw | ( | bool * | backgroundFilled = NULL |
) | [private, virtual] |
| void MMSLabelWidget::targetLangChanged | ( | MMSLanguage | lang | ) | [private] |
Internal method: Inform the widget, that the language has changed.
Definition at line 474 of file mmslabelwidget.cpp.
| MMSWidget * MMSLabelWidget::copyWidget | ( | ) | [virtual] |
| int MMSLabelWidget::getStringWidth | ( | const char * | text = NULL |
) |
Definition at line 484 of file mmslabelwidget.cpp.
| string MMSLabelWidget::getFontPath | ( | ) |
Definition at line 528 of file mmslabelwidget.cpp.
| string MMSLabelWidget::getFontName | ( | MMSLanguage | lang = MMSLANG_NONE |
) |
Definition at line 532 of file mmslabelwidget.cpp.
| unsigned int MMSLabelWidget::getFontSize | ( | ) |
Definition at line 536 of file mmslabelwidget.cpp.
| MMSALIGNMENT MMSLabelWidget::getAlignment | ( | ) |
Definition at line 540 of file mmslabelwidget.cpp.
| MMSFBColor MMSLabelWidget::getColor | ( | ) |
Definition at line 544 of file mmslabelwidget.cpp.
| MMSFBColor MMSLabelWidget::getSelColor | ( | ) |
Definition at line 548 of file mmslabelwidget.cpp.
| MMSFBColor MMSLabelWidget::getColor_p | ( | ) |
Definition at line 552 of file mmslabelwidget.cpp.
| MMSFBColor MMSLabelWidget::getSelColor_p | ( | ) |
Definition at line 556 of file mmslabelwidget.cpp.
| MMSFBColor MMSLabelWidget::getColor_i | ( | ) |
Definition at line 560 of file mmslabelwidget.cpp.
| MMSFBColor MMSLabelWidget::getSelColor_i | ( | ) |
Definition at line 564 of file mmslabelwidget.cpp.
| string MMSLabelWidget::getText | ( | ) |
Definition at line 568 of file mmslabelwidget.cpp.
| void MMSLabelWidget::getText | ( | string & | text | ) |
Definition at line 572 of file mmslabelwidget.cpp.
| bool MMSLabelWidget::getSlidable | ( | ) |
Definition at line 576 of file mmslabelwidget.cpp.
| unsigned char MMSLabelWidget::getSlideSpeed | ( | ) |
Definition at line 580 of file mmslabelwidget.cpp.
| bool MMSLabelWidget::getTranslate | ( | ) |
Definition at line 584 of file mmslabelwidget.cpp.
| MMSFBColor MMSLabelWidget::getShadowColor | ( | MMSPOSITION | position | ) |
Definition at line 589 of file mmslabelwidget.cpp.
| MMSFBColor MMSLabelWidget::getSelShadowColor | ( | MMSPOSITION | position | ) |
Definition at line 593 of file mmslabelwidget.cpp.
| void MMSLabelWidget::setFontPath | ( | string | fontpath, | |
| bool | load = true, |
|||
| bool | refresh = true | |||
| ) |
Definition at line 602 of file mmslabelwidget.cpp.
| void MMSLabelWidget::setFontName | ( | MMSLanguage | lang, | |
| string | fontname, | |||
| bool | load = true, |
|||
| bool | refresh = true | |||
| ) |
Definition at line 615 of file mmslabelwidget.cpp.
| void MMSLabelWidget::setFontName | ( | string | fontname, | |
| bool | load = true, |
|||
| bool | refresh = true | |||
| ) |
Definition at line 628 of file mmslabelwidget.cpp.
| void MMSLabelWidget::setFontSize | ( | unsigned int | fontsize, | |
| bool | load = true, |
|||
| bool | refresh = true | |||
| ) |
Definition at line 632 of file mmslabelwidget.cpp.
| void MMSLabelWidget::setFont | ( | MMSLanguage | lang, | |
| string | fontpath, | |||
| string | fontname, | |||
| unsigned int | fontsize, | |||
| bool | load = true, |
|||
| bool | refresh = true | |||
| ) |
Definition at line 645 of file mmslabelwidget.cpp.
| void MMSLabelWidget::setFont | ( | string | fontpath, | |
| string | fontname, | |||
| unsigned int | fontsize, | |||
| bool | load = true, |
|||
| bool | refresh = true | |||
| ) |
Definition at line 660 of file mmslabelwidget.cpp.
| void MMSLabelWidget::setAlignment | ( | MMSALIGNMENT | alignment, | |
| bool | refresh = true | |||
| ) |
Definition at line 664 of file mmslabelwidget.cpp.
| void MMSLabelWidget::setColor | ( | MMSFBColor | color, | |
| bool | refresh = true | |||
| ) |
Definition at line 673 of file mmslabelwidget.cpp.
| void MMSLabelWidget::setSelColor | ( | MMSFBColor | selcolor, | |
| bool | refresh = true | |||
| ) |
Definition at line 682 of file mmslabelwidget.cpp.
| void MMSLabelWidget::setColor_p | ( | MMSFBColor | color_p, | |
| bool | refresh = true | |||
| ) |
Definition at line 691 of file mmslabelwidget.cpp.
| void MMSLabelWidget::setSelColor_p | ( | MMSFBColor | selcolor_p, | |
| bool | refresh = true | |||
| ) |
Definition at line 700 of file mmslabelwidget.cpp.
| void MMSLabelWidget::setColor_i | ( | MMSFBColor | color_i, | |
| bool | refresh = true | |||
| ) |
Definition at line 709 of file mmslabelwidget.cpp.
| void MMSLabelWidget::setSelColor_i | ( | MMSFBColor | selcolor_i, | |
| bool | refresh = true | |||
| ) |
Definition at line 718 of file mmslabelwidget.cpp.
| void MMSLabelWidget::setText | ( | string | text, | |
| bool | refresh = true | |||
| ) |
Definition at line 728 of file mmslabelwidget.cpp.
| void MMSLabelWidget::setSlidable | ( | bool | slidable | ) |
Definition at line 738 of file mmslabelwidget.cpp.
| void MMSLabelWidget::setSlideSpeed | ( | unsigned char | slidespeed | ) |
Definition at line 767 of file mmslabelwidget.cpp.
| void MMSLabelWidget::setTranslate | ( | bool | translate, | |
| bool | refresh = true | |||
| ) |
Definition at line 773 of file mmslabelwidget.cpp.
| void MMSLabelWidget::setShadowColor | ( | MMSPOSITION | position, | |
| MMSFBColor | color, | |||
| bool | refresh = true | |||
| ) |
Definition at line 785 of file mmslabelwidget.cpp.
| void MMSLabelWidget::setSelShadowColor | ( | MMSPOSITION | position, | |
| MMSFBColor | selcolor, | |||
| bool | refresh = true | |||
| ) |
Definition at line 794 of file mmslabelwidget.cpp.
| void MMSLabelWidget::updateFromThemeClass | ( | MMSLabelWidgetClass * | themeClass | ) |
Definition at line 805 of file mmslabelwidget.cpp.
friend class MMSWindow [friend] |
friend class MMSLabelWidgetThread [friend] |
Definition at line 165 of file mmslabelwidget.h.
string MMSLabelWidget::className [private] |
Definition at line 48 of file mmslabelwidget.h.
Definition at line 49 of file mmslabelwidget.h.
Definition at line 50 of file mmslabelwidget.h.
MMSLanguage MMSLabelWidget::lang [private] |
MMSFBFont* MMSLabelWidget::font [private] |
string MMSLabelWidget::fontpath [private] |
string MMSLabelWidget::fontname [private] |
unsigned int MMSLabelWidget::fontsize [private] |
bool MMSLabelWidget::load_font [private] |
int MMSLabelWidget::slide_width [private] |
Definition at line 71 of file mmslabelwidget.h.
int MMSLabelWidget::slide_offset [private] |
Definition at line 72 of file mmslabelwidget.h.
unsigned int MMSLabelWidget::frame_delay [private] |
Definition at line 74 of file mmslabelwidget.h.
unsigned int MMSLabelWidget::frame_delay_set [private] |
Definition at line 75 of file mmslabelwidget.h.
class MMSLabelWidgetThread* MMSLabelWidget::labelThread [private] |
Definition at line 77 of file mmslabelwidget.h.
string MMSLabelWidget::translated_text [private] |
the translated text will be stored here, this is used in the draw() method
Definition at line 80 of file mmslabelwidget.h.
bool MMSLabelWidget::translated [private] |
bool MMSLabelWidget::swap_left_right [private] |
bool MMSLabelWidget::current_fgset [private] |
MMSFBColor MMSLabelWidget::current_fgcolor [private] |