#include <ap_UnixDialog_PageSetup.h>
Public Member Functions | |
AP_UnixDialog_PageSetup (XAP_DialogFactory *pDlgFactory, XAP_Dialog_Id id) | |
virtual | ~AP_UnixDialog_PageSetup (void) |
virtual void | runModal (XAP_Frame *pFrame) |
virtual void | event_OK (void) |
virtual void | event_Cancel (void) |
virtual void | event_PageSizeChanged (fp_PageSize::Predefined pageSize) |
virtual void | event_PageUnitsChanged () |
virtual void | event_MarginUnitsChanged () |
void | event_LandscapeChanged (void) |
void | doWidthEntry (void) |
void | doHeightEntry (void) |
Static Public Member Functions | |
static XAP_Dialog * | static_constructor (XAP_DialogFactory *, XAP_Dialog_Id id) |
Protected Types | |
enum | ResponseId { BUTTON_OK = GTK_RESPONSE_OK, BUTTON_CANCEL = GTK_RESPONSE_CANCEL } |
Protected Member Functions | |
virtual GtkWidget * | _constructWindow (void) |
virtual void | _connectSignals (void) |
GtkWidget * | _getWidget (const char *szNameBase, UT_sint32 level=0) |
Protected Attributes | |
GtkWidget * | m_window |
GtkWidget * | m_wHelp |
GtkBuilder * | m_pBuilder |
Private Member Functions | |
void | _setWidth (const char *buf) |
void | _setHeight (const char *buf) |
void | _updatePageSizeList () |
Private Attributes | |
GtkWidget * | m_comboPageSize |
GtkWidget * | m_entryPageWidth |
GtkWidget * | m_entryPageHeight |
GtkWidget * | m_optionPageUnits |
GtkWidget * | m_radioPagePortrait |
GtkWidget * | m_radioPageLandscape |
GtkWidget * | m_spinPageScale |
GtkWidget * | m_optionMarginUnits |
GtkWidget * | m_spinMarginTop |
GtkWidget * | m_spinMarginBottom |
GtkWidget * | m_spinMarginLeft |
GtkWidget * | m_spinMarginRight |
GtkWidget * | m_spinMarginHeader |
GtkWidget * | m_spinMarginFooter |
GtkWidget * | customPreview |
GtkWidget * | m_PageHbox |
GtkWidget * | m_MarginHbox |
guint | m_iEntryPageWidthID |
guint | m_iEntryPageHeightID |
guint | m_iComboPageSizeListID |
XAP_Frame * | m_pFrame |
fp_PageSize | m_PageSize |
enum AP_UnixDialog_PageSetup::ResponseId [protected] |
AP_UnixDialog_PageSetup::AP_UnixDialog_PageSetup | ( | XAP_DialogFactory * | pDlgFactory, | |
XAP_Dialog_Id | id | |||
) |
Referenced by static_constructor().
AP_UnixDialog_PageSetup::~AP_UnixDialog_PageSetup | ( | void | ) | [virtual] |
References m_pBuilder.
void AP_UnixDialog_PageSetup::_connectSignals | ( | void | ) | [protected, virtual] |
References m_entryPageHeight, m_entryPageWidth, m_iEntryPageHeightID, m_iEntryPageWidthID, m_optionMarginUnits, m_optionPageUnits, m_radioPageLandscape, s_entryPageHeight_changed(), s_entryPageWidth_changed(), s_Landscape_changed(), s_margin_units_changed(), and s_page_units_changed().
Referenced by _constructWindow().
GtkWidget * AP_UnixDialog_PageSetup::_constructWindow | ( | void | ) | [protected, virtual] |
References _, _connectSignals(), fp_PageSize::_first_predefined_pagesize_, _getWidget(), abiAddButton(), abiDialogSetTitle(), BUTTON_CANCEL, BUTTON_OK, create_pixmap(), customPreview, DIM_CM, DIM_IN, DIM_MM, XAP_App::getStringSet(), XAP_StringSet::getValue(), XAP_StringSet::getValueUTF8(), fp_PageSize::Height(), last_margin_unit, m_comboPageSize, m_entryPageHeight, m_entryPageWidth, m_iComboPageSizeListID, m_MarginHbox, m_optionMarginUnits, m_optionPageUnits, m_PageHbox, m_PageSize, XAP_Dialog::m_pApp, m_pBuilder, m_radioPageLandscape, m_radioPagePortrait, m_spinMarginBottom, m_spinMarginFooter, m_spinMarginHeader, m_spinMarginLeft, m_spinMarginRight, m_spinMarginTop, m_spinPageScale, m_wHelp, m_window, Markup(), newDialogBuilder(), AP_Dialog_PageSetup::PORTRAIT, fp_PageSize::PredefinedToLocalName(), s, s_page_size_changed(), fp_PageSize::setLandscape(), fp_PageSize::Width(), XAP_appendComboBoxTextAndInt(), XAP_comboBoxSetActiveFromIntCol(), and XAP_makeGtkComboBoxText().
Referenced by runModal().
GtkWidget * AP_UnixDialog_PageSetup::_getWidget | ( | const char * | szNameBase, | |
UT_sint32 | level = 0 | |||
) | [protected] |
References UT_String::c_str(), m_pBuilder, UT_return_val_if_fail, and UT_String_sprintf().
Referenced by _constructWindow().
void AP_UnixDialog_PageSetup::_setHeight | ( | const char * | buf | ) | [private] |
References fp_PageSize::isPortrait(), m_PageSize, fp_PageSize::match(), fp_PageSize::Set(), and fp_PageSize::Width().
Referenced by doHeightEntry(), event_LandscapeChanged(), and event_PageSizeChanged().
void AP_UnixDialog_PageSetup::_setWidth | ( | const char * | buf | ) | [private] |
References fp_PageSize::Height(), fp_PageSize::isPortrait(), m_PageSize, fp_PageSize::match(), and fp_PageSize::Set().
Referenced by doWidthEntry(), event_LandscapeChanged(), and event_PageSizeChanged().
void AP_UnixDialog_PageSetup::_updatePageSizeList | ( | void | ) | [private] |
References fp_PageSize::getPredefinedName(), m_comboPageSize, m_iComboPageSizeListID, m_PageSize, fp_PageSize::NameToPredefined(), and UT_DEBUGMSG.
Referenced by doHeightEntry(), doWidthEntry(), and runModal().
void AP_UnixDialog_PageSetup::doHeightEntry | ( | void | ) |
References _setHeight(), _updatePageSizeList(), m_entryPageHeight, m_iEntryPageHeightID, m_PageSize, fp_PageSize::psCustom, fp_PageSize::Set(), and UT_UTF8String::utf8_str().
Referenced by s_entryPageHeight_changed().
void AP_UnixDialog_PageSetup::doWidthEntry | ( | void | ) |
References _setWidth(), _updatePageSizeList(), m_entryPageWidth, m_iEntryPageWidthID, m_PageSize, fp_PageSize::psCustom, fp_PageSize::Set(), and UT_UTF8String::utf8_str().
Referenced by s_entryPageWidth_changed().
void AP_UnixDialog_PageSetup::event_Cancel | ( | void | ) | [virtual] |
References AP_Dialog_PageSetup::a_CANCEL, and AP_Dialog_PageSetup::setAnswer().
Referenced by runModal().
void AP_UnixDialog_PageSetup::event_LandscapeChanged | ( | void | ) |
References _setHeight(), _setWidth(), create_pixmap(), customPreview, m_entryPageHeight, m_entryPageWidth, m_iEntryPageHeightID, m_iEntryPageWidthID, m_PageHbox, and m_radioPageLandscape.
Referenced by s_Landscape_changed().
void AP_UnixDialog_PageSetup::event_MarginUnitsChanged | ( | void | ) | [virtual] |
void AP_UnixDialog_PageSetup::event_OK | ( | void | ) | [virtual] |
References AP_Dialog_PageSetup::a_CANCEL, AP_Dialog_PageSetup::a_OK, XAP_Dialog_MessageBox::a_OK, XAP_Dialog_MessageBox::b_O, DIM_IN, fp_PageSize::Height(), AP_Dialog_PageSetup::LANDSCAPE, last_margin_unit, m_PageSize, m_pFrame, m_radioPagePortrait, m_spinMarginBottom, m_spinMarginFooter, m_spinMarginHeader, m_spinMarginLeft, m_spinMarginRight, m_spinMarginTop, m_spinPageScale, AP_Dialog_PageSetup::PORTRAIT, AP_Dialog_PageSetup::setAnswer(), XAP_Frame::showMessageBox(), AP_Dialog_PageSetup::validatePageSettings(), and fp_PageSize::Width().
Referenced by runModal().
void AP_UnixDialog_PageSetup::event_PageSizeChanged | ( | fp_PageSize::Predefined | pageSize | ) | [virtual] |
References _setHeight(), _setWidth(), dim, FMT_STRING, gchar, fp_PageSize::getDims(), fp_PageSize::Height(), m_entryPageHeight, m_entryPageWidth, m_iEntryPageHeightID, m_iEntryPageWidthID, m_optionPageUnits, m_PageSize, m_radioPagePortrait, fp_PageSize::Set(), fp_PageSize::setLandscape(), fp_PageSize::Width(), XAP_comboBoxGetActiveInt(), and XAP_comboBoxSetActiveFromIntCol().
Referenced by s_page_size_changed().
void AP_UnixDialog_PageSetup::event_PageUnitsChanged | ( | void | ) | [virtual] |
References FMT_STRING, gchar, fp_PageSize::Height(), fp_PageSize::isPortrait(), m_entryPageHeight, m_entryPageWidth, m_iEntryPageHeightID, m_iEntryPageWidthID, m_optionPageUnits, m_PageSize, fp_PageSize::Set(), fp_PageSize::Width(), and XAP_comboBoxGetActiveInt().
Referenced by s_page_units_changed().
void AP_UnixDialog_PageSetup::runModal | ( | XAP_Frame * | pFrame | ) | [virtual] |
Implements AP_Dialog_PageSetup.
References _constructWindow(), _updatePageSizeList(), abiDestroyWidget(), abiRunModalDialog(), BUTTON_CANCEL, BUTTON_OK, event_Cancel(), event_OK(), m_PageSize, m_pFrame, and UT_return_if_fail.
XAP_Dialog * AP_UnixDialog_PageSetup::static_constructor | ( | XAP_DialogFactory * | pFactory, | |
XAP_Dialog_Id | id | |||
) | [static] |
References AP_UnixDialog_PageSetup().
GtkWidget* AP_UnixDialog_PageSetup::customPreview [private] |
Referenced by _constructWindow(), and event_LandscapeChanged().
GtkWidget* AP_UnixDialog_PageSetup::m_comboPageSize [private] |
Referenced by _constructWindow(), and _updatePageSizeList().
GtkWidget* AP_UnixDialog_PageSetup::m_entryPageHeight [private] |
GtkWidget* AP_UnixDialog_PageSetup::m_entryPageWidth [private] |
guint AP_UnixDialog_PageSetup::m_iComboPageSizeListID [private] |
Referenced by _constructWindow(), and _updatePageSizeList().
guint AP_UnixDialog_PageSetup::m_iEntryPageHeightID [private] |
Referenced by _connectSignals(), doHeightEntry(), event_LandscapeChanged(), event_PageSizeChanged(), and event_PageUnitsChanged().
guint AP_UnixDialog_PageSetup::m_iEntryPageWidthID [private] |
Referenced by _connectSignals(), doWidthEntry(), event_LandscapeChanged(), event_PageSizeChanged(), and event_PageUnitsChanged().
GtkWidget* AP_UnixDialog_PageSetup::m_MarginHbox [private] |
Referenced by _constructWindow().
GtkWidget* AP_UnixDialog_PageSetup::m_optionMarginUnits [private] |
Referenced by _connectSignals(), _constructWindow(), and event_MarginUnitsChanged().
GtkWidget* AP_UnixDialog_PageSetup::m_optionPageUnits [private] |
Referenced by _connectSignals(), _constructWindow(), event_PageSizeChanged(), and event_PageUnitsChanged().
GtkWidget* AP_UnixDialog_PageSetup::m_PageHbox [private] |
Referenced by _constructWindow(), and event_LandscapeChanged().
Reimplemented from AP_Dialog_PageSetup.
Referenced by _constructWindow(), _setHeight(), _setWidth(), _updatePageSizeList(), doHeightEntry(), doWidthEntry(), event_OK(), event_PageSizeChanged(), event_PageUnitsChanged(), and runModal().
GtkBuilder* AP_UnixDialog_PageSetup::m_pBuilder [protected] |
Referenced by _constructWindow(), _getWidget(), and ~AP_UnixDialog_PageSetup().
XAP_Frame* AP_UnixDialog_PageSetup::m_pFrame [private] |
Reimplemented from AP_Dialog_PageSetup.
Referenced by event_OK(), and runModal().
GtkWidget* AP_UnixDialog_PageSetup::m_radioPageLandscape [private] |
Referenced by _connectSignals(), _constructWindow(), and event_LandscapeChanged().
GtkWidget* AP_UnixDialog_PageSetup::m_radioPagePortrait [private] |
Referenced by _constructWindow(), event_OK(), and event_PageSizeChanged().
GtkWidget* AP_UnixDialog_PageSetup::m_spinMarginBottom [private] |
Referenced by _constructWindow(), event_MarginUnitsChanged(), and event_OK().
GtkWidget* AP_UnixDialog_PageSetup::m_spinMarginFooter [private] |
Referenced by _constructWindow(), event_MarginUnitsChanged(), and event_OK().
GtkWidget* AP_UnixDialog_PageSetup::m_spinMarginHeader [private] |
Referenced by _constructWindow(), event_MarginUnitsChanged(), and event_OK().
GtkWidget* AP_UnixDialog_PageSetup::m_spinMarginLeft [private] |
Referenced by _constructWindow(), event_MarginUnitsChanged(), and event_OK().
GtkWidget* AP_UnixDialog_PageSetup::m_spinMarginRight [private] |
Referenced by _constructWindow(), event_MarginUnitsChanged(), and event_OK().
GtkWidget* AP_UnixDialog_PageSetup::m_spinMarginTop [private] |
Referenced by _constructWindow(), event_MarginUnitsChanged(), and event_OK().
GtkWidget* AP_UnixDialog_PageSetup::m_spinPageScale [private] |
Referenced by _constructWindow(), and event_OK().
GtkWidget* AP_UnixDialog_PageSetup::m_wHelp [protected] |
Referenced by _constructWindow().
GtkWidget* AP_UnixDialog_PageSetup::m_window [protected] |
Referenced by _constructWindow().