mirror of https://github.com/fltk/fltk
Added new virtual methods, as discussed in fltk.development:
virtual Fl_Group* Fl_Widget::as_group() const virtual Fl_Window* Fl_Widget::as_window() const Todo: documentation is not yet complete. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7074 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
1ff2af5fd3
commit
ea31edb241
|
@ -176,6 +176,14 @@ public:
|
|||
*/
|
||||
unsigned int clip_children() { return (flags() & CLIP_CHILDREN) != 0; }
|
||||
|
||||
/** Returns an Fl_Group pointer if this widget is an Fl_Group.
|
||||
|
||||
\retval NULL if this widget is not derived from Fl_Group.
|
||||
\note This method is provided to avoid dynamic_cast.
|
||||
\todo More documentation ...
|
||||
*/
|
||||
virtual Fl_Group* as_group() const { return (Fl_Group*)this; }
|
||||
|
||||
// back compatibility functions:
|
||||
|
||||
/**
|
||||
|
|
|
@ -924,6 +924,22 @@ public:
|
|||
*/
|
||||
Fl_Window* window() const ;
|
||||
|
||||
/** Returns an Fl_Group pointer if this widget is an Fl_Group.
|
||||
|
||||
\retval NULL if this widget is not derived from Fl_Group.
|
||||
\note This method is provided to avoid dynamic_cast.
|
||||
\todo More documentation ...
|
||||
*/
|
||||
virtual Fl_Group* as_group() const {return 0;}
|
||||
|
||||
/** Returns an Fl_Window pointer if this widget is an Fl_Window.
|
||||
|
||||
\retval NULL if this widget is not derived from Fl_Window.
|
||||
\note This method is provided to avoid dynamic_cast.
|
||||
\todo More documentation ...
|
||||
*/
|
||||
virtual Fl_Window* as_window() const {return 0;}
|
||||
|
||||
/** For back compatibility only.
|
||||
\deprecated Use selection_color() instead.
|
||||
*/
|
||||
|
|
|
@ -415,6 +415,14 @@ public:
|
|||
*/
|
||||
void make_current();
|
||||
|
||||
/** Returns an Fl_Window pointer if this widget is an Fl_Window.
|
||||
|
||||
\retval NULL if this widget is not derived from Fl_Window.
|
||||
\note This method is provided to avoid dynamic_cast.
|
||||
\todo More documentation ...
|
||||
*/
|
||||
virtual Fl_Window* as_window() const { return (Fl_Window*)this; }
|
||||
|
||||
// for back-compatibility only:
|
||||
/**
|
||||
Changes the cursor for this window. This always calls the system, if
|
||||
|
|
Loading…
Reference in New Issue