#include <fox16_htmllabel.hpp>
Public Types | |
enum | { FLAGS_NO_WORDWRAP = 0x00080000, FLAGS_USE_FULL_WIDTH = 0x00040000 } |
Public Member Functions | |
void | addMediaPath (const char *s) |
void | create () |
FOX16_HtmlLabel (FXComposite *p, const FXString &text, FXuint opts=0, 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) | |
virtual FXint | getDefaultHeight () |
Return default height. | |
virtual FXint | getDefaultWidth () |
Return default width. | |
FXIcon * | getIcon () const |
FXString | getText () const |
Get the text for this label. | |
void | layout () |
long | onPaint (FXObject *, FXSelector, void *) |
void | setIcon (FXIcon *ic) |
void | setMaxDefaultWidth (int i) |
void | setMinimumWidth (int i) |
void | setText (const FXString &text) |
Set the text for this label. | |
~FOX16_HtmlLabel () | |
Protected Member Functions | |
void | calcDefaultDims () |
FOX16_HtmlLabel () | |
void | updateHtml () |
Protected Attributes | |
FXint | m_defaultHeight |
FXint | m_defaultWidth |
bool | m_haveDefaultDims |
FOX16_HtmlCtx * | m_htmlCtx |
FXIcon * | m_icon |
int | m_maxDefaultWidth |
GWEN_STRINGLIST * | m_mediaPaths |
int | m_minWidth |
FXString | m_text |
Definition at line 22 of file fox16_htmllabel.hpp.
anonymous enum |
FLAGS_NO_WORDWRAP |
don't wrap the text. If this flag is given as parameter to the constructor then you'll have to insert line-breaks into the text yourself. |
FLAGS_USE_FULL_WIDTH |
when wrapping words use the full widget width to layout the text. Otherwise the wordwrapping occurrs at the width set by setMaxDefaultWidth(). |
Definition at line 27 of file fox16_htmllabel.hpp.
FOX16_HtmlLabel | ( | FXComposite * | p, | |
const FXString & | text, | |||
FXuint | opts = 0 , |
|||
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 | |||
) |
Definition at line 41 of file fox16_htmllabel.cpp.
References GWEN_StringList_new(), and FOX16_HtmlCtx::setText().
~FOX16_HtmlLabel | ( | ) |
Definition at line 74 of file fox16_htmllabel.cpp.
References GWEN_StringList_free(), m_htmlCtx, and m_mediaPaths.
FOX16_HtmlLabel | ( | ) | [protected] |
Definition at line 62 of file fox16_htmllabel.cpp.
void addMediaPath | ( | const char * | s | ) |
Definition at line 94 of file fox16_htmllabel.cpp.
References GWEN_StringList_AppendString(), and m_mediaPaths.
Referenced by FOX16_GuiDialog::setupTree().
void calcDefaultDims | ( | ) | [protected] |
Definition at line 111 of file fox16_htmllabel.cpp.
References FLAGS_NO_WORDWRAP, FLAGS_USE_FULL_WIDTH, FOX16_HtmlCtx::getHeight(), FOX16_HtmlCtx::getWidth(), FOX16_HtmlCtx::layout(), m_defaultHeight, m_defaultWidth, m_haveDefaultDims, m_htmlCtx, and m_maxDefaultWidth.
Referenced by getDefaultHeight(), and getDefaultWidth().
void create | ( | ) |
Definition at line 222 of file fox16_htmllabel.cpp.
References m_icon, and updateHtml().
FXint getDefaultHeight | ( | ) | [virtual] |
Return default height.
Definition at line 163 of file fox16_htmllabel.cpp.
References calcDefaultDims(), m_defaultHeight, m_haveDefaultDims, m_htmlCtx, m_icon, NULL, and updateHtml().
FXint getDefaultWidth | ( | ) | [virtual] |
Return default width.
Definition at line 147 of file fox16_htmllabel.cpp.
References calcDefaultDims(), m_defaultWidth, m_haveDefaultDims, m_htmlCtx, m_icon, NULL, and updateHtml().
FXIcon* getIcon | ( | ) | const [inline] |
Definition at line 51 of file fox16_htmllabel.hpp.
FXString getText | ( | ) | const [inline] |
Get the text for this label.
Definition at line 49 of file fox16_htmllabel.hpp.
Referenced by FOX16_GuiDialog::getCharProperty().
void layout | ( | ) |
Definition at line 232 of file fox16_htmllabel.cpp.
References FLAGS_NO_WORDWRAP, FLAGS_USE_FULL_WIDTH, FOX16_HtmlCtx::layout(), m_haveDefaultDims, m_htmlCtx, m_icon, m_maxDefaultWidth, NULL, and updateHtml().
long onPaint | ( | FXObject * | , | |
FXSelector | , | |||
void * | ptr | |||
) |
Definition at line 184 of file fox16_htmllabel.cpp.
References DBG_ERROR, drawFrame(), FOX16_HtmlCtx::getHeight(), GWEN_LOGDOMAIN, ICON_SPACE, m_htmlCtx, m_icon, and FOX16_HtmlCtx::paint().
void setIcon | ( | FXIcon * | ic | ) |
Definition at line 101 of file fox16_htmllabel.cpp.
References layout(), and m_icon.
Referenced by FOX16_GuiDialog::setupTree().
void setMaxDefaultWidth | ( | int | i | ) | [inline] |
Definition at line 65 of file fox16_htmllabel.hpp.
Referenced by FOX16_GuiDialog::setupTree().
void setMinimumWidth | ( | int | i | ) | [inline] |
Definition at line 64 of file fox16_htmllabel.hpp.
void setText | ( | const FXString & | text | ) |
Set the text for this label.
Definition at line 82 of file fox16_htmllabel.cpp.
References layout(), m_haveDefaultDims, m_text, and updateHtml().
Referenced by FOX16_GuiDialog::setCharProperty().
void updateHtml | ( | ) | [protected] |
Definition at line 271 of file fox16_htmllabel.cpp.
References FOX16_HtmlCtx::addMediaPath(), FOX16_HtmlCtx::FOX16_HtmlCtx(), GWEN_StringList_FirstEntry(), GWEN_StringListEntry_Data(), GWEN_StringListEntry_Next(), m_haveDefaultDims, m_htmlCtx, m_mediaPaths, m_text, FOX16_HtmlCtx::setBackgroundColor(), FOX16_HtmlCtx::setForegroundColor(), and FOX16_HtmlCtx::setText().
Referenced by create(), getDefaultHeight(), getDefaultWidth(), layout(), and setText().
FXint m_defaultHeight [protected] |
Definition at line 79 of file fox16_htmllabel.hpp.
Referenced by calcDefaultDims(), and getDefaultHeight().
FXint m_defaultWidth [protected] |
Definition at line 78 of file fox16_htmllabel.hpp.
Referenced by calcDefaultDims(), and getDefaultWidth().
bool m_haveDefaultDims [protected] |
Definition at line 77 of file fox16_htmllabel.hpp.
Referenced by calcDefaultDims(), getDefaultHeight(), getDefaultWidth(), layout(), setText(), and updateHtml().
FOX16_HtmlCtx* m_htmlCtx [protected] |
Definition at line 72 of file fox16_htmllabel.hpp.
Referenced by calcDefaultDims(), getDefaultHeight(), getDefaultWidth(), layout(), onPaint(), updateHtml(), and ~FOX16_HtmlLabel().
FXIcon* m_icon [protected] |
Definition at line 83 of file fox16_htmllabel.hpp.
Referenced by create(), getDefaultHeight(), getDefaultWidth(), layout(), onPaint(), and setIcon().
int m_maxDefaultWidth [protected] |
Definition at line 75 of file fox16_htmllabel.hpp.
Referenced by calcDefaultDims(), and layout().
GWEN_STRINGLIST* m_mediaPaths [protected] |
Definition at line 81 of file fox16_htmllabel.hpp.
Referenced by addMediaPath(), updateHtml(), and ~FOX16_HtmlLabel().
int m_minWidth [protected] |
Definition at line 74 of file fox16_htmllabel.hpp.
FXString m_text [protected] |
Definition at line 73 of file fox16_htmllabel.hpp.
Referenced by setText(), and updateHtml().