Adding keyboard shortcut to Fl_Value_Input and Fl_Text_Editor

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6111 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher
2008-04-23 14:19:58 +00:00
parent 8d6b757bfe
commit 8683ea2c81
13 changed files with 121 additions and 29 deletions
+6
View File
@@ -78,6 +78,7 @@ class.
<LI><A HREF="#Fl_Text_Editor.kf_up">kf_up</A></LI>
<LI><A HREF="#Fl_Text_Editor.remove_all_key_bindings">remove_all_key_bindings</A></LI>
<LI><A HREF="#Fl_Text_Editor.remove_key_binding">remove_key_binding</A></LI>
<LI><A href="#Fl_Text_Editor.shortcut">shortcut</A></LI>
</UL></TD></TR>
</TABLE>
@@ -217,5 +218,10 @@ void remove_key_binding(int key, int state);</A></H4>
<P>Removes a single key binding from the text editor or list.
<H4><A name="Fl_Text_Editor.shortcut">ulong Fl_Text_Editor::shortcut() const
<BR> void Fl_Text_Editor::shortcut(ulong key)</A></H4>
The first form returns the current shortcut key for the editor.
<P>The second form sets the shortcut key to <TT>key</TT>.
</BODY>
</HTML>
+18
View File
@@ -59,6 +59,7 @@ ALT="Fl_Value_Input widget."></P>
<LI><A href="#Fl_Value_Input.Fl_Value_Input">Fl_Value_Input</A></LI>
<LI><A href="#Fl_Value_Input.~Fl_Value_Input">~Fl_Value_Input</A></LI>
<LI><A href="#Fl_Value_Input.cursor_color">cursor_color</A></LI>
<LI><A href="#Fl_Value_Input.shortcut">shortcut</A></LI>
<LI><A href="#Fl_Value_Input.soft">soft</A></LI>
<LI><A href="#Fl_Value_Input.textcolor">textcolor</A></LI>
<LI><A href="#Fl_Value_Input.textfont">textfont</A></LI>
@@ -85,6 +86,23 @@ void Fl_Value_Input::cursor_color(Fl_Color)</A></H4>
<P>Get or set the color of the text cursor. The text cursor is
black by default.
<H4><A name="Fl_Value_Input.shortcut">ulong Fl_Value_Input::shortcut() const
<BR> void Fl_Value_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_Value_Input.soft">uchar Fl_Value_Input::soft() const<BR>
void Fl_Value_Input::soft(uchar)</A></H4>