mirror of
https://github.com/fltk/fltk.git
synced 2026-06-04 23:42:15 +08:00
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:
@@ -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>
|
||||
|
||||
@@ -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 '&' 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 "don't care"
|
||||
setting). </P>
|
||||
|
||||
<H4><A name="Fl_Value_Input.soft">uchar Fl_Value_Input::soft() const<BR>
|
||||
void Fl_Value_Input::soft(uchar)</A></H4>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user