Added support for keyboard shortcuts to Fl_Input_ derived widgets (STR #1770). Code added for Fluid. Documentation updated.

This commit must be considered partial because there is no shortcut handling for Fl_Text_Display derived widgets or Fl_Value_Input which is derived form Fl_Valuator.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6109 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher
2008-04-22 23:33:17 +00:00
parent 6a143b1f61
commit 8198e51799
10 changed files with 82 additions and 8 deletions
+18
View File
@@ -87,6 +87,7 @@ setting <TT>type()</TT> to one of the following values:</P>
</UL>
</TD><TD align="left" valign="top">
<UL>
<LI><A href="#Fl_Input_.shortcut">shortcut</A></LI>
<LI><A href="#Fl_Input_.undo">undo</A></LI>
<LI><A href="#Fl_Input_.up_down_position">up_down_position</A></LI>
<LI><A href="#Fl_Input_.wrap">wrap</A></LI>
@@ -255,6 +256,23 @@ information to the clipboard. This is used to make ^K work.
<P>Gets or sets the read-only state of the input field.
<H4><A name="Fl_Input_.shortcut">ulong Fl_Input_::shortcut() const
<BR> void Fl_Input_::shortcut(ulong key)</A></H4>
The first form returns the current shortcut key for the Input.
<P>The second form sets the shortcut key to <TT>key</TT>. Setting this
overrides the use of '&amp;' in the <TT>label()</TT>. The value is a bitwise
OR of a key and a set of shift flags, for example <CODE>FL_ALT | 'a'</CODE>
, <CODE>FL_ALT | (FL_F + 10)</CODE>, or just <CODE>'a'</CODE>. A value
of 0 disables the shortcut. </P>
<P>The key can be any value returned by <A href="Fl.html#Fl.event_key">
<TT>Fl::event_key()</TT></A>, but will usually be an ASCII letter. Use
a lower-case letter unless you require the shift key to be held down. </P>
<P>The shift flags can be any set of values accepted by <A href="Fl.html#Fl.event_state">
<TT>Fl::event_state()</TT></A>. If the bit is on that shift key must
be pushed. Meta, Alt, Ctrl, and Shift must be off if they are not in
the shift flags (zero for the other bits indicates a &quot;don't care&quot;
setting). </P>
<H4><A name="Fl_Input_.wrap">int Fl_Input_::wrap() const
<BR>void Fl_Input_::wrap(int)</A></H4>