Documentation updates for STR #2142 (protected draw methods).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6665 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
5e9a5f3023
commit
354701c6f6
1
CHANGES
1
CHANGES
@ -1,5 +1,6 @@
|
||||
CHANGES IN FLTK 1.3.0
|
||||
|
||||
- All draw() methods of widgets are now protected (STR #2142).
|
||||
- The new configure option --enable-x11 (lowercase 'x') enables
|
||||
cygwin builds under Windows (with --enable-cygwin) to use X11
|
||||
instead of GDI drawing (STR #2147) and is ignored otherwise.
|
||||
|
@ -177,8 +177,17 @@ public:
|
||||
Never call this function directly. FLTK will schedule redrawing whenever
|
||||
needed. If your widget must be redrawn as soon as possible, call redraw()
|
||||
instead.
|
||||
|
||||
|
||||
Override this function to draw your own widgets.
|
||||
|
||||
If you ever need to call another widget's draw method <I>from within your
|
||||
own draw method</I>, e.g. for an embedded scrollbar, you must downcast the
|
||||
embedded widget's pointer to Fl_Widget* and call the virtual draw() method.
|
||||
|
||||
\code
|
||||
Fl_Widget *s = &scroll; // scroll is an embedded Fl_Scrollbar
|
||||
s->draw(); // calls Fl_Scrollbar::draw()
|
||||
\endcode
|
||||
*/
|
||||
virtual void draw() = 0;
|
||||
|
||||
|
@ -13,17 +13,12 @@ Calling these functions at other places will result in undefined behavior!
|
||||
To write code here, you must subclass one of the existing Fl_Widget
|
||||
classes and implement your own version of draw().
|
||||
|
||||
\li The most common place is inside the virtual method
|
||||
<A href="subclassing.html#draw"><tt>Fl_Widget::draw()</tt></A>.
|
||||
To write code here, you must subclass one of the existing Fl_Widget
|
||||
classes and implement your own version of draw().
|
||||
|
||||
\li You can also write <A href="common.html#boxtypes">boxtypes</A> and
|
||||
<A href="common.html#labeltypes">labeltypes</A>. These are small
|
||||
procedures that can be called by existing
|
||||
<A HREF="subclassing.html#draw"><tt>Fl_Widget::draw()</tt></A>
|
||||
methods. These "types" are identified by an 8-bit index that is stored
|
||||
in the widget's box(), labeltype(), and possibly other properties.
|
||||
Fl_Widget::draw() methods. These "types" are identified by an 8-bit
|
||||
index that is stored in the widget's box(), labeltype(), and possibly
|
||||
other properties.
|
||||
|
||||
\li You can call Fl_Window::make_current() to do incremental update of a
|
||||
widget. Use Fl_Widget::window() to find the window.
|
||||
|
Loading…
Reference in New Issue
Block a user