Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef AP_UNIXDIALOG_OPTIONS_H
00024 #define AP_UNIXDIALOG_OPTIONS_H
00025
00026 #ifdef HAVE_CONFIG_H
00027 #include "config.h"
00028 #endif
00029
00030 #include "ap_Dialog_Options.h"
00031
00032 class XAP_UnixFrame;
00033
00034
00035 class AP_UnixDialog_Options : public AP_Dialog_Options,
00036 public XAP_NotebookDialog
00037 {
00038 public:
00039 AP_UnixDialog_Options(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id);
00040 virtual ~AP_UnixDialog_Options(void);
00041
00042 virtual void runModal(XAP_Frame * pFrame);
00043
00044 static XAP_Dialog * static_constructor(XAP_DialogFactory *, XAP_Dialog_Id id);
00045 void event_ChooseTransparentColor(void);
00046
00047
00048 virtual void addPage (const XAP_NotebookDialog::Page *page);
00049
00050 protected:
00051
00052 GtkWidget *_lookupWidget( tControl id );
00053 virtual void _controlEnable( tControl id, bool value );
00054
00055
00056 #define SET_GATHER(a,t) virtual t _gather##a(void); \
00057 virtual void _set##a(t)
00058
00059
00060 SET_GATHER (NotebookPageNum, int);
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070 SET_GATHER (ViewRulerUnits, UT_Dimension);
00071
00072
00073 virtual bool _gatherViewCursorBlink(void) { return true; }
00074 virtual void _setViewCursorBlink(const bool) {}
00075
00076
00077
00078 SET_GATHER (AutoLoadPlugins, bool);
00079
00080
00081
00082
00083
00084 SET_GATHER (AutoSaveFile, bool);
00085 virtual void _gatherAutoSaveFilePeriod ( UT_String &stRetVal);
00086 virtual void _setAutoSaveFilePeriod (const UT_String &stPeriod);
00087 virtual void _gatherAutoSaveFileExt ( UT_String &stRetVal);
00088 virtual void _setAutoSaveFileExt (const UT_String &stExt);
00089
00090
00091
00092 SET_GATHER (OtherDirectionRtl, bool);
00093
00094
00095
00096
00097
00098 SET_GATHER (SpellCheckAsType, bool);
00099 SET_GATHER (SpellHideErrors, bool);
00100
00101
00102
00103 SET_GATHER (SpellUppercase, bool);
00104 SET_GATHER (SpellNumbers, bool);
00105
00106
00107
00108 SET_GATHER (SpellSuggest, bool);
00109 SET_GATHER (SpellMainOnly, bool);
00110
00111
00112
00113 SET_GATHER (GrammarCheck, bool);
00114
00115
00116
00117 SET_GATHER (SmartQuotes, bool);
00118 SET_GATHER (CustomSmartQuotes, bool);
00119 SET_GATHER (OuterQuoteStyle, gint);
00120 SET_GATHER (InnerQuoteStyle, gint);
00121
00122
00123
00124 SET_GATHER (PrefsAutoSave, bool);
00125 SET_GATHER (ViewShowRuler, bool);
00126 SET_GATHER (ViewShowStatusBar, bool);
00127 SET_GATHER (ViewAll, bool);
00128 SET_GATHER (ViewHiddenText, bool);
00129 SET_GATHER (ViewUnprintable, bool);
00130 SET_GATHER (EnableSmoothScrolling, bool);
00131 SET_GATHER (EnableOverwrite, bool);
00132 #undef SET_GATHER
00133
00134 protected:
00135
00136
00137 void _setupUnitMenu(GtkWidget *optionmenu, const XAP_StringSet *pSS);
00138 void _constructWindowContents(GtkBuilder *builder);
00139 GtkWidget * _constructWindow(void);
00140
00141
00142
00143
00144 GtkWidget * m_windowMain;
00145 GtkWidget * m_notebook;
00146 GtkWidget * m_buttonDefaults;
00147 GtkWidget * m_buttonClose;
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157 GtkWidget *m_pushbuttonNewTransparentColor;
00158 GtkWidget *m_menuUnits;
00159
00160
00161
00162 GtkWidget *m_buttonColSel_Defaults;
00163
00164
00165
00166 GtkWidget *m_checkbuttonAutoLoadPlugins;
00167
00168
00169
00170
00171
00172 GtkWidget *m_checkbuttonAutoSaveFile;
00173 GtkWidget *m_tableAutoSaveFile;
00174 GtkWidget *m_textAutoSaveFilePeriod;
00175 GtkWidget *m_textAutoSaveFileExt;
00176
00177
00178
00179 GtkWidget * m_checkbuttonOtherDirectionRtl;
00180
00181
00182
00183
00184
00185 GtkWidget *m_checkbuttonSpellCheckAsType;
00186 GtkWidget *m_checkbuttonSpellHideErrors;
00187
00188
00189
00190 GtkWidget *m_checkbuttonSpellUppercase;
00191 GtkWidget *m_checkbuttonSpellNumbers;
00192
00193
00194
00195 GtkWidget *m_checkbuttonSpellSuggest;
00196 GtkWidget *m_checkbuttonSpellMainOnly;
00197
00198
00199
00200 GtkWidget *m_checkbuttonGrammarCheck;
00201
00202
00203
00204 GtkWidget *m_checkbuttonSmartQuotes;
00205 GtkWidget *m_checkbuttonCustomSmartQuotes;
00206 GtkWidget *m_omOuterQuoteStyle;
00207 GtkWidget *m_omInnerQuoteStyle;
00208
00209 GtkWidget *m_checkbuttonEnableOverwrite;
00210
00211
00212 bool m_boolEnableSmoothScrolling;
00213 bool m_boolPrefsAutoSave;
00214 bool m_boolViewAll;
00215 bool m_boolViewHiddenText;
00216 bool m_boolViewShowRuler;
00217 bool m_boolViewShowStatusBar;
00218 bool m_boolViewUnprintable;
00219 private:
00220
00221 static void s_control_changed (GtkWidget *, gpointer);
00222 static void s_apply_clicked (GtkWidget *, gpointer);
00223 static void s_defaults_clicked (GtkWidget *, gpointer);
00224 static void s_chooseTransparentColor (GtkWidget *, gpointer);
00225 static void s_real_color_changed(GdkRGBA & gdkcolor, AP_UnixDialog_Options * dlg);
00226 static void s_color_changed (GtkColorChooser *, GdkRGBA*, gpointer);
00227 static void s_auto_save_toggled (GtkToggleButton *, gpointer);
00228 static void s_checkbutton_toggle (GtkWidget *, gpointer);
00229 static gint s_menu_item_activate (GtkWidget *, gpointer);
00230 void _setupSmartQuotesCombos( GtkWidget *optionmenu );
00231
00232
00233 virtual void _storeWindowData(void);
00234
00235 GSList *m_extraPages;
00236 };
00237
00238 #endif
00239