#include <xap_Preview_Zoom.h>
Public Types | |
enum | tPos { pos_TOP, pos_CENTER, pos_BOTTOM } |
enum | tFont { font_NORMAL } |
Public Member Functions | |
XAP_Preview_Zoom (GR_Graphics *gc) | |
virtual | ~XAP_Preview_Zoom (void) |
void | setDrawAtPosition (XAP_Preview_Zoom::tPos pos) |
void | setFont (XAP_Preview_Zoom::tFont f) |
void | setZoomPercent (UT_uint32 percent) |
bool | setString (const char *string) |
bool | setString (UT_UCSChar *string) |
void | draw (const UT_Rect *clip=NULL) |
Protected Attributes | |
XAP_Preview_Zoom::tPos | m_pos |
XAP_Preview_Zoom::tFont | m_previewFont |
UT_uint32 | m_zoomPercent |
UT_UCSChar * | m_string |
GR_Font * | m_pFont |
XAP_Preview_Zoom::XAP_Preview_Zoom | ( | GR_Graphics * | gc | ) |
References font_NORMAL, m_pFont, m_string, m_zoomPercent, pos_CENTER, setDrawAtPosition(), and setFont().
void XAP_Preview_Zoom::draw | ( | const UT_Rect * | clip = NULL |
) | [virtual] |
Implements XAP_CustomWidget.
References GR_Painter::clearArea(), GR_Graphics::CLR3D_Background, GR_Painter::drawChars(), GR_Painter::fillRect(), XAP_Preview::getWindowHeight(), XAP_Preview::getWindowWidth(), XAP_Preview::m_gc, m_string, GR_Graphics::setClipRect(), GR_Graphics::tlu(), UT_ASSERT, UT_UCS4_strlen(), and UT_UNUSED.
Referenced by XAP_Dialog_Zoom::_updatePreviewZoomPercent().
void XAP_Preview_Zoom::setDrawAtPosition | ( | XAP_Preview_Zoom::tPos | pos | ) |
References XAP_Preview::m_gc, m_pos, and UT_ASSERT.
Referenced by XAP_Preview_Zoom().
void XAP_Preview_Zoom::setFont | ( | XAP_Preview_Zoom::tFont | f | ) |
References GR_Graphics::findFont(), font_NORMAL, XAP_Preview::m_gc, m_pFont, m_previewFont, m_zoomPercent, GR_Graphics::setFont(), UT_ASSERT, and UT_SHOULD_NOT_HAPPEN.
Referenced by XAP_Dialog_Zoom::_createPreviewFromGC(), setZoomPercent(), and XAP_Preview_Zoom().
bool XAP_Preview_Zoom::setString | ( | const char * | string | ) |
References FREEP, XAP_Preview::m_gc, m_string, UT_ASSERT, and UT_UCS4_cloneString_char().
Referenced by XAP_Dialog_Zoom::_createPreviewFromGC().
bool XAP_Preview_Zoom::setString | ( | UT_UCSChar * | string | ) |
References FREEP, XAP_Preview::m_gc, m_string, UT_ASSERT, and UT_UCS4_cloneString().
void XAP_Preview_Zoom::setZoomPercent | ( | UT_uint32 | percent | ) |
References XAP_Preview::m_gc, m_previewFont, m_zoomPercent, setFont(), and UT_ASSERT.
Referenced by XAP_Dialog_Zoom::_createPreviewFromGC(), and XAP_Dialog_Zoom::_updatePreviewZoomPercent().
GR_Font* XAP_Preview_Zoom::m_pFont [protected] |
Referenced by setFont(), and XAP_Preview_Zoom().
XAP_Preview_Zoom::tPos XAP_Preview_Zoom::m_pos [protected] |
Referenced by setDrawAtPosition().
Referenced by setFont(), and setZoomPercent().
UT_UCSChar* XAP_Preview_Zoom::m_string [protected] |
Referenced by draw(), setString(), XAP_Preview_Zoom(), and ~XAP_Preview_Zoom().
UT_uint32 XAP_Preview_Zoom::m_zoomPercent [protected] |
Referenced by setFont(), setZoomPercent(), and XAP_Preview_Zoom().