ide: Copying bold and size attributes for fonts
[sdk] / ide / src / panels / OutputView.ec
index 6575f76..6da95d5 100644 (file)
@@ -21,8 +21,8 @@ class OutputView : Window
    size.h = 240;
    background = formColor;
 
-   virtual void OnGotoError(char * line, bool noParsing);
-   virtual void OnCodeLocationParseAndGoTo(char * line);
+   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" };
 
@@ -121,7 +121,7 @@ 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 };
+      font = { panelFont.faceName, panelFont.size, panelFont.bold, panelFont.italic };
       background = outputBackground;
       foreground = outputText;
       selectionColor = selectionColor, selectionText = selectionText;
@@ -148,7 +148,7 @@ 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 };
+      font = { panelFont.faceName, panelFont.size, panelFont.bold, panelFont.italic };
       background = outputBackground;
       foreground = outputText;
       selectionColor = selectionColor, selectionText = selectionText;
@@ -175,7 +175,7 @@ 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 };
+      font = { panelFont.faceName, panelFont.size, panelFont.bold, panelFont.italic };
       background = outputBackground;
       foreground = outputText;
       selectionColor = selectionColor, selectionText = selectionText;
@@ -203,7 +203,7 @@ 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 };
+      font = { panelFont.faceName, panelFont.size, panelFont.bold, panelFont.italic };
       background = outputBackground;
       foreground = outputText;
       selectionColor = selectionColor, selectionText = selectionText;
@@ -230,10 +230,10 @@ class OutputView : Window
    bool MenuEditFind(MenuItem selection, Modifiers mods)
    {
       int64 id = selection.id;
-      char * searchString = findDialog.searchString;
+      const char * searchString = findDialog.searchString;
       if(id != 2 && searchString[0])
       {
-         activeBox.Find(searchString, findDialog.wholeWord, findDialog.matchCase, (bool)id);
+         activeBox.Find(searchString, findDialog.wholeWord, findDialog.matchCase, id != 0);
          return true;
       }
       findDialog.Create();
@@ -270,7 +270,7 @@ class OutputView : Window
       {
          case shiftTab:
          {
-            OutputViewTab switchTo;
+            OutputViewTab switchTo = build;
             if(activeBox == buildBox)
 #ifdef GDB_DEBUG_OUTPUT
                switchTo = gdb;
@@ -313,7 +313,7 @@ class LogBox : EditBox
 {
    bool moved, logging, tell;
 
-   void Logf(char * format, ...)
+   void Logf(const char * format, ...)
    {
       char string[MAX_F_STRING*10];
       va_list args;
@@ -325,14 +325,7 @@ class LogBox : EditBox
       LogRaw(string);
    }
 
-   void LogSprintf(char * entry)
-   {
-      char string[MAX_F_STRING];
-      sprintf(string, entry);
-      LogRaw(string);
-   }
-
-   void LogRaw(char * entry)
+   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)
       //if(len > 1023) line[1023] = '\0';
@@ -360,7 +353,7 @@ class LogBox : EditBox
          Log(entry);
    }
 
-   void Log(char * string)
+   void Log(const char * string)
    {
       int x1, y1, x2, y2;
       Point scrl;
@@ -388,7 +381,7 @@ class LogBox : EditBox
       logging = false;
    }
 
-   void Tellf(char * format, ...)
+   void Tellf(const char * format, ...)
    {
       char string[MAX_F_STRING*10];
       va_list args;
@@ -400,7 +393,7 @@ class LogBox : EditBox
       Tell(string);
    }
 
-   void Tell(char * string)
+   void Tell(const char * string)
    {
       Log(string);
       if(!moved)