gwenhywfar
4.10.0beta
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
gwenhywfar4
gwen-gui-fox16
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
14
#include <
gwen-gui-fox16/fox16_gui.hpp
>
15
#include <
gwenhywfar/htmlobject_be.h
>
16
#include <
gwenhywfar/htmlfont_be.h
>
17
#include <
gwenhywfar/htmlctx_be.h
>
18
19
#include <fx.h>
20
21
22
class
FOX16GUI_API
FOX16_HtmlCtx
{
23
friend
class
FOX16_HtmlCtxLinker;
24
25
public
:
26
FOX16_HtmlCtx
(uint32_t flags);
27
~
FOX16_HtmlCtx
();
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
54
protected
:
55
GWEN_XML_CONTEXT
*
_context
;
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
68
int
getTextWidth(
HTML_FONT
*fnt,
69
const
char
*s);
70
71
int
getTextHeight(
HTML_FONT
*fnt,
72
const
char
*s);
73
74
uint32_t getColorFromName(
const
char
*name);
75
76
};
77
78
79
80
81
#endif
82
83
Generated on Tue Feb 11 2014 11:09:43 for gwenhywfar by
1.8.1.2