FLTK logo

[master] 4c8927c - FLUID: No syntax highlighting in comment editor (#658)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 4c8927c - FLUID: No syntax highlighting in comment editor (#658) "Matthias Melcher" Jan 21, 2023  
 
commit 4c8927c08344f4275941c4367377f6ca60019648
Author:     Matthias Melcher <github@matthiasm.com>
AuthorDate: Sat Jan 21 18:23:21 2023 +0100
Commit:     Matthias Melcher <github@matthiasm.com>
CommitDate: Sat Jan 21 18:23:48 2023 +0100

    FLUID: No syntax highlighting in comment editor (#658)

 fluid/function_panel.cxx | 15 +++++----------
 fluid/function_panel.fl  | 14 +++++++-------
 fluid/function_panel.h   |  2 +-
 3 files changed, 13 insertions(+), 18 deletions(-)

diff --git fluid/function_panel.cxx fluid/function_panel.cxx
index 26e2a70..12fd7f4 100644
--- fluid/function_panel.cxx
+++ fluid/function_panel.cxx
@@ -625,7 +625,7 @@ Fl_Double_Window* make_class_panel() {
 
 Fl_Double_Window *comment_panel=(Fl_Double_Window *)0;
 
-CodeEditor *comment_input=(CodeEditor *)0;
+Fl_Text_Editor *comment_input=(Fl_Text_Editor *)0;
 
 Fl_Return_Button *comment_panel_ok=(Fl_Return_Button *)0;
 
@@ -642,21 +642,16 @@ Fl_Button *comment_load=(Fl_Button *)0;
 Fl_Double_Window* make_comment_panel() {
   { Fl_Double_Window* o = comment_panel = new Fl_Double_Window(550, 280, "Comment Properties");
     comment_panel->labelsize(11);
-    { CodeEditor* o = comment_input = new CodeEditor(110, 10, 430, 230);
+    { Fl_Text_Editor* o = comment_input = new Fl_Text_Editor(110, 10, 430, 230);
       comment_input->box(FL_DOWN_BOX);
-      comment_input->color(FL_BACKGROUND2_COLOR);
-      comment_input->selection_color(FL_SELECTION_COLOR);
-      comment_input->labeltype(FL_NORMAL_LABEL);
-      comment_input->labelfont(0);
       comment_input->labelsize(11);
-      comment_input->labelcolor(FL_FOREGROUND_COLOR);
       comment_input->textfont(4);
       comment_input->textsize(11);
-      comment_input->align(Fl_Align(FL_ALIGN_TOP));
-      comment_input->when(FL_WHEN_RELEASE);
+      comment_input->textcolor((Fl_Color)58);
       Fl_Group::current()->resizable(comment_input);
       o->when(FL_WHEN_ENTER_KEY_CHANGED|FL_WHEN_RELEASE);
-    } // CodeEditor* comment_input
+      o->buffer(new Fl_Text_Buffer());
+    } // Fl_Text_Editor* comment_input
     { Fl_Group* o = new Fl_Group(110, 250, 430, 20);
       o->labelsize(11);
       { comment_panel_ok = new Fl_Return_Button(370, 250, 80, 20, "OK");
diff --git fluid/function_panel.fl fluid/function_panel.fl
index e1464fd..c830de7 100644
--- fluid/function_panel.fl
+++ fluid/function_panel.fl
@@ -479,14 +479,14 @@ Function {make_class_panel()} {open
 Function {make_comment_panel()} {open
 } {
   Fl_Window comment_panel {
-    label {Comment Properties}
-    xywh {780 296 550 280} type Double labelsize 11 hide resizable
-    code0 {o->size_range(320, 180);} modal
+    label {Comment Properties} open
+    xywh {780 296 550 280} type Double labelsize 11 resizable
+    code0 {o->size_range(320, 180);} modal visible
   } {
-    Fl_Text_Editor comment_input {
-      xywh {110 10 430 230} box DOWN_BOX labelsize 11 textfont 4 textsize 11 resizable
+    Fl_Text_Editor comment_input {selected
+      xywh {110 10 430 230} box DOWN_BOX labelsize 11 textfont 4 textsize 11 textcolor 58 resizable
       code0 {o->when(FL_WHEN_ENTER_KEY_CHANGED|FL_WHEN_RELEASE);}
-      class CodeEditor
+      code1 {o->buffer(new Fl_Text_Buffer());}
     }
     Fl_Group {} {open
       xywh {110 250 430 20} labelsize 11
@@ -986,7 +986,7 @@ Function {make_sourceview()} {open
       xywh {10 10 500 440} selection_color 4 labelcolor 7 resizable
     } {
       Fl_Group {} {
-        label Source open selected
+        label Source open
         xywh {10 35 500 415} labelsize 13 resizable
       } {
         Fl_Text_Editor sv_source {
diff --git fluid/function_panel.h fluid/function_panel.h
index b64c1b9..29562db 100644
--- fluid/function_panel.h
+++ fluid/function_panel.h
@@ -94,7 +94,7 @@ extern Fl_Return_Button *c_panel_ok;
 extern Fl_Button *c_panel_cancel;
 Fl_Double_Window* make_class_panel();
 extern Fl_Double_Window *comment_panel;
-extern CodeEditor *comment_input;
+extern Fl_Text_Editor *comment_input;
 extern Fl_Return_Button *comment_panel_ok;
 extern Fl_Button *comment_panel_cancel;
 extern Fl_Light_Button *comment_in_source;
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.