Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef FOX16_HTMLTEXT_HPP
00012 #define FOX16_HTMLTEXT_HPP
00013
00014 #include <gwen-gui-fox16/cppgui.hpp>
00015
00016 #include <fx.h>
00017
00018
00019 class FOX16_HtmlCtx;
00020
00021
00022 class FOX16GUI_API FOX16_HtmlText: public FXScrollArea {
00023 FXDECLARE(FOX16_HtmlText)
00024
00025 public:
00026
00027 enum {
00031 FLAGS_NO_WORDWRAP = 0x00080000
00032 };
00033
00034 FOX16_HtmlText(FXComposite* p, const FXString& text,
00035 FXuint opts=0,
00036 FXint x=0, FXint y=0, FXint w=0, FXint h=0);
00037 ~FOX16_HtmlText();
00038
00040 void setText(const FXString& text);
00041
00043 FXString getText() const { return m_text; }
00044
00045 virtual FXint getContentWidth();
00046
00047 virtual FXint getContentHeight();
00048
00049 void setMinimumWidth(int i) { m_minWidth=i;};
00050
00051 void makePositionVisible(FXint pos);
00052
00053 long onPaint(FXObject*, FXSelector, void*);
00054
00055 void layout();
00056
00057 protected:
00058 FOX16_HtmlCtx *m_htmlCtx;
00059 FXString m_text;
00060 int m_minWidth;
00061 int m_maxDefaultWidth;
00062
00063 bool m_haveDefaultDims;
00064 FXint m_defaultWidth;
00065 FXint m_defaultHeight;
00066
00067 FXint margintop;
00068 FXint marginbottom;
00069 FXint marginleft;
00070 FXint marginright;
00071 FXint barwidth;
00072
00073 FOX16_HtmlText();
00074 void updateHtml();
00075 void calcDefaultDims();
00076
00077
00078 };
00079
00080
00081
00082 #endif
00083