~ubuntu-branches/ubuntu/oneiric/monodevelop/oneiric

« back to all changes in this revision

Viewing changes to src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Style.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2010-07-05 13:00:05 UTC
  • mfrom: (1.2.8 upstream) (1.3.9 experimental)
  • Revision ID: james.westby@ubuntu.com-20100705130005-d6hp4k5gcn1xkj8c
Tags: 2.4+dfsg-1ubuntu1
* debian/patches/remove_support_for_moonlight.patch,
  debian/patches/dont_add_moonlight_to_core_addins.patch,
  debian/control:
  + Enable support for Moonlight
* debian/rules:
  + Ensure Moonlight addin isn't shipped in main MonoDevelop package by
    mistake

Show diffs side-by-side

added added

removed removed

Lines of Context:
184
184
                                return GetColorFromDefinition (SearchTextBgString);
185
185
                        }
186
186
                }
 
187
                
 
188
                public const string SearchTextMainBgString = "text.background.searchresult-main";
 
189
                public Color SearchTextMainBg {
 
190
                        get {
 
191
                                return GetColorFromDefinition (SearchTextMainBgString);
 
192
                        }
 
193
                }
187
194
 
188
195
                public const string BreakpointString = "marker.breakpoint";
189
196
                public Color BreakpointFg {
367
374
                                                (double)color.Blue / ushort.MaxValue);
368
375
                }
369
376
                
 
377
                public static Cairo.Color ToCairoColor (Gdk.Color color, double alpha)
 
378
                {
 
379
                        return new Cairo.Color ((double)color.Red / ushort.MaxValue,
 
380
                                                (double)color.Green / ushort.MaxValue,
 
381
                                                (double)color.Blue / ushort.MaxValue,
 
382
                                                alpha);
 
383
                }
 
384
                
370
385
                protected Style ()
371
386
                {
372
 
                        SetStyle (DefaultString, new ChunkStyle (new Gdk.Color (0, 0, 0), new Gdk.Color (255, 255, 255)));
 
387
                        SetStyle (DefaultString, 0, 0, 0, 255, 255, 255);
373
388
                        GetChunkStyle (DefaultString).ChunkProperties |= ChunkProperties.TransparentBackground;
374
389
                        
375
 
                        SetStyle (CaretString, new ReferencedChunkStyle (this, DefaultString));
376
 
 
377
 
                        SetStyle (LineNumberString, new ChunkStyle (new Gdk.Color (172, 168, 153), new Gdk.Color (255, 255, 255)));
378
 
                        SetStyle (LineNumberFgHighlightedString, new ChunkStyle (new Gdk.Color (122, 118, 103)));
379
 
                        
380
 
                        SetStyle (IconBarBgString, new ChunkStyle (new Gdk.Color (255, 255, 255)));
381
 
                        SetStyle (IconBarSeperatorString, new ChunkStyle (new Gdk.Color (172, 168, 153)));
382
 
                        
383
 
                        SetStyle (FoldLineString, new ReferencedChunkStyle (this, LineNumberString));
384
 
                        SetStyle (FoldLineHighlightedString, new ReferencedChunkStyle (this, IconBarSeperatorString));
385
 
                        SetStyle (FoldToggleMarkerString, new ReferencedChunkStyle (this, DefaultString));
386
 
                        
387
 
                        SetStyle (LineDirtyBgString, new ChunkStyle (new Gdk.Color (255, 238, 98)));
388
 
                        SetStyle (LineChangedBgString, new ChunkStyle (new Gdk.Color (108, 226, 108)));
389
 
                        
390
 
                        SetStyle (SelectionString, new ChunkStyle (new Gdk.Color (255, 255, 255), new Gdk.Color (96, 87, 210)));
391
 
                        
392
 
                        SetStyle (LineMarkerString, new ChunkStyle (new Gdk.Color (200, 255, 255)));
393
 
                        SetStyle (RulerString, new ChunkStyle (new Gdk.Color (187, 187, 187)));
394
 
                        SetStyle (WhitespaceMarkerString, new ReferencedChunkStyle (this, RulerString));
395
 
                        
396
 
                        SetStyle (InvalidLineMarkerString, new ChunkStyle (new Gdk.Color (210, 0, 0)));
397
 
                        
398
 
                        SetStyle (BreakpointString, new ChunkStyle (new Gdk.Color (255, 255, 255), new Gdk.Color (125, 0, 0)));
399
 
                        
400
 
                        SetStyle (BreakpointMarkerColor1String, new ChunkStyle (new Gdk.Color (255, 255, 255)));
401
 
                        SetStyle (BreakpointMarkerColor2String, new ChunkStyle (new Gdk.Color (125, 0, 0)));
402
 
 
403
 
                        SetStyle (DisabledBreakpointBgString, new ChunkStyle (new Gdk.Color (237, 220, 220)));
404
 
                        
405
 
                        SetStyle (CurrentDebugLineString, new ChunkStyle (new Gdk.Color (0, 0, 0), new Gdk.Color (255, 255, 0)));
406
 
                        SetStyle (CurrentDebugLineMarkerColor1String, new ChunkStyle (new Gdk.Color (255, 255, 0)));
407
 
                        SetStyle (CurrentDebugLineMarkerColor2String, new ChunkStyle (new Gdk.Color (255, 255, 204)));
408
 
                        SetStyle (CurrentDebugLineMarkerBorderString, new ChunkStyle (new Gdk.Color (102, 102, 0)));
409
 
                        
410
 
                        SetStyle (DebugStackLineString, new ChunkStyle (new Gdk.Color (0, 0, 0), new Gdk.Color (128, 255, 128)));
411
 
                        SetStyle (DebugStackLineMarkerColor1String, new ChunkStyle (new Gdk.Color (128, 255, 128)));
412
 
                        SetStyle (DebugStackLineMarkerColor2String, new ChunkStyle (new Gdk.Color (204, 255, 204)));
413
 
                        SetStyle (DebugStackLineMarkerBorderString, new ChunkStyle (new Gdk.Color (51, 102, 51))); 
414
 
                        
415
 
                        SetStyle (InvalidBreakpointBgString, new ChunkStyle (new Gdk.Color (237, 220, 220)));
416
 
                        SetStyle (InvalidBreakpointMarkerColor1String, new ChunkStyle (new Gdk.Color (237, 220, 220)));
417
 
                        SetStyle (InvalidBreakpointMarkerBorderString, new ChunkStyle (new Gdk.Color (125, 0, 0)));
418
 
                        SetStyle (SearchTextBgString, new ChunkStyle (new Gdk.Color (250, 250, 0)));
419
 
                        
420
 
                        SetStyle (BracketHighlightRectangleString, new ChunkStyle (new Gdk.Color (128, 128, 128), new Gdk.Color (196, 196, 196)));
421
 
                        
422
 
                        SetStyle (BookmarkColor1String, new ChunkStyle (new Gdk.Color (255, 255, 255)));
423
 
                        SetStyle (BookmarkColor2String, new ChunkStyle (new Gdk.Color (105, 156, 235)));
424
 
                        
425
 
                        SetStyle (ErrorUnderlineString, new ChunkStyle (new Gdk.Color (255, 0, 0)));
426
 
                        SetStyle (WarningUnderlineString, new ChunkStyle (new Gdk.Color (30, 30, 255)));
427
 
                        
428
 
                        SetStyle ("diff.line-added", new Mono.TextEditor.ChunkStyle (new Gdk.Color (0,  0x8B,  0x8B), ChunkProperties.None));
429
 
                        SetStyle ("diff.line-removed", new Mono.TextEditor.ChunkStyle (new Gdk.Color (0x6A, 0x5A, 0xCD), ChunkProperties.None));
430
 
                        SetStyle ("diff.line-changed", new ReferencedChunkStyle (this, "text.preprocessor"));
431
 
                        SetStyle ("diff.header", new Mono.TextEditor.ChunkStyle (new Gdk.Color (0, 128,  0), ChunkProperties.Bold));
432
 
                        SetStyle ("diff.header-seperator", new Mono.TextEditor.ChunkStyle (new Gdk.Color (0,  0,  255)));
433
 
                        SetStyle ("diff.header-oldfile", new ReferencedChunkStyle (this, "diff.header"));
434
 
                        SetStyle ("diff.header-newfile", new ReferencedChunkStyle (this, "diff.header"));
435
 
                        SetStyle ("diff.location", new ReferencedChunkStyle (this, "keyword.misc"));
436
 
                        
437
 
                        SetStyle (PrimaryTemplateColorString, new ChunkStyle (new Gdk.Color (0xB4, 0xE4, 0xB4), new Gdk.Color (0xB4, 0xE4, 0xB4)));
438
 
                        SetStyle (PrimaryTemplateHighlightedColorString, new ChunkStyle (new Gdk.Color (0, 0, 0), new Gdk.Color (0xB4, 0xE4, 0xB4)));
439
 
                        
440
 
                        SetStyle (SecondaryTemplateColorString, new ChunkStyle (new Gdk.Color (0xFF, 0xFF, 0xFF), new Gdk.Color (0xFF, 0xFF, 0xFF)));
441
 
                        SetStyle (SecondaryTemplateHighlightedColorString, new ChunkStyle (new Gdk.Color (0x7F, 0x7F, 0x7F), new Gdk.Color (0xFF, 0xFF, 0xFF)));
 
390
                        SetStyle (CaretString, DefaultString);
 
391
 
 
392
                        SetStyle (LineNumberString, 172, 168, 153, 255, 255, 255);
 
393
                        SetStyle (LineNumberFgHighlightedString, 122, 118, 103);
 
394
                        
 
395
                        SetStyle (IconBarBgString,        255, 255, 255);
 
396
                        SetStyle (IconBarSeperatorString, 172, 168, 153);
 
397
                        
 
398
                        SetStyle (FoldLineString, LineNumberString);
 
399
                        SetStyle (FoldLineHighlightedString, IconBarSeperatorString);
 
400
                        SetStyle (FoldToggleMarkerString, DefaultString);
 
401
                        
 
402
                        SetStyle (LineDirtyBgString,   255, 238, 98);
 
403
                        SetStyle (LineChangedBgString, 108, 226, 108);
 
404
                        
 
405
                        SetStyle (SelectionString,     255, 255, 255, 96, 87, 210);
 
406
                        
 
407
                        SetStyle (LineMarkerString,    200, 255, 255);
 
408
                        SetStyle (RulerString,         187, 187, 187);
 
409
                        SetStyle (WhitespaceMarkerString, RulerString);
 
410
                        
 
411
                        SetStyle (InvalidLineMarkerString,     210,   0,   0);
 
412
                        
 
413
                        SetStyle (BreakpointString,            255, 255, 255, 125, 0, 0);
 
414
                        
 
415
                        SetStyle (BreakpointMarkerColor1String, 255, 255, 255);
 
416
                        SetStyle (BreakpointMarkerColor2String, 125, 0, 0);
 
417
 
 
418
                        SetStyle (DisabledBreakpointBgString,   237, 220, 220);
 
419
                        
 
420
                        SetStyle (CurrentDebugLineString,               0,   0,   0, 255, 255, 0);
 
421
                        SetStyle (CurrentDebugLineMarkerColor1String, 255, 255,   0);
 
422
                        SetStyle (CurrentDebugLineMarkerColor2String, 255, 255, 204);
 
423
                        SetStyle (CurrentDebugLineMarkerBorderString, 102, 102,   0);
 
424
                        
 
425
                        SetStyle (DebugStackLineString,               0,   0,   0, 128, 255, 128);
 
426
                        SetStyle (DebugStackLineMarkerColor1String, 128, 255, 128);
 
427
                        SetStyle (DebugStackLineMarkerColor2String, 204, 255, 204);
 
428
                        SetStyle (DebugStackLineMarkerBorderString,  51, 102,  51); 
 
429
                        
 
430
                        SetStyle (InvalidBreakpointBgString, 237, 220, 220);
 
431
                        SetStyle (InvalidBreakpointMarkerColor1String, 237, 220, 220);
 
432
                        SetStyle (InvalidBreakpointMarkerBorderString, 125, 0, 0);
 
433
                        SetStyle (SearchTextBgString, 255, 226, 185);
 
434
                        SetStyle (SearchTextMainBgString, 243, 221, 72);
 
435
                        
 
436
                        SetStyle (BracketHighlightRectangleString, 128, 128, 128, 196, 196, 196);
 
437
                        
 
438
                        SetStyle (BookmarkColor1String, 255, 255, 255);
 
439
                        SetStyle (BookmarkColor2String, 105, 156, 235);
 
440
                        
 
441
                        SetStyle (ErrorUnderlineString, 255, 0, 0);
 
442
                        SetStyle (WarningUnderlineString, 30, 30, 255);
 
443
                        
 
444
                        SetStyle ("diff.line-added",          0, 0x8B, 0x8B, ChunkProperties.None);
 
445
                        SetStyle ("diff.line-removed",     0x6A, 0x5A, 0xCD, ChunkProperties.None);
 
446
                        SetStyle ("diff.line-changed",     "text.preprocessor");
 
447
                        SetStyle ("diff.header",              0, 128,     0, BOLD);
 
448
                        SetStyle ("diff.header-seperator",    0,   0,   255);
 
449
                        SetStyle ("diff.header-oldfile",   "diff.header");
 
450
                        SetStyle ("diff.header-newfile",   "diff.header");
 
451
                        SetStyle ("diff.location",         "keyword.misc");
 
452
                        
 
453
                        SetStyle (PrimaryTemplateColorString, 0xB4, 0xE4, 0xB4, 0xB4, 0xE4, 0xB4);
 
454
                        SetStyle (PrimaryTemplateHighlightedColorString, 0, 0, 0, 0xB4, 0xE4, 0xB4);
 
455
                         
 
456
                        SetStyle (SecondaryTemplateColorString,            0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF);
 
457
                        SetStyle (SecondaryTemplateHighlightedColorString, 0x7F, 0x7F, 0x7F, 0xFF, 0xFF, 0xFF);
 
458
                        
 
459
                        SetStyle ("bubble.error.text",             0,    0,   0);
 
460
                        
 
461
                        SetStyleFromWeb ("bubble.warning.light.color1", "#fbf7eb");
 
462
                        SetStyleFromWeb ("bubble.warning.light.color2", "#f4eeda");
 
463
                        SetStyleFromWeb ("bubble.warning.dark.color1", "#f5eed8");
 
464
                        SetStyleFromWeb ("bubble.warning.dark.color2", "#eadebb");
 
465
                        SetStyleFromWeb ("bubble.warning.line.top", "#e5e3dd");
 
466
                        SetStyleFromWeb ("bubble.warning.line.bottom", "#d3cdba");
 
467
                        SetStyleFromWeb ("bubble.warning.text", "black");
 
468
                        
 
469
                        SetStyleFromWeb ("bubble.inactive.warning.light.color1", "#fbfbfb");
 
470
                        SetStyleFromWeb ("bubble.inactive.warning.light.color2", "#f5f3ed");
 
471
                        SetStyleFromWeb ("bubble.inactive.warning.dark.color1", "#f7f7f7");
 
472
                        SetStyleFromWeb ("bubble.inactive.warning.dark.color2", "#ece7dd");
 
473
                        SetStyleFromWeb ("bubble.inactive.warning.line.top", "#f2f2f2");
 
474
                        SetStyleFromWeb ("bubble.inactive.warning.line.bottom", "#eceae6");
 
475
                        
 
476
                        SetStyleFromWeb ("bubble.error.light.color1", "#faf2f0");
 
477
                        SetStyleFromWeb ("bubble.error.light.color2", "#f5eae7");
 
478
                        SetStyleFromWeb ("bubble.error.dark.color1", "#f6e6e2");
 
479
                        SetStyleFromWeb ("bubble.error.dark.color2", "#ead7d2");
 
480
                        SetStyleFromWeb ("bubble.error.line.top", "#e5e0e0");
 
481
                        SetStyleFromWeb ("bubble.error.line.bottom", "#cfc6c4");
 
482
                        SetStyleFromWeb ("bubble.error.text", "black");
 
483
                        
 
484
                        SetStyleFromWeb ("bubble.inactive.error.light.color1", "#fcfcfc");
 
485
                        SetStyleFromWeb ("bubble.inactive.error.light.color2", "#f5f4f3");
 
486
                        SetStyleFromWeb ("bubble.inactive.error.dark.color1", "#f9f9f9");
 
487
                        SetStyleFromWeb ("bubble.inactive.error.dark.color2", "#ebe8e6");
 
488
                        SetStyleFromWeb ("bubble.inactive.error.line.top", "#f2f2f2");
 
489
                        SetStyleFromWeb ("bubble.inactive.error.line.bottom", "#eceaea");
442
490
                }
443
491
                
444
492
                protected void PopulateDefaults ()
445
493
                {
446
 
                        SetStyle ("text", new Mono.TextEditor.ChunkStyle (new Gdk.Color (0, 0, 0)));
447
 
                        SetStyle ("text.punctuation", new Mono.TextEditor.ChunkStyle (new Gdk.Color (0, 0, 0)));
448
 
                        SetStyle ("text.link", new Mono.TextEditor.ChunkStyle (new Gdk.Color (0, 0, 255)));
449
 
                        SetStyle ("text.preprocessor", new Mono.TextEditor.ChunkStyle (new Gdk.Color (0, 128 , 0)));
450
 
                        SetStyle ("text.preprocessor.keyword", new Mono.TextEditor.ChunkStyle (new Gdk.Color (0, 128, 0), ChunkProperties.Bold));
451
 
                        SetStyle ("text.markup", new Mono.TextEditor.ChunkStyle (new Gdk.Color (0, 0x8A , 0x8C)));
452
 
                        SetStyle ("text.markup.tag", new Mono.TextEditor.ChunkStyle (new Gdk.Color (0x6A, 0x5A, 0xCD)));
453
 
                        
454
 
                        SetStyle ("comment", new Mono.TextEditor.ChunkStyle (new Gdk.Color (0, 0, 255)));
455
 
                        SetStyle ("comment.line", new Mono.TextEditor.ChunkStyle (new Gdk.Color (0, 0, 255)));
456
 
                        SetStyle ("comment.block", new Mono.TextEditor.ChunkStyle (new Gdk.Color (0, 0, 255)));
457
 
                        SetStyle ("comment.doc", new Mono.TextEditor.ChunkStyle (new Gdk.Color (0, 0, 255)));
458
 
                        SetStyle ("comment.tag", new Mono.TextEditor.ChunkStyle (new Gdk.Color (128, 128, 128), ChunkProperties.Italic));
459
 
                        SetStyle ("comment.tag.line", new Mono.TextEditor.ChunkStyle (new Gdk.Color (128, 128, 128), ChunkProperties.Italic));
460
 
                        SetStyle ("comment.tag.block", new Mono.TextEditor.ChunkStyle (new Gdk.Color (128, 128, 128), ChunkProperties.Italic));
461
 
                        SetStyle ("comment.tag.doc", new Mono.TextEditor.ChunkStyle (new Gdk.Color (128, 128, 128), ChunkProperties.Italic));
462
 
                        SetStyle ("comment.keyword", new Mono.TextEditor.ChunkStyle (new Gdk.Color (0, 0,255), ChunkProperties.Italic));
463
 
                        SetStyle ("comment.keyword.todo", new Mono.TextEditor.ChunkStyle (new Gdk.Color (0, 0, 255), ChunkProperties.Bold));
464
 
                        
465
 
                        SetStyle ("constant", new Mono.TextEditor.ChunkStyle (new Gdk.Color (255, 0, 255)));
466
 
                        SetStyle ("constant.digit", new Mono.TextEditor.ChunkStyle (new Gdk.Color (255, 0, 255)));
467
 
                        SetStyle ("constant.language", new Mono.TextEditor.ChunkStyle (new Gdk.Color (165,  42,  42), ChunkProperties.Bold));
468
 
                        SetStyle ("constant.language.void", new Mono.TextEditor.ChunkStyle (new Gdk.Color (165,  42,  42), ChunkProperties.Bold));
469
 
                        
470
 
                        SetStyle ("string", new Mono.TextEditor.ChunkStyle (new Gdk.Color (255, 0, 255)));
471
 
                        SetStyle ("string.single", new Mono.TextEditor.ChunkStyle (new Gdk.Color (255, 0, 255)));
472
 
                        SetStyle ("string.double", new Mono.TextEditor.ChunkStyle (new Gdk.Color (255, 0, 255)));
473
 
                        SetStyle ("string.other", new Mono.TextEditor.ChunkStyle (new Gdk.Color (255, 0, 255)));
474
 
                        
475
 
                        SetStyle ("keyword.semantic.type", new Mono.TextEditor.ChunkStyle (new Gdk.Color (0, 0x8A , 0x8C)));
476
 
                        
477
 
                        SetStyle ("keyword", new Mono.TextEditor.ChunkStyle (new Gdk.Color (0, 0, 0), ChunkProperties.Bold));
478
 
                        
479
 
                        SetStyle ("keyword.access", new Mono.TextEditor.ChunkStyle (new Gdk.Color (165,  42,  42), ChunkProperties.Bold));
480
 
                        SetStyle ("keyword.operator", new Mono.TextEditor.ChunkStyle (new Gdk.Color (165,  42,  42), ChunkProperties.Bold));
481
 
                        SetStyle ("keyword.operator.declaration", new Mono.TextEditor.ChunkStyle (new Gdk.Color (165,  42,  42), ChunkProperties.Bold));
482
 
                        SetStyle ("keyword.selection", new Mono.TextEditor.ChunkStyle (new Gdk.Color (165,  42,  42), ChunkProperties.Bold));
483
 
                        SetStyle ("keyword.iteration", new Mono.TextEditor.ChunkStyle (new Gdk.Color (165,  42,  42), ChunkProperties.Bold));
484
 
                        SetStyle ("keyword.jump", new Mono.TextEditor.ChunkStyle (new Gdk.Color (165,  42,  42), ChunkProperties.Bold));
485
 
                        SetStyle ("keyword.context", new Mono.TextEditor.ChunkStyle (new Gdk.Color (165,  42,  42), ChunkProperties.Bold));
486
 
                        SetStyle ("keyword.exceptions", new Mono.TextEditor.ChunkStyle (new Gdk.Color (165,  42,  42), ChunkProperties.Bold));
487
 
                        SetStyle ("keyword.modifier", new Mono.TextEditor.ChunkStyle (new Gdk.Color (165,  42,  42), ChunkProperties.Bold));
488
 
                        SetStyle ("keyword.type", new Mono.TextEditor.ChunkStyle (new Gdk.Color ( 46, 139,  87), ChunkProperties.Bold));
489
 
                        SetStyle ("keyword.namespace", new Mono.TextEditor.ChunkStyle (new Gdk.Color (165,  42,  42), ChunkProperties.Bold));
490
 
                        SetStyle ("keyword.property", new Mono.TextEditor.ChunkStyle (new Gdk.Color (165,  42,  42), ChunkProperties.Bold));
491
 
                        SetStyle ("keyword.declaration", new Mono.TextEditor.ChunkStyle (new Gdk.Color (165,  42,  42), ChunkProperties.Bold));
492
 
                        SetStyle ("keyword.parameter", new Mono.TextEditor.ChunkStyle (new Gdk.Color (165,  42,  42), ChunkProperties.Bold));
493
 
                        SetStyle ("keyword.misc", new Mono.TextEditor.ChunkStyle (new Gdk.Color (165,  42,  42), ChunkProperties.Bold));
494
 
                        
 
494
                        SetStyle ("text",                      0,    0,    0);
 
495
                        SetStyle ("text.punctuation",          0,    0,    0);
 
496
                        SetStyle ("text.link",                 0,    0,  255);
 
497
                        SetStyle ("text.preprocessor",         0,  128,    0);
 
498
                        SetStyle ("text.preprocessor.keyword", 0,  128,    0, BOLD);
 
499
                        SetStyle ("text.markup",               0, 0x8A, 0x8C);
 
500
                        SetStyle ("text.markup.tag",        0x6A, 0x5A, 0xCD);
 
501
                        
 
502
                        SetStyle ("comment",              0,   0, 255);
 
503
                        SetStyle ("comment.line",         0,   0, 255);
 
504
                        SetStyle ("comment.block",        0,   0, 255);
 
505
                        SetStyle ("comment.doc",          0,   0, 255);
 
506
                        SetStyle ("comment.tag",        128, 128, 128, ITALIC);
 
507
                        SetStyle ("comment.tag.line",   128, 128, 128, ITALIC);
 
508
                        SetStyle ("comment.tag.block" , 128, 128, 128, ITALIC);
 
509
                        SetStyle ("comment.tag.doc",    128, 128, 128, ITALIC);
 
510
                        SetStyle ("comment.keyword",      0,   0, 255, ITALIC);
 
511
                        SetStyle ("comment.keyword.todo", 0,   0, 255, BOLD);
 
512
                        
 
513
                        SetStyle ("constant",               255,   0, 255);
 
514
                        SetStyle ("constant.digit",         255,   0, 255);
 
515
                        SetStyle ("constant.language",      165,  42,  42, BOLD);
 
516
                        SetStyle ("constant.language.void", 165,  42,  42, BOLD);
 
517
                        
 
518
                        SetStyle ("string",        255, 0, 255);
 
519
                        SetStyle ("string.single", 255, 0, 255);
 
520
                        SetStyle ("string.double", 255, 0, 255);
 
521
                        SetStyle ("string.other",  255, 0, 255);
 
522
                        
 
523
                        SetStyle ("keyword.semantic.type", 0, 0x8A , 0x8C);
 
524
                        
 
525
                        SetStyle ("keyword", 0, 0, 0, BOLD);
 
526
                        
 
527
                        SetStyle ("keyword.access",      165,  42,  42, BOLD);
 
528
                        SetStyle ("keyword.operator",    165,  42,  42, BOLD);
 
529
                        SetStyle ("keyword.operator.declaration", 165,  42,  42, BOLD);
 
530
                        SetStyle ("keyword.selection",   165,  42,  42, BOLD);
 
531
                        SetStyle ("keyword.iteration",   165,  42,  42, BOLD);
 
532
                        SetStyle ("keyword.jump",        165,  42,  42, BOLD);
 
533
                        SetStyle ("keyword.context",     165,  42,  42, BOLD);
 
534
                        SetStyle ("keyword.exceptions",  165,  42,  42, BOLD);
 
535
                        SetStyle ("keyword.modifier",    165,  42,  42, BOLD);
 
536
                        SetStyle ("keyword.type",         46, 139,  87, BOLD);
 
537
                        SetStyle ("keyword.namespace",   165,  42,  42, BOLD);
 
538
                        SetStyle ("keyword.property",    165,  42,  42, BOLD);
 
539
                        SetStyle ("keyword.declaration", 165,  42,  42, BOLD);
 
540
                        SetStyle ("keyword.parameter",   165,  42,  42, BOLD);
 
541
                        SetStyle ("keyword.misc",        165,  42,  42, BOLD);
495
542
                }
496
543
                
 
544
                const ChunkProperties BOLD   = ChunkProperties.Bold;
 
545
                const ChunkProperties ITALIC = ChunkProperties.Bold;
 
546
                
497
547
                void SetStyle (string name, ChunkStyle style)
498
548
                {
499
549
                        styleLookupTable[name] = style;
500
550
                }
501
551
                
 
552
                void SetStyle (string name, string referencedStyleName)
 
553
                {
 
554
                        styleLookupTable[name] = new ReferencedChunkStyle (this, referencedStyleName);
 
555
                }
 
556
                
 
557
                void SetStyle (string name, byte r, byte g, byte b)
 
558
                {
 
559
                        SetStyle (name, new ChunkStyle (new Gdk.Color (r, g, b)));
 
560
                }
 
561
                
 
562
                void SetStyleFromWeb (string name, string colorString)
 
563
                {
 
564
                        Gdk.Color color = new Color ();
 
565
                        if (!Gdk.Color.Parse (colorString, ref color)) 
 
566
                                throw new Exception ("Can't parse color: " + colorString);
 
567
                        SetStyle (name, new ChunkStyle (color));
 
568
                }
 
569
                
 
570
                void SetStyle (string name, byte r, byte g, byte b, byte bg_r, byte bg_g, byte bg_b)
 
571
                {
 
572
                        SetStyle (name, new ChunkStyle (new Gdk.Color (r, g, b), new Gdk.Color (bg_r, bg_g, bg_b)));
 
573
                }
 
574
                        
 
575
                void SetStyle (string name, byte r, byte g, byte b, ChunkProperties properties)
 
576
                {
 
577
                        SetStyle (name, new ChunkStyle (new Gdk.Color (r, g, b), properties));
 
578
                }
 
579
                        
 
580
/*              void SetStyle (string name, byte r, byte g, byte b, byte bg_r, byte bg_g, byte bg_b, ChunkProperties properties)
 
581
                {
 
582
                        SetStyle (name, new ChunkStyle (new Gdk.Color (r, g, b), new Gdk.Color (bg_r, bg_g, bg_b), properties));
 
583
                }*/
 
584
                
502
585
                public ChunkStyle GetDefaultChunkStyle ()
503
586
                {
504
587
                        ChunkStyle style;
544
627
                                if (weight.ToUpper ().IndexOf ("UNDERLINE") >= 0)
545
628
                                        properties |= ChunkProperties.Underline;
546
629
                        }
547
 
                        SetStyle (name, new Mono.TextEditor.ChunkStyle (color, bgColor, properties));
 
630
                        SetStyle (name, new ChunkStyle (color, bgColor, properties));
548
631
                }
549
632
                
550
633
                public Gdk.Color GetColorFromString (string colorString)