From 8198e51799ba715d27e82b276b93cb39918d3361 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Tue, 22 Apr 2008 23:33:17 +0000 Subject: 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 --- test/input.cxx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/input.cxx b/test/input.cxx index fd955a7c0..9131707cd 100644 --- a/test/input.cxx +++ b/test/input.cxx @@ -88,13 +88,15 @@ int main(int argc, char **argv) { // input[0]->maximum_size(20); // input[0]->static_value("this is a testgarbage"); input[1] = new Fl_Float_Input(70,y,300,30,"Float:"); y += 35; - input[1]->tooltip("Input field for floating-point number"); + input[1]->tooltip("Input field for floating-point number (F1)"); + input[1]->shortcut(FL_F+1); input[2] = new Fl_Int_Input(70,y,300,30,"Int:"); y += 35; - input[2]->tooltip("Input field for integer number"); - input[3] = new Fl_Secret_Input(70,y,300,30,"Secret:"); y += 35; - input[3]->tooltip("Input field for password"); - input[4] = new Fl_Multiline_Input(70,y,300,100,"Multiline:"); y += 105; - input[4]->tooltip("Input field for short text with newlines"); + input[2]->tooltip("Input field for integer number (F2)"); + input[2]->shortcut(FL_F+2); + input[3] = new Fl_Secret_Input(70,y,300,30,"&Secret:"); y += 35; + input[3]->tooltip("Input field for password (Alt-S)"); + input[4] = new Fl_Multiline_Input(70,y,300,100,"&Multiline:"); y += 105; + input[4]->tooltip("Input field for short text with newlines (Alt-M)"); input[4]->wrap(1); for (int i = 0; i < 4; i++) { -- cgit v1.2.3