gwenhywfar  5.1.3
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 
19 class FOX16_HtmlCtx;
20 
21 
22 class FOX16GUI_API FOX16_HtmlText: public FXScrollArea {
23  FXDECLARE(FOX16_HtmlText)
24 
25 public:
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);
37  ~FOX16_HtmlText();
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 
57 protected:
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();
75  void calcDefaultDims();
76 
77 
78 };
79 
80 
81 
82 #endif
83 
FOX16_HtmlText::m_minWidth
int m_minWidth
Definition: fox16_htmltext.hpp:60
FOX16_HtmlText::m_maxDefaultWidth
int m_maxDefaultWidth
Definition: fox16_htmltext.hpp:61
FOX16_HtmlText::m_text
FXString m_text
Definition: fox16_htmltext.hpp:59
FOX16_HtmlText::marginbottom
FXint marginbottom
Definition: fox16_htmltext.hpp:68
FOX16_HtmlText::marginleft
FXint marginleft
Definition: fox16_htmltext.hpp:69
FOX16_HtmlText::getText
FXString getText() const
Get the text for this label.
Definition: fox16_htmltext.hpp:43
FOX16_HtmlText::m_htmlCtx
FOX16_HtmlCtx * m_htmlCtx
Definition: fox16_htmltext.hpp:58
FOX16_HtmlText::m_defaultWidth
FXint m_defaultWidth
Definition: fox16_htmltext.hpp:64
FOX16_HtmlText
Definition: fox16_htmltext.hpp:22
FOX16_HtmlText::m_defaultHeight
FXint m_defaultHeight
Definition: fox16_htmltext.hpp:65
FOX16_HtmlText::marginright
FXint marginright
Definition: fox16_htmltext.hpp:70
FOX16_HtmlText::barwidth
FXint barwidth
Definition: fox16_htmltext.hpp:71
FOX16_HtmlText::m_haveDefaultDims
bool m_haveDefaultDims
Definition: fox16_htmltext.hpp:63
fox16_gui.hpp
FOX16_HtmlCtx
Definition: fox16_htmlctx.hpp:22
FOX16_HtmlText::setMinimumWidth
void setMinimumWidth(int i)
Definition: fox16_htmltext.hpp:49
FOX16_HtmlText::margintop
FXint margintop
Definition: fox16_htmltext.hpp:67