Public Types | Public Member Functions | Static Public Member Functions | Private Attributes

fp_PageSize Class Reference

#include <fp_PageSize.h>

List of all members.

Public Types

enum  Predefined {
  _first_predefined_pagesize_ = 0, psA0 = 0, psA1, psA2,
  psA3, psA4, psA5, psA6,
  psA7, psA8, psA9, psA10,
  psB0, psB1, psB2, psB3,
  psB4, psB5, psB6, psB7,
  psB8, psB9, psB10, psC0,
  psC1, psC2, psC3, psC4,
  psC5, psC6, psC7, psC8,
  psC9, psC10, psLegal, psFolio,
  psLetter, ps1_3A4, ps1_4A4, ps1_8A4,
  ps1_4A3, ps1_3A5, psEnvelope_DL, psEnvelope_C6_C5,
  psEnvelope_no10, psEnvelope_6x9, psCustom, _last_predefined_pagesize_dont_use_
}

Public Member Functions

 fp_PageSize (Predefined preDef)
 fp_PageSize (const char *name)
 fp_PageSize (double w, double h, UT_Dimension u)
fp_PageSizeoperator= (fp_PageSize &rhs)
fp_PageSizeoperator= (const fp_PageSize &rhs)
bool match (double x, double y)
void Set (Predefined preDef, UT_Dimension u=DIM_none)
void Set (const char *name, UT_Dimension u=DIM_none)
void Set (double w, double h, UT_Dimension u=DIM_none)
void Set (UT_Dimension u)
bool Set (const PP_PropertyVector &attributes)
void setScale (double scale)
void setPortrait (void)
void setLandscape (void)
bool isPortrait (void) const
double Width (UT_Dimension u) const
double Height (UT_Dimension u) const
double getScale (void) const
UT_Dimension getDims (void) const
const char * getPredefinedName (void) const

Static Public Member Functions

static UT_UTF8String getDefaultPageMargin (UT_Dimension dim)
static bool IsPredefinedName (const char *szPageSizeName)
static Predefined NameToPredefined (const char *name)
static const char * PredefinedToName (Predefined preDef)
static int PredefinedToLocalName (Predefined preDef)

Private Attributes

const char * m_predefined
double m_iWidth
double m_iHeight
bool m_bisPortrait
double m_scale
UT_Dimension m_unit

Member Enumeration Documentation

Enumerator:
_first_predefined_pagesize_ 
psA0 
psA1 
psA2 
psA3 
psA4 
psA5 
psA6 
psA7 
psA8 
psA9 
psA10 
psB0 
psB1 
psB2 
psB3 
psB4 
psB5 
psB6 
psB7 
psB8 
psB9 
psB10 
psC0 
psC1 
psC2 
psC3 
psC4 
psC5 
psC6 
psC7 
psC8 
psC9 
psC10 
psLegal 
psFolio 
psLetter 
ps1_3A4 
ps1_4A4 
ps1_8A4 
ps1_4A3 
ps1_3A5 
psEnvelope_DL 
psEnvelope_C6_C5 
psEnvelope_no10 
psEnvelope_6x9 
psCustom 
_last_predefined_pagesize_dont_use_ 

Constructor & Destructor Documentation

fp_PageSize::fp_PageSize ( Predefined  preDef  ) 

References m_bisPortrait, m_scale, psA4, psCustom, and Set().

fp_PageSize::fp_PageSize ( const char *  name  ) 
fp_PageSize::fp_PageSize ( double  w,
double  h,
UT_Dimension  u 
)

Member Function Documentation

UT_UTF8String fp_PageSize::getDefaultPageMargin ( UT_Dimension  dim  )  [static]
UT_Dimension fp_PageSize::getDims ( void   )  const [inline]
const char* fp_PageSize::getPredefinedName ( void   )  const [inline]
double fp_PageSize::getScale ( void   )  const [inline]
double fp_PageSize::Height ( UT_Dimension  u  )  const
bool fp_PageSize::isPortrait ( void   )  const [inline]
bool fp_PageSize::IsPredefinedName ( const char *  szPageSizeName  )  [static]
bool fp_PageSize::match ( double  x,
double  y 
)

Take account of the 12 digit precision is double precision numbers.

Referenced by AP_UnixDialog_PageSetup::_setHeight(), AP_UnixDialog_PageSetup::_setWidth(), and Set().

fp_PageSize::Predefined fp_PageSize::NameToPredefined ( const char *  name  )  [static]
fp_PageSize & fp_PageSize::operator= ( fp_PageSize rhs  ) 
fp_PageSize & fp_PageSize::operator= ( const fp_PageSize rhs  ) 
int fp_PageSize::PredefinedToLocalName ( Predefined  preDef  )  [static]
const char * fp_PageSize::PredefinedToName ( Predefined  preDef  )  [static]
void fp_PageSize::Set ( UT_Dimension  u  )  [inline]
void fp_PageSize::Set ( Predefined  preDef,
UT_Dimension  u = DIM_none 
)
void fp_PageSize::Set ( const char *  name,
UT_Dimension  u = DIM_none 
)

References NameToPredefined(), and Set().

void fp_PageSize::Set ( double  w,
double  h,
UT_Dimension  u = DIM_none 
)

Set the pagesize to given width and height, assumed to be in given unit.

References _first_predefined_pagesize_, _last_predefined_pagesize_dont_use_, DIM_IN, DIM_none, FUND, m_bisPortrait, m_iHeight, m_iWidth, m_unit, match(), pagesizes, Set(), UT_ASSERT, and UT_convertDimensions().

bool fp_PageSize::Set ( const PP_PropertyVector attributes  ) 

Set all pagesize parameters via const gchar attributes

References ASSERT_PV_SIZE, FUND, m_iHeight, m_iWidth, Set(), setLandscape(), setPortrait(), setScale(), UT_convertDimensionless(), and UT_DEBUGMSG.

void fp_PageSize::setLandscape ( void   ) 
void fp_PageSize::setPortrait ( void   ) 
void fp_PageSize::setScale ( double  scale  )  [inline]
double fp_PageSize::Width ( UT_Dimension  u  )  const

References DIM_IN, DIM_none, FUND, m_bisPortrait, m_iHeight, m_iWidth, m_scale, UT_ASSERT, and UT_convertDimensions().

Referenced by IE_Imp_MsWord_97::_beginSect(), FV_Base::_checkDimensions(), AP_UnixDialog_PageSetup::_constructWindow(), s_RTF_ListenerWriteDoc::_getColumnWidthInches(), s_XSL_FO_Listener::_handlePageSize(), s_KWord_1_Listener::_handlePageSize(), s_AbiWord_1_Listener::_handlePageSize(), AP_Win32Dialog_PageSetup_Page::_onCommand(), IE_Exp_HTML_Listener::_openSection(), s_RTF_ListenerWriteDoc::_rtf_docfmt(), FL_DocLayout::_setDocPageDimensions(), AP_UnixDialog_PageSetup::_setHeight(), IE_Exp_Cairo::_writeDocument(), AP_Preview_Abi::AP_Preview_Abi(), FV_View::calculateZoomPercentForPageWidth(), PD_Document::convertPercentToInches(), Defun1(), XAP_UnixFrameImpl::_fe::do_ZoomUpdate(), AP_Win32Dialog_PageSetup_Page::doSpinControl(), AP_UnixDialog_PageSetup::event_OK(), AP_UnixDialog_PageSetup::event_PageSizeChanged(), AP_UnixDialog_PageSetup::event_PageUnitsChanged(), ODe_Style_PageLayout::fetchAttributesFromAbiDoc(), fl_DocSectionLayout::getActualColumnWidth(), FV_FrameEdit::getFrameStrings(), AP_Dialog_Columns::getPageWidth(), FV_View::getTopRulerInfo(), fl_DocSectionLayout::getWidth(), FV_VisualInlineImage::mouseRelease(), AP_Frame::quickZoom(), XAP_Win32Dialog_PrintPreview::runModal(), AP_CocoaDialog_PageSetup::runModal, IE_Exp_OpenXML_Listener::setPageSize(), XAP_UnixDialog_Print::setupPrint(), IE_Imp_RTF::TranslateKeywordID(), FL_DocLayout::updateOnViewModeChange(), AP_Win32Dialog_PageSetup::updatePreview(), AP_Win32Dialog_PageSetup::updateWidth(), and AP_Dialog_PageSetup::validatePageSettings().


Member Data Documentation

double fp_PageSize::m_iHeight [private]

Referenced by Height(), operator=(), Set(), and Width().

double fp_PageSize::m_iWidth [private]

Referenced by Height(), operator=(), Set(), and Width().

const char* fp_PageSize::m_predefined [private]

Referenced by operator=(), and Set().

double fp_PageSize::m_scale [private]

Referenced by fp_PageSize(), Height(), operator=(), and Width().

Referenced by operator=(), and Set().


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