FLUID: resizable Command dialogs

This commit is contained in:
Matthias Melcher 2023-02-05 00:35:31 +01:00
parent fa9915e1e3
commit 62331e4a38
2 changed files with 32 additions and 17 deletions

View File

@ -410,8 +410,8 @@ static void cb_shell_run_button(Fl_Return_Button*, void*) {
}
Fl_Double_Window* make_shell_window() {
{ shell_window = new Fl_Double_Window(365, 200, "Shell Command");
{ Fl_Group* o = new Fl_Group(0, 0, 365, 165);
{ shell_window = new Fl_Double_Window(375, 208, "Shell Command");
{ Fl_Group* o = new Fl_Group(0, 0, 375, 165);
{ shell_command_input = new Fl_Input(82, 14, 277, 20, "Command:");
shell_command_input->tooltip("external shell command");
shell_command_input->labelfont(1);
@ -458,8 +458,9 @@ ings");
o->end();
} // Fl_Group* o
o->end();
Fl_Group::current()->resizable(o);
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(0, 160, 365, 40);
{ Fl_Group* o = new Fl_Group(0, 160, 375, 48);
{ Fl_Box* o = new Fl_Box(10, 167, 135, 25);
Fl_Group::current()->resizable(o);
} // Fl_Box* o
@ -475,16 +476,23 @@ ings");
o->end();
} // Fl_Group* o
shell_window->set_modal();
shell_window->size_range(365, 200, 365, 200);
shell_window->size_range(375, 208, 1024, 208);
shell_window->end();
} // Fl_Double_Window* shell_window
{ shell_run_window = new Fl_Double_Window(555, 430, "Shell Command Output");
{ shell_run_terminal = new Fl_Simple_Terminal(10, 10, 535, 375);
Fl_Group::current()->resizable(shell_run_terminal);
} // Fl_Simple_Terminal* shell_run_terminal
{ shell_run_button = new Fl_Return_Button(468, 395, 77, 25, "Close");
shell_run_button->callback((Fl_Callback*)cb_shell_run_button);
} // Fl_Return_Button* shell_run_button
{ Fl_Group* o = new Fl_Group(10, 395, 535, 25);
{ Fl_Box* o = new Fl_Box(10, 395, 435, 25);
o->hide();
Fl_Group::current()->resizable(o);
} // Fl_Box* o
{ shell_run_button = new Fl_Return_Button(445, 395, 100, 25, "Close");
shell_run_button->callback((Fl_Callback*)cb_shell_run_button);
} // Fl_Return_Button* shell_run_button
o->end();
} // Fl_Group* o
shell_run_window->end();
} // Fl_Double_Window* shell_run_window
return shell_run_window;

View File

@ -51,7 +51,7 @@ decl {\#include <string.h>} {private global
}
decl {void init_scheme(void);} {
comment {// initialize the scheme from preferences} selected public global
comment {// initialize the scheme from preferences} public global
}
decl {extern struct Fl_Menu_Item *dbmanager_item;} {public local
@ -291,11 +291,11 @@ Examples:
Function {make_shell_window()} {open
} {
Fl_Window shell_window {
label {Shell Command}
xywh {544 751 365 200} type Double hide modal size_range {365 200 365 200}
label {Shell Command} open selected
xywh {844 473 375 208} type Double resizable modal size_range {375 208 1024 208} visible
} {
Fl_Group {} {open
xywh {0 0 365 165}
xywh {0 0 375 165} resizable
} {
Fl_Input shell_command_input {
label {Command:}
@ -343,7 +343,7 @@ shell_prefs_set();}
}
}
Fl_Group {} {open
xywh {0 160 365 40}
xywh {0 160 375 48}
} {
Fl_Box {} {
xywh {10 167 135 25} resizable
@ -364,20 +364,27 @@ shell_window->hide();}
}
Fl_Window shell_run_window {
label {Shell Command Output}
xywh {887 409 555 430} type Double hide resizable
xywh {887 409 555 430} type Double resizable visible
} {
Fl_Simple_Terminal shell_run_terminal {
xywh {10 10 535 375} resizable
}
Fl_Return_Button shell_run_button {
label Close
callback {Fl_Preferences pos(fluid_prefs, "shell_run_Window_pos");
Fl_Group {} {open
xywh {10 395 535 25}
} {
Fl_Box {} {
xywh {10 395 435 25} hide resizable
}
Fl_Return_Button shell_run_button {
label Close
callback {Fl_Preferences pos(fluid_prefs, "shell_run_Window_pos");
pos.set("x", shell_run_window->x());
pos.set("y", shell_run_window->y());
pos.set("w", shell_run_window->w());
pos.set("h", shell_run_window->h());
shell_run_window->hide();}
xywh {468 395 77 25}
xywh {445 395 100 25}
}
}
}
}