gwenhywfar 5.11.1beta
fox16_htmllabel.hpp
Go to the documentation of this file.
1/***************************************************************************
2 begin : Tue Feb 23 2010
3 copyright : (C) 2010 by Martin Preuss
4 email : martin@libchipcard.de
5
6 ***************************************************************************
7 * Please see toplevel file COPYING for license details *
8 ***************************************************************************/
9
10
11#ifndef FOX16_HTMLLABEL_HPP
12#define FOX16_HTMLLABEL_HPP
13
15
16#include <fx.h>
17
18
19class FOX16_HtmlCtx;
20
21
22class FOX16GUI_API FOX16_HtmlLabel: public FXFrame {
23 FXDECLARE(FOX16_HtmlLabel)
24
25public:
26
27 enum {
31 FLAGS_NO_WORDWRAP = 0x00080000,
35 FLAGS_USE_FULL_WIDTH = 0x00040000
36 };
37
38 FOX16_HtmlLabel(FXComposite* p, const FXString& text,
39 FXuint opts=0,
40 FXint x=0, FXint y=0, FXint w=0, FXint h=0,
41 FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD,
42 FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD);
44
46 void setText(const FXString& text);
47
49 FXString getText() const { return m_text; }
50
51 FXIcon *getIcon() const { return m_icon;};
52 void setIcon(FXIcon *ic);
53
54 void addMediaPath(const char *s);
55
57 virtual FXint getDefaultWidth();
58
60 virtual FXint getDefaultHeight();
61
62 void create();
63
64 void setMinimumWidth(int i) { m_minWidth=i;};
65 void setMaxDefaultWidth(int i) { m_maxDefaultWidth=i;};
66
67 long onPaint(FXObject*, FXSelector, void*);
68
69 void layout();
70
71protected:
73 FXString m_text;
76
80
82
83 FXIcon *m_icon;
84
86 void updateHtml();
88
89
90};
91
92
93
94#endif
95
long onPaint(FXObject *, FXSelector, void *)
FXString getText() const
Get the text for this label.
void addMediaPath(const char *s)
void setIcon(FXIcon *ic)
FOX16_HtmlCtx * m_htmlCtx
virtual FXint getDefaultWidth()
Return default width.
FXIcon * getIcon() const
void setMaxDefaultWidth(int i)
virtual FXint getDefaultHeight()
Return default height.
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)
void setMinimumWidth(int i)
void setText(const FXString &text)
Set the text for this label.
GWEN_STRINGLIST * m_mediaPaths
void calcDefaultDims()
struct GWEN_STRINGLISTSTRUCT GWEN_STRINGLIST
Definition stringlist.h:56