summaryrefslogtreecommitdiff
path: root/FL/Fl_Input_.H
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-04-11 11:52:43 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-04-11 11:52:43 +0000
commit74824267355c4ac6f51bcec10bdf66b45b46ee0a (patch)
tree3b8a2da7dbfe19c3c23c153cf9ab76e8e1a0f54e /FL/Fl_Input_.H
parentef36be385e5bedc22f5e1da11b5eca4a55d3c0b5 (diff)
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
Diffstat (limited to 'FL/Fl_Input_.H')
-rw-r--r--FL/Fl_Input_.H14
1 files changed, 12 insertions, 2 deletions
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 $".
//