#include <ap_Preview_Annotation.h>
AP_Preview_Annotation::AP_Preview_Annotation | ( | XAP_DialogFactory * | pDlgFactory, | |
XAP_Dialog_Id | id | |||
) |
References XAP_Preview::m_gc.
AP_Preview_Annotation::~AP_Preview_Annotation | ( | void | ) | [virtual] |
void AP_Preview_Annotation::_createAnnotationPreviewFromGC | ( | GR_Graphics * | gc, | |
UT_uint32 | width, | |||
UT_uint32 | height | |||
) | [protected] |
References XAP_Preview::m_gc, m_height, m_width, XAP_Preview::setWindowSize(), GR_Graphics::tlu(), UT_ASSERT, and UT_DEBUGMSG.
Referenced by AP_UnixPreview_Annotation::runModeless().
void AP_Preview_Annotation::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().
void AP_Preview_Annotation::ConstructWindowName | ( | void | ) | [protected] |
void AP_Preview_Annotation::draw | ( | const UT_Rect * | clip = NULL |
) | [virtual] |
Reimplemented in AP_Win32Preview_Annotation.
References clearScreen(), GR_Painter::drawChars(), GR_Painter::drawLine(), GR_Graphics::findFont(), GR_Graphics::getFontAscent(), GR_Graphics::getFontDescent(), GR_Graphics::getFontHeight(), XAP_Preview::getWindowHeight(), XAP_Preview::getWindowWidth(), m_clrBackground, m_drawString, XAP_Preview::m_gc, m_iAscent, m_iDescent, m_iHeight, m_pFont, m_sDescription, GR_Graphics::setColor(), GR_Graphics::setFont(), UT_UCS4String::size(), GR_Graphics::tlu(), UT_UCS4String::ucs4_str(), UT_ASSERT_HARMLESS, UT_return_if_fail, and UT_UNUSED.
Referenced by Defun().
UT_uint32 AP_Preview_Annotation::getAnnotationID | ( | ) | const [inline] |
const std::string& AP_Preview_Annotation::getAuthor | ( | void | ) | const [inline] |
Referenced by AP_Win32Preview_Annotation::_createToolTip().
const std::string& AP_Preview_Annotation::getDescription | ( | ) | const [inline] |
Referenced by AP_Win32Preview_Annotation::_createToolTip().
const std::string& AP_Preview_Annotation::getTitle | ( | void | ) | const [inline] |
Referenced by AP_Win32Preview_Annotation::_createToolTip().
void AP_Preview_Annotation::setActiveFrame | ( | XAP_Frame * | pFrame | ) | [virtual] |
Reimplemented from XAP_Dialog_Modeless.
References XAP_Dialog_Modeless::notifyActiveFrame(), and UT_DEBUGMSG.
Referenced by AP_Win32Preview_Annotation::runModeless(), and AP_UnixPreview_Annotation::runModeless().
void AP_Preview_Annotation::setAuthor | ( | const gchar * | pAuthor | ) |
References m_sAuthor, and UT_return_if_fail.
Referenced by Defun().
void AP_Preview_Annotation::setAuthor | ( | const std::string & | sAuthor | ) | [inline] |
void AP_Preview_Annotation::setDescription | ( | const std::string & | sDescription | ) | [inline] |
void AP_Preview_Annotation::setDescription | ( | const gchar * | pDescription | ) |
References m_sDescription, and UT_return_if_fail.
Referenced by Defun().
void AP_Preview_Annotation::setOffset | ( | UT_sint32 | offset | ) |
In Gtk Apps it is really hard to translate the position of the popup window to the actual position of the run. In insead use the location of the mouse when it crosses the run. If induces a vertical uncertainty in here the popup appears. Setting this offset corrects for this.
References m_Offset.
Referenced by Defun().
void AP_Preview_Annotation::setSizeFromAnnotation | ( | void | ) |
This method sets the height and width of the preview from the size of the comment in the annotation.
References GR_Graphics::findFont(), XAP_Dialog_Modeless::getActiveFrame(), XAP_Frame::getCurrentView(), GR_Graphics::getFontAscent(), FV_View::getGraphics(), AV_View::getWindowWidth(), GR_Graphics::getZoomPercentage(), m_drawString, m_height, m_sDescription, m_width, GR_Graphics::measureString(), GR_Graphics::setFont(), UT_UCS4String::size(), GR_Graphics::tdu(), GR_Graphics::tlu(), UT_UCS4String::ucs4_str(), UT_DEBUGMSG, and UT_return_if_fail.
Referenced by AP_UnixPreview_Annotation::runModeless().
void AP_Preview_Annotation::setTitle | ( | const std::string & | sTitle | ) | [inline] |
void AP_Preview_Annotation::setTitle | ( | const gchar * | pTitle | ) |
References m_sTitle, and UT_return_if_fail.
Referenced by Defun().
Set the left and top positions of the popup. These are the mouse coordinates in device units.c - This is ignored by the unix FE
References m_left, m_top, m_width, and UT_DEBUGMSG.
Referenced by Defun().
UT_RGBColor AP_Preview_Annotation::m_clrBackground [protected] |
Referenced by clearScreen(), and draw().
Referenced by draw(), and setSizeFromAnnotation().
UT_sint32 AP_Preview_Annotation::m_height [protected] |
UT_uint32 AP_Preview_Annotation::m_iAID [private] |
Referenced by setAnnotationID().
UT_sint32 AP_Preview_Annotation::m_iAscent [private] |
Referenced by draw().
UT_sint32 AP_Preview_Annotation::m_iDescent [private] |
Referenced by draw().
UT_sint32 AP_Preview_Annotation::m_iHeight [private] |
Referenced by draw().
UT_sint32 AP_Preview_Annotation::m_left [protected] |
Referenced by AP_UnixPreview_Annotation::_constructWindow(), and setXY().
UT_sint32 AP_Preview_Annotation::m_Offset [protected] |
Referenced by AP_UnixPreview_Annotation::_constructWindow(), and setOffset().
GR_Font* AP_Preview_Annotation::m_pFont [private] |
Referenced by draw().
std::string AP_Preview_Annotation::m_sAuthor [private] |
Referenced by setAuthor().
std::string AP_Preview_Annotation::m_sDescription [private] |
Referenced by draw(), setDescription(), and setSizeFromAnnotation().
std::string AP_Preview_Annotation::m_sTitle [private] |
Referenced by setTitle().
UT_sint32 AP_Preview_Annotation::m_top [protected] |
Referenced by AP_UnixPreview_Annotation::_constructWindow(), and setXY().
UT_sint32 AP_Preview_Annotation::m_width [protected] |