#include <fox16_htmlctx.hpp>
Public Member Functions | |
void | addMediaPath (const char *s) |
void | dump () |
FOX16_HtmlCtx (uint32_t flags) | |
HTML_FONT * | getFont (const char *fontName, int fontSize, uint32_t fontFlags) |
int | getHeight () |
HTML_IMAGE * | getImage (const char *imageName) |
int | getWidth () |
int | layout (int width, int height) |
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) |
void | setText (const char *s) |
~FOX16_HtmlCtx () | |
Protected Member Functions | |
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) |
uint32_t | getColorFromName (const char *name) |
int | getTextHeight (HTML_FONT *fnt, const char *s) |
int | getTextWidth (HTML_FONT *fnt, const char *s) |
Protected Attributes | |
FXColor | _bgColor |
GWEN_XML_CONTEXT * | _context |
FXColor | _fgColor |
FXFont * | _font |
FXIconSource * | m_iconSource |
Friends | |
class | FOX16_HtmlCtxLinker |
Definition at line 22 of file fox16_htmlctx.hpp.
FOX16_HtmlCtx | ( | uint32_t | flags | ) |
Definition at line 140 of file fox16_htmlctx.cpp.
References _context, _font, GWEN_INHERIT_SETDATA, HtmlCtx_GetFont(), HtmlCtx_new(), HtmlCtx_SetGetColorFromNameFn(), HtmlCtx_SetGetFontFn(), HtmlCtx_SetGetImageFn(), HtmlCtx_SetGetTextHeightFn(), HtmlCtx_SetGetTextWidthFn(), HtmlCtx_SetStandardProps(), HtmlProps_free(), HtmlProps_new(), and HtmlProps_SetFont().
Referenced by FOX16_HtmlLabel::updateHtml().
~FOX16_HtmlCtx | ( | ) |
Definition at line 170 of file fox16_htmlctx.cpp.
References _context, GWEN_INHERIT_UNLINK, and GWEN_XmlCtx_free().
FXFont * _getFoxFont | ( | HTML_FONT * | fnt | ) | [protected] |
Definition at line 179 of file fox16_htmlctx.cpp.
References _font, DBG_DEBUG, DBG_ERROR, GWEN_INHERIT_GETDATA, GWEN_INHERIT_ISOFTYPE, GWEN_INHERIT_SETDATA, GWEN_LOGDOMAIN, HTML_FONT_FLAGS_ITALIC, HTML_FONT_FLAGS_STRONG, HtmlFont_GetFontFlags(), HtmlFont_GetFontName(), HtmlFont_GetFontSize(), and NULL.
Referenced by _paint(), _paintAt(), getTextHeight(), and getTextWidth().
void _paint | ( | FXDC * | dc, | |
HTML_OBJECT * | o, | |||
int | xOffset, | |||
int | yOffset | |||
) | [protected] |
Definition at line 346 of file fox16_htmlctx.cpp.
References _bgColor, _fgColor, _getFoxFont(), GWEN_INHERIT_GETDATA, HTML_PROPS_NOCOLOR, HtmlObject_GetObjectType(), HtmlObject_GetProperties(), HtmlObject_GetText(), HtmlObject_GetX(), HtmlObject_GetY(), HtmlObject_Image_GetImage(), HtmlObjectType_Image, HtmlObjectType_Word, HtmlProps_GetBackgroundColor(), HtmlProps_GetFont(), and HtmlProps_GetForegroundColor().
Referenced by paint().
void _paintAt | ( | FXDC * | dc, | |
HTML_OBJECT * | o, | |||
int | xOffset, | |||
int | yOffset, | |||
int | xText, | |||
int | yText, | |||
int | w, | |||
int | h | |||
) | [protected] |
Definition at line 433 of file fox16_htmlctx.cpp.
References _bgColor, _fgColor, _getFoxFont(), GWEN_INHERIT_GETDATA, HTML_PROPS_NOCOLOR, HtmlObject_GetHeight(), HtmlObject_GetObjectType(), HtmlObject_GetProperties(), HtmlObject_GetText(), HtmlObject_GetWidth(), HtmlObject_GetX(), HtmlObject_GetY(), HtmlObject_Image_GetImage(), HtmlObjectType_Grid, HtmlObjectType_Image, HtmlObjectType_Word, HtmlProps_GetBackgroundColor(), HtmlProps_GetFont(), and HtmlProps_GetForegroundColor().
Referenced by paintAt().
void addMediaPath | ( | const char * | s | ) |
Definition at line 292 of file fox16_htmlctx.cpp.
References _context, and HtmlCtx_AddMediaPath().
Referenced by FOX16_HtmlLabel::updateHtml().
void dump | ( | ) |
Definition at line 336 of file fox16_htmlctx.cpp.
References _context, dumpObject(), and HtmlCtx_GetRootObject().
uint32_t getColorFromName | ( | const char * | name | ) | [protected] |
Definition at line 269 of file fox16_htmlctx.cpp.
HTML_FONT * getFont | ( | const char * | fontName, | |
int | fontSize, | |||
uint32_t | fontFlags | |||
) |
Definition at line 591 of file fox16_htmlctx.cpp.
References FOX16_Gui::getFgGui(), and FOX16_Gui::getFont().
int getHeight | ( | ) |
Definition at line 579 of file fox16_htmlctx.cpp.
References _context, HtmlCtx_GetRootObject(), and HtmlObject_GetHeight().
Referenced by FOX16_HtmlText::calcDefaultDims(), FOX16_HtmlLabel::calcDefaultDims(), FOX16_HtmlText::getContentHeight(), and FOX16_HtmlLabel::onPaint().
HTML_IMAGE * getImage | ( | const char * | imageName | ) |
Definition at line 604 of file fox16_htmlctx.cpp.
References _context, DBG_ERROR, GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_Directory_FindFileInPaths(), GWEN_INHERIT_SETDATA, GWEN_LOGDOMAIN, HtmlCtx_GetMediaPaths(), HtmlImage_new(), HtmlImage_SetHeight(), HtmlImage_SetImageName(), HtmlImage_SetWidth(), m_iconSource, and NULL.
int getTextHeight | ( | HTML_FONT * | fnt, | |
const char * | s | |||
) | [protected] |
Definition at line 249 of file fox16_htmlctx.cpp.
References _font, _getFoxFont(), DBG_ERROR, GWEN_LOGDOMAIN, and NULL.
int getTextWidth | ( | HTML_FONT * | fnt, | |
const char * | s | |||
) | [protected] |
Definition at line 229 of file fox16_htmlctx.cpp.
References _font, _getFoxFont(), DBG_ERROR, GWEN_LOGDOMAIN, and NULL.
int getWidth | ( | ) |
Definition at line 567 of file fox16_htmlctx.cpp.
References _context, HtmlCtx_GetRootObject(), and HtmlObject_GetWidth().
Referenced by FOX16_HtmlText::calcDefaultDims(), FOX16_HtmlLabel::calcDefaultDims(), and FOX16_HtmlText::getContentWidth().
int layout | ( | int | width, | |
int | height | |||
) |
Definition at line 275 of file fox16_htmlctx.cpp.
References _context, and HtmlCtx_Layout().
Referenced by FOX16_HtmlText::calcDefaultDims(), FOX16_HtmlLabel::calcDefaultDims(), FOX16_HtmlText::getContentWidth(), FOX16_HtmlText::layout(), and FOX16_HtmlLabel::layout().
void paint | ( | FXDC * | dc, | |
int | xOffset, | |||
int | yOffset | |||
) |
Definition at line 544 of file fox16_htmlctx.cpp.
References _context, _paint(), and HtmlCtx_GetRootObject().
Referenced by FOX16_HtmlLabel::onPaint().
void paintAt | ( | FXDC * | dc, | |
int | xOffset, | |||
int | yOffset, | |||
int | xText, | |||
int | yText, | |||
int | w, | |||
int | h | |||
) |
Definition at line 554 of file fox16_htmlctx.cpp.
References _context, _paintAt(), and HtmlCtx_GetRootObject().
Referenced by FOX16_HtmlText::onPaint().
void setBackgroundColor | ( | FXColor | c | ) |
Definition at line 652 of file fox16_htmlctx.cpp.
References _bgColor.
Referenced by FOX16_HtmlText::updateHtml(), and FOX16_HtmlLabel::updateHtml().
void setForegroundColor | ( | FXColor | c | ) |
Definition at line 658 of file fox16_htmlctx.cpp.
References _fgColor.
Referenced by FOX16_HtmlText::updateHtml(), and FOX16_HtmlLabel::updateHtml().
void setText | ( | const char * | s | ) |
Definition at line 281 of file fox16_htmlctx.cpp.
References _context, DBG_INFO, GWEN_LOGDOMAIN, and GWEN_XMLContext_ReadFromString().
Referenced by FOX16_HtmlLabel::FOX16_HtmlLabel(), FOX16_HtmlText::updateHtml(), and FOX16_HtmlLabel::updateHtml().
friend class FOX16_HtmlCtxLinker [friend] |
Definition at line 23 of file fox16_htmlctx.hpp.
FXColor _bgColor [protected] |
Definition at line 58 of file fox16_htmlctx.hpp.
Referenced by _paint(), _paintAt(), and setBackgroundColor().
GWEN_XML_CONTEXT* _context [protected] |
Definition at line 55 of file fox16_htmlctx.hpp.
Referenced by addMediaPath(), dump(), FOX16_HtmlCtx(), getHeight(), getImage(), getWidth(), layout(), paint(), paintAt(), setText(), and ~FOX16_HtmlCtx().
FXColor _fgColor [protected] |
Definition at line 57 of file fox16_htmlctx.hpp.
Referenced by _paint(), _paintAt(), and setForegroundColor().
FXFont* _font [protected] |
Definition at line 56 of file fox16_htmlctx.hpp.
Referenced by _getFoxFont(), FOX16_HtmlCtx(), getTextHeight(), and getTextWidth().
FXIconSource* m_iconSource [protected] |
Definition at line 59 of file fox16_htmlctx.hpp.
Referenced by getImage().