• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

ap_UnixDialog_PageSetup.h

Go to the documentation of this file.
00001 /* AbiWord
00002  * Copyright (C) 2001 AbiSource, Inc.
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017  * 02110-1301 USA.
00018  */
00019 
00020 #ifndef AP_UnixDialog_PageSetup_H
00021 #define AP_UnixDialog_PageSetup_H
00022 
00023 #include <gtk/gtk.h>
00024 #include "ap_Dialog_PageSetup.h"
00025 
00026 class AP_UnixDialog_PageSetup : public AP_Dialog_PageSetup
00027 {
00028 public:
00029     AP_UnixDialog_PageSetup (XAP_DialogFactory *pDlgFactory, XAP_Dialog_Id id);
00030     virtual ~AP_UnixDialog_PageSetup (void);
00031 
00032     virtual void runModal (XAP_Frame *pFrame);
00033 
00034     static XAP_Dialog *     static_constructor(XAP_DialogFactory *, XAP_Dialog_Id id);
00035 
00036     virtual void event_OK (void);
00037     virtual void event_Cancel (void);
00038 
00039     virtual void event_PageSizeChanged (fp_PageSize::Predefined pageSize);
00040     virtual void event_PageUnitsChanged ();
00041     virtual void event_MarginUnitsChanged ();
00042     void event_LandscapeChanged(void);
00043 
00044     void doWidthEntry(void);
00045     void doHeightEntry(void);
00046 
00047  protected:
00048     // construction functions
00049     virtual GtkWidget * _constructWindow (void);
00050     virtual void        _connectSignals (void);
00051     GtkWidget *         _getWidget(const char * szNameBase, UT_sint32 level=0);
00052 
00053     // pointers to all the action items
00054     GtkWidget * m_window;
00055     GtkWidget * m_wHelp;
00056     GtkBuilder * m_pBuilder;
00057 
00058     typedef enum
00059         {
00060             BUTTON_OK = GTK_RESPONSE_OK,
00061             BUTTON_CANCEL = GTK_RESPONSE_CANCEL
00062         } ResponseId ;
00063 
00064  private:
00065     // pointers to widgets that we may need to query
00066     GtkWidget * m_comboPageSize;
00067     GtkWidget * m_entryPageWidth;
00068     GtkWidget * m_entryPageHeight;
00069     GtkWidget * m_optionPageUnits;
00070     GtkWidget * m_radioPagePortrait;
00071     GtkWidget * m_radioPageLandscape;
00072     GtkWidget * m_spinPageScale;
00073 
00074     GtkWidget * m_optionMarginUnits;
00075     GtkWidget * m_spinMarginTop;
00076     GtkWidget * m_spinMarginBottom;
00077     GtkWidget * m_spinMarginLeft;
00078     GtkWidget * m_spinMarginRight;
00079     GtkWidget * m_spinMarginHeader;
00080     GtkWidget * m_spinMarginFooter;
00081 
00082     GtkWidget * customPreview;
00083     GtkWidget * m_PageHbox;
00084     GtkWidget * m_MarginHbox;
00085 
00086 
00087     guint m_iEntryPageWidthID;
00088     guint m_iEntryPageHeightID;
00089     guint m_iComboPageSizeListID;
00090 
00091     XAP_Frame * m_pFrame;
00092 
00093     void _setWidth(const char * buf);
00094     void _setHeight(const char * buf);
00095 
00096     // The parent field behaves unpredictably, so we declare our own.
00097     fp_PageSize m_PageSize;
00098 
00099     void _updatePageSizeList();
00100 };
00101 
00102 #endif // AP_UnixDialog_PageSetup_H

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1