summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2001-10-22 21:15:11 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2001-10-22 21:15:11 +0000
commit19518ebe35587898a32e3172529761a9a9058621 (patch)
treec7e1b773cd2a7666be62c3849a44c9c5ff5d4b02
parent29476d08b848fa7e8a6261349bb8d80cdb8a3069 (diff)
Make Fl_Widget::parent() work with Fl_Group pointers...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1647 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--CHANGES3
-rw-r--r--FL/Fl_Widget.H11
-rw-r--r--documentation/Fl_Widget.html2
-rw-r--r--src/Fl_Value_Input.cxx6
4 files changed, 13 insertions, 9 deletions
diff --git a/CHANGES b/CHANGES
index 4b01dd924..f77fd372b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -8,6 +8,9 @@ CHANGES IN FLTK 1.1.0b4
integer instead of uchar, to support the new
FL_OVERRIDE flag for Fl_Window.
+ - The parent() method of Fl_Widget now uses pointers to
+ Fl_Group instead of Fl_Widget.
+
- Fl_Window now provides the FLTK 2.0 "override()" and
"set_override()" methods for windows.
diff --git a/FL/Fl_Widget.H b/FL/Fl_Widget.H
index 103f23d14..68fb8c599 100644
--- a/FL/Fl_Widget.H
+++ b/FL/Fl_Widget.H
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Widget.H,v 1.6.2.4.2.7 2001/10/18 18:53:20 easysw Exp $"
+// "$Id: Fl_Widget.H,v 1.6.2.4.2.8 2001/10/22 21:15:11 easysw Exp $"
//
// Widget header file for the Fast Light Tool Kit (FLTK).
//
@@ -30,6 +30,7 @@
class Fl_Widget;
class Fl_Window;
+class Fl_Group;
class Fl_Image;
typedef void (Fl_Callback )(Fl_Widget*, void*);
@@ -52,7 +53,7 @@ struct Fl_Label {
class Fl_Widget {
friend class Fl_Group;
- Fl_Widget* parent_;
+ Fl_Group* parent_;
Fl_Callback* callback_;
void* user_data_;
short x_,y_,w_,h_;
@@ -100,8 +101,8 @@ public:
FL_EXPORT virtual void draw() = 0;
FL_EXPORT virtual int handle(int);
- Fl_Widget* parent() const {return parent_;}
- void parent(Fl_Widget* w) {parent_ = w;} // for hacks only
+ Fl_Group* parent() const {return parent_;}
+ void parent(Fl_Group* w) {parent_ = w;} // for hacks only
uchar type() const {return type_;}
void type(uchar t) {type_ = t;}
@@ -206,5 +207,5 @@ public:
#endif
//
-// End of "$Id: Fl_Widget.H,v 1.6.2.4.2.7 2001/10/18 18:53:20 easysw Exp $".
+// End of "$Id: Fl_Widget.H,v 1.6.2.4.2.8 2001/10/22 21:15:11 easysw Exp $".
//
diff --git a/documentation/Fl_Widget.html b/documentation/Fl_Widget.html
index 9d3d5545d..d002bda2d 100644
--- a/documentation/Fl_Widget.html
+++ b/documentation/Fl_Widget.html
@@ -289,7 +289,7 @@ This is the same as <TT>(active() &amp;&amp; visible() &amp;&amp;
Non-zero if <A HREF="subclassing.html#draw"><TT>draw()</TT></A> needs to be called. Actually this is a
bit field that the widget subclass can use to figure out what parts to
draw.
-<H4><A name=Fl_Widget.parent>Fl_Widget *Fl_Widget::parent() const</A></H4>
+<H4><A name=Fl_Widget.parent>Fl_Group *Fl_Widget::parent() const</A></H4>
Returns a pointer to the parent widget. Usually this is a <A
href=Fl_Group.html#Fl_Group> <TT>Fl_Group</TT></A> or <A
HREF="Fl_Window.html#Fl_Window"><tt>Fl_Window</tt></a>. Returns
diff --git a/src/Fl_Value_Input.cxx b/src/Fl_Value_Input.cxx
index 6371649e6..398c626bb 100644
--- a/src/Fl_Value_Input.cxx
+++ b/src/Fl_Value_Input.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Value_Input.cxx,v 1.6.2.5 2001/01/22 15:13:40 easysw Exp $"
+// "$Id: Fl_Value_Input.cxx,v 1.6.2.5.2.1 2001/10/22 21:15:11 easysw Exp $"
//
// Value input widget for the Fast Light Tool Kit (FLTK).
//
@@ -117,7 +117,7 @@ Fl_Value_Input::Fl_Value_Input(int x, int y, int w, int h, const char* l)
soft_ = 0;
if (input.parent()) // defeat automatic-add
((Fl_Group*)input.parent())->remove(input);
- input.parent(this); // kludge!
+ input.parent((Fl_Group *)this); // kludge!
input.callback(input_cb, this);
input.when(FL_WHEN_CHANGED);
box(input.box());
@@ -128,5 +128,5 @@ Fl_Value_Input::Fl_Value_Input(int x, int y, int w, int h, const char* l)
}
//
-// End of "$Id: Fl_Value_Input.cxx,v 1.6.2.5 2001/01/22 15:13:40 easysw Exp $".
+// End of "$Id: Fl_Value_Input.cxx,v 1.6.2.5.2.1 2001/10/22 21:15:11 easysw Exp $".
//