Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

XAP_Dialog_FontChooser Class Reference

#include <xap_Dlg_FontChooser.h>

Inheritance diagram for XAP_Dialog_FontChooser:
XAP_Dialog_NonPersistent XAP_Dialog XAP_CocoaDialog_FontChooser XAP_UnixDialog_FontChooser XAP_Win32Dialog_FontChooser

List of all members.

Public Types

enum  tAnswer { a_OK, a_CANCEL, a_YES, a_NO }
typedef std::map< std::string,
std::string > 
PropMap

Public Member Functions

 XAP_Dialog_FontChooser (XAP_DialogFactory *pDlgFactory, XAP_Dialog_Id id)
virtual ~XAP_Dialog_FontChooser (void)
virtual void runModal (XAP_Frame *pFrame)=0
void setDrawString (const UT_UCSChar *str)
const UT_UCSChargetDrawString () const
void addOrReplaceVecProp (const std::string &pszProp, const std::string &pszVal)
void event_previewExposed (const UT_UCSChar *pszChars)
void event_previewClear (void)
std::string getVal (const std::string &sProp) const
void setAllPropsFromVec (const std::vector< std::string > &vProps)
void setGraphicsContext (GR_Graphics *pGraphics)
void setFontFamily (const std::string &sFontFamily)
void setFontSize (const std::string &sFontSize)
void setFontWeight (const std::string &sFontWeight)
void setFontStyle (const std::string &sFontStyle)
void setColor (const std::string &sColor)
void setBGColor (const std::string &sBGColor)
void setFontDecoration (bool bUnderline, bool bOverline, bool bStrikeOut, bool bTopline, bool bBottomline)
void setHidden (bool bHidden)
void setSuperScript (bool bSuperScript)
void setSubScript (bool bSubScript)
void setBackGroundColor (const gchar *pBackGroundColor)
void setTextTransform (const std::string &pTextTransform)
XAP_Dialog_FontChooser::tAnswer getAnswer (void) const
bool didPropChange (const std::string &v1, const std::string &v2) const
bool getChangedTextTransform (std::string &) const
bool getChangedFontFamily (std::string &) const
bool getChangedFontSize (std::string &) const
bool getChangedFontWeight (std::string &) const
bool getChangedFontStyle (std::string &) const
bool getChangedColor (std::string &) const
bool getChangedBGColor (std::string &) const
bool getChangedUnderline (bool *pbUnderline) const
bool getChangedOverline (bool *pbOverline) const
bool getChangedStrikeOut (bool *pbStrikeOut) const
bool getChangedTopline (bool *pbTopline) const
bool getChangedBottomline (bool *pbBottomline) const
bool getChangedHidden (bool *pbHidden) const
bool getChangedSuperScript (bool *pbSuperScript) const
bool getChangedSubScript (bool *pbSubScript) const

Protected Member Functions

void _createFontPreviewFromGC (GR_Graphics *gc, UT_uint32 width, UT_uint32 height)

Protected Attributes

XAP_Dialog_FontChooser::tAnswer m_answer
GR_Graphicsm_pGraphics
std::string m_sColorBackground
std::string m_sFontFamily
std::string m_sFontSize
std::string m_sFontWeight
std::string m_sFontStyle
std::string m_sColor
std::string m_sBGColor
bool m_bUnderline
bool m_bOverline
bool m_bStrikeout
bool m_bTopline
bool m_bBottomline
bool m_bHidden
bool m_bSuperScript
bool m_bSubScript
std::string m_sTextTransform
PropMap m_mapProps
XAP_Preview_FontPreviewm_pFontPreview
bool m_bChangedFontFamily
bool m_bChangedFontSize
bool m_bChangedFontWeight
bool m_bChangedFontStyle
bool m_bChangedColor
bool m_bChangedBGColor
bool m_bChangedUnderline
bool m_bChangedOverline
bool m_bChangedStrikeOut
bool m_bChangedTopline
bool m_bChangedBottomline
bool m_bChangedHidden
bool m_bChangedSuperScript
bool m_bChangedSubScript
bool m_bChangedTextTransform
UT_UCSCharm_drawString

Member Typedef Documentation

typedef std::map<std::string,std::string> XAP_Dialog_FontChooser::PropMap

Member Enumeration Documentation

Enumerator:
a_OK 
a_CANCEL 
a_YES 
a_NO 

Constructor & Destructor Documentation

XAP_Dialog_FontChooser::~XAP_Dialog_FontChooser ( void   )  [virtual]

Member Function Documentation

bool XAP_Dialog_FontChooser::didPropChange ( const std::string &  v1,
const std::string &  v2 
) const

Compare two prop values and gracefully handle the cases of NULL pointers

Referenced by getChangedBGColor(), getChangedColor(), getChangedFontFamily(), getChangedFontSize(), getChangedFontStyle(), getChangedFontWeight(), and getChangedTextTransform().

void XAP_Dialog_FontChooser::event_previewClear ( void   ) 

This method clears the drawing area in the dialog.

References XAP_Preview_FontPreview::clearScreen(), and m_pFontPreview.

Referenced by XAP_CocoaDialog_FontChooser::runModal, and XAP_UnixDialog_FontChooser::updatePreview().

void XAP_Dialog_FontChooser::event_previewExposed ( const UT_UCSChar pszChars  ) 
XAP_Dialog_FontChooser::tAnswer XAP_Dialog_FontChooser::getAnswer ( void   )  const
bool XAP_Dialog_FontChooser::getChangedBGColor ( std::string &  szBGColor  )  const
bool XAP_Dialog_FontChooser::getChangedBottomline ( bool *  pbBottomline  )  const
bool XAP_Dialog_FontChooser::getChangedColor ( std::string &  szColor  )  const
bool XAP_Dialog_FontChooser::getChangedFontFamily ( std::string &  szFontFamily  )  const
bool XAP_Dialog_FontChooser::getChangedFontSize ( std::string &  szFontSize  )  const
bool XAP_Dialog_FontChooser::getChangedFontStyle ( std::string &  szFontStyle  )  const
bool XAP_Dialog_FontChooser::getChangedFontWeight ( std::string &  szFontWeight  )  const
bool XAP_Dialog_FontChooser::getChangedHidden ( bool *  pbHidden  )  const

References m_bChangedHidden, and m_bHidden.

Referenced by s_doFontDlg().

bool XAP_Dialog_FontChooser::getChangedOverline ( bool *  pbOverline  )  const
bool XAP_Dialog_FontChooser::getChangedStrikeOut ( bool *  pbStrikeOut  )  const
bool XAP_Dialog_FontChooser::getChangedSubScript ( bool *  pbSubScript  )  const

References m_bChangedSubScript, and m_bSubScript.

Referenced by s_doFontDlg().

bool XAP_Dialog_FontChooser::getChangedSuperScript ( bool *  pbSuperScript  )  const

References m_bChangedSuperScript, and m_bSuperScript.

Referenced by s_doFontDlg().

bool XAP_Dialog_FontChooser::getChangedTextTransform ( std::string &  szTextTransform  )  const
bool XAP_Dialog_FontChooser::getChangedTopline ( bool *  pbTopline  )  const
bool XAP_Dialog_FontChooser::getChangedUnderline ( bool *  pbUnderline  )  const
const UT_UCSChar* XAP_Dialog_FontChooser::getDrawString (  )  const [inline]
std::string XAP_Dialog_FontChooser::getVal ( const std::string &  sProp  )  const
virtual void XAP_Dialog_FontChooser::runModal ( XAP_Frame pFrame  )  [pure virtual]
void XAP_Dialog_FontChooser::setAllPropsFromVec ( const std::vector< std::string > &  vProps  ) 

This method sets all the local properties from a vector of string Property - Value pairs. This method wipes out all the old values and clears all the bools assciated with them.

References getVal(), m_bBottomline, m_bHidden, m_bOverline, m_bStrikeout, m_bSubScript, m_bSuperScript, m_bTopline, m_bUnderline, m_mapProps, and UT_ASSERT_HARMLESS.

void XAP_Dialog_FontChooser::setBackGroundColor ( const gchar *  pBackGroundColor  ) 
void XAP_Dialog_FontChooser::setBGColor ( const std::string &  sBGColor  ) 
void XAP_Dialog_FontChooser::setColor ( const std::string &  sColor  ) 
void XAP_Dialog_FontChooser::setDrawString ( const UT_UCSChar str  ) 
void XAP_Dialog_FontChooser::setFontFamily ( const std::string &  sFontFamily  ) 
void XAP_Dialog_FontChooser::setFontSize ( const std::string &  sFontSize  ) 
void XAP_Dialog_FontChooser::setFontStyle ( const std::string &  sFontStyle  ) 
void XAP_Dialog_FontChooser::setFontWeight ( const std::string &  sFontWeight  ) 
void XAP_Dialog_FontChooser::setGraphicsContext ( GR_Graphics pGraphics  ) 
void XAP_Dialog_FontChooser::setHidden ( bool  bHidden  ) 
void XAP_Dialog_FontChooser::setTextTransform ( const std::string &  pTextTransform  ) 

References addOrReplaceVecProp(), and m_sTextTransform.

Referenced by s_doFontDlg().


Member Data Documentation

std::string XAP_Dialog_FontChooser::m_sBGColor [protected]

Referenced by getChangedBGColor(), and setBGColor().


The documentation for this class was generated from the following files: