diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2010-02-13 12:25:58 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2010-02-13 12:25:58 +0000 |
| commit | ea31edb2410308b4f610a027086c7b6f5ee72e1a (patch) | |
| tree | 5a8923212a502e69ea324c279347e2f06d8b2c96 /FL/Fl_Group.H | |
| parent | 1ff2af5fd30272885bdcbec22809377fb2e3456f (diff) | |
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
Diffstat (limited to 'FL/Fl_Group.H')
| -rw-r--r-- | FL/Fl_Group.H | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/FL/Fl_Group.H b/FL/Fl_Group.H index 941951cbf..7e1630d0b 100644 --- a/FL/Fl_Group.H +++ b/FL/Fl_Group.H @@ -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: /** |
