gwenhywfar 5.14.1
FOX16_HtmlLabel Class Reference

#include <fox16_htmllabel.hpp>

Inheritance diagram for FOX16_HtmlLabel:
Collaboration diagram for FOX16_HtmlLabel:

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_HtmlCtxm_htmlCtx
FXIcon * m_icon
int m_maxDefaultWidth
GWEN_STRINGLISTm_mediaPaths
int m_minWidth
FXString m_text

Detailed Description

Definition at line 22 of file fox16_htmllabel.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
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.

Constructor & Destructor Documentation

◆ FOX16_HtmlLabel() [1/2]

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 FOX16_HtmlLabel(), GWEN_StringList_new(), m_haveDefaultDims, m_htmlCtx, m_icon, m_maxDefaultWidth, m_mediaPaths, m_minWidth, NULL, and setText().

Referenced by FOX16_HtmlLabel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~FOX16_HtmlLabel()

Definition at line 72 of file fox16_htmllabel.cpp.

References GWEN_StringList_free(), m_htmlCtx, and m_mediaPaths.

Here is the call graph for this function:

◆ FOX16_HtmlLabel() [2/2]

FOX16_HtmlLabel ( )
protected

Definition at line 61 of file fox16_htmllabel.cpp.

References m_htmlCtx, m_icon, m_mediaPaths, m_minWidth, and NULL.

Member Function Documentation

◆ addMediaPath()

void addMediaPath ( const char * s)

Definition at line 92 of file fox16_htmllabel.cpp.

References GWEN_StringList_AppendString(), and m_mediaPaths.

Referenced by FOX16_GuiDialog::setupTree().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calcDefaultDims()

void calcDefaultDims ( )
protected

Definition at line 109 of file fox16_htmllabel.cpp.

References FLAGS_NO_WORDWRAP, FLAGS_USE_FULL_WIDTH, m_defaultHeight, m_defaultWidth, m_haveDefaultDims, m_htmlCtx, and m_maxDefaultWidth.

Referenced by getDefaultHeight(), getDefaultWidth(), and layout().

Here is the caller graph for this function:

◆ create()

void create ( )

Definition at line 251 of file fox16_htmllabel.cpp.

References m_icon, and updateHtml().

Here is the call graph for this function:

◆ getDefaultHeight()

FXint getDefaultHeight ( )
virtual

Return default height.

Definition at line 189 of file fox16_htmllabel.cpp.

References calcDefaultDims(), m_defaultHeight, m_haveDefaultDims, m_htmlCtx, m_icon, NULL, and updateHtml().

Here is the call graph for this function:

◆ getDefaultWidth()

FXint getDefaultWidth ( )
virtual

Return default width.

Definition at line 170 of file fox16_htmllabel.cpp.

References calcDefaultDims(), ICON_SPACE, m_defaultWidth, m_haveDefaultDims, m_htmlCtx, m_icon, NULL, and updateHtml().

Here is the call graph for this function:

◆ getIcon()

FXIcon * getIcon ( ) const
inline

Definition at line 51 of file fox16_htmllabel.hpp.

References m_icon.

◆ getText()

FXString getText ( ) const
inline

Get the text for this label.

Definition at line 49 of file fox16_htmllabel.hpp.

References m_text.

Referenced by FOX16_GuiDialog::getCharProperty().

Here is the caller graph for this function:

◆ layout()

void layout ( )

Definition at line 261 of file fox16_htmllabel.cpp.

References calcDefaultDims(), FLAGS_NO_WORDWRAP, FLAGS_USE_FULL_WIDTH, ICON_SPACE, m_defaultWidth, m_haveDefaultDims, m_htmlCtx, m_icon, m_maxDefaultWidth, NULL, and updateHtml().

Referenced by setIcon(), and setText().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onPaint()

long onPaint ( FXObject * ,
FXSelector ,
void * ptr )

Definition at line 212 of file fox16_htmllabel.cpp.

References DBG_ERROR, drawFrame(), GWEN_LOGDOMAIN, ICON_SPACE, m_htmlCtx, and m_icon.

Referenced by FXDEFMAP().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setIcon()

void setIcon ( FXIcon * ic)

Definition at line 99 of file fox16_htmllabel.cpp.

References layout(), and m_icon.

Referenced by FOX16_GuiDialog::setupTree().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMaxDefaultWidth()

void setMaxDefaultWidth ( int i)
inline

Definition at line 65 of file fox16_htmllabel.hpp.

References m_maxDefaultWidth.

Referenced by FOX16_GuiDialog::setupTree().

Here is the caller graph for this function:

◆ setMinimumWidth()

void setMinimumWidth ( int i)
inline

Definition at line 64 of file fox16_htmllabel.hpp.

References m_minWidth.

◆ setText()

void setText ( const FXString & text)

Set the text for this label.

Definition at line 80 of file fox16_htmllabel.cpp.

References layout(), m_haveDefaultDims, m_text, and updateHtml().

Referenced by FOX16_HtmlLabel(), and FOX16_GuiDialog::setCharProperty().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateHtml()

void updateHtml ( )
protected

Definition at line 311 of file fox16_htmllabel.cpp.

References GWEN_StringList_FirstEntry(), GWEN_StringListEntry_Data(), GWEN_StringListEntry_Next(), m_haveDefaultDims, m_htmlCtx, m_mediaPaths, and m_text.

Referenced by create(), getDefaultHeight(), getDefaultWidth(), layout(), and setText().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ m_defaultHeight

FXint m_defaultHeight
protected

Definition at line 79 of file fox16_htmllabel.hpp.

Referenced by calcDefaultDims(), and getDefaultHeight().

◆ m_defaultWidth

FXint m_defaultWidth
protected

Definition at line 78 of file fox16_htmllabel.hpp.

Referenced by calcDefaultDims(), getDefaultWidth(), and layout().

◆ m_haveDefaultDims

bool m_haveDefaultDims
protected

◆ m_htmlCtx

◆ m_icon

FXIcon* m_icon
protected

◆ m_maxDefaultWidth

int m_maxDefaultWidth
protected

Definition at line 75 of file fox16_htmllabel.hpp.

Referenced by calcDefaultDims(), FOX16_HtmlLabel(), layout(), and setMaxDefaultWidth().

◆ m_mediaPaths

GWEN_STRINGLIST* m_mediaPaths
protected

◆ m_minWidth

int m_minWidth
protected

Definition at line 74 of file fox16_htmllabel.hpp.

Referenced by FOX16_HtmlLabel(), FOX16_HtmlLabel(), and setMinimumWidth().

◆ m_text

FXString m_text
protected

Definition at line 73 of file fox16_htmllabel.hpp.

Referenced by getText(), setText(), and updateHtml().


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