]> git.saurik.com Git - wxWidgets.git/blame - contrib/samples/stc/prefs.h
wxString and wxChar* access for file functions. Source cleaning.
[wxWidgets.git] / contrib / samples / stc / prefs.h
CommitLineData
88a8b04e
RD
1 //////////////////////////////////////////////////////////////////////////////
2// File: prefs.h
3// Purpose: STC test Preferences initialization
4// Maintainer: Wyo
5// Created: 2003-09-01
6// RCS-ID: $Id$
7// Copyright: (c) wxGuide
8// Licence: wxWindows licence
9//////////////////////////////////////////////////////////////////////////////
10
11#ifndef _PREFS_H_
12#define _PREFS_H_
13
14//----------------------------------------------------------------------------
15// informations
16//----------------------------------------------------------------------------
17
18
19//----------------------------------------------------------------------------
20// headers
21//----------------------------------------------------------------------------
22
be5a51fb 23//! wxWidgets headers
88a8b04e 24
be5a51fb 25//! wxWidgets/contrib headers
88a8b04e
RD
26#include <wx/stc/stc.h> // styled text control
27
28//! application headers
29
30
31//============================================================================
32// declarations
33//============================================================================
34
35//! general style types
36#define mySTC_TYPE_DEFAULT 0
37
38#define mySTC_TYPE_WORD1 1
39#define mySTC_TYPE_WORD2 2
40#define mySTC_TYPE_WORD3 3
41#define mySTC_TYPE_WORD4 4
42#define mySTC_TYPE_WORD5 5
43#define mySTC_TYPE_WORD6 6
44
45#define mySTC_TYPE_COMMENT 7
46#define mySTC_TYPE_COMMENT_DOC 8
47#define mySTC_TYPE_COMMENT_LINE 9
48#define mySTC_TYPE_COMMENT_SPECIAL 10
49
50#define mySTC_TYPE_CHARACTER 11
51#define mySTC_TYPE_CHARACTER_EOL 12
52#define mySTC_TYPE_STRING 13
53#define mySTC_TYPE_STRING_EOL 14
54
55#define mySTC_TYPE_DELIMITER 15
56
57#define mySTC_TYPE_PUNCTUATION 16
58
59#define mySTC_TYPE_OPERATOR 17
60
61#define mySTC_TYPE_BRACE 18
62
63#define mySTC_TYPE_COMMAND 19
64#define mySTC_TYPE_IDENTIFIER 20
65#define mySTC_TYPE_LABEL 21
66#define mySTC_TYPE_NUMBER 22
67#define mySTC_TYPE_PARAMETER 23
68#define mySTC_TYPE_REGEX 24
69#define mySTC_TYPE_UUID 25
70#define mySTC_TYPE_VALUE 26
71
72#define mySTC_TYPE_PREPROCESSOR 27
73#define mySTC_TYPE_SCRIPT 28
74
75#define mySTC_TYPE_ERROR 29
76
77//----------------------------------------------------------------------------
78//! style bits types
79#define mySTC_STYLE_BOLD 1
80#define mySTC_STYLE_ITALIC 2
81#define mySTC_STYLE_UNDERL 4
82#define mySTC_STYLE_HIDDEN 8
83
84//----------------------------------------------------------------------------
85//! general folding types
86#define mySTC_FOLD_COMMENT 1
87#define mySTC_FOLD_COMPACT 2
88#define mySTC_FOLD_PREPROC 4
89
90#define mySTC_FOLD_HTML 16
91#define mySTC_FOLD_HTMLPREP 32
92
93#define mySTC_FOLD_COMMENTPY 64
94#define mySTC_FOLD_QUOTESPY 128
95
96//----------------------------------------------------------------------------
97//! flags
98#define mySTC_FLAG_WRAPMODE 16
99
100//----------------------------------------------------------------------------
101// CommonInfo
102
103struct CommonInfo {
104 // editor functionality prefs
105 bool syntaxEnable;
106 bool foldEnable;
107 bool indentEnable;
108 // display defaults prefs
109 bool readOnlyInitial;
110 bool overTypeInitial;
111 bool wrapModeInitial;
112 bool displayEOLEnable;
113 bool indentGuideEnable;
114 bool lineNumberEnable;
115 bool longLineOnEnable;
116 bool whiteSpaceEnable;
117};
118extern const CommonInfo g_CommonPrefs;
119
120//----------------------------------------------------------------------------
121// LanguageInfo
122
123struct LanguageInfo {
124 wxChar *name;
125 wxChar *filepattern;
126 int lexer;
127 struct {
128 int type;
129 const wxChar *words;
130 } styles [STYLE_TYPES_COUNT];
131 int folds;
132};
133
134extern const LanguageInfo g_LanguagePrefs[];
135extern const int g_LanguagePrefsSize;
136
137//----------------------------------------------------------------------------
138// StyleInfo
139struct StyleInfo {
140 wxChar *name;
141 wxChar *foreground;
142 wxChar *background;
143 wxChar *fontname;
144 int fontsize;
145 int fontstyle;
146 int lettercase;
147};
148
149extern const StyleInfo g_StylePrefs[];
150extern const int g_StylePrefsSize;
151
152#endif // _PREFS_H_
153