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

XAP_Dialog_Image Class Reference

#include <xap_Dlg_Image.h>

Inheritance diagram for XAP_Dialog_Image:
XAP_Dialog_NonPersistent XAP_Dialog XAP_UnixDialog_Image XAP_Win32Dialog_Image

List of all members.

Public Types

enum  tAnswer { a_OK, a_Cancel }

Public Member Functions

 XAP_Dialog_Image (XAP_DialogFactory *pDlgFactory, XAP_Dialog_Id id)
virtual ~XAP_Dialog_Image (void)
virtual void runModal (XAP_Frame *pFrame)=0
void setWrapping (WRAPPING_TYPE iWrap)
void setPositionTo (POSITION_TO iPos)
bool isInHdrFtr (void)
void setInHdrFtr (bool b)
WRAPPING_TYPE getWrapping (void) const
POSITION_TO getPositionTo (void) const
double getWidth () const
double getHeight () const
bool getPreserveAspect () const
void setWidth (double w)
void setHeight (double h)
void setPreserveAspect (bool b)
void setWidth (UT_sint32 w)
void setHeight (UT_sint32 h)
void setMaxHeight (double h)
void setMaxWidth (double w)
double getMaxWidth () const
double getMaxHeight () const
tAnswer getAnswer () const
const char * getHeightString (void)
const char * getWidthString (void)
double getIncrement (const char *sz)
void incrementHeight (bool bIncrement)
void incrementWidth (bool bIncrement)
void setHeight (const char *szHeight)
void setWidth (const char *szWidth)
UT_Dimension getPreferedUnits (void)
void setPreferedUnits (UT_Dimension dim)
void setTightWrap (bool bTight)
bool isTightWrap (void)
void setTitle (const UT_UTF8String &title)
const UT_UTF8StringgetTitle () const
void setDescription (const UT_UTF8String &description)
const UT_UTF8StringgetDescription () const

Protected Member Functions

void setAnswer (tAnswer ans)
void _convertToPreferredUnits (const char *sz, UT_String &pRet)

Private Member Functions

void setWidth (double w, bool checkaspect)
void setHeight (double h, bool checkaspect)
void setWidthAndHeight (double wh, bool iswidth)

Private Attributes

bool m_bAspect
double m_width
double m_height
double m_maxWidth
double m_maxHeight
tAnswer m_answer
UT_String m_HeightString
UT_String m_WidthString
bool m_bHeightChanged
bool m_bWidthChanged
UT_Dimension m_PreferedUnits
UT_UTF8String m_title
UT_UTF8String m_description
WRAPPING_TYPE m_iWrappingType
POSITION_TO m_iPositionTo
bool m_bInHdrFtr
bool m_bTightWrap

Member Enumeration Documentation

Enumerator:
a_OK 
a_Cancel 

Constructor & Destructor Documentation

XAP_Dialog_Image::XAP_Dialog_Image ( XAP_DialogFactory pDlgFactory,
XAP_Dialog_Id  id 
)
XAP_Dialog_Image::~XAP_Dialog_Image ( void   )  [virtual]

Member Function Documentation

void XAP_Dialog_Image::_convertToPreferredUnits ( const char *  sz,
UT_String pRet 
) [protected]

Converts the string sz into the units seleced for the ruler.

Parameters:
const char * sz is the strinewheightng containing the old value
UT_String & pRet is the string to which the new value is copied.

References gchar, getPreferedUnits(), and UT_reformatDimensionString().

tAnswer XAP_Dialog_Image::getAnswer ( void   )  const [inline]

Referenced by Defun1(), and s_doFormatImageDlg().

const UT_UTF8String& XAP_Dialog_Image::getDescription (  )  const [inline]
double XAP_Dialog_Image::getHeight (  )  const [inline]
const char * XAP_Dialog_Image::getHeightString ( void   ) 
double XAP_Dialog_Image::getIncrement ( const char *  sz  ) 

Returns the increment associated with the dimension defined in the string.

Parameters:
const char * sz the dimensioned string.
Returns:
double - the increment associated with the dimension in sz

References dim, DIM_CM, DIM_IN, DIM_MM, DIM_PI, DIM_PT, DIM_PX, and UT_determineDimension().

Referenced by incrementHeight(), and incrementWidth().

double XAP_Dialog_Image::getMaxHeight (  )  const [inline]
double XAP_Dialog_Image::getMaxWidth (  )  const [inline]
POSITION_TO XAP_Dialog_Image::getPositionTo ( void   )  const [inline]
UT_Dimension XAP_Dialog_Image::getPreferedUnits ( void   ) 

Returns the current units used for the rulers.

References m_PreferedUnits.

Referenced by _convertToPreferredUnits(), XAP_Win32Dialog_Image::_onCommand(), setHeight(), setWidth(), and setWidthAndHeight().

bool XAP_Dialog_Image::getPreserveAspect (  )  const [inline]
const UT_UTF8String& XAP_Dialog_Image::getTitle (  )  const [inline]
double XAP_Dialog_Image::getWidth (  )  const [inline]
const char * XAP_Dialog_Image::getWidthString ( void   ) 
WRAPPING_TYPE XAP_Dialog_Image::getWrapping ( void   )  const [inline]
void XAP_Dialog_Image::incrementHeight ( bool  bIncrement  ) 
void XAP_Dialog_Image::incrementWidth ( bool  bIncrement  ) 
bool XAP_Dialog_Image::isInHdrFtr ( void   ) 
bool XAP_Dialog_Image::isTightWrap ( void   )  [inline]
virtual void XAP_Dialog_Image::runModal ( XAP_Frame pFrame  )  [pure virtual]
void XAP_Dialog_Image::setAnswer ( tAnswer  ans  )  [inline, protected]
void XAP_Dialog_Image::setDescription ( const UT_UTF8String description  )  [inline]
void XAP_Dialog_Image::setHeight ( UT_sint32  iHeight  ) 

Set the member string variable m_HeightString from the pixel value of the image. This is to set the initial value if it's not defined.

Parameters:
UT_sint32 iHeight is the pixels height of the image.

References setHeight().

void XAP_Dialog_Image::setHeight ( double  dHeight,
bool  checkaspect 
) [private]

Set the member string variable m_HeightString from the a double value of the image.

Parameters:
double dHeight is the height of the image in inches.

References getPreferedUnits(), m_bAspect, m_height, m_HeightString, m_maxHeight, setWidthAndHeight(), and UT_convertInchesToDimensionString().

void XAP_Dialog_Image::setHeight ( double  h  )  [inline]
void XAP_Dialog_Image::setHeight ( const char *  szHeight  ) 

Set the member string variable m_HeightString

Parameters:
const char * szHeight is the string containing the new value

References dim, DIM_none, getHeightString(), m_bHeightChanged, m_HeightString, setHeight(), setPreferedUnits(), UT_convertToInches(), and UT_determineDimension().

void XAP_Dialog_Image::setInHdrFtr ( bool  b  )  [inline]

Referenced by Defun1(), and s_doFormatImageDlg().

void XAP_Dialog_Image::setMaxHeight ( double  h  )  [inline]

Referenced by Defun1(), and s_doFormatImageDlg().

void XAP_Dialog_Image::setMaxWidth ( double  w  )  [inline]

Referenced by Defun1(), and s_doFormatImageDlg().

void XAP_Dialog_Image::setPositionTo ( POSITION_TO  iPos  ) 
void XAP_Dialog_Image::setPreferedUnits ( UT_Dimension  dim  ) 

Sets the prefered units for the dialog.

References m_PreferedUnits.

Referenced by Defun1(), incrementHeight(), incrementWidth(), s_doFormatImageDlg(), setHeight(), and setWidth().

void XAP_Dialog_Image::setPreserveAspect ( bool  b  )  [inline]
void XAP_Dialog_Image::setTightWrap ( bool  bTight  )  [inline]
void XAP_Dialog_Image::setTitle ( const UT_UTF8String title  )  [inline]
void XAP_Dialog_Image::setWidth ( const char *  szWidth  ) 

Set the member string variable m_HeightString

Parameters:
const char * szWidth is the string containing the new value

References dim, DIM_none, getWidthString(), m_bWidthChanged, m_WidthString, setPreferedUnits(), setWidth(), UT_convertToInches(), and UT_determineDimension().

void XAP_Dialog_Image::setWidth ( double  w  )  [inline]
void XAP_Dialog_Image::setWidth ( double  dWidth,
bool  checkaspect 
) [private]

Set the member string variable m_WidthString from the a double value of the image.

Parameters:
double dWidth is the width of the image in inches.

References getPreferedUnits(), m_bAspect, m_maxWidth, m_width, m_WidthString, setWidthAndHeight(), and UT_convertInchesToDimensionString().

void XAP_Dialog_Image::setWidth ( UT_sint32  iWidth  ) 

Set the member string variable m_WidthString from the pixel value of the image. This is to set the initial value if it's not defined.

Parameters:
UT_sint32 iWidth is the pixel width of the string.

References setWidth().

void XAP_Dialog_Image::setWidthAndHeight ( double  wh,
bool  iswidth 
) [private]
void XAP_Dialog_Image::setWrapping ( WRAPPING_TYPE  iWrap  ) 

Member Data Documentation

Reimplemented in XAP_UnixDialog_Image.

Referenced by setHeight(), and setWidth().

Referenced by setHeight().

Referenced by isInHdrFtr().

Referenced by setWidth().

double XAP_Dialog_Image::m_height [private]

Referenced by setHeight(), and setWidthAndHeight().

Referenced by setHeight(), and setWidthAndHeight().

double XAP_Dialog_Image::m_maxWidth [private]

Referenced by setWidth(), and setWidthAndHeight().

double XAP_Dialog_Image::m_width [private]

Referenced by setWidth(), and setWidthAndHeight().


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