gwenhywfar 5.11.2beta
fox16_htmlctx.hpp
Go to the documentation of this file.
1/***************************************************************************
2 begin : Mon Feb 22 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#ifndef FOX16_HTMLCTX_HPP
11#define FOX16_HTMLCTX_HPP
12
13
18
19#include <fx.h>
20
21
22class FOX16GUI_API FOX16_HtmlCtx {
23 friend class FOX16_HtmlCtxLinker;
24
25public:
26 FOX16_HtmlCtx(uint32_t flags);
28
29 void setText(const char *s);
30
31 int getWidth();
32 int getHeight();
33
34 HTML_FONT *getFont(const char *fontName,
35 int fontSize,
36 uint32_t fontFlags);
37
38 HTML_IMAGE *getImage(const char *imageName);
39
40 void addMediaPath(const char *s);
41
42 int layout(int width, int height);
43 void dump();
44
45 void paint(FXDC *dc, int xOffset, int yOffset);
46 void paintAt(FXDC *dc,
47 int xOffset, int yOffset,
48 int xText, int yText,
49 int w, int h);
50
51 void setBackgroundColor(FXColor c);
52 void setForegroundColor(FXColor c);
53
54protected:
56 FXFont *_font;
57 FXColor _fgColor;
58 FXColor _bgColor;
59 FXIconSource *m_iconSource;
60
61 FXFont *_getFoxFont(HTML_FONT *fnt);
62 void _paint(FXDC *dc, HTML_OBJECT *o, int xOffset, int yOffset);
63 void _paintAt(FXDC *dc, HTML_OBJECT *o,
64 int xOffset, int yOffset,
65 int xText, int yText,
66 int w, int h);
67
69 const char *s);
70
72 const char *s);
73
74 uint32_t getColorFromName(const char *name);
75
76};
77
78
79
80
81#endif
82
83
int getTextWidth(HTML_FONT *fnt, const char *s)
FXIconSource * m_iconSource
FXFont * _getFoxFont(HTML_FONT *fnt)
int getTextHeight(HTML_FONT *fnt, const char *s)
void setText(const char *s)
void addMediaPath(const char *s)
int layout(int width, int height)
void paint(FXDC *dc, int xOffset, int yOffset)
void setForegroundColor(FXColor c)
FOX16_HtmlCtx(uint32_t flags)
GWEN_XML_CONTEXT * _context
void _paintAt(FXDC *dc, HTML_OBJECT *o, int xOffset, int yOffset, int xText, int yText, int w, int h)
HTML_IMAGE * getImage(const char *imageName)
void paintAt(FXDC *dc, int xOffset, int yOffset, int xText, int yText, int w, int h)
void _paint(FXDC *dc, HTML_OBJECT *o, int xOffset, int yOffset)
HTML_FONT * getFont(const char *fontName, int fontSize, uint32_t fontFlags)
void setBackgroundColor(FXColor c)
uint32_t getColorFromName(const char *name)
struct HTML_FONT HTML_FONT
Definition htmlfont_be.h:23
struct HTML_IMAGE HTML_IMAGE
struct HTML_OBJECT HTML_OBJECT
struct GWEN_XML_CONTEXT GWEN_XML_CONTEXT
Definition xmlctx.h:39