1 /*
2   FXiTe - The Free eXtensIble Text Editor
3   Copyright (c) 2009-2012 Jeffrey Pohlmeyer <yetanothergeek@gmail.com>
4 
5   This program is free software; you can redistribute it and/or modify it
6   under the terms of the GNU General Public License version 3 as
7   published by the Free Software Foundation.
8 
9   This software 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 St, Fifth Floor, Boston, MA  02110-1301  USA
17 */
18 
19 
20 typedef struct _StyleDef StyleDef;
21 
22 class SettingsBase: public FXObject {
23 protected:
24   StyleDef *styles;
25 public:
26   SettingsBase();
27   ~SettingsBase();
28 
29   FXulong ShowStatusBar:1;
30   FXulong ShowLineNumbers:1;
31   FXulong ShowToolbar:1;
32   FXulong ShowWhiteSpace:1;
33 
34   FXulong ShowOutputPane:1;
35   FXulong InvertColors:1;
36   FXulong ShowRightEdge:1;
37   FXulong ShowIndentGuides:1;
38 
39   FXulong ShowCaretLine:1;
40   FXulong Maximize:1;
41   FXulong SmartHome:1;
42   FXulong WrapAwareHomeEnd:1;
43 
44   FXulong BraceMatch:3;
45   FXulong UseTabs:1;
46   FXulong CaretPastEOL:1;
47   FXulong WhitespaceShowsEOL:1;
48 
49   FXulong PromptCloseMultiMenu:1;
50   FXulong PromptCloseMultiExit:1;
51   FXulong WatchExternChanges:1;
52   FXulong Autosave:1;
53 
54   FXulong SaveBeforeFilterSel:1;
55   FXulong SaveBeforeInsCmd:1;
56   FXulong SaveBeforeExecCmd:1;
57   FXulong WrapToolbar:1;
58 
59   FXulong DefaultToAscii:1;
60   FXulong DefaultToSbcs:1;
61   FXulong FileOpenMulti:1;
62   FXulong WordWrap:1;
63 
64 
65 
66   FXint AutoIndent;
67   FXint FileFilterIndex;
68   FXint KeepFileFilter;
69 
70   FXFontDesc fontdesc;
71   FXint ToolbarButtonSize;
72   FXint SplitView;
73   FXint OutputPaneHeight;
74   FXString FontName;
75   FXint FontSize;
76   FXuchar FontAscent;
77   FXuchar FontDescent;
78   FXint Left,Top,Width,Height;
79   FXint SearchWrap;
80   FXint SearchGui;
81   FXbool SearchVerbose;
82   FXint SearchOptions;
83   FXlong ZoomFactor;
84   FXint TabWidth;
85   FXint IndentWidth;
86   FXint CaretWidth;
87   FXint SmoothScroll;
88   FXint WheelLines;
89   FXint placement;
90   FXString FileFilters;
91   FXint RightEdgeColumn;
92   FXString ShellCommand;
93   FXchar DocTabPosition;
94   FXchar DocTabsPacked;
95   FXint MaxFiles;
96   FXint AutosaveInterval;
97   FXint DefaultFileFormat;
98   FXString LastFocused;
99   FXint ScreenWidth;
100   FXint ScreenHeight;
101   FXint TabTitleMaxWidth;
Styles()102   StyleDef *Styles() { return styles; }
103   static SettingsBase*instance();
104 };
105 
106 
107 enum {
108   SPLIT_NONE,
109   SPLIT_BELOW,
110   SPLIT_BESIDE
111 };
112 
113 
114 typedef enum {
115   BRACEMATCH_NONE=0,
116   BRACEMATCH_INSIDE,
117   BRACEMATCH_OUTSIDE,
118   BRACEMATCH_EITHER,
119   BRACEMATCH_AFTER,
120 } BraceMatchPolicy;
121 
122