| 1 |
/* AbiSource Application Framework |
| 2 |
* Copyright (C) 1998-2000 AbiSource, Inc. |
| 3 |
* |
| 4 |
* This program is free software; you can redistribute it and/or |
| 5 |
* modify it under the terms of the GNU General Public License |
| 6 |
* as published by the Free Software Foundation; either version 2 |
| 7 |
* of the License, or (at your option) any later version. |
| 8 |
* |
| 9 |
* This program is distributed in the hope that it will be useful, |
| 10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
* GNU General Public License for more details. |
| 13 |
* |
| 14 |
* You should have received a copy of the GNU General Public License |
| 15 |
* along with this program; if not, write to the Free Software |
| 16 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
| 17 |
* 02110-1301 USA. |
| 18 |
*/ |
| 19 |
|
| 20 |
#ifndef XAP_UNIXDIALOG_ZOOM_H |
| 21 |
#define XAP_UNIXDIALOG_ZOOM_H |
| 22 |
|
| 23 |
#include "xap_Dlg_Zoom.h" |
| 24 |
|
| 25 |
class XAP_Frame; |
| 26 |
|
| 27 |
/*****************************************************************/ |
| 28 |
|
| 29 |
class XAP_UnixDialog_Zoom: public XAP_Dialog_Zoom |
| 30 |
{ |
| 31 |
public: |
| 32 |
XAP_UnixDialog_Zoom(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id); |
| 33 |
virtual ~XAP_UnixDialog_Zoom(void); |
| 34 |
|
| 35 |
virtual void runModal(XAP_Frame * pFrame); |
| 36 |
|
| 37 |
static XAP_Dialog * static_constructor(XAP_DialogFactory *, XAP_Dialog_Id id); |
| 38 |
|
| 39 |
protected: |
| 40 |
// callbacks can fire these events |
| 41 |
|
| 42 |
virtual void event_Radio200Clicked(void); |
| 43 |
virtual void event_Radio100Clicked(void); |
| 44 |
virtual void event_Radio75Clicked(void); |
| 45 |
virtual void event_RadioPageWidthClicked(void); |
| 46 |
virtual void event_RadioWholePageClicked(void); |
| 47 |
|
| 48 |
virtual void event_RadioPercentClicked(void); |
| 49 |
virtual void event_SpinPercentChanged(void); |
| 50 |
|
| 51 |
static void s_radio_200_clicked(GtkWidget * widget, XAP_UnixDialog_Zoom * dlg) ; |
| 52 |
|
| 53 |
static void s_radio_100_clicked(GtkWidget * widget, XAP_UnixDialog_Zoom * dlg) ; |
| 54 |
|
| 55 |
static void s_radio_75_clicked(GtkWidget * widget, XAP_UnixDialog_Zoom * dlg) ; |
| 56 |
|
| 57 |
static void s_radio_PageWidth_clicked(GtkWidget * widget, XAP_UnixDialog_Zoom * dlg) ; |
| 58 |
|
| 59 |
static void s_radio_WholePage_clicked(GtkWidget * widget, XAP_UnixDialog_Zoom * dlg) ; |
| 60 |
|
| 61 |
static void s_radio_Percent_clicked(GtkWidget * widget, XAP_UnixDialog_Zoom * dlg) ; |
| 62 |
|
| 63 |
static void s_spin_Percent_changed(GtkWidget * widget, XAP_UnixDialog_Zoom * dlg) ; |
| 64 |
|
| 65 |
// private construction functions |
| 66 |
GtkWidget * _constructWindow(void); |
| 67 |
void _populateWindowData(void); |
| 68 |
void _enablePercentSpin(bool enable); |
| 69 |
void _storeWindowData(void); |
| 70 |
|
| 71 |
// pointers to widgets we need to query/set |
| 72 |
GtkWidget * m_windowMain; |
| 73 |
|
| 74 |
GtkWidget * m_radio200; |
| 75 |
GtkWidget * m_radio100; |
| 76 |
GtkWidget * m_radio75; |
| 77 |
GtkWidget * m_radioPageWidth; |
| 78 |
GtkWidget * m_radioWholePage; |
| 79 |
GtkWidget * m_radioPercent; |
| 80 |
GtkWidget * m_spinPercent; |
| 81 |
GtkAdjustment * m_spinAdj; |
| 82 |
|
| 83 |
// our "group" of radio buttons |
| 84 |
GSList * m_radioGroup; |
| 85 |
}; |
| 86 |
|
| 87 |
#endif /* XAP_UNIXDIALOG_ZOOM_H */ |