From 74824267355c4ac6f51bcec10bdf66b45b46ee0a Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 11 Apr 2002 11:52:43 +0000 Subject: Make Fl_Output a subclass of Fl_Input, and add input_type and readonly methods/constants to support Fl_Output as a special case of Fl_Input (you can do everything but change the text in Fl_Output...) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2073 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_Input_.H | 14 ++++++-- FL/Fl_Multiline_Output.H | 6 ++-- FL/Fl_Output.H | 13 +++---- documentation/Fl_Input.html | 3 +- documentation/Fl_Input_.html | 2 +- documentation/Fl_Output.html | 2 +- documentation/Fl_Widget.html | 4 +-- fluid/factory.cxx | 8 ++--- fluid/makedepend | 6 ++-- src/Fl_Bitmap.cxx | 6 ++-- src/Fl_Browser.cxx | 6 ++-- src/Fl_Chart.cxx | 6 ++-- src/Fl_Check_Browser.cxx | 6 ++-- src/Fl_File_Icon.cxx | 6 ++-- src/Fl_GIF_Image.cxx | 6 ++-- src/Fl_Gl_Window.cxx | 6 ++-- src/Fl_Image.cxx | 6 ++-- src/Fl_Input.cxx | 67 ++++++++++++++++++++++++++-------- src/Fl_Input_.cxx | 50 +++++++++++++------------- src/Fl_Menu_.cxx | 6 ++-- src/Fl_Menu_add.cxx | 6 ++-- src/Fl_Output.cxx | 53 --------------------------- src/Fl_PNM_Image.cxx | 6 ++-- src/Fl_Pixmap.cxx | 6 ++-- src/Fl_Shared_Image.cxx | 6 ++-- src/Fl_Sys_Menu_Bar.cxx | 6 ++-- src/Fl_Text_Buffer.cxx | 6 ++-- src/Fl_Text_Display.cxx | 6 ++-- src/Fl_Text_Editor.cxx | 6 ++-- src/Fl_XBM_Image.cxx | 6 ++-- src/Fl_XPM_Image.cxx | 6 ++-- src/Fl_arg.cxx | 6 ++-- src/Fl_display.cxx | 6 ++-- src/Fl_mac.cxx | 6 ++-- src/Fl_win32.cxx | 6 ++-- src/Fl_x.cxx | 6 ++-- src/Makefile | 5 ++- src/filename_expand.cxx | 6 ++-- src/filename_setext.cxx | 6 ++-- src/fl_dnd_win32.cxx | 6 ++-- src/fl_draw.cxx | 6 ++-- src/fl_draw_image.cxx | 6 ++-- src/fl_draw_pixmap.cxx | 6 ++-- src/fl_font.cxx | 6 ++-- src/fl_line_style.cxx | 6 ++-- src/fl_plastic.cxx | 6 ++-- src/fl_set_font.cxx | 6 ++-- src/fl_set_fonts.cxx | 6 ++-- src/fl_shortcut.cxx | 6 ++-- src/fl_symbols.cxx | 6 ++-- src/forms_fselect.cxx | 6 ++-- src/gl_draw.cxx | 6 ++-- src/makedepend | 85 ++++++++++++++++++++++++-------------------- test/makedepend | 5 +-- 54 files changed, 280 insertions(+), 277 deletions(-) delete mode 100644 src/Fl_Output.cxx diff --git a/FL/Fl_Input_.H b/FL/Fl_Input_.H index dd43a6dc1..b0504412d 100644 --- a/FL/Fl_Input_.H +++ b/FL/Fl_Input_.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Input_.H,v 1.6.2.4.2.3 2002/03/07 19:22:56 spitzak Exp $" +// "$Id: Fl_Input_.H,v 1.6.2.4.2.4 2002/04/11 11:52:40 easysw Exp $" // // Input base class header file for the Fast Light Tool Kit (FLTK). // @@ -36,6 +36,10 @@ #define FL_HIDDEN_INPUT 3 #define FL_MULTILINE_INPUT 4 #define FL_SECRET_INPUT 5 +#define FL_INPUT_TYPE 7 +#define FL_INPUT_READONLY 8 +#define FL_NORMAL_OUTPUT (FL_NORMAL_INPUT | FL_INPUT_READONLY) +#define FL_MULTILINE_OUTPUT (FL_MULTILINE_INPUT | FL_INPUT_READONLY) class Fl_Input_ : public Fl_Widget { @@ -117,10 +121,16 @@ public: void textcolor(unsigned n) {textcolor_ = n;} Fl_Color cursor_color() const {return (Fl_Color)cursor_color_;} void cursor_color(unsigned n) {cursor_color_ = n;} + + int input_type() const {return type() & FL_INPUT_TYPE; } + void input_type(int t) { type(t | readonly()); } + int readonly() const { return type() & FL_INPUT_READONLY; } + void readonly(int b) { if (b) type(type() | FL_INPUT_READONLY); + else type(type() & FL_INPUT_TYPE); } }; #endif // -// End of "$Id: Fl_Input_.H,v 1.6.2.4.2.3 2002/03/07 19:22:56 spitzak Exp $". +// End of "$Id: Fl_Input_.H,v 1.6.2.4.2.4 2002/04/11 11:52:40 easysw Exp $". // diff --git a/FL/Fl_Multiline_Output.H b/FL/Fl_Multiline_Output.H index 0f5b550f1..ea1d51ce4 100644 --- a/FL/Fl_Multiline_Output.H +++ b/FL/Fl_Multiline_Output.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Multiline_Output.H,v 1.4.2.3.2.1 2002/01/01 15:11:28 easysw Exp $" +// "$Id: Fl_Multiline_Output.H,v 1.4.2.3.2.2 2002/04/11 11:52:41 easysw Exp $" // // Multi line output header file for the Fast Light Tool Kit (FLTK). // @@ -31,11 +31,11 @@ class Fl_Multiline_Output : public Fl_Output { public: Fl_Multiline_Output(int x,int y,int w,int h,const char *l = 0) - : Fl_Output(x,y,w,h,l) {type(FL_MULTILINE_INPUT);} + : Fl_Output(x,y,w,h,l) {type(FL_MULTILINE_OUTPUT);} }; #endif // -// End of "$Id: Fl_Multiline_Output.H,v 1.4.2.3.2.1 2002/01/01 15:11:28 easysw Exp $". +// End of "$Id: Fl_Multiline_Output.H,v 1.4.2.3.2.2 2002/04/11 11:52:41 easysw Exp $". // diff --git a/FL/Fl_Output.H b/FL/Fl_Output.H index 3e57b5dec..25eafba90 100644 --- a/FL/Fl_Output.H +++ b/FL/Fl_Output.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Output.H,v 1.5.2.3.2.1 2002/01/01 15:11:28 easysw Exp $" +// "$Id: Fl_Output.H,v 1.5.2.3.2.2 2002/04/11 11:52:41 easysw Exp $" // // Output header file for the Fast Light Tool Kit (FLTK). // @@ -26,19 +26,16 @@ #ifndef Fl_Output_H #define Fl_Output_H -#include "Fl_Input_.H" +#include "Fl_Input.H" -class Fl_Output : public Fl_Input_ { -protected: - FL_EXPORT void draw(); +class Fl_Output : public Fl_Input { public: - FL_EXPORT int handle(int); Fl_Output(int x, int y, int w, int h, const char *l = 0) - : Fl_Input_(x, y, w, h, l) {} + : Fl_Input(x, y, w, h, l) {type(FL_NORMAL_OUTPUT);} }; #endif // -// End of "$Id: Fl_Output.H,v 1.5.2.3.2.1 2002/01/01 15:11:28 easysw Exp $". +// End of "$Id: Fl_Output.H,v 1.5.2.3.2.2 2002/04/11 11:52:41 easysw Exp $". // diff --git a/documentation/Fl_Input.html b/documentation/Fl_Input.html index 5474d5e37..000d15daf 100644 --- a/documentation/Fl_Input.html +++ b/documentation/Fl_Input.html @@ -10,7 +10,8 @@ +----Fl_Input | +----Fl_Float_Input, Fl_Int_Input, - Fl_Multiline_Input, Fl_Secret_Input + Fl_Multiline_Input, Fl_Output, + Fl_Secret_Input

Include Files

diff --git a/documentation/Fl_Input_.html b/documentation/Fl_Input_.html index 46a74a973..3cab358cb 100644 --- a/documentation/Fl_Input_.html +++ b/documentation/Fl_Input_.html @@ -9,7 +9,7 @@ | +----Fl_Input_ | - +----Fl_Input, Fl_Output + +----Fl_Input

Include Files

diff --git a/documentation/Fl_Output.html b/documentation/Fl_Output.html index 035c2deec..eb169b886 100644 --- a/documentation/Fl_Output.html +++ b/documentation/Fl_Output.html @@ -5,7 +5,7 @@

Class Hierarchy