fox16_htmltext.hpp
Go to the documentation of this file.
/***************************************************************************
begin : Sat Jun 19 2010
copyright : (C) 2010 by Martin Preuss
email : martin@libchipcard.de
***************************************************************************
* Please see toplevel file COPYING for license details *
***************************************************************************/
#ifndef FOX16_HTMLTEXT_HPP
#define FOX16_HTMLTEXT_HPP
#include <gwen-gui-fox16/fox16_gui.hpp>
#include <fx.h>
class FOX16_HtmlCtx;
class FOX16GUI_API FOX16_HtmlText: public FXScrollArea {
FXDECLARE(FOX16_HtmlText)
public:
enum {
FLAGS_NO_WORDWRAP = 0x00080000
};
FOX16_HtmlText(FXComposite* p, const FXString& text,
FXuint opts=0,
FXint x=0, FXint y=0, FXint w=0, FXint h=0);
~FOX16_HtmlText();
void setText(const FXString& text);
FXString getText() const { return m_text; }
virtual FXint getContentWidth();
virtual FXint getContentHeight();
void setMinimumWidth(int i) { m_minWidth=i;};
void makePositionVisible(FXint pos);
long onPaint(FXObject*, FXSelector, void*);
void layout();
protected:
FOX16_HtmlCtx *m_htmlCtx;
FXString m_text;
int m_minWidth;
int m_maxDefaultWidth;
bool m_haveDefaultDims;
FXint m_defaultWidth;
FXint m_defaultHeight;
FXint margintop; // Margins top
FXint marginbottom; // Margin bottom
FXint marginleft; // Margin left
FXint marginright; // Margin right
FXint barwidth;
FOX16_HtmlText();
void updateHtml();
void calcDefaultDims();
};
#endif
FOX16_HtmlCtx
Definition fox16_htmlctx.hpp:22
FOX16_HtmlText::FOX16_HtmlText
FOX16_HtmlText()
FOX16_HtmlText::onPaint
long onPaint(FXObject *, FXSelector, void *)
FOX16_HtmlText::m_minWidth
int m_minWidth
Definition fox16_htmltext.hpp:60
FOX16_HtmlText::getText
FXString getText() const
Get the text for this label.
Definition fox16_htmltext.hpp:43
FOX16_HtmlText::m_haveDefaultDims
bool m_haveDefaultDims
Definition fox16_htmltext.hpp:63
FOX16_HtmlText::~FOX16_HtmlText
~FOX16_HtmlText()
FOX16_HtmlText::m_defaultWidth
FXint m_defaultWidth
Definition fox16_htmltext.hpp:64
FOX16_HtmlText::FLAGS_NO_WORDWRAP
@ FLAGS_NO_WORDWRAP
Definition fox16_htmltext.hpp:31
FOX16_HtmlText::m_htmlCtx
FOX16_HtmlCtx * m_htmlCtx
Definition fox16_htmltext.hpp:58
FOX16_HtmlText::m_text
FXString m_text
Definition fox16_htmltext.hpp:59
FOX16_HtmlText::m_maxDefaultWidth
int m_maxDefaultWidth
Definition fox16_htmltext.hpp:61
FOX16_HtmlText::updateHtml
void updateHtml()
FOX16_HtmlText::getContentHeight
virtual FXint getContentHeight()
FOX16_HtmlText::getContentWidth
virtual FXint getContentWidth()
FOX16_HtmlText::FOX16_HtmlText
FOX16_HtmlText(FXComposite *p, const FXString &text, FXuint opts=0, FXint x=0, FXint y=0, FXint w=0, FXint h=0)
FOX16_HtmlText::marginbottom
FXint marginbottom
Definition fox16_htmltext.hpp:68
FOX16_HtmlText::barwidth
FXint barwidth
Definition fox16_htmltext.hpp:71
FOX16_HtmlText::setMinimumWidth
void setMinimumWidth(int i)
Definition fox16_htmltext.hpp:49
FOX16_HtmlText::setText
void setText(const FXString &text)
Set the text for this label.
FOX16_HtmlText::marginright
FXint marginright
Definition fox16_htmltext.hpp:70
FOX16_HtmlText::calcDefaultDims
void calcDefaultDims()
FOX16_HtmlText::makePositionVisible
void makePositionVisible(FXint pos)
FOX16_HtmlText::layout
void layout()
FOX16_HtmlText::margintop
FXint margintop
Definition fox16_htmltext.hpp:67
FOX16_HtmlText::marginleft
FXint marginleft
Definition fox16_htmltext.hpp:69
FOX16_HtmlText::m_defaultHeight
FXint m_defaultHeight
Definition fox16_htmltext.hpp:65
fox16_gui.hpp