My favorites | Sign in
Project Home Downloads Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
#ifdef PLATFORM_POSIX
inline bool MoveFile(const char *oldpath, const char *newpath)
{
return !rename(oldpath, newpath);
}
#endif

struct PackageInfo : Moveable<PackageInfo> {
Time stamp;
String path;
Color ink;
bool bold, italic;
};

void InvalidatePackageInfo(const String& name);
PackageInfo GetPackageInfo(const String& name);

struct FileTemplate {
String filename;
String condition;
String text;
};

enum {
TEMPLATEITEM_ID, TEMPLATEITEM_FILENAME, TEMPLATEITEM_OPTION, TEMPLATEITEM_SELECT,
TEMPLATEITEM_TEXT
};

struct TemplateItem {
String label;
int type;
String id;
Vector<String> value;
String init;
};

struct PackageTemplate {
String name;
bool main, sub;
Array<TemplateItem> item;
Array<FileTemplate> file;
};

struct AppPreview : Ctrl {
virtual void Paint(Draw& w);
virtual void Layout();
virtual void MouseWheel(Point p, int zdelta, dword keyflags);

ScrollBar sb;
struct Line : Moveable<Line> {
String text;
bool header;
};
Vector<Line> line;

void Scroll() { Refresh(); }

void Clear() { line.Clear(); Refresh(); sb.Set(0); }
void Add(const String& data, bool header = false);

typedef AppPreview CLASSNAME;

AppPreview();
virtual ~AppPreview();
};

struct TemplateDlg : public WithNewPackageLayout<TopWindow> {
AppPreview preview;

Array<PackageTemplate> pt;

Array<Label> label;
Array<Ctrl> ctrl;
DelayCallback delay;

const PackageTemplate& ActualTemplate();

String GetPackageFile();
void Preview();
void EnterTemplate();
void LoadNest(const char *dir, bool main, bool recurse = true);
void Load(const Vector<String>& path, bool main);
void EnableCreate() { ok.Enable(!IsNull(package)); Inits(); delay.Invoke(); }
void Inits();

ArrayMap<String, EscValue> MakeVars0();
ArrayMap<String, EscValue> MakeVars();
void Create();

void Serialize(Stream& s) { SerializePlacement(s); }

typedef TemplateDlg CLASSNAME;
TemplateDlg();
virtual ~TemplateDlg();
};

String SelectPackage(const char *title, const char *startwith = NULL,
bool selectvars = false, bool all = false);

int CondFilter(int c);
int FlagFilter(int c);
int FlagFilterM(int c);

struct UsesDlg : public WithUppOptPushDlg<TopWindow> {
void New();

typedef UsesDlg CLASSNAME;

UsesDlg();
};

struct DependsDlg : public WithUppOptPushDlg<TopWindow> {
String package;

void New();

typedef DependsDlg CLASSNAME;

DependsDlg();
};

struct UppList : FileList {
virtual void Paint(Draw& w, const Rect& r, const Value& q, Color ink, Color paper,
dword style) const;
};

struct WorkspaceWork {
static Font ListFont();

FileList package;
Vector<bool> speed;
UppList filelist;
Vector<int> fileindex;

String main;
String actualpackage;
int actualfileindex;
Package actual;

struct Sepfo : Moveable<Sepfo> {
String package;
String separator;

bool operator==(const Sepfo& s) const { return package == s.package && separator == s.separator; }
unsigned GetHashValue() const { return CombineHash(Upp::GetHashValue(package),
Upp::GetHashValue(separator)); }
void Serialize(Stream& s) { s % package % separator; }
Sepfo(const String& package, const String& separator) : package(package), separator(separator) {}
Sepfo() {}
};

Index<Sepfo> closed;

struct Backup {
FileTime time;
String data;
};

ArrayMap<String, Backup> backup;

bool organizer;
bool showtime;
bool sort;

Index<String> errorfiles;

virtual void PackageCursor();
virtual void FileCursor();
virtual void BuildPackageMenu(Bar& bar) {}
virtual void BuildFileMenu(Bar& bar) {}
virtual void FilePropertiesMenu(Bar& bar) {}
virtual String GetOutputDir() { return Null; }
virtual void SyncWorkspace() {}
virtual void FileSelected() {}
virtual void FileRename(const String& nm) {}
virtual bool FileRemove() { return true; }
virtual void SyncSvnDir(const String& working) {}

void ScanWorkspace();
void SavePackage();
void RestoreBackup();
void SyncErrorPackages();

void SerializeFileSetup(Stream& s) { s % filelist % package; }

Sepfo GetActiveSepfo();
void Group();
void OpenAllGroups();
void CloseAllGroups();
void GroupOrFile(Point pos);

void SetMain(const String& m) { main = m; }
void FindSetPackage(const String& s) { package.FindSetCursor(s); }

void ShowFile(int pi);

String GetActivePackage() const { return package.GetCurrentName(); }
String GetActivePackagePath() const { return PackagePath(package.GetCurrentName()); }
String GetActiveFileName() const;
String GetActiveFilePath() const;
void OpenFileFolder();
void OpenPackageFolder();
bool IsActiveFile() const;
Package::File& ActiveFile();
String FileName(int i) const;
bool IsSeparator(int i) const;

void LoadActualPackage();
void SaveLoadPackage(bool sel = true);
void SaveLoadPackageNS(bool sel = true);
void TouchFile(const String& path);

void MoveFile(int d);
void Move(Vector<String>& v, FileList& ta, int d);

enum ADDFILE { PACKAGE_FILE, OUTPUT_FILE, HOME_FILE, LOCAL_FILE, ANY_FILE };
void AddFile(ADDFILE type);
void AddItem(const String& name, bool separator, bool readonly);
void AddTopicGroup();
void AddSeparator();
void DoImportTree(const String& dir, const String& mask, bool sep, Progress& pi, int from);
void DoImportTree(const String& dir, const String& mask, bool sep, Progress& pi);
void DoImport(const String& dir, const String& mask, bool sep, Progress& pi);
void DoImport(const String& dir, const String& mask, bool sep, Progress& pi, bool tree);
void Import();
void RemoveFile();
void DelFile();
void RenameFile();
void ToggleFileSpeed();
void ToggleIncludeable();

void AddNormalUses();
void AddAnyUses();
void TogglePackageSpeed();

void RemovePackageMenu(Bar& bar);
void RemovePackage(String from_package);

static bool IsAux(const String& p);
bool IsAux();

void PackageMenu(Bar& bar);
void FileMenu(Bar& bar);
void SpecialFileMenu(Bar& bar);
void InsertSpecialMenu(Bar& menu);

String PackagePathA(const String& pn);

void SetErrorFiles(const Vector<String>& files);

void SerializeClosed(Stream& s);

typedef WorkspaceWork CLASSNAME;

WorkspaceWork();
virtual ~WorkspaceWork() {}
};

struct PackageEditor : WorkspaceWork, WithUppLayout<TopWindow> {
virtual bool Key(dword key, int);
virtual void FileCursor();
virtual void PackageCursor();

enum OptionType {
FLAG = 0, USES, TARGET, LIBRARY, LINK, COMPILER, INCLUDE,
FILEOPTION, FILEDEPENDS
};

Vector<Array<OptItem> *> opt;
Vector<String> opt_name;

void Add(const char *name, Array<OptItem>& m);

void Serialize(Stream& s);
void SaveOptions();
void SaveOptionsLoad();

void Empty();
void FileEmpty();
void OptionAdd(ArrayCtrl& option, int type, const char *title, const Array<OptItem>& o);
void FindOpt(ArrayCtrl& option, int type, const String& when, const String& text);
void FindOpt(ArrayCtrl& option, int type, int ii);
void AdjustOptionCursor(ArrayCtrl& option);
void Init(ArrayCtrl& option);
void SetOpt(ArrayCtrl& opt, int type, OptItem& m, const String& when, const String& text);

void OptionAdd(int type, const char *title, const Array<OptItem>& o);
void AdjustPackageOptionCursor();
void AddOption(int type);
void OptionMenu(Bar& bar);
void RemoveOption();
void EditOption();
void MoveOption(int d);

void AdjustFileOptionCursor();
void FindFileOpt(int type, const String& when, const String& text);
void FileOptionMenu(Bar& bar);
void MoveFileOption(int d);
void AddDepends(bool external_deps);
void AddFileOption();
void EditFileOption();
void RemoveFileOption();
void Description();

typedef PackageEditor CLASSNAME;

PackageEditor();
};

void EditPackages(const char *main, const char *startwith, String& cfg);

Change log

r4524 by cxl on Feb 3, 2012   Diff
*ide: fixed more config issues
Go to: 
Project members, sign in to write a code review

Older revisions

r4513 by cxl on Feb 2, 2012   Diff
ide: Fixed config issue
r4153 by cxl on Nov 9, 2011   Diff
ide: Improved 'import directory tree'
- new option 'Including tree' (RM
#126)
r4148 by cxl on Nov 7, 2011   Diff
ide: resolved problems with deleting
files (RM #139)
All revisions of this file

File info

Size: 8199 bytes, 310 lines

File properties

svn:eol-style
native
Powered by Google Project Hosting