fox16_htmllabel.hpp
Go to the documentation of this file.
/***************************************************************************
begin : Tue Feb 23 2010
copyright : (C) 2010 by Martin Preuss
email : martin@libchipcard.de
***************************************************************************
* Please see toplevel file COPYING for license details *
***************************************************************************/
#ifndef FOX16_HTMLLABEL_HPP
#define FOX16_HTMLLABEL_HPP
#include <gwen-gui-fox16/fox16_gui.hpp>
#include <fx.h>
class FOX16_HtmlCtx;
class FOX16GUI_API FOX16_HtmlLabel: public FXFrame {
FXDECLARE(FOX16_HtmlLabel)
public:
enum {
FLAGS_NO_WORDWRAP = 0x00080000,
FLAGS_USE_FULL_WIDTH = 0x00040000
};
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);
~FOX16_HtmlLabel();
void setText(const FXString& text);
FXString getText() const { return m_text; }
FXIcon *getIcon() const { return m_icon;};
void setIcon(FXIcon *ic);
void addMediaPath(const char *s);
virtual FXint getDefaultWidth();
virtual FXint getDefaultHeight();
void create();
void setMinimumWidth(int i) { m_minWidth=i;};
void setMaxDefaultWidth(int i) { m_maxDefaultWidth=i;};
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;
GWEN_STRINGLIST *m_mediaPaths;
FXIcon *m_icon;
FOX16_HtmlLabel();
void updateHtml();
void calcDefaultDims();
};
#endif
FOX16_HtmlCtx
Definition fox16_htmlctx.hpp:22
FOX16_HtmlLabel::onPaint
long onPaint(FXObject *, FXSelector, void *)
FOX16_HtmlLabel::FLAGS_USE_FULL_WIDTH
@ FLAGS_USE_FULL_WIDTH
Definition fox16_htmllabel.hpp:35
FOX16_HtmlLabel::FLAGS_NO_WORDWRAP
@ FLAGS_NO_WORDWRAP
Definition fox16_htmllabel.hpp:31
FOX16_HtmlLabel::m_minWidth
int m_minWidth
Definition fox16_htmllabel.hpp:74
FOX16_HtmlLabel::getText
FXString getText() const
Get the text for this label.
Definition fox16_htmllabel.hpp:49
FOX16_HtmlLabel::FOX16_HtmlLabel
FOX16_HtmlLabel()
FOX16_HtmlLabel::m_haveDefaultDims
bool m_haveDefaultDims
Definition fox16_htmllabel.hpp:77
FOX16_HtmlLabel::m_icon
FXIcon * m_icon
Definition fox16_htmllabel.hpp:83
FOX16_HtmlLabel::m_defaultWidth
FXint m_defaultWidth
Definition fox16_htmllabel.hpp:78
FOX16_HtmlLabel::addMediaPath
void addMediaPath(const char *s)
FOX16_HtmlLabel::setIcon
void setIcon(FXIcon *ic)
FOX16_HtmlLabel::m_htmlCtx
FOX16_HtmlCtx * m_htmlCtx
Definition fox16_htmllabel.hpp:72
FOX16_HtmlLabel::m_text
FXString m_text
Definition fox16_htmllabel.hpp:73
FOX16_HtmlLabel::getDefaultWidth
virtual FXint getDefaultWidth()
Return default width.
FOX16_HtmlLabel::m_maxDefaultWidth
int m_maxDefaultWidth
Definition fox16_htmllabel.hpp:75
FOX16_HtmlLabel::updateHtml
void updateHtml()
FOX16_HtmlLabel::getIcon
FXIcon * getIcon() const
Definition fox16_htmllabel.hpp:51
FOX16_HtmlLabel::setMaxDefaultWidth
void setMaxDefaultWidth(int i)
Definition fox16_htmllabel.hpp:65
FOX16_HtmlLabel::~FOX16_HtmlLabel
~FOX16_HtmlLabel()
FOX16_HtmlLabel::getDefaultHeight
virtual FXint getDefaultHeight()
Return default height.
FOX16_HtmlLabel::FOX16_HtmlLabel
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)
FOX16_HtmlLabel::setMinimumWidth
void setMinimumWidth(int i)
Definition fox16_htmllabel.hpp:64
FOX16_HtmlLabel::setText
void setText(const FXString &text)
Set the text for this label.
FOX16_HtmlLabel::m_mediaPaths
GWEN_STRINGLIST * m_mediaPaths
Definition fox16_htmllabel.hpp:81
FOX16_HtmlLabel::create
void create()
FOX16_HtmlLabel::calcDefaultDims
void calcDefaultDims()
FOX16_HtmlLabel::layout
void layout()
FOX16_HtmlLabel::m_defaultHeight
FXint m_defaultHeight
Definition fox16_htmllabel.hpp:79
fox16_gui.hpp
GWEN_STRINGLIST
struct GWEN_STRINGLISTSTRUCT GWEN_STRINGLIST
Definition stringlist.h:56