mirror of https://github.com/fltk/fltk
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
This commit is contained in:
parent
29476d08b8
commit
19518ebe35
3
CHANGES
3
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.
|
||||
|
||||
|
|
|
@ -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 $".
|
||||
//
|
||||
|
|
|
@ -289,7 +289,7 @@ This is the same as <TT>(active() && visible() &&
|
|||
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
|
||||
|
|
|
@ -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 $".
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue