Remove old comment dialog

This commit is contained in:
Matthias Melcher 2025-11-28 01:08:54 +01:00
parent 18e31e90da
commit 599513b513
7 changed files with 307 additions and 667 deletions

View File

@ -561,83 +561,6 @@ Fl_Double_Window* make_class_panel() {
return class_panel;
}
Fl_Double_Window *comment_panel=(Fl_Double_Window *)0;
Fl_Text_Editor *comment_input=(Fl_Text_Editor *)0;
Fl_Return_Button *comment_panel_ok=(Fl_Return_Button *)0;
Fl_Button *comment_panel_cancel=(Fl_Button *)0;
Fl_Light_Button *comment_in_source=(Fl_Light_Button *)0;
Fl_Light_Button *comment_in_header=(Fl_Light_Button *)0;
Fl_Menu_Button *comment_predefined=(Fl_Menu_Button *)0;
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);
{ Fl_Text_Editor* o = comment_input = new Fl_Text_Editor(110, 10, 430, 230);
comment_input->box(FL_DOWN_BOX);
comment_input->labelsize(11);
comment_input->textfont(4);
comment_input->textsize(11);
comment_input->textcolor((Fl_Color)58);
Fl_Group::current()->resizable(comment_input);
o->when(FL_WHEN_ENTER_KEY_CHANGED|FL_WHEN_RELEASE);
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");
comment_panel_ok->labelsize(11);
comment_panel_ok->window()->hotspot(comment_panel_ok);
} // Fl_Return_Button* comment_panel_ok
{ comment_panel_cancel = new Fl_Button(460, 250, 80, 20, "Cancel");
comment_panel_cancel->shortcut(0xff1b);
comment_panel_cancel->labelsize(11);
} // Fl_Button* comment_panel_cancel
{ Fl_Box* o = new Fl_Box(110, 250, 250, 20);
o->labelsize(11);
Fl_Group::current()->resizable(o);
} // Fl_Box* o
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(10, 10, 90, 243);
o->labelsize(11);
{ comment_in_source = new Fl_Light_Button(10, 10, 90, 20, "In Source");
comment_in_source->tooltip("Put the comment into the source (.cxx) file.");
comment_in_source->labelsize(11);
comment_in_source->when(FL_WHEN_NEVER);
} // Fl_Light_Button* comment_in_source
{ comment_in_header = new Fl_Light_Button(10, 40, 90, 20, "In Header");
comment_in_header->tooltip("Put the comment into the header (.h) file.");
comment_in_header->labelsize(11);
comment_in_header->when(FL_WHEN_NEVER);
} // Fl_Light_Button* comment_in_header
{ comment_predefined = new Fl_Menu_Button(10, 70, 90, 20, "Predefined");
comment_predefined->labelsize(11);
comment_predefined->textsize(11);
} // Fl_Menu_Button* comment_predefined
{ comment_load = new Fl_Button(10, 100, 90, 20, "Import...");
comment_load->labelsize(11);
} // Fl_Button* comment_load
{ Fl_Box* o = new Fl_Box(10, 132, 90, 121);
o->labelsize(11);
Fl_Group::current()->resizable(o);
} // Fl_Box* o
o->end();
} // Fl_Group* o
comment_panel->set_modal();
o->size_range(320, 180);
comment_panel->end();
} // Fl_Double_Window* comment_panel
return comment_panel;
}
void type_make_cb(Fl_Widget*,void*d) {
const char *type_name = (const char*)d;
if (Fluid.proj.tree.current && Fluid.proj.tree.current->can_have_children())

View File

@ -429,59 +429,6 @@ Function {make_class_panel()} {open
}
}
Function {make_comment_panel()} {open
} {
Fl_Window comment_panel {
label {Comment Properties}
xywh {519 374 550 280} type Double labelsize 11 hide resizable
code0 {o->size_range(320, 180);} modal
} {
Fl_Text_Editor comment_input {
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);}
code1 {o->buffer(new Fl_Text_Buffer());}
}
Fl_Group {} {open
xywh {110 250 430 20} labelsize 11
} {
Fl_Return_Button comment_panel_ok {
label OK
xywh {370 250 80 20} labelsize 11 hotspot
}
Fl_Button comment_panel_cancel {
label Cancel
xywh {460 250 80 20} shortcut 0xff1b labelsize 11
}
Fl_Box {} {
xywh {110 250 250 20} labelsize 11 resizable
}
}
Fl_Group {} {open
xywh {10 10 90 243} labelsize 11
} {
Fl_Light_Button comment_in_source {
label {In Source}
tooltip {Put the comment into the source (.cxx) file.} xywh {10 10 90 20} labelsize 11 when 0
}
Fl_Light_Button comment_in_header {
label {In Header}
tooltip {Put the comment into the header (.h) file.} xywh {10 40 90 20} labelsize 11 when 0
}
Fl_Menu_Button comment_predefined {
label Predefined open
xywh {10 70 90 20} labelsize 11 textsize 11
} {}
Fl_Button comment_load {
label {Import...}
xywh {10 100 90 20} labelsize 11
}
Fl_Box {} {
xywh {10 132 90 121} labelsize 11 resizable
}
}
}
}
Function {type_make_cb(Fl_Widget*,void*d)} {open return_type void
} {
code {const char *type_name = (const char*)d;

View File

@ -83,16 +83,6 @@ extern Fl_Text_Editor *c_comment_input;
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 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;
extern Fl_Light_Button *comment_in_header;
#include <FL/Fl_Menu_Button.H>
extern Fl_Menu_Button *comment_predefined;
extern Fl_Button *comment_load;
Fl_Double_Window* make_comment_panel();
void type_make_cb(Fl_Widget*,void*d);
#include <FL/Fl_Window.H>
extern Fl_Window *widgetbin_panel;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,7 @@
// https://www.fltk.org/bugs.php
//
// generated by Fast Light User Interface Designer (fluid) version 1.0500
// generated by Fast Light User Interface Designer (fluid) version 1.0400
#ifndef widget_panel_h
#define widget_panel_h
@ -112,7 +112,7 @@ extern Fl_Group *data_tabs_data;
extern Fl_Choice *data_mode_2;
extern Fl_Input *wp_data_filename;
extern Fl_Tabs *comment_tabs;
extern Fl_Group *commet_tabs_comment;
extern Fl_Group *comment_tabs_comment;
extern Fl_Text_Editor *comment_tabs_name;
extern void load_comments_preset(Fl_Preferences &menu);
#include <FL/fl_string_functions.h>

View File

@ -23,6 +23,7 @@
#include "nodes/factory.h"
#include "nodes/Widget_Node.h"
#include "nodes/Window_Node.h"
#include "nodes/Function_Node.h"
#include "panels/widget_panel.h"
#include "panels/function_panel.h"
#include "panels/settings_panel.h"
@ -402,6 +403,8 @@ void run_autodoc(const std::string &target_dir) {
Node *t_grd = add_new_widget_from_user("Fl_Grid", Strategy::AS_LAST_CHILD, false);
Node *t_grdc = add_new_widget_from_user("Fl_Button", Strategy::AS_LAST_CHILD, false);
Node *t_data = add_new_widget_from_user("Data", Strategy::AS_LAST_CHILD, false);
Node *t_comment = add_new_widget_from_user("Comment", Strategy::AS_LAST_CHILD, false);
t_comment->name("All work and no play make Jack a dull boy.");
widget_browser->rebuild();
Fluid.proj.update_settings_dialog();
@ -533,10 +536,8 @@ void run_autodoc(const std::string &target_dir) {
// -- Type::Widget_Class is handled like Window_Node
// -- Type::Comment
Fl_Window *adoc_comment_panel = make_comment_panel();
comment_input->buffer()->text("Make sure that the giraffe gets enough hay,\nbut the monkey can't reach it.");
fl_snapshot((target_dir + "comment_panel.png").c_str(), adoc_comment_panel, win_margin, win_blend);
adoc_comment_panel->hide();
select_only(t_comment);
fl_snapshot((target_dir + "comment_panel.png").c_str(), comment_tabs_comment, tab_margin, row_blend);
// ---- widget dialog
t_win->open(); // open the window