New Fl_Widget::redraw_label() method to cleanly redraw the label of a

widget (this should eliminate the extra flicker some users have complained
about...)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2652 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet
2002-10-04 15:59:29 +00:00
parent 3a0dd9fe23
commit 8d552439c7
6 changed files with 35 additions and 11 deletions
+7
View File
@@ -75,6 +75,7 @@ to call <TT>redraw()</TT> after these. </P>
<LI><A href=#Fl_Widget.parent>parent</A></LI>
<LI><A href=#Fl_Widget.position>position</A></LI>
<LI><A href=#Fl_Widget.redraw>redraw</A></LI>
<LI><A href=#Fl_Widget.redraw_label>redraw_label</A></LI>
<LI><A href=#Fl_Widget.resize>resize</A></LI>
<LI><A href=#Fl_Widget.selection_color>selection_color</A></LI>
<LI><A href=#Fl_Widget.set_changed>set_changed</A></LI>
@@ -386,6 +387,12 @@ HREF="Fl_Window.html#Fl_Window"><tt>Fl_Window</tt></a>. Returns
HREF="subclassing.html#draw"><TT>draw()</TT></A> routine called.
<H4><A name=Fl_Widget.redraw_label>void Fl_Widget::redraw_label()</A></H4>
<P>Marks the widget or the parent as needing a redraw for the
label area of a widget.
<H4><A name=Fl_Widget.resize>virtual void
Fl_Widget::resize(int x, int y, int w, int h)</A>
<BR><A name=Fl_Widget.position>void Fl_Widget::position(short x, short y)</A>
+7 -4
View File
@@ -332,7 +332,7 @@ sign. Figure 3-4 shows the available symbols.</P>
<I>Figure 3-4: FLTK label symbols</I></A></P>
<P>The @ sign may also be followed by the following optional
&quot;formatting&quot; characters, in this order:</P>
&quot;formatting&quot; characters, in this order:</P>
<UL>
@@ -342,12 +342,15 @@ sign. Figure 3-4 shows the available symbols.</P>
<LI>+[1-9] or -[1-9] tweaks the scaling a little bigger
or smaller.</LI>
<LI>[1-9] - rotates by a multiple of 45 degrees. '6'
does nothing, the others point in the direction of
that key on a numeric keypad.</LI>
<LI>[1-9] - rotates by a multiple of 45 degrees. '5' and
'6' do no rotation while the others point in the
direction of that key on a numeric keypad.</LI>
</UL>
<P>Thus, to show a very large arrow pointing downward you would use the
label string "@+92->".
<H3>align()</H3>
<P>The <TT>align()</TT> method positions the label. The following