Back
1 //------------------------------------------------------------------------------
2 // Module Options.cpp //
3 // //
4 // Class TOptions which encapsulates several options. Options may be //
5 // saved/loaded to/from file. //
6 // //
7 // Copyright (c) 2000-2004 by Lars Haendel //
8 // Home: http://www.newty.de //
9 // //
10 // This program is free software; you can redistribute it and/or modify //
11 // it under the terms of the GNU General Public License as published by //
12 // the Free Software Foundation as version 2 of the License. //
13 // //
14 // This program is distributed in the hope that it will be useful, //
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
17 // GNU General Public License for more details. //
18 // //
19 // You should have received a copy of the GNU General Public License //
20 // along with this program; if not, write to the Free Software //
21 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. //
22 // //
23 //------------------------------------------------------------------------------
24
25
26 #ifndef OptionsH
27 #define OptionsH
28
29 #include <fstream>
30 #include "defines.h" // due to: defines like using namespace and STS (string size) ...
31
32
33 //----------------------------------------------------------------------------------------------------------------------
34 // options like tab stop positions ...
35 class TOptions
36 {
37 public:
38
39 // constructor/destructor
40 TOptions();
41
42 void Save(ofstream& file); // save options to file
43 void Load(ifstream& file); // load options from file
44
45 void RestoreFactoryDefaults(); // restore factory defaults settings
46 void RestoreDefaults(const TOptions& defaults); // restore defaults from given object
47
48
49 // section 'Expert'
50 bool f_TagClosingOnEndl; // close all tabs if there are more than 'nEndl' linefeeds
51 int nEndl; // see above
52 bool f_HtmlAndBodyTags; // enclose output in <html> and <body> tags
53
54
55 // section 'Misc'
56 int tabPos; // tab stop positions
57 int indent; // left indent: number of spaces to be added infront of each none empty line
58 bool f_AddBackLink; // add back links
59 bool f_UserDefinedBackLink; // back link text is user defined
60 bool f_AddTopLinks; // add top links at bottom
61 bool f_AddLineNumbers; // add line numbers
62 bool f_AddLineAnchors; // add line anchors
63 char szBackLinkText[STS]; // text of user defined back link
64
65 // section 'OverviewFile'
66 bool f_GenerateOverviewFile; // generate overview file
67 char szOverviewFileName[STS]; // overview filename
68 };
69 #endif
Top |