gwenhywfar 5.11.1beta
fox16_htmltext.hpp
Go to the documentation of this file.
1/***************************************************************************
2 begin : Sat Jun 19 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_HTMLTEXT_HPP
12#define FOX16_HTMLTEXT_HPP
13
15
16#include <fx.h>
17
18
19class FOX16_HtmlCtx;
20
21
22class FOX16GUI_API FOX16_HtmlText: public FXScrollArea {
23 FXDECLARE(FOX16_HtmlText)
24
25public:
26
27 enum {
31 FLAGS_NO_WORDWRAP = 0x00080000
32 };
33
34 FOX16_HtmlText(FXComposite* p, const FXString& text,
35 FXuint opts=0,
36 FXint x=0, FXint y=0, FXint w=0, FXint h=0);
38
40 void setText(const FXString& text);
41
43 FXString getText() const { return m_text; }
44
45 virtual FXint getContentWidth();
46
47 virtual FXint getContentHeight();
48
49 void setMinimumWidth(int i) { m_minWidth=i;};
50
51 void makePositionVisible(FXint pos);
52
53 long onPaint(FXObject*, FXSelector, void*);
54
55 void layout();
56
57protected:
59 FXString m_text;
62
66
67 FXint margintop; // Margins top
68 FXint marginbottom; // Margin bottom
69 FXint marginleft; // Margin left
70 FXint marginright; // Margin right
71 FXint barwidth;
72
74 void updateHtml();
76
77
78};
79
80
81
82#endif
83
long onPaint(FXObject *, FXSelector, void *)
FXString getText() const
Get the text for this label.
FOX16_HtmlCtx * m_htmlCtx
virtual FXint getContentHeight()
virtual FXint getContentWidth()
FOX16_HtmlText(FXComposite *p, const FXString &text, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0)
void setMinimumWidth(int i)
void setText(const FXString &text)
Set the text for this label.
void calcDefaultDims()
void makePositionVisible(FXint pos)