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

AP_Dialog_Columns Class Reference

#include <ap_Dialog_Columns.h>

Inheritance diagram for AP_Dialog_Columns:
XAP_Dialog_NonPersistent XAP_Dialog AP_CocoaDialog_Columns AP_UnixDialog_Columns AP_Win32Dialog_Columns

List of all members.

Public Types

enum  tAnswer { a_OK, a_CANCEL }

Public Member Functions

 AP_Dialog_Columns (XAP_DialogFactory *pDlgFactory, XAP_Dialog_Id id)
virtual ~AP_Dialog_Columns (void)
virtual void runModal (XAP_Frame *pFrame)=0
virtual void enableLineBetweenControl (bool bState=true)=0
void setColumns (UT_uint32 iColumns)
AP_Dialog_Columns::tAnswer getAnswer (void) const
UT_uint32 getColumns (void) const
void setLineBetween (bool bState)
bool getLineBetween (void) const
double getMaxHeightPercent (void)
double getSpaceAfterPercent (void)
void setColumnOrder (UT_uint32 iOrder)
UT_uint32 getColumnOrder (void) const
const char * getHeightString (void)
const char * getSpaceAfterString (void)
bool isSpaceAfterChanged (void) const
bool isMaxHeightChanged (void) const

Protected Member Functions

void _createPreviewFromGC (GR_Graphics *gc, UT_uint32 width, UT_uint32 height)
void _drawColumnButton (GR_Graphics *gc, UT_Rect rect, UT_uint32 iColumns)
void _convertToPreferredUnits (XAP_Frame *pFrame, const char *sz, gchar *pRet)
void incrementMaxHeight (bool bIncrement)
void incrementSpaceAfter (bool bIncrement)
double getIncrement (const char *sz)
void setViewAndDoc (XAP_Frame *pFrame)
double getPageWidth (void)
double getPageHeight (void)
void setMaxHeight (const char *szHeight)
void setSpaceAfter (const char *szAfter)

Protected Attributes

AP_Dialog_Columns::tAnswer m_answer
AP_Columns_previewm_pColumnsPreview
AP_Columns_preview_drawer m_previewDrawer

Private Attributes

UT_uint32 m_iColumns
bool m_bLineBetween
UT_uint32 m_iColumnOrder
UT_String m_HeightString
UT_String m_SpaceAfterString
PD_Documentm_pDoc
FV_Viewm_pView
bool m_bSpaceAfterChanged
bool m_bMaxHeightChanged
double m_dMarginTop
double m_dMarginBottom
double m_dMarginLeft
double m_dMarginRight

Member Enumeration Documentation

Enumerator:
a_OK 
a_CANCEL 

Constructor & Destructor Documentation

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

References DELETEP, and m_pColumnsPreview.


Member Function Documentation

void AP_Dialog_Columns::_convertToPreferredUnits ( XAP_Frame pFrame,
const char *  sz,
gchar *  pRet 
) [protected]

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

Parameters:
XAP_Frame * pFrame defined the frame of the application
const char * sz is the string containing the old value
const gchar * pRet is the string to which the new value is copied.

References AP_PREF_KEY_RulerUnits, gchar, XAP_App::getApp(), UT_determineDimension(), and UT_reformatDimensionString().

Referenced by setViewAndDoc().

void AP_Dialog_Columns::_drawColumnButton ( GR_Graphics gc,
UT_Rect  rect,
UT_uint32  iColumns 
) [protected]
virtual void AP_Dialog_Columns::enableLineBetweenControl ( bool  bState = true  )  [pure virtual]
AP_Dialog_Columns::tAnswer AP_Dialog_Columns::getAnswer ( void   )  const

References m_answer.

Referenced by Defun().

UT_uint32 AP_Dialog_Columns::getColumnOrder ( void   )  const [inline]
const char * AP_Dialog_Columns::getHeightString ( void   ) 
double AP_Dialog_Columns::getIncrement ( const char *  sz  )  [protected]

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 incrementMaxHeight(), and incrementSpaceAfter().

bool AP_Dialog_Columns::getLineBetween ( void   )  const [inline]
double AP_Dialog_Columns::getMaxHeightPercent ( void   ) 

Returns the 100* the fraction of the total page height in the Maximum height string.

References getHeightString(), getPageHeight(), and UT_convertToInches().

Referenced by AP_Columns_preview::draw().

double AP_Dialog_Columns::getPageHeight ( void   )  [protected]

Returns the current height of the document page.

Returns:
UT_sint32 height of page in inches

References DIM_IN, fp_PageSize::Height(), m_dMarginBottom, m_dMarginTop, PD_Document::m_docPageSize, and m_pDoc.

Referenced by AP_UnixDialog_Columns::_constructWindowContents(), getMaxHeightPercent(), and getSpaceAfterPercent().

double AP_Dialog_Columns::getPageWidth ( void   )  [protected]

Returns the current width of the document page.

Returns:
UT_sint32 width of page in inches

References DIM_IN, m_dMarginLeft, m_dMarginRight, PD_Document::m_docPageSize, m_pDoc, and fp_PageSize::Width().

Referenced by AP_UnixDialog_Columns::_constructWindowContents().

double AP_Dialog_Columns::getSpaceAfterPercent ( void   ) 

Returns the 100* the fraction of the total page height in space after.

References getPageHeight(), getSpaceAfterString(), and UT_convertToInches().

Referenced by AP_Columns_preview::draw().

bool AP_Dialog_Columns::isMaxHeightChanged ( void   )  const [inline]

Referenced by Defun().

bool AP_Dialog_Columns::isSpaceAfterChanged ( void   )  const [inline]

Referenced by Defun().

virtual void AP_Dialog_Columns::runModal ( XAP_Frame pFrame  )  [pure virtual]
void AP_Dialog_Columns::setColumnOrder ( UT_uint32  iOrder  ) 
void AP_Dialog_Columns::setMaxHeight ( const char *  szHeight  )  [protected]
void AP_Dialog_Columns::setSpaceAfter ( const char *  szAfter  )  [protected]
void AP_Dialog_Columns::setViewAndDoc ( XAP_Frame pFrame  )  [protected]

Member Data Documentation

Referenced by getPageWidth(), and setViewAndDoc().

Referenced by getPageHeight(), and setViewAndDoc().


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