#include <xap_Dlg_FontChooser.h>
Public Member Functions | |
XAP_Preview_FontPreview (GR_Graphics *gc, const gchar *pszClrBackgound) | |
virtual | ~XAP_Preview_FontPreview (void) |
void | setVecProperties (const XAP_Dialog_FontChooser::PropMap *vFontProps) |
std::string | getVal (const std::string &) const |
void | draw (const UT_Rect *clip=NULL) |
void | setDrawString (const UT_UCSChar *pszChars) |
void | clearScreen (void) |
Protected Attributes | |
const XAP_Dialog_FontChooser::PropMap * | m_mapProps |
UT_RGBColor | m_clrBackground |
const UT_UCSChar * | m_pszChars |
Private Member Functions | |
XAP_Preview_FontPreview () | |
XAP_Preview_FontPreview (const XAP_Preview_FontPreview &other) | |
XAP_Preview_FontPreview & | operator= (const XAP_Preview_FontPreview &other) |
Private Attributes | |
GR_Font * | m_pFont |
UT_sint32 | m_iAscent |
UT_sint32 | m_iDescent |
UT_sint32 | m_iHeight |
XAP_Preview_FontPreview::XAP_Preview_FontPreview | ( | GR_Graphics * | gc, | |
const gchar * | pszClrBackgound | |||
) | [explicit] |
References m_clrBackground, UT_parseColor(), and UT_setColor().
XAP_Preview_FontPreview::~XAP_Preview_FontPreview | ( | void | ) | [virtual] |
XAP_Preview_FontPreview::XAP_Preview_FontPreview | ( | ) | [private] |
XAP_Preview_FontPreview::XAP_Preview_FontPreview | ( | const XAP_Preview_FontPreview & | other | ) | [private] |
void XAP_Preview_FontPreview::clearScreen | ( | void | ) |
References GR_Painter::fillRect(), XAP_Preview::getWindowHeight(), XAP_Preview::getWindowWidth(), m_clrBackground, XAP_Preview::m_gc, and GR_Graphics::tlu().
Referenced by draw(), and XAP_Dialog_FontChooser::event_previewClear().
void XAP_Preview_FontPreview::draw | ( | const UT_Rect * | clip = NULL |
) | [virtual] |
Implements XAP_CustomWidget.
References clearScreen(), GR_Painter::drawChars(), GR_Painter::drawLine(), GR_Painter::fillRect(), GR_Graphics::findFont(), GR_Graphics::getFontAscent(), GR_Graphics::getFontDescent(), GR_Graphics::getFontHeight(), getVal(), XAP_Preview::getWindowHeight(), XAP_Preview::getWindowWidth(), m_clrBackground, XAP_Preview::m_gc, m_iAscent, m_iDescent, m_iHeight, m_pFont, m_pszChars, GR_Graphics::measureString(), GR_Graphics::setColor(), GR_Graphics::setFont(), GR_Graphics::tlu(), UT_ASSERT_HARMLESS, UT_MAX, UT_parseColor(), UT_UCS4_strlen(), and UT_UNUSED.
Referenced by XAP_FontPreview::draw(), AP_Dialog_Styles::event_charPreviewUpdated(), and XAP_Dialog_FontChooser::event_previewExposed().
std::string XAP_Preview_FontPreview::getVal | ( | const std::string & | sProp | ) | const |
This method returns a pointer to the const char * value associated with the the property szProp. Stolen from ap_Dialog_Lists.
References m_mapProps.
Referenced by draw().
XAP_Preview_FontPreview& XAP_Preview_FontPreview::operator= | ( | const XAP_Preview_FontPreview & | other | ) | [private] |
void XAP_Preview_FontPreview::setDrawString | ( | const UT_UCSChar * | pszChars | ) | [inline] |
void XAP_Preview_FontPreview::setVecProperties | ( | const XAP_Dialog_FontChooser::PropMap * | vFontProps | ) |
UT_RGBColor XAP_Preview_FontPreview::m_clrBackground [protected] |
Referenced by clearScreen(), draw(), and XAP_Preview_FontPreview().
UT_sint32 XAP_Preview_FontPreview::m_iAscent [private] |
Referenced by draw().
UT_sint32 XAP_Preview_FontPreview::m_iDescent [private] |
Referenced by draw().
UT_sint32 XAP_Preview_FontPreview::m_iHeight [private] |
Referenced by draw().
const XAP_Dialog_FontChooser::PropMap* XAP_Preview_FontPreview::m_mapProps [protected] |
Referenced by getVal(), and setVecProperties().
GR_Font* XAP_Preview_FontPreview::m_pFont [private] |
Referenced by draw().
const UT_UCSChar* XAP_Preview_FontPreview::m_pszChars [protected] |
Referenced by draw().