[96dcfd]: src / Credits.cxx Maximize Restore History

Download this file

Credits.cxx    450 lines (436 with data), 13.5 kB

  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
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
// SciTE - Scintilla based Text Editor
/** @file Credits.cxx
** Display a list of contributors in the about box.
**/
// Copyright 1998-2011 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <memory>
#include "Scintilla.h"
#include "ILexer.h"
#include "GUI.h"
#include "SString.h"
#include "StringList.h"
#include "StringHelpers.h"
#include "FilePath.h"
#include "StyleDefinition.h"
#include "PropSetFile.h"
#include "StyleWriter.h"
#include "Extender.h"
#include "SciTE.h"
#include "Mutex.h"
#include "JobQueue.h"
#include "Cookie.h"
#include "Worker.h"
#include "SciTEBase.h"
// Contributor names are in UTF-8
const char *contributors[] = {
"Atsuo Ishimoto",
"Mark Hammond",
"Francois Le Coguiec",
"Dale Nagata",
"Ralf Reinhardt",
"Philippe Lhoste",
"Andrew McKinlay",
"Stephan R. A. Deibel",
"Hans Eckardt",
"Vassili Bourdo",
"Maksim Lin",
"Robin Dunn",
"John Ehresman",
"Steffen Goeldner",
"Deepak S.",
"DevelopMentor http://www.develop.com",
"Yann Gaillard",
"Aubin Paul",
"Jason Diamond",
"Ahmad Baitalmal",
"Paul Winwood",
"Maxim Baranov",
#if defined(GTK)
"Icons Copyright(C) 1998 by Dean S. Jones",
" http://jfa.javalobby.org/projects/icons/",
#endif
"Ragnar H\xc3\xb8jland",
"Christian Obrecht",
"Andreas Neukoetter",
"Adam Gates",
"Steve Lhomme",
"Ferdinand Prantl",
"Jan Dries",
"Markus Gritsch",
"Tahir Karaca",
"Ahmad Zawawi",
"Laurent le Tynevez",
"Walter Braeu",
"Ashley Cambrell",
"Garrett Serack",
"Holger Schmidt",
"ActiveState http://www.activestate.com",
"James Larcombe",
"Alexey Yutkin",
"Jan Hercek",
"Richard Pecl",
"Edward K. Ream",
"Valery Kondakoff",
"Sm\xc3\xa1ri McCarthy",
"Clemens Wyss",
"Simon Steele",
"Serge A. Baranov",
"Xavier Nodet",
"Willy Devaux",
"David Clain",
"Brendon Yenson",
"Vamsi Potluru http://www.baanboard.com",
"Praveen Ambekar",
"Alan Knowles",
"Kengo Jinno",
"Valentin Valchev",
"Marcos E. Wurzius",
"Martin Alderson",
"Robert Gustavsson",
"Jos\xc3\xa9 Fonseca",
"Holger Kiemes",
"Francis Irving",
"Scott Kirkwood",
"Brian Quinlan",
"Ubi",
"Michael R. Duerig",
"Deepak T",
"Don Paul Beletsky",
"Gerhard Kalab",
"Olivier Dagenais",
"Josh Wingstrom",
"Bruce Dodson",
"Sergey Koshcheyev",
"Chuan-jian Shen",
"Shane Caraveo",
"Alexander Scripnik",
"Ryan Christianson",
"Martin Steffensen",
"Jakub Vr\xc3\xa1na",
"The Black Horus",
"Bernd Kreuss",
"Thomas Lauer",
"Mike Lansdaal",
"Yukihiro Nakai",
"Jochen Tucht",
"Greg Smith",
"Steve Schoettler",
"Mauritius Thinnes",
"Darren Schroeder",
"Pedro Guerreiro",
"Steven te Brinke",
"Dan Petitt",
"Biswapesh Chattopadhyay",
"Kein-Hong Man",
"Patrizio Bekerle",
"Nigel Hathaway",
"Hrishikesh Desai",
"Sergey Puljajev",
"Mathias Rauen",
"Angelo Mandato http://www.spaceblue.com",
"Denis Sureau",
"Kaspar Schiess",
"Christoph H\xc3\xb6sler",
"Jo\xc3\xa3o Paulo F Farias",
"Ron Schofield",
"Stefan Wosnik",
"Marius Gheorghe",
"Naba Kumar",
"Sean O'Dell",
"Stefanos Togoulidis",
"Hans Hagen",
"Jim Cape",
"Roland Walter",
"Brian Mosher",
"Nicholas Nemtsev",
"Roy Wood",
"Peter-Henry Mander",
"Robert Boucher",
"Christoph Dalitz",
"April White",
"S. Umar",
"Trent Mick",
"Filip Yaghob",
"Avi Yegudin",
"Vivi Orunitia",
"Manfred Becker",
"Dimitris Keletsekis",
"Yuiga",
"Davide Scola",
"Jason Boggs",
"Reinhold Niesner",
"Jos van der Zande",
"Pescuma",
"Pavol Bosik",
"Johannes Schmid",
"Blair McGlashan",
"Mikael Hultgren",
"Florian Balmer",
"Hadar Raz",
"Herr Pfarrer",
"Ben Key",
"Gene Barry",
"Niki Spahiev",
"Carsten Sperber",
"Phil Reid",
"Iago Rubio",
"R\xc3\xa9gis Vaquette",
"Massimo Cor\xc3\xa0",
"Elias Pschernig",
"Chris Jones",
"Josiah Reynolds",
"Robert Roessler http://www.rftp.com",
"Steve Donovan",
"Jan Martin Pettersen",
"Sergey Philippov",
"Borujoa",
"Michael Owens",
"Franck Marcia",
"Massimo Maria Ghisalberti",
"Frank Wunderlich",
"Josepmaria Roca",
"Tobias Engvall",
"Suzumizaki Kimitaka",
"Michael Cartmell",
"Pascal Hurni",
"Andre",
"Randy Butler",
"Georg Ritter",
"Michael Goffioul",
"Ben Harper",
"Adam Strzelecki",
"Kamen Stanev",
"Steve Menard",
"Oliver Yeoh",
"Eric Promislow",
"Joseph Galbraith",
"Jeffrey Ren",
"Armel Asselin",
"Jim Pattee",
"Friedrich Vedder",
"Sebastian Pipping",
"Andre Arpin",
"Stanislav Maslovski",
"Martin Stone",
"Fabien Proriol",
"mimir",
"Nicola Civran",
"Snow",
"Mitchell Foral",
"Pieter Holtzhausen",
"Waldemar Augustyn",
"Jason Haslam",
"Sebastian Steinlechner",
"Chris Rickard",
"Rob McMullen",
"Stefan Schwendeler",
"Cristian Adam",
"Nicolas Chachereau",
"Istvan Szollosi",
"Xie Renhui",
"Enrico Tr\xc3\xb6ger",
"Todd Whiteman",
"Yuval Papish",
"instanton",
"Sergio Lucato",
"VladVRO",
"Dmitry Maslov",
"chupakabra",
"Juan Carlos Arevalo Baeza",
"Nick Treleaven",
"Stephen Stagg",
"Jean-Paul Iribarren",
"Tim Gerundt",
"Sam Harwell",
"Boris",
"Jason Oster",
"Gertjan Kloosterman",
"alexbodn",
"Sergiu Dotenco",
"Anders Karlsson",
"ozlooper",
"Marko Njezic",
"Eugen Bitter",
"Christoph Baumann",
"Christopher Bean",
"Sergey Kishchenko",
"Kai Liu",
"Andreas Rumpf",
"James Moffatt",
"Yuzhou Xin",
"Nic Jansma",
"Evan Jones",
"Mike Lischke",
"Eric Kidd",
"maXmo",
"David Severwright",
"Jon Strait",
"Oliver Kiddle",
"Etienne Girondel",
"Haimag Ren",
"Andrey Moskalyov",
"Xavi",
"Toby Inkster",
"Eric Forgeot",
"Colomban Wendling",
"Neo",
"Jordan Russell",
"Farshid Lashkari",
"Sam Rawlins",
"Michael Mullin",
"Carlos SS",
"vim",
"Martial Demolins",
"Tino Weinkauf",
"J\xc3\xa9r\xc3\xb4me Laforge",
"Udo Lechner",
"Marco Falda",
"Dariusz Knoci\xc5\x84ski",
"Ben Fisher",
"Don Gobin",
"John Yeung",
"Adobe",
"Elizabeth A. Irizarry",
"Mike Schroeder",
"Morten MacFly",
"Jaime Gimeno",
"Thomas Linder Puls",
"Artyom Zuikov",
"Gerrit",
"Occam's Razor",
"Ben Bluemel",
"David Wolfendale",
"Chris Angelico",
"Marat Dukhan",
"Stefan Weil",
"Rex Conn",
"Ross McKay",
"Bruno Barbieri",
"Gordon Smith",
"dimitar",
"S\xc3\xa9""bastien Granjoux",
"zeniko",
"James Ribe",
"Markus Ni\xc3\x9fl",
"Martin Panter",
"Mark Yen",
"Philippe Elsass",
"Dimitar Zhekov",
"Fan Yang",
"Denis Shelomovskij",
"darmar",
"John Vella",
"Chinh Nguyen",
"Sakshi Verma",
"Joel B. Mohler",
"Isiledhel",
"Vidya Wasi",
"G. Hu",
"Byron Hawkins",
"Alpha",
"John Donoghue",
"kudah",
"Igor Shaula",
"Pavel Bulochkin",
"Yosef Or Boczko",
"Brian Griffin",
"\xc3\x96zg\xc3\xbcr Emir",
"Neomi",
"OmegaPhil",
"SiegeLord",
"Erik",
"TJF",
"Mark Robinson",
"Thomas Martitz",
"felix",
};
// AddStyledText only called from About so static size buffer is OK
void AddStyledText(GUI::ScintillaWindow &wsci, const char *s, int attr) {
size_t len = strlen(s);
std::vector<char> buf(len*2);
for (size_t i = 0; i < len; i++) {
buf[i*2] = s[i];
buf[i*2 + 1] = static_cast<char>(attr);
}
wsci.SendPointer(SCI_ADDSTYLEDTEXT,
static_cast<int>(len*2), const_cast<char *>(&buf[0]));
}
void SetAboutStyle(GUI::ScintillaWindow &wsci, int style, Colour fore) {
wsci.Send(SCI_STYLESETFORE, style, fore);
}
static void HackColour(int &n) {
n += (rand() % 100) - 50;
if (n > 0xE7)
n = 0x60;
if (n < 0)
n = 0x80;
}
void SciTEBase::SetAboutMessage(GUI::ScintillaWindow &wsci, const char *appTitle) {
if (wsci.Created()) {
wsci.Send(SCI_SETSTYLEBITS, 7, 0);
wsci.Send(SCI_STYLERESETDEFAULT, 0, 0);
#if defined(GTK)
wsci.Send(SCI_STYLESETFONT, STYLE_DEFAULT,
reinterpret_cast<uptr_t>("!Serif"));
int fontSize = 14;
#else
int fontSize = 15;
#endif
wsci.Send(SCI_SETCODEPAGE, SC_CP_UTF8, 0);
wsci.Send(SCI_STYLESETSIZE, STYLE_DEFAULT, fontSize);
wsci.Send(SCI_STYLESETBACK, STYLE_DEFAULT, ColourRGB(0xff, 0xff, 0xff));
wsci.Send(SCI_STYLECLEARALL, 0, 0);
SetAboutStyle(wsci, 0, ColourRGB(0xff, 0xff, 0xff));
wsci.Send(SCI_STYLESETSIZE, 0, fontSize);
wsci.Send(SCI_STYLESETBACK, 0, ColourRGB(0, 0, 0x80));
AddStyledText(wsci, appTitle, 0);
AddStyledText(wsci, "\n", 0);
SetAboutStyle(wsci, 1, ColourRGB(0, 0, 0));
int trsSty = 5; // define the stylenumber to assign font for translators.
SString translator = GetTranslationToAbout("TranslationCredit", false);
SetAboutStyle(wsci, trsSty, ColourRGB(0, 0, 0));
AddStyledText(wsci, GetTranslationToAbout("Version").c_str(), trsSty);
AddStyledText(wsci, " " VERSION_SCITE "\n", 1);
AddStyledText(wsci, " " __DATE__ " " __TIME__ "\n", 1);
SetAboutStyle(wsci, 2, ColourRGB(0, 0, 0));
wsci.Send(SCI_STYLESETITALIC, 2, 1);
AddStyledText(wsci, GetTranslationToAbout("by").c_str(), trsSty);
AddStyledText(wsci, " Neil Hodgson.\n", 2);
SetAboutStyle(wsci, 3, ColourRGB(0, 0, 0));
AddStyledText(wsci, COPYRIGHT_DATES ".\n", 3);
SetAboutStyle(wsci, 4, ColourRGB(0, 0x7f, 0x7f));
AddStyledText(wsci, "http://www.scintilla.org\n", 4);
AddStyledText(wsci, "Lua scripting language by TeCGraf, PUC-Rio\n", 3);
AddStyledText(wsci, " http://www.lua.org\n", 4);
if (translator.length()) {
AddStyledText(wsci, translator.c_str(), trsSty);
AddStyledText(wsci, "\n", 5);
}
AddStyledText(wsci, GetTranslationToAbout("Contributors:").c_str(), trsSty);
srand(static_cast<unsigned>(time(0)));
for (unsigned int co = 0;co < ELEMENTS(contributors);co++) {
int colourIndex = 50 + (co % 78);
AddStyledText(wsci, "\n ", colourIndex);
AddStyledText(wsci, contributors[co], colourIndex);
}
int r = rand() % 256;
int g = rand() % 256;
int b = rand() % 256;
for (unsigned int sty = 0;sty < 78; sty++) {
HackColour(r);
HackColour(g);
HackColour(b);
SetAboutStyle(wsci, sty + 50, ColourRGB(r, g, b));
}
wsci.Send(SCI_SETREADONLY, 1, 0);
}
}