import "ide"
-// *** Color Schemes ***
-
-// *** The Old Color Scheme that was causing me auras and ophtalmic migraines -- Uncomment at your own risk! ***
-/*
-FontResource panelFont { $"Courier New", 10 };
-FontResource codeFont { $"Courier New", 10 };
-Color selectionColor = Color { 10, 36, 106 };
-Color selectionText = white;
-Color viewsBackground = white;
-Color viewsText = black;
-Color outputBackground = white;
-Color outputText = black;
-Color projectViewBackground = white;
-Color projectViewText = black;
-Color codeEditorBG = white;
-Color codeEditorFG = black;
-Color marginColor = Color {230, 230, 230};
-Color selectedMarginColor = Color {200, 200, 200};
-Color lineNumbersColor = Color {60, 60, 60};
-SyntaxColorScheme colorScheme
-{
- keywordColors = [ blue, blue ];
- commentColor = dimGray;
- charLiteralColor = crimson;
- stringLiteralColor = crimson;
- preprocessorColor = green;
- numberColor = teal;
-};
-*/
-
-// The new nice dark scheme -- so peaceful on my brain
-
-FontResource panelFont { $"Courier New", 10 };
-FontResource codeFont { $"Courier New", 10 };
-/*
-FontResource panelFont { $"Consolas", 12 };
-FontResource codeFont { $"Consolas", 12 };
-*/
-Color selectionColor = lightYellow;
-Color selectionText = Color { 30, 40, 50 };
-Color viewsBackground = Color { 30, 40, 50 };
-Color viewsText = lightGray;
-Color outputBackground = black;
-Color outputText = lime;
-Color projectViewBackground = Color { 30, 40, 50 };
-Color projectViewText = lightGray;
-Color codeEditorBG = black;
-Color codeEditorFG = ivory;
-Color marginColor = Color {24, 24, 24};
-Color selectedMarginColor = Color {64, 64, 64};
-Color lineNumbersColor = Color {160, 160, 160};
-SyntaxColorScheme colorScheme
-{
- keywordColors = [ skyBlue, skyBlue ];
- commentColor = Color { 125, 125, 125 };
- charLiteralColor = Color { 245, 50, 245 };
- stringLiteralColor = Color { 245, 50, 245 };
- preprocessorColor = { 120, 220, 140 };
- numberColor = Color { 0, 192, 192 };
-};
-
-// *********************
-
import "findCtx"
import "findExp"
import "findParams"
class CodeEditor : Window
{
- background = marginColor;
+ background = colorScheme.marginColor;
borderStyle = sizableDeep;
hasMaximize = true;
hasMinimize = true;
freeCaret = ideSettings.useFreeCaret, caretFollowsScrolling = ideSettings.caretFollowsScrolling,
tabKey = true, smartHome = true;
tabSelection = true, /*maxLineSize = 65536, */parent = this, hasHorzScroll = true, hasVertScroll = true;
- selectionColor = selectionColor, selectionText = selectionText,
- background = codeEditorBG, foreground = codeEditorFG, syntaxColorScheme = colorScheme,
+ selectionColor = colorScheme.selectionColor, selectionText = colorScheme.selectionText,
+ background = colorScheme.codeEditorBG, foreground = colorScheme.codeEditorFG, syntaxColorScheme = colorScheme.syntaxColors,
font = font, borderStyle = none;
anchor = Anchor { left = 0, right = 0, top = 0, bottom = 0 };
int line = editBox.lineNumber + 1;
if(projectView)
{
- CompilerConfig compiler = ideSettings.GetCompilerConfig(ide.workspace.compiler);
+ CompilerConfig compiler = ideConfig.compilers.GetCompilerConfig(ide.workspace.activeCompiler);
ProjectConfig config = projectView.project.config;
int bitDepth = ide.workspace.bitDepth;
bool useValgrind = ide.workspace.useValgrind;
if(!parentClosing)
{
if(ide.workspace && fileName)
- ide.workspace.UpdateOpenedFileInfo(fileName, closed);
+ ide.workspace.UpdateOpenedFileInfo(fileName, closed, false);
if(inUseDebug && !debugClosing)
{
debugClosing = true;
void OnDestroy(void)
{
ObjectInfo oClass, next;
- Class windowClass = eSystem_FindClass(this.privateModule, "ecere::gui::Window");
+ // Class windowClass = eSystem_FindClass(this.privateModule, "ecere::gui::Window");
FreeType(this.functionType);
FreeType(this.instanceType);
void OnRedraw(Surface surface)
{
// Line Numbers
- surface.SetBackground(marginColor);
+ surface.SetBackground(colorScheme.marginColor);
surface.Area(0, 0, editBox.anchor.left.distance, clientSize.h - 1);
if(ideSettings.showLineNumbers)
{
currentLineNumber = editBox.scroll.y / spaceH + 1;
sprintf(lineFormat, " %%%du", maxLineNumberLength);
- surface.SetForeground(lineNumbersColor);
+ surface.SetForeground(colorScheme.lineNumbersColor);
for(i = 0; i < editBox.clientSize.h - 4; i += spaceH)
{
// Highlight current line
if(editBox.lineNumber == currentLineNumber - 1)
{
- surface.SetBackground(selectedMarginColor);
+ surface.SetBackground(colorScheme.selectedMarginColor);
surface.Area(0, i, editBox.anchor.left.distance, i+spaceH-1);
- surface.SetBackground(marginColor);
+ surface.SetBackground(colorScheme.marginColor);
}
sprintf(lineText, lineFormat, currentLineNumber);
if(currentLineNumber <= editBox.numLines)
#endif
Project project;
- // This temporarily fixes issue with 2 overrides in release mode with VC6 (only happens with both ecere.dll and ide.exe compiled in release mode)
+ // This temporarily fixes issue with 2 overrides in release mode with VC6 (only happens with both ecere.dll and ecere-ide.exe compiled in release mode)
if(reentrant) return;
reentrant = true;
if(ide.workspace)
{
- CompilerConfig compiler = ideSettings.GetCompilerConfig(ide.workspace.compiler);
+ CompilerConfig compiler = ideConfig.compilers.GetCompilerConfig(ide.workspace.activeCompiler);
SetTargetBits(ide.workspace.bitDepth ? ide.workspace.bitDepth : GetHostBits());
delete compiler;
}
// TODO: Get symbolsDir from project settings instead...
if(ide.projectView)
{
- CompilerConfig compiler = ideSettings.GetCompilerConfig(ide.workspace.compiler);
+ CompilerConfig compiler = ideConfig.compilers.GetCompilerConfig(ide.workspace.activeCompiler);
ProjectConfig config = project.config;
int bitDepth = ide.workspace.bitDepth;
DirExpression objDir = project.GetObjDir(compiler, config, bitDepth);
ObjectInfo check;
if(!strcmp(name, "this"))
{
- char * name = computed.member.member.string;
- ObjectInfo check;
- for(check = classObject.instances.first; check; check = check.next)
- if(check.name && !strcmp(name, check.name))
- {
- if(prop.Set)
- ((void (*)(void *, void *))(void *)prop.Set)(control, check.instance);
- variable = false;
- break;
- }
+ if(computed.member.member)
+ {
+ char * name = computed.member.member.string;
+ ObjectInfo check;
+ for(check = classObject.instances.first; check; check = check.next)
+ if(check.name && !strcmp(name, check.name))
+ {
+ if(prop.Set)
+ ((void (*)(void *, void *))(void *)prop.Set)(control, check.instance);
+ variable = false;
+ break;
+ }
+ }
}
else
{