mirror of https://github.com/fltk/fltk
Added Fl_Simple_Terminal to Fluid.
This commit is contained in:
parent
6a61772c80
commit
6ff11dd8d0
|
@ -98,6 +98,7 @@ static Fl_Pixmap protected_pixmap(protected_xpm);
|
|||
#include "pixmaps/flWidgetClass.xpm"
|
||||
#include "pixmaps/flTree.xpm"
|
||||
#include "pixmaps/flTable.xpm"
|
||||
#include "pixmaps/flSimpleTerminal.xpm"
|
||||
|
||||
static Fl_Pixmap window_pixmap(flWindow_xpm);
|
||||
static Fl_Pixmap button_pixmap(flButton_xpm);
|
||||
|
@ -150,6 +151,7 @@ static Fl_Pixmap widgetclass_pixmap(flWidgetClass_xpm);
|
|||
static Fl_Pixmap data_pixmap(flData_xpm);
|
||||
static Fl_Pixmap tree_pixmap(flTree_xpm);
|
||||
static Fl_Pixmap table_pixmap(flTable_xpm);
|
||||
static Fl_Pixmap simple_terminal_pixmap(flSimpleTerminal_xpm);
|
||||
|
||||
Fl_Pixmap *pixmap[] = { 0, &window_pixmap, &button_pixmap, &checkbutton_pixmap, &roundbutton_pixmap, /* 0..4 */
|
||||
&box_pixmap, &group_pixmap, &function_pixmap, &code_pixmap, &codeblock_pixmap, &declaration_pixmap, /* 5..10 */
|
||||
|
@ -160,7 +162,8 @@ Fl_Pixmap *pixmap[] = { 0, &window_pixmap, &button_pixmap, &checkbutton_pixmap,
|
|||
&checkbrowser_pixmap, &filebrowser_pixmap, &clock_pixmap, &help_pixmap, &progress_pixmap, /* 33..36 */
|
||||
&slider_pixmap, &scrollbar_pixmap, &valueslider_pixmap, &adjuster_pixmap, &counter_pixmap, /* 37..41 */
|
||||
&dial_pixmap, &roller_pixmap, &valueinput_pixmap, &valueoutput_pixmap, &comment_pixmap, /* 42..46 */
|
||||
&spinner_pixmap, &widgetclass_pixmap, &data_pixmap, &tree_pixmap, &table_pixmap }; /* 47..51 */
|
||||
&spinner_pixmap, &widgetclass_pixmap, &data_pixmap, &tree_pixmap, &table_pixmap, /* 47..51 */
|
||||
&simple_terminal_pixmap }; /* 52 */
|
||||
|
||||
extern int show_comments;
|
||||
|
||||
|
|
|
@ -410,15 +410,6 @@ Fl_Double_Window* make_shell_window() {
|
|||
} // 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);
|
||||
shell_run_terminal->box(FL_DOWN_BOX);
|
||||
shell_run_terminal->color(FL_FOREGROUND_COLOR);
|
||||
shell_run_terminal->selection_color(FL_BACKGROUND_COLOR);
|
||||
shell_run_terminal->labeltype(FL_NORMAL_LABEL);
|
||||
shell_run_terminal->labelfont(0);
|
||||
shell_run_terminal->labelsize(14);
|
||||
shell_run_terminal->labelcolor(FL_FOREGROUND_COLOR);
|
||||
shell_run_terminal->align(Fl_Align(FL_ALIGN_CENTER));
|
||||
shell_run_terminal->when(FL_WHEN_RELEASE);
|
||||
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");
|
||||
|
|
|
@ -28,9 +28,6 @@ decl {\#include <FL/Fl_Text_Buffer.H>} {public local
|
|||
decl {\#include <FL/Fl_Text_Display.H>} {public local
|
||||
}
|
||||
|
||||
decl {\#include <FL/Fl_Simple_Terminal.H>} {public local
|
||||
}
|
||||
|
||||
decl {\#include <FL/filename.H>} {public local
|
||||
}
|
||||
|
||||
|
@ -350,12 +347,11 @@ Function {make_shell_window()} {open
|
|||
}
|
||||
}
|
||||
Fl_Window shell_run_window {
|
||||
label {Shell Command Output} open selected
|
||||
label {Shell Command Output} open
|
||||
xywh {454 363 555 430} type Double resizable visible
|
||||
} {
|
||||
Fl_Box shell_run_terminal {
|
||||
xywh {10 10 535 375} box DOWN_BOX color 0 resizable
|
||||
class Fl_Simple_Terminal
|
||||
Fl_Simple_Terminal shell_run_terminal {
|
||||
xywh {10 10 535 375} resizable
|
||||
}
|
||||
Fl_Return_Button shell_run_button {
|
||||
label Close
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include <FL/Fl.H>
|
||||
#include <FL/Fl_Text_Buffer.H>
|
||||
#include <FL/Fl_Text_Display.H>
|
||||
#include <FL/Fl_Simple_Terminal.H>
|
||||
#include <FL/filename.H>
|
||||
extern void load_history();
|
||||
extern void redraw_browser();
|
||||
|
@ -87,6 +86,7 @@ extern Fl_Check_Button *shell_savefl_button;
|
|||
#include <FL/Fl_Return_Button.H>
|
||||
extern void do_shell_command(Fl_Return_Button*, void*);
|
||||
extern Fl_Double_Window *shell_run_window;
|
||||
#include <FL/Fl_Simple_Terminal.H>
|
||||
extern Fl_Simple_Terminal *shell_run_terminal;
|
||||
extern Fl_Return_Button *shell_run_button;
|
||||
Fl_Double_Window* make_shell_window();
|
||||
|
|
|
@ -607,6 +607,23 @@ int Fl_Text_Editor_Type::textstuff(int w, Fl_Font& f, int& s, Fl_Color& c) {
|
|||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <FL/Fl_Simple_Terminal.H>
|
||||
class Fl_Simple_Terminal_Type : public Fl_Text_Editor_Type {
|
||||
public:
|
||||
virtual const char *type_name() {return "Fl_Simple_Terminal";}
|
||||
virtual const char *alt_type_name() {return "fltk::SimpleTerminal";}
|
||||
int is_text_display() const {return 1;}
|
||||
Fl_Widget *widget(int x,int y,int w,int h) {
|
||||
Fl_Simple_Terminal *myo = new Fl_Simple_Terminal(x,y,w,h);
|
||||
return myo;
|
||||
}
|
||||
Fl_Widget_Type *_make() {return new Fl_Simple_Terminal_Type();}
|
||||
int pixmapID() { return 52; }
|
||||
};
|
||||
static Fl_Simple_Terminal_Type Fl_Simple_Terminal_type;
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <FL/Fl_Clock.H>
|
||||
class Fl_Clock_Type : public Fl_Widget_Type {
|
||||
public:
|
||||
|
@ -1023,6 +1040,7 @@ Fl_Menu_Item New_Menu[] = {
|
|||
{0,0,cb,(void*)&Fl_Output_type},
|
||||
{0,0,cb,(void*)&Fl_Text_Display_type},
|
||||
{0,0,cb,(void*)&Fl_Text_Editor_type},
|
||||
{0,0,cb,(void*)&Fl_Simple_Terminal_type},
|
||||
{0},
|
||||
{"Menus",0,0,0,FL_SUBMENU},
|
||||
{0,0,cb,(void*)&Fl_Menu_Bar_type},
|
||||
|
|
|
@ -974,6 +974,12 @@ Fl_Window* make_widgetbin() {
|
|||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_File_Input"));
|
||||
o->image(pixmap[30]);
|
||||
} // Fl_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(366, 55, 24, 24);
|
||||
o->tooltip("File Input");
|
||||
o->box(FL_THIN_UP_BOX);
|
||||
o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Simple_Terminal"));
|
||||
o->image(pixmap[52]);
|
||||
} // Fl_Button* o
|
||||
o->end();
|
||||
} // Fl_Group* o
|
||||
{ Fl_Group* o = new Fl_Group(398, 3, 54, 79);
|
||||
|
|
|
@ -257,8 +257,7 @@ Function {make_declblock_panel()} {} {
|
|||
}
|
||||
}
|
||||
|
||||
Function {make_decl_panel()} {selected
|
||||
} {
|
||||
Function {make_decl_panel()} {} {
|
||||
Fl_Window decl_panel {
|
||||
label {Declaration Properties} open
|
||||
xywh {480 333 343 237} type Double align 80 hide resizable size_range {343 237 0 0}
|
||||
|
@ -536,16 +535,17 @@ Function {type_make_cb(Fl_Widget*,void*d)} {return_type void
|
|||
}} {}
|
||||
}
|
||||
|
||||
Function {make_widgetbin()} {} {
|
||||
Function {make_widgetbin()} {open
|
||||
} {
|
||||
Fl_Window widgetbin_panel {
|
||||
label {Widget Bin}
|
||||
callback {if (Fl::event()==FL_SHORTCUT && Fl::event_key()==FL_Escape)
|
||||
exit_cb((Fl_Widget*)o, v);
|
||||
else
|
||||
toggle_widgetbin_cb((Fl_Widget*)o, v);} open
|
||||
xywh {410 171 574 85} type Single align 80 hide non_modal
|
||||
xywh {410 171 574 85} type Single align 80 non_modal visible
|
||||
} {
|
||||
Fl_Group {} {open
|
||||
Fl_Group {} {
|
||||
xywh {3 3 79 79}
|
||||
} {
|
||||
Fl_Button {} {
|
||||
|
@ -759,7 +759,7 @@ else
|
|||
code0 {o->image(pixmap[44]);}
|
||||
}
|
||||
}
|
||||
Fl_Group {} {
|
||||
Fl_Group {} {open
|
||||
xywh {339 3 54 79}
|
||||
} {
|
||||
Fl_Button {} {
|
||||
|
@ -792,6 +792,12 @@ else
|
|||
tooltip {File Input} xywh {341 55 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[30]);}
|
||||
}
|
||||
Fl_Button {} {
|
||||
user_data {"Fl_Simple_Terminal"}
|
||||
callback type_make_cb selected
|
||||
tooltip {File Input} xywh {366 55 24 24} box THIN_UP_BOX
|
||||
code0 {o->image(pixmap[52]);}
|
||||
}
|
||||
}
|
||||
Fl_Group {} {
|
||||
xywh {398 3 54 79}
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
/* XPM */
|
||||
static const char *flSimpleTerminal_xpm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"16 16 6 1",
|
||||
/* colors */
|
||||
"f c #606060",
|
||||
". c #000000",
|
||||
"c c none",
|
||||
"d c #ffffff",
|
||||
"e c #8080ff",
|
||||
"a c #d0d0d0",
|
||||
/* pixels */
|
||||
"cccccccccccccccc",
|
||||
"ffffffffffffffff",
|
||||
"fdddddddddddddda",
|
||||
"fdddddddddddddda",
|
||||
"fd.dddddddddddda",
|
||||
"fdd.ddddddddddda",
|
||||
"fddd.dddddddddda",
|
||||
"fdd.ddddddddddda",
|
||||
"fd.ddd....ddddda",
|
||||
"fdddddddddddddda",
|
||||
"fdddddddddddddda",
|
||||
"fdddddddddddddda",
|
||||
"fdddddddddddddda",
|
||||
"fdddddddddddddda",
|
||||
"aaaaaaaaaaaaaaaa",
|
||||
"cccccccccccccccc"
|
||||
};
|
Loading…
Reference in New Issue