summaryrefslogtreecommitdiff
path: root/fluid/panels
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2026-01-05 12:54:12 +0100
committerMatthias Melcher <github@matthiasm.com>2026-01-05 21:06:04 +0100
commit89aa5726f8d772e0fec1ebcbdfa3b74aa7a217f8 (patch)
tree2bb2c31e1b283d33a1bff29aa3a105362f2a9435 /fluid/panels
parent5f10939cfa0fc943dfc28b441efa9e9028eef5e5 (diff)
Fluid: Improve std::string output
Fluid: Update Widget_Node to std::string Fluid: Image names to std::string Fluid: std::string tooltip Fluid: stringify Widget_Node::subtype Fluid:: extra_code
Diffstat (limited to 'fluid/panels')
-rw-r--r--fluid/panels/widget_panel.cxx22
-rw-r--r--fluid/panels/widget_panel.fl22
2 files changed, 22 insertions, 22 deletions
diff --git a/fluid/panels/widget_panel.cxx b/fluid/panels/widget_panel.cxx
index f964f7278..a6f4129ae 100644
--- a/fluid/panels/widget_panel.cxx
+++ b/fluid/panels/widget_panel.cxx
@@ -629,7 +629,7 @@ static void cb_widget_image_input(Fl_Input* o, void* v) {
if (v == LOAD) {
if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) {
o->activate();
- o->value(((Widget_Node*)current_widget)->image_name());
+ o->value(((Widget_Node*)current_widget)->image_name().c_str());
} else o->deactivate();
} else {
int mod = 0;
@@ -639,7 +639,7 @@ static void cb_widget_image_input(Fl_Input* o, void* v) {
}
if (mod) Fluid.proj.set_modflag(1);
}
-//fl ▲ ----------=~-==-=~=-~~----------~~=-~~--=~~~~~-~=-~=~= ▲ fl//
+//fl ▲ ----------=~-==-=~=-~~----------~~=-~==~~~-=-=~---=-=~ ▲ fl//
}
static void cb_Browse(Fl_Button* o, void* v) {
@@ -679,7 +679,7 @@ static void cb_widget_deimage_input(Fl_Input* o, void* v) {
if (v == LOAD) {
if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) {
o->activate();
- o->value(((Widget_Node*)current_widget)->inactive_name());
+ o->value(((Widget_Node*)current_widget)->inactive_name().c_str());
} else o->deactivate();
} else {
int mod = 0;
@@ -689,7 +689,7 @@ static void cb_widget_deimage_input(Fl_Input* o, void* v) {
}
if (mod) Fluid.proj.set_modflag(1);
}
-//fl ▲ ----------=~---=-~=~-=-----------~-~--=~~~~~-~-~=-~-=~ ▲ fl//
+//fl ▲ ----------=~---=-~=~-=--------------~~~-~---~-~~=--=-- ▲ fl//
}
static void cb_Browse1(Fl_Button* o, void* v) {
@@ -1702,7 +1702,7 @@ static void cb_wp_gui_tooltip(Fl_Input* o, void* v) {
if (v == LOAD) {
if (current_widget->is_widget()) {
o->activate();
- o->value(((Widget_Node*)current_widget)->tooltip());
+ o->value(((Widget_Node*)current_widget)->tooltip().c_str());
} else {
o->deactivate();
}
@@ -1714,7 +1714,7 @@ static void cb_wp_gui_tooltip(Fl_Input* o, void* v) {
}
if (mod) Fluid.proj.set_modflag(1);
}
-//fl ▲ ----------~==--==-~==~----------~---=~--~--=~~-----=~~ ▲ fl//
+//fl ▲ ----------~==--==-~==~-----------~--~--~~=--=-~----==- ▲ fl//
}
Fl_Group *wp_style_tab=(Fl_Group *)0;
@@ -2172,7 +2172,7 @@ static void cb_e(Fl_Input* o, void* v) {
o->deactivate();
} else {
o->activate();
- o->value(current_widget->subclass());
+ o->value(current_widget->subclass().c_str());
}
} else {
int mod = 0;
@@ -2183,7 +2183,7 @@ static void cb_e(Fl_Input* o, void* v) {
}
if (mod) Fluid.proj.set_modflag(1);
}
-//fl ▲ ----------~=~~--=~-=~=----------~~~-~~=~~~~=~---~~--~- ▲ fl//
+//fl ▲ ----------~=~~--=~-=~=-----------~~==--=--~~~--=---=-= ▲ fl//
}
static void cb_f(Fl_Choice* o, void* v) {
@@ -2303,19 +2303,19 @@ static void cb_v_input(Fl_Input* o, void* v) {
//fl ▼ ---------------------- callback ~~-==~=~-~~==-=--~~--= ▼ fl//
int n = fl_int(o->user_data());
if (v == LOAD) {
- o->value(current_widget->extra_code(n));
+ o->value(current_widget->extra_code(n).c_str());
} else {
int mod = 0;
const char *c = o->value();
const char *d = c_check(c&&c[0]=='#' ? c+1 : c);
if (d) {fl_message("Error in %s: %s",o->label(),d); haderror = 1; return;}
for (Widget_Node *w: Fluid.proj.tree.all_selected_widgets()) {
- w->extra_code(n,c);
+ w->extra_code(n, c);
mod = 1;
}
if (mod) Fluid.proj.set_modflag(1);
}
-//fl ▲ ----------~==--~-~=-~~----------~--~~~~~~==--~=-~~~-~- ▲ fl//
+//fl ▲ ----------~==--~-~=-~~----------~~-=-=~=~-~--~-==---=~ ▲ fl//
}
static void cb_v_input1(Fl_Input* o, void* v) {
diff --git a/fluid/panels/widget_panel.fl b/fluid/panels/widget_panel.fl
index 18108bbbf..03c08272b 100644
--- a/fluid/panels/widget_panel.fl
+++ b/fluid/panels/widget_panel.fl
@@ -519,7 +519,7 @@ Function {make_widget_panel()} {uid 9310
} {
Fl_Window {} {uid 30ee
comment {Use a Double Window to avoid flickering.} open
- xywh {406 252 420 400} type Double labelsize 11 align 80 resizable hotspot
+ xywh {444 254 420 400} type Double labelsize 11 align 80 resizable hotspot
code0 {o->size_range(o->w(), o->h());} size_range {420 400 0 0} visible
} {
Fl_Wizard tabs_wizard {uid 647f
@@ -534,7 +534,7 @@ Function {make_widget_panel()} {uid 9310
} {
Fl_Group wp_gui_tab {uid b76b
label GUI
- callback propagate_load open
+ callback propagate_load open selected
xywh {10 30 400 330} labelsize 11 when 0 resizable
} {
Fl_Group {} {uid d70c
@@ -563,7 +563,7 @@ Use Ctrl-J for newlines.} xywh {95 40 190 20} labelfont 1 labelsize 11 when 15 t
callback {if (v == LOAD) {
if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) {
o->activate();
- o->value(((Widget_Node*)current_widget)->image_name());
+ o->value(((Widget_Node*)current_widget)->image_name().c_str());
} else o->deactivate();
} else {
int mod = 0;
@@ -613,7 +613,7 @@ Use Ctrl-J for newlines.} xywh {95 40 190 20} labelfont 1 labelsize 11 when 15 t
callback {if (v == LOAD) {
if (current_widget->is_widget() && !current_widget->is_a(Type::Window)) {
o->activate();
- o->value(((Widget_Node*)current_widget)->inactive_name());
+ o->value(((Widget_Node*)current_widget)->inactive_name().c_str());
} else o->deactivate();
} else {
int mod = 0;
@@ -1089,7 +1089,7 @@ h, ph, sh, ch, and i} xywh {275 150 55 20} labelsize 11 align 5 textsize 11
o->show();
propagate_load(o, v);
}
-}}
+}} open
xywh {95 185 300 20} labelfont 1 labelsize 11 align 4
} {
Fl_Value_Input {} {uid 4e4e
@@ -1773,7 +1773,7 @@ unselectable, but not grayed out} xywh {225 260 75 20} selection_color 1 labelsi
callback {if (v == LOAD) {
if (current_widget->is_widget()) {
o->activate();
- o->value(((Widget_Node*)current_widget)->tooltip());
+ o->value(((Widget_Node*)current_widget)->tooltip().c_str());
} else {
o->deactivate();
}
@@ -2265,7 +2265,7 @@ if (v == LOAD) {
o->deactivate();
} else {
o->activate();
- o->value(current_widget->subclass());
+ o->value(current_widget->subclass().c_str());
}
} else {
int mod = 0;
@@ -2413,14 +2413,14 @@ if (v == LOAD) {
user_data 0
callback {int n = fl_int(o->user_data());
if (v == LOAD) {
- o->value(current_widget->extra_code(n));
+ o->value(current_widget->extra_code(n).c_str());
} else {
int mod = 0;
const char *c = o->value();
const char *d = c_check(c&&c[0]=='\#' ? c+1 : c);
if (d) {fl_message("Error in %s: %s",o->label(),d); haderror = 1; return;}
for (Widget_Node *w: Fluid.proj.tree.all_selected_widgets()) {
- w->extra_code(n,c);
+ w->extra_code(n, c);
mod = 1;
}
if (mod) Fluid.proj.set_modflag(1);
@@ -3797,7 +3797,7 @@ if (v == LOAD) {
}
}
}
- Fl_Tabs widget_tabs_repo {uid 3194 open
+ Fl_Tabs widget_tabs_repo {uid 3194
xywh {10 10 400 350} hide
code0 {o->hide();}
} {
@@ -3805,7 +3805,7 @@ if (v == LOAD) {
xywh {10 30 400 330} resizable
} {}
}
- Fl_Group {} {uid 7667
+ Fl_Group {} {uid 7667 open
xywh {10 370 400 20} labelsize 11
} {
Fl_Button wLiveMode {uid 9a1d