ide/CodeEditor: Customizable color scheme support
[sdk] / ide / src / panels / OutputView.ec
index ace4e16..db7e1a3 100644 (file)
@@ -15,7 +15,7 @@ class OutputView : Window
    borderStyle = sizable;
    hasClose = true;
    mergeMenus = false;
-   text = "Output";
+   text = $"Output";
    menu = Menu { };
    anchor = Anchor { left = 0, right = 0, bottom = 0 };
    size.h = 240;
@@ -24,11 +24,11 @@ class OutputView : Window
    virtual void OnGotoError(const char * line, bool noParsing);
    virtual void OnCodeLocationParseAndGoTo(const char * line);
 
-   FindDialog findDialog { master = this, editBox = buildBox, isModal = true, autoCreate = false, text = "Find" };
+   FindDialog findDialog { master = this, editBox = buildBox, isModal = true, autoCreate = false, text = $"Find" };
 
    Button buildBtn
    {
-      this, inactive = true, text = "Build", bevelOver = true, isRadio = true, bitmap = null, checked = true;
+      this, inactive = true, text = $"Build", bevelOver = true, isRadio = true, bitmap = null, checked = true;
       size = { 99, 20 };
       anchor = { left = 0, top = 1 };
       font = { $"Tahoma", 8.25f, bold = true };
@@ -42,7 +42,7 @@ class OutputView : Window
 
    Button debugBtn
    {
-      this, inactive = true, text = "Debug", bevelOver = true, isRadio = true, bitmap = null;
+      this, inactive = true, text = $"Debug", bevelOver = true, isRadio = true, bitmap = null;
       size = { 99, 20 };
       anchor = { left = 100, top = 1 };
 
@@ -55,7 +55,7 @@ class OutputView : Window
 
    Button findBtn
    {
-      this, inactive = true, text = "Find", bevelOver = true, isRadio = true, bitmap = null;
+      this, inactive = true, text = $"Find", bevelOver = true, isRadio = true, bitmap = null;
       size = { 99, 20 };
       anchor = { left = 200, top = 1 };
 
@@ -121,10 +121,13 @@ class OutputView : Window
       parent = this, freeCaret = true, autoEmpty = true, multiLine = true;
       readOnly = true, hasVertScroll = true, hasHorzScroll = true;
       anchor = Anchor { left = 0, right = 0, top = 23, bottom = 0 };
-      font = { panelFont.faceName, panelFont.size };
-      background = outputBackground;
-      foreground = outputText;
-      selectionColor = selectionColor, selectionText = selectionText;
+      /*
+      font = { panelFont.faceName, panelFont.size, panelFont.bold, panelFont.italic };
+      background = colorScheme.outputBackground;
+      foreground = colorScheme.outputText;
+      selectionColor = colorScheme.selectionColor;
+      selectionText = colorScheme.selectionText;
+      */
 
       bool NotifyDoubleClick(EditBox editBox, EditLine line, Modifiers mods)
       {
@@ -148,10 +151,13 @@ class OutputView : Window
       parent = this, freeCaret = true, autoEmpty = true, multiLine = true;
       readOnly = true, hasVertScroll = true, hasHorzScroll = true, visible = false;
       anchor = Anchor { left = 0, right = 0, top = 23, bottom = 0 };
-      font = { panelFont.faceName, panelFont.size };
-      background = outputBackground;
-      foreground = outputText;
-      selectionColor = selectionColor, selectionText = selectionText;
+      /*
+      font = { panelFont.faceName, panelFont.size, panelFont.bold, panelFont.italic };
+      background = colorScheme.outputBackground;
+      foreground = colorScheme.outputText;
+      selectionColor = colorScheme.selectionColor;
+      selectionText = colorScheme.selectionText;
+      */
 
       bool NotifyDoubleClick(EditBox editBox, EditLine line, Modifiers mods)
       {
@@ -175,10 +181,13 @@ class OutputView : Window
       parent = this, freeCaret = true, autoEmpty = true, multiLine = true;
       readOnly = true, hasVertScroll = true, hasHorzScroll = true, visible = false;
       anchor = Anchor { left = 0, right = 0, top = 23, bottom = 0 };
-      font = { panelFont.faceName, panelFont.size };
-      background = outputBackground;
-      foreground = outputText;
-      selectionColor = selectionColor, selectionText = selectionText;
+      /*
+      font = { panelFont.faceName, panelFont.size, panelFont.bold, panelFont.italic };
+      background = colorScheme.outputBackground;
+      foreground = colorScheme.outputText;
+      selectionColor = colorScheme.selectionColor;
+      selectionText = colorScheme.selectionText;
+      */
 
       bool NotifyDoubleClick(EditBox editBox, EditLine line, Modifiers mods)
       {
@@ -203,10 +212,11 @@ class OutputView : Window
       parent = this, freeCaret = true, autoEmpty = true, multiLine = true;
       readOnly = true, hasVertScroll = true, hasHorzScroll = true, visible = false;
       anchor = Anchor { left = 0, right = 0, top = 23, bottom = 0 };
-      font = { panelFont.faceName, panelFont.size };
-      background = outputBackground;
-      foreground = outputText;
-      selectionColor = selectionColor, selectionText = selectionText;
+      font = { panelFont.faceName, panelFont.size, panelFont.bold, panelFont.italic };
+      background = colorScheme.outputBackground;
+      foreground = colorScheme.outputText;
+      selectionColor = colorScheme.selectionColor;
+      selectionText = colorScheme.selectionText;
    };
 #endif
 
@@ -270,7 +280,7 @@ class OutputView : Window
       {
          case shiftTab:
          {
-            OutputViewTab switchTo;
+            OutputViewTab switchTo = build;
             if(activeBox == buildBox)
 #ifdef GDB_DEBUG_OUTPUT
                switchTo = gdb;
@@ -325,13 +335,6 @@ class LogBox : EditBox
       LogRaw(string);
    }
 
-   void LogSprintf(const char * entry)
-   {
-      char string[MAX_F_STRING];
-      sprintf(string, entry);
-      LogRaw(string);
-   }
-
    void LogRaw(const char * entry)
    {
       // Cut the line longer than 1024 because Logf prints to a buffer (and we don't want to output crazy long lines either)