Skip to content

Commit

Permalink
Merge pull request #228 from jgriffitts/Terminal
Browse files Browse the repository at this point in the history
Terminal widget
  • Loading branch information
MoAlyousef authored Dec 1, 2023
2 parents 9bc79f1 + 2c3da41 commit 162fd6f
Show file tree
Hide file tree
Showing 4 changed files with 463 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@ compile_commands.json
/bin
/temp
/.cache
/examples/bin
/examples/bin
/out
/\.vs/cfltk/FileContentIndex
/\.vs/cfltk/v17
.*\.sqlite
2 changes: 1 addition & 1 deletion fltk
Submodule fltk updated 71 files
+2 −0 .gitignore
+8 −0 CMake/fl_create_example.cmake
+18 −0 CMake/options.cmake
+10 −0 CMakeLists.txt
+2 −0 FL/Fl_Bitmap.H
+12 −0 FL/Fl_Browser_.H
+1 −1 FL/Fl_File_Browser.H
+2 −0 FL/Fl_Gl_Window.H
+2 −0 FL/Fl_Image.H
+4 −0 FL/Fl_Input.H
+2 −0 FL/Fl_Pixmap.H
+11 −0 FL/Fl_Rect.H
+187 −90 FL/Fl_Terminal.H
+2 −0 FL/Fl_Text_Display.H
+23 −0 FL/Fl_Tile.H
+13 −0 FL/Fl_Widget.H
+24 −3 FL/Fl_Window.H
+5 −0 README.CMake.txt
+20 −0 configure.ac
+13 −0 documentation/src/faq.dox
+2 −1 documentation/src/subclassing.dox
+1 −1 examples/simple-terminal.cxx
+1 −0 fltk-options/fltk-options.cxx
+1 −1 fluid/factory.cxx
+9 −9 fluid/makedepend
+1 −1 fluid/sourceview_panel.cxx
+1 −1 fluid/template_panel.cxx
+1 −1 fluid/template_panel.fl
+4 −4 fluid/widget_browser.cxx
+2 −2 misc/update_config_scripts
+2 −2 src/CMakeLists.txt
+3 −3 src/Fl.cxx
+8 −8 src/Fl_Browser.cxx
+16 −15 src/Fl_Browser_.cxx
+2 −1 src/Fl_Check_Browser.cxx
+13 −15 src/Fl_File_Browser.cxx
+15 −0 src/Fl_Gl_Window.cxx
+2 −0 src/Fl_Gl_Window_Driver.H
+1 −0 src/Fl_Help_View.cxx
+92 −3 src/Fl_Input.cxx
+455 −225 src/Fl_Terminal.cxx
+61 −1 src/Fl_Text_Display.cxx
+19 −0 src/Fl_Text_Editor.cxx
+591 −35 src/Fl_Tile.cxx
+1 −1 src/Fl_Window.cxx
+2 −2 src/Fl_Window_Driver.H
+2 −2 src/Fl_Window_iconize.cxx
+1 −1 src/Fl_arg.cxx
+2 −2 src/Fl_x.cxx
+3 −2 src/Makefile
+4 −4 src/drivers/Cairo/Fl_Cairo_Graphics_Driver.H
+62 −39 src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx
+2 −0 src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.H
+15 −0 src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.mm
+1 −0 src/drivers/Wayland/Fl_Wayland_Graphics_Driver.H
+7 −0 src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx
+1 −0 src/drivers/Wayland/Fl_Wayland_Image_Surface_Driver.cxx
+1 −1 src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
+0 −1 src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx
+2 −0 src/drivers/X11/Fl_X11_Gl_Window_Driver.H
+37 −2 src/drivers/X11/Fl_X11_Gl_Window_Driver.cxx
+57 −62 src/fl_call_main.c
+4 −0 src/makedepend
+1 −0 test/.gitignore
+1 −0 test/CMakeLists.txt
+7 −1 test/Makefile
+160 −0 test/grid_dialog.cxx
+15 −0 test/makedepend
+145 −50 test/terminal.fl
+35 −0 test/tile.cxx
+1 −0 test/unittests.cxx
159 changes: 159 additions & 0 deletions include/cfl_group.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,165 @@ void Fl_Grid_debug(Fl_Grid *self, int level);

GROUP_DECLARE(Fl_Grid)

WIDGET_DECLARE(Fl_Terminal)

int Fl_Terminal_ansi(Fl_Terminal *self);

void Fl_Terminal_set_ansi(Fl_Terminal *self, int boolean);

void Fl_Terminal_append(Fl_Terminal *self, const char *txt);

void Fl_Terminal_append_u8(Fl_Terminal *self, const char *txt, int len);

void Fl_Terminal_append_ascii(Fl_Terminal *self, const char *txt);

void Fl_Terminal_append_utf8(Fl_Terminal *self, const char *txt);

void Fl_Terminal_append_utf8_u8(Fl_Terminal *self, const char *txt, int len);

// int Fl_Terminal_box(Fl_Terminal *self); // Actually Fl_BoxType todo?:
// handled in cfl_macros.h

// void Fl_Terminal_set_box(Fl_Terminal *self, int set);

void Fl_Terminal_clear_history(Fl_Terminal *self);

int Fl_Terminal_cursor_col(Fl_Terminal *self);

// void Fl_Terminal_set_cursor_col(Fl_Terminal *self, int set); // Can't
// use: not public

int Fl_Terminal_cursor_row(Fl_Terminal *self);

// void Fl_Terminal_set_cursor_row(Fl_Terminal *self, int set); // Can't
// use: not public

unsigned Fl_Terminal_cursor_bg_color(Fl_Terminal *self); // Actually Fl_Color

void Fl_Terminal_set_cursor_bg_color(Fl_Terminal *self, unsigned set);

unsigned Fl_Terminal_cursor_fg_color(Fl_Terminal *self); // Actually Fl_Color

void Fl_Terminal_set_cursor_fg_color(Fl_Terminal *self, unsigned set);

int Fl_Terminal_display_columns(Fl_Terminal *self);

void Fl_Terminal_set_display_columns(Fl_Terminal *self, int set);

int Fl_Terminal_display_rows(Fl_Terminal *self);

void Fl_Terminal_set_display_rows(Fl_Terminal *self, int set);

// todo? int Fl_Terminal_draw(Fl_Terminal *self);

// todo? constructor?

// todo? int Fl_Terminal_handle(Fl_Terminal *self);

int Fl_Terminal_history_lines(Fl_Terminal *self);

void Fl_Terminal_set_history_lines(Fl_Terminal *self, int set);

int Fl_Terminal_history_rows(Fl_Terminal *self);

void Fl_Terminal_set_history_rows(Fl_Terminal *self, int set);

int Fl_Terminal_history_use(Fl_Terminal *self);

int Fl_Terminal_margin_bottom(Fl_Terminal *self);

void Fl_Terminal_set_margin_bottom(Fl_Terminal *self, int set);

int Fl_Terminal_margin_left(Fl_Terminal *self);

void Fl_Terminal_set_margin_left(Fl_Terminal *self, int set);

int Fl_Terminal_margin_right(Fl_Terminal *self);

void Fl_Terminal_set_margin_right(Fl_Terminal *self, int set);

int Fl_Terminal_margin_top(Fl_Terminal *self);

void Fl_Terminal_set_margin_top(Fl_Terminal *self, int set);

void Fl_Terminal_print_char(Fl_Terminal *self, char c);

void Fl_Terminal_print_char_utf8(Fl_Terminal *self, const char *txt, int len);

// Fl_Terminal_printf not supported for Rust

void Fl_Terminal_put_char(Fl_Terminal *self, char c, int row, int col);

void Fl_Terminal_put_char_utf8(Fl_Terminal *self, const char *txt, int len, int row,
int col);

float Fl_Terminal_redraw_rate(Fl_Terminal *self);

void Fl_Terminal_set_redraw_rate(Fl_Terminal *self, float set);

int Fl_Terminal_redraw_style(Fl_Terminal *self); // Actually enum RedrawStyle

void Fl_Terminal_set_redraw_style(Fl_Terminal *self, int set);

void Fl_Terminal_reset_terminal(Fl_Terminal *self);

// todo? int Fl_Terminal_resize(Fl_Terminal *self, int X, int Y, int W, int H);

int Fl_Terminal_scrollbar_actual_size(Fl_Terminal *self);

int Fl_Terminal_scrollbar_size(Fl_Terminal *self);

void Fl_Terminal_set_scrollbar_size(Fl_Terminal *self, int set);

unsigned Fl_Terminal_selection_bg_color(Fl_Terminal *self); // Actually Fl_Color

void Fl_Terminal_set_selection_bg_color(Fl_Terminal *self, unsigned set);

unsigned Fl_Terminal_selection_fg_color(Fl_Terminal *self); // Actually Fl_Color

void Fl_Terminal_set_selection_fg_color(Fl_Terminal *self, unsigned set);

int Fl_Terminal_show_unknown(Fl_Terminal *self);

void Fl_Terminal_set_show_unknown(Fl_Terminal *self, int boolean);

void Fl_Terminal_text_attrib(Fl_Terminal *self,
unsigned set); // Actually Fl_Color

unsigned Fl_Terminal_text_bg_color(Fl_Terminal *self); // Actually Fl_Color

void Fl_Terminal_set_text_bg_color(Fl_Terminal *self, unsigned set);

unsigned
Fl_Terminal_text_bg_color_default(Fl_Terminal *self); // Actually Fl_Color

void Fl_Terminal_set_text_bg_color_default(Fl_Terminal *self, unsigned set);

void Fl_Terminal_set_text_bg_color_xterm(Fl_Terminal *self, unsigned char set);

unsigned Fl_Terminal_text_fg_color(Fl_Terminal *self); // Actually Fl_Color

void Fl_Terminal_set_text_fg_color(Fl_Terminal *self, unsigned set);

unsigned
Fl_Terminal_text_fg_color_default(Fl_Terminal *self); // Actually Fl_Color

void Fl_Terminal_set_text_fg_color_default(Fl_Terminal *self, unsigned set);

void Fl_Terminal_set_text_fg_color_xterm(Fl_Terminal *self, unsigned char set);

int Fl_Terminal_text_font(Fl_Terminal *self); // Actually Fl_Font

void Fl_Terminal_set_text_font(Fl_Terminal *self, int set);

int Fl_Terminal_text_size(Fl_Terminal *self);

void Fl_Terminal_set_text_size(Fl_Terminal *self, int set);

// Fl_Terminal_vprintf not supported for Rust

GROUP_DECLARE(Fl_Terminal)

#ifdef __cplusplus
}
#endif
Expand Down
Loading

0 comments on commit 162fd6f

Please sign in to comment.