fox16_htmlctx.hpp
Go to the documentation of this file.
/***************************************************************************
begin : Mon Feb 22 2010
copyright : (C) 2010 by Martin Preuss
email : martin@libchipcard.de
***************************************************************************
* Please see toplevel file COPYING for license details *
***************************************************************************/
#ifndef FOX16_HTMLCTX_HPP
#define FOX16_HTMLCTX_HPP
#include <gwen-gui-fox16/fox16_gui.hpp>
#include <gwenhywfar/htmlobject_be.h>
#include <gwenhywfar/htmlfont_be.h>
#include <gwenhywfar/htmlctx_be.h>
#include <fx.h>
class FOX16GUI_API FOX16_HtmlCtx {
friend class FOX16_HtmlCtxLinker;
public:
FOX16_HtmlCtx(uint32_t flags);
~FOX16_HtmlCtx();
void setText(const char *s);
int getWidth();
int getHeight();
HTML_FONT *getFont(const char *fontName,
int fontSize,
uint32_t fontFlags);
HTML_IMAGE *getImage(const char *imageName);
void addMediaPath(const char *s);
int layout(int width, int height);
void dump();
void paint(FXDC *dc, int xOffset, int yOffset);
void paintAt(FXDC *dc,
int xOffset, int yOffset,
int xText, int yText,
int w, int h);
void setBackgroundColor(FXColor c);
void setForegroundColor(FXColor c);
protected:
GWEN_XML_CONTEXT *_context;
FXFont *_font;
FXColor _fgColor;
FXColor _bgColor;
FXIconSource *m_iconSource;
FXFont *_getFoxFont(HTML_FONT *fnt);
void _paint(FXDC *dc, HTML_OBJECT *o, int xOffset, int yOffset);
void _paintAt(FXDC *dc, HTML_OBJECT *o,
int xOffset, int yOffset,
int xText, int yText,
int w, int h);
int getTextWidth(HTML_FONT *fnt,
const char *s);
int getTextHeight(HTML_FONT *fnt,
const char *s);
uint32_t getColorFromName(const char *name);
};
#endif
FOX16_HtmlCtx::getHeight
int getHeight()
FOX16_HtmlCtx::getTextWidth
int getTextWidth(HTML_FONT *fnt, const char *s)
FOX16_HtmlCtx::m_iconSource
FXIconSource * m_iconSource
Definition fox16_htmlctx.hpp:59
FOX16_HtmlCtx::_getFoxFont
FXFont * _getFoxFont(HTML_FONT *fnt)
FOX16_HtmlCtx::getTextHeight
int getTextHeight(HTML_FONT *fnt, const char *s)
FOX16_HtmlCtx::_bgColor
FXColor _bgColor
Definition fox16_htmlctx.hpp:58
FOX16_HtmlCtx::setText
void setText(const char *s)
FOX16_HtmlCtx::addMediaPath
void addMediaPath(const char *s)
FOX16_HtmlCtx::_fgColor
FXColor _fgColor
Definition fox16_htmlctx.hpp:57
FOX16_HtmlCtx::FOX16_HtmlCtxLinker
friend class FOX16_HtmlCtxLinker
Definition fox16_htmlctx.hpp:23
FOX16_HtmlCtx::layout
int layout(int width, int height)
FOX16_HtmlCtx::paint
void paint(FXDC *dc, int xOffset, int yOffset)
FOX16_HtmlCtx::_font
FXFont * _font
Definition fox16_htmlctx.hpp:56
FOX16_HtmlCtx::getWidth
int getWidth()
FOX16_HtmlCtx::setForegroundColor
void setForegroundColor(FXColor c)
FOX16_HtmlCtx::FOX16_HtmlCtx
FOX16_HtmlCtx(uint32_t flags)
FOX16_HtmlCtx::_context
GWEN_XML_CONTEXT * _context
Definition fox16_htmlctx.hpp:55
FOX16_HtmlCtx::_paintAt
void _paintAt(FXDC *dc, HTML_OBJECT *o, int xOffset, int yOffset, int xText, int yText, int w, int h)
FOX16_HtmlCtx::getImage
HTML_IMAGE * getImage(const char *imageName)
FOX16_HtmlCtx::paintAt
void paintAt(FXDC *dc, int xOffset, int yOffset, int xText, int yText, int w, int h)
FOX16_HtmlCtx::dump
void dump()
FOX16_HtmlCtx::_paint
void _paint(FXDC *dc, HTML_OBJECT *o, int xOffset, int yOffset)
FOX16_HtmlCtx::getFont
HTML_FONT * getFont(const char *fontName, int fontSize, uint32_t fontFlags)
FOX16_HtmlCtx::~FOX16_HtmlCtx
~FOX16_HtmlCtx()
FOX16_HtmlCtx::setBackgroundColor
void setBackgroundColor(FXColor c)
FOX16_HtmlCtx::getColorFromName
uint32_t getColorFromName(const char *name)
fox16_gui.hpp
htmlctx_be.h
htmlfont_be.h
HTML_FONT
struct HTML_FONT HTML_FONT
Definition htmlfont_be.h:23
HTML_IMAGE
struct HTML_IMAGE HTML_IMAGE
Definition htmlimage_be.h:23
htmlobject_be.h
HTML_OBJECT
struct HTML_OBJECT HTML_OBJECT
Definition htmlobject_be.h:25
GWEN_XML_CONTEXT
struct GWEN_XML_CONTEXT GWEN_XML_CONTEXT
Definition xmlctx.h:39