diff --git a/CHANGES b/CHANGES index 72737e3de..88da65b47 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,9 @@ CHANGES IN FLTK 1.1.0b8 + - MacOS: improved keyboard handling, fixed keyboard + focus handling, fixed get_key, modified 'keyboard' + demo to show second mouse wheel and additional keys + 'help' and FL_NK+'=' - OS/2 build fixes. - fl_draw() didn't ignore symbol escapes properly for the browsers... diff --git a/FL/Enumerations.H b/FL/Enumerations.H index e72e3a9a6..8bd72bdaf 100644 --- a/FL/Enumerations.H +++ b/FL/Enumerations.H @@ -1,5 +1,5 @@ // -// "$Id: Enumerations.H,v 1.18.2.14.2.16 2001/12/06 18:23:29 easysw Exp $" +// "$Id: Enumerations.H,v 1.18.2.14.2.17 2001/12/22 07:16:11 matthiaswm Exp $" // // Enumerations for the Fast Light Tool Kit (FLTK). // @@ -107,6 +107,7 @@ enum Fl_When { // Fl_Widget::when(): #define FL_Print 0xff61 #define FL_Insert 0xff63 #define FL_Menu 0xff67 // the "menu/apps" key on XFree86 +#define FL_Help 0xff68 // the 'help' key on Mac keyboards #define FL_Num_Lock 0xff7f #define FL_KP 0xff80 // use FL_KP+'x' for 'x' on numeric keypad #define FL_KP_Enter 0xff8d // same as Fl_KP+'\r' @@ -372,5 +373,5 @@ enum Fl_Damage { #endif // -// End of "$Id: Enumerations.H,v 1.18.2.14.2.16 2001/12/06 18:23:29 easysw Exp $". +// End of "$Id: Enumerations.H,v 1.18.2.14.2.17 2001/12/22 07:16:11 matthiaswm Exp $". // diff --git a/README.mac b/README.mac index 99e9868c1..6b9f3a192 100644 --- a/README.mac +++ b/README.mac @@ -126,12 +126,10 @@ OTHER STUFF used for FLTK applications ('FLTK') and FLUID files ('Flid'). - All applications should call exit(0) to terminate; otherwise - they may hang until killed. - Under MacOS X, all windows are double-buffered. Using Fl_Window has the same effect as using Fl_Double_Window on - other operating systems. + other operating systems. However Fl_Overlay_Window uses one + additional buffer for the overlay plane. FLTK 1.0.X FOR MAC diff --git a/src/Fl.cxx b/src/Fl.cxx index 9667e02b8..4c3dc6d9b 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl.cxx,v 1.24.2.41.2.14 2001/12/18 11:00:09 matthiaswm Exp $" +// "$Id: Fl.cxx,v 1.24.2.41.2.15 2001/12/22 07:16:12 matthiaswm Exp $" // // Main event handling code for the Fast Light Tool Kit (FLTK). // @@ -696,8 +696,8 @@ void Fl_Window::hide() { fl_gc = 0; } #elif defined(__APPLE__) - //++ Matt: I have not checked yet what we need to do here - Fl::handle(FL_UNFOCUS, this); + if ( x->xid == fl_window ) + fl_window = 0; #else if (x->region) XDestroyRegion(x->region); #endif @@ -851,5 +851,5 @@ void Fl_Window::flush() { } // -// End of "$Id: Fl.cxx,v 1.24.2.41.2.14 2001/12/18 11:00:09 matthiaswm Exp $". +// End of "$Id: Fl.cxx,v 1.24.2.41.2.15 2001/12/22 07:16:12 matthiaswm Exp $". // diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx index 09ded3191..b4ab77f48 100644 --- a/src/Fl_Input_.cxx +++ b/src/Fl_Input_.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Input_.cxx,v 1.21.2.11.2.4 2001/11/17 17:00:22 easysw Exp $" +// "$Id: Fl_Input_.cxx,v 1.21.2.11.2.5 2001/12/22 07:16:12 matthiaswm Exp $" // // Common input widget routines for the Fast Light Tool Kit (FLTK). // @@ -87,7 +87,11 @@ const char* Fl_Input_::expand(const char* p, char* buf) const { *o++ = '^'; *o++ = c ^ 0x40; } +#ifdef __APPLE__ + } else if ( 0 ) { // this is a rather complex issue on MacOS: see glyphs vs. characters in font sets... +#else } else if (c >= 128 && c < 0xA0) { +#endif *o++ = '\\'; *o++ = (c>>6)+'0'; *o++ = ((c>>3)&7)+'0'; @@ -855,5 +859,5 @@ Fl_Input_::~Fl_Input_() { } // -// End of "$Id: Fl_Input_.cxx,v 1.21.2.11.2.4 2001/11/17 17:00:22 easysw Exp $". +// End of "$Id: Fl_Input_.cxx,v 1.21.2.11.2.5 2001/12/22 07:16:12 matthiaswm Exp $". // diff --git a/src/Fl_get_key_mac.cxx b/src/Fl_get_key_mac.cxx index 223459048..2939331b2 100644 --- a/src/Fl_get_key_mac.cxx +++ b/src/Fl_get_key_mac.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_get_key_mac.cxx,v 1.1.2.1 2001/11/27 17:44:06 easysw Exp $" +// "$Id: Fl_get_key_mac.cxx,v 1.1.2.2 2001/12/22 07:16:12 matthiaswm Exp $" // // MacOS keyboard state routines for the Fast Light Tool Kit (FLTK). // @@ -47,11 +47,11 @@ static const struct {unsigned short vk, fltk;} vktab[] = { { 32, 'U' }, { 9, 'V' }, { 13, 'W' }, { 7, 'X' }, { 16, 'Y' }, { 6, 'Z' }, { 33, '[' }, { 30, ']' }, { 50, '`' }, { 42, '|' }, - { 51, FL_BackSpace }, { 48, FL_Tab }, { 36, FL_Enter }, { 0x72, FL_Pause }, - { 127, FL_Scroll_Lock }, { 53, FL_Escape }, { 0x73, FL_Home }, { 123, FL_Left }, + { 51, FL_BackSpace }, { 48, FL_Tab }, { 36, FL_Enter }, { 127, FL_Pause }, + { 107, FL_Scroll_Lock }, { 53, FL_Escape }, { 0x73, FL_Home }, { 123, FL_Left }, { 126, FL_Up }, { 124, FL_Right }, { 125, FL_Down }, { 0x74, FL_Page_Up }, - { 0x79, FL_Page_Down }, { 127, FL_End }, { 0x71, FL_Print }, { 127, FL_Insert }, - { 127, FL_Menu }, { 0x47, FL_Num_Lock }, + { 0x79, FL_Page_Down }, { 119, FL_End }, { 0x71, FL_Print }, { 127, FL_Insert }, + { 127, FL_Menu }, { 114, FL_Help }, { 0x47, FL_Num_Lock }, { 76, FL_KP_Enter }, { 67, FL_KP+'*' }, { 69, FL_KP+'+'}, { 78, FL_KP+'-' }, { 65, FL_KP+'.' }, { 75, FL_KP+'/' }, { 82, FL_KP+'0' }, { 83, FL_KP+'1' }, { 84, FL_KP+'2' }, { 85, FL_KP+'3' }, { 86, FL_KP+'4' }, { 87, FL_KP+'5' }, { 88, FL_KP+'6' }, { 89, FL_KP+'7' }, @@ -61,7 +61,7 @@ static const struct {unsigned short vk, fltk;} vktab[] = { { 0x65, FL_F+9 }, { 0x6D, FL_F+10 }, { 0x67, FL_F+11 }, { 0x6f, FL_F+12 }, { 56, FL_Shift_L }, { 56, FL_Shift_R }, { 55, FL_Control_L }, { 55, FL_Control_R }, { 57, FL_Caps_Lock }, { 59, FL_Meta_L }, { 59, FL_Meta_R }, - { 58, FL_Alt_L }, { 58, FL_Alt_R }, // Fl_Help = 0x72 + { 58, FL_Alt_L }, { 58, FL_Alt_R }, }; static int fltk2mac(int fltk) { @@ -100,5 +100,5 @@ int Fl::get_key(int k) { } // -// End of "$Id: Fl_get_key_mac.cxx,v 1.1.2.1 2001/11/27 17:44:06 easysw Exp $". +// End of "$Id: Fl_get_key_mac.cxx,v 1.1.2.2 2001/12/22 07:16:12 matthiaswm Exp $". // diff --git a/src/Fl_mac.cxx b/src/Fl_mac.cxx index 2b9742996..707961534 100644 --- a/src/Fl_mac.cxx +++ b/src/Fl_mac.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_mac.cxx,v 1.1.2.9 2001/12/20 22:02:25 matthiaswm Exp $" +// "$Id: Fl_mac.cxx,v 1.1.2.10 2001/12/22 07:16:12 matthiaswm Exp $" // // MacOS specific code for the Fast Light Tool Kit (FLTK). // @@ -65,6 +65,7 @@ static Fl_Window* resize_from_system; Fl_Window* fl_find(Window); int fl_handle(const EventRecord &event); void handleUpdateEvent( WindowPtr xid ); +extern void fl_fix_focus(); int fl_screen; Handle fl_system_menu; @@ -443,6 +444,8 @@ pascal OSStatus carbonWindowHandler( EventHandlerCallRef nextHandler, EventRef e Fl_Window *window = (Fl_Window*)userData; Rect currentBounds, originalBounds; + WindowClass winClass; + static Fl_Window *activeWindow = 0; switch ( kind ) { @@ -465,16 +468,31 @@ pascal OSStatus carbonWindowHandler( EventHandlerCallRef nextHandler, EventRef e } break; } case kEventWindowShown: + // ;;;; printf("Show %s\n", window->label()); if ( !window->parent() ) Fl::handle( FL_SHOW, window); break; case kEventWindowHidden: + // ;;;; printf("Hide %s\n", window->label()); if ( !window->parent() ) Fl::handle( FL_HIDE, window); break; case kEventWindowActivated: - if ( !window->parent() ) Fl::handle(FL_FOCUS, window); + if ( window!=activeWindow ) + { + GetWindowClass( fl_xid( window ), &winClass ); + if ( winClass != kHelpWindowClass ) { // help windows can't get the focus! + Fl::handle( FL_FOCUS, window); + activeWindow = window; + // ;;;; printf("Activate %s\n", window->label()); + } + } break; case kEventWindowDeactivated: - if ( !window->parent() ) Fl::handle(FL_UNFOCUS, window); + if ( window==activeWindow ) + { + Fl::handle( FL_UNFOCUS, window); + activeWindow = 0; + // ;;;; printf("Deactivate %s\n", window->label()); + } break; case kEventWindowClose: Fl::handle( FL_CLOSE, window ); // this might or might not close the window @@ -562,21 +580,27 @@ pascal OSStatus carbonMouseHandler( EventHandlerCallRef nextHandler, EventRef ev case kEventMouseUp: // ;;;; if ( !sendEvent ) printf("Carb-win-hdlr: mouse up (x:%d, y:d)\n", pos.h, pos.v ); if ( !window ) break; - if ( !sendEvent ) sendEvent = FL_RELEASE; + if ( !sendEvent ) { + sendEvent = FL_RELEASE; + } Fl::e_keysym = keysym[ btn ]; // fall through case kEventMouseMoved: // ;;;; if ( !sendEvent ) printf("Carb-win-hdlr: mouse moved (x:%d, y:d)\n", pos.h, pos.v ); - if ( !sendEvent ) { sendEvent = FL_MOVE; chord = 0; } + if ( !sendEvent ) { + sendEvent = FL_MOVE; chord = 0; + } // fall through case kEventMouseDragged: // ;;;; if ( !sendEvent ) printf("Carb-win-hdlr: mouse dragged (x:%d, y:d)\n", pos.h, pos.v ); if ( !sendEvent ) { sendEvent = FL_DRAG; - if (abs(pos.h-px)>5 || abs(pos.v-py)>5) Fl::e_is_click = 0; + if (abs(pos.h-px)>5 || abs(pos.v-py)>5) + Fl::e_is_click = 0; } chord_to_e_state( chord ); - SetPort( GetWindowPort(xid) ); SetOrigin(0, 0); + SetPort( GetWindowPort(xid) ); //++ remove this! There must be some GlobalToLocal call that has a port as an argument + SetOrigin(0, 0); Fl::e_x_root = pos.h; Fl::e_y_root = pos.v; GlobalToLocal( &pos ); @@ -610,7 +634,7 @@ static void mods_to_e_state( UInt32 mods ) static void mods_to_e_keysym( UInt32 mods ) { if ( mods & cmdKey ) Fl::e_keysym = FL_Control_L; - //else if ( mods & kEventKeyModifierNumLockMask ) Fl::e_keysym = FL_Num_Lock; + else if ( mods & kEventKeyModifierNumLockMask ) Fl::e_keysym = FL_Num_Lock; else if ( mods & optionKey ) Fl::e_keysym = FL_Alt_L; else if ( mods & rightOptionKey ) Fl::e_keysym = FL_Alt_R; else if ( mods & controlKey ) Fl::e_keysym = FL_Meta_L; @@ -630,14 +654,15 @@ pascal OSStatus carbonKeyboardHandler( EventHandlerCallRef nextHandler, EventRef int sendEvent = 0; Fl_Window *window = (Fl_Window*)userData; UInt32 mods; - static UInt32 prevMods = 0xdeadbeef; + static UInt32 prevMods = 0xffffffff; GetEventParameter( event, kEventParamKeyModifiers, typeUInt32, NULL, sizeof(UInt32), NULL, &mods ); - if ( prevMods == 0xdeadbeef ) prevMods = mods; + if ( prevMods == 0xffffffff ) prevMods = mods; UInt32 keyCode; GetEventParameter( event, kEventParamKeyCode, typeUInt32, NULL, sizeof(UInt32), NULL, &keyCode ); - char key; + unsigned char key; GetEventParameter( event, kEventParamKeyMacCharCodes, typeChar, NULL, sizeof(char), NULL, &key ); - // ;;;; printf( "kb: %08x %08x %02x %04x\n", mods, keyCode, key, GetEventKind( event ) ); + unsigned short sym; + // ;;;; printf( "kb: %08x %08x %02x %04x %04x\n", mods, keyCode, key, GetEventKind( event ), macKeyLookUp[ keyCode & 0x7f ] ); switch ( GetEventKind( event ) ) { case kEventRawKeyDown: @@ -646,13 +671,12 @@ pascal OSStatus carbonKeyboardHandler( EventHandlerCallRef nextHandler, EventRef // fall through case kEventRawKeyUp: if ( !sendEvent ) sendEvent = FL_KEYUP; - Fl::e_keysym = macKeyLookUp[ keyCode & 0x7f ]; - if ( key=='\t' || key==27 || ( key>=32 && keyCode!=0x75 ) ) { + sym = macKeyLookUp[ keyCode & 0x7f ]; + Fl::e_keysym = sym; + if ( keyCode==0x4c ) key=0x0d; + if ( ( (sym>=FL_KP) && (sym<=FL_KP_Last) ) || ((sym&0xff00)==0) || (sym==FL_Tab) ) { buffer[0] = key; Fl::e_length = 1; - } else if ( key==3 || key==0x0d ) { - buffer[0] = 0x0d; - Fl::e_length = 1; } else { buffer[0] = 0; Fl::e_length = 0; @@ -878,9 +902,9 @@ static unsigned short macKeyLookUp[128] = FL_KP+'6', FL_KP+'7', 0, FL_KP+'8', FL_KP+'9', 0, 0, 0, FL_F+5, FL_F+6, FL_F+7, FL_F+3, FL_F+8, FL_F+9, 0, FL_F+11, - 0, 0, FL_F+13, FL_F+14, 0, FL_F+10, 0, FL_F+12, + 0, 0, FL_Print, FL_Scroll_Lock, 0, FL_F+10, 0, FL_F+12, - 0, FL_F+15, FL_Pause, FL_Home, FL_Page_Up, FL_Delete, FL_F+4, FL_End, + 0, FL_Pause, FL_Help, FL_Home, FL_Page_Up, FL_Delete, FL_F+4, FL_End, FL_F+2, FL_Page_Down, FL_F+1, FL_Left, FL_Right, FL_Down, FL_Up, 0, }; @@ -1312,8 +1336,6 @@ void Fl_X::make(Fl_Window* w) w->handle(FL_SHOW); w->redraw(); // force draw to happen fl_show_iconic = 0; - //++ hmmm, this should maybe set by the activate event?! - Fl::handle(FL_FOCUS, w); //++ if (w->modal()) { Fl::modal_ = w; fl_fix_focus(); } // ;;;; printf("Created subwindow %08x (%08x)\n", w, x->xid ); } @@ -1350,9 +1372,9 @@ void Fl_X::make(Fl_Window* w) } int xwm = xp, ywm = yp, bt, bx, by; if (!fake_X_wm(w, xwm, ywm, bt, bx, by)) - { winclass = kHelpWindowClass; winattr = 0; } + { winclass = kHelpWindowClass; winattr = 0; } // menu windows and tooltips else if (w->modal()) - winclass = kFloatingWindowClass; // basically fine, but not modal! The modal window however does nor show + winclass = kFloatingWindowClass; // basically fine, but not modal! The modal window however does not show else if (w->non_modal()) winclass = kFloatingWindowClass; // we need to call 'InitFloatingWindows for OS 8, 9 if (by+bt) { @@ -1366,7 +1388,7 @@ void Fl_X::make(Fl_Window* w) if (xyPos>200) xyPos = 24; } else { if (!Fl::grab()) { - xp = xwm; yp = ywm; + xp = xwm; yp = ywm; w->x(xp);w->y(yp); } xp -= bx; @@ -1448,17 +1470,16 @@ void Fl_X::make(Fl_Window* w) if ( err==noErr ) SetFrontProcess( &psn ); // or 'BringToFront' } - - w->handle(FL_SHOW); - w->redraw(); // force draw to happen - + //TransitionWindow( x->xid, kWindowZoomTransitionEffect, kWindowShowTransitionAction, 0 ); ShowWindow( x->xid ); + w->handle(FL_SHOW); + w->redraw(); // force draw to happen fl_show_iconic = 0; - //++ hmmm, this should maybe set by the activate event?! - Fl::handle(FL_FOCUS, w); - //++ if (w->modal()) { Fl::modal_ = w; fl_fix_focus(); } + w->set_visible(); + + if (w->modal()) { Fl::modal_ = w; fl_fix_focus(); } //;;;; printf("Created top level window %08x (%08x)\n", w, x->xid ); } } @@ -1573,7 +1594,7 @@ void Fl_Window::make_current() fl_window = i->xid; current_ = this; - SetPort( GetWindowPort(i->xid) ); + SetPort( GetWindowPort(i->xid) ); //++ this does not handle double buffered windows! int xp = 0, yp = 0; Fl_Window *win = this; @@ -1693,6 +1714,6 @@ elapsedNanoseconds = AbsoluteToNanoseconds(elapsedTime); //++ we MUST call aglConfigure(AGL_TARGET_OS_MAC_OSX, GL_TRUE); // -// End of "$Id: Fl_mac.cxx,v 1.1.2.9 2001/12/20 22:02:25 matthiaswm Exp $". +// End of "$Id: Fl_mac.cxx,v 1.1.2.10 2001/12/22 07:16:12 matthiaswm Exp $". // diff --git a/test/keyboard.cxx b/test/keyboard.cxx index a7afa943d..3a4eb9b7e 100644 --- a/test/keyboard.cxx +++ b/test/keyboard.cxx @@ -1,5 +1,5 @@ // -// "$Id: keyboard.cxx,v 1.5.2.3.2.2 2001/12/21 14:35:34 easysw Exp $" +// "$Id: keyboard.cxx,v 1.5.2.3.2.3 2001/12/22 07:16:12 matthiaswm Exp $" // // Keyboard/event test program for the Fast Light Tool Kit (FLTK). // @@ -54,7 +54,7 @@ public: // these are used to identify which buttons are which: void key_cb(Fl_Button*, void*) {} void shift_cb(Fl_Button*, void*) {} -void wheel_cb(Fl_Button*, void*) {} +void wheel_cb(Fl_Dial*, void*) {} // this is used to stop Esc from exiting the program: int handle(int e) { @@ -64,7 +64,8 @@ int handle(int e) { int MyWindow::handle(int msg) { if (msg==FL_MOUSEWHEEL) { - roller->value( roller->value() + Fl::e_dy * roller->step() ); + roller_x->value( roller_x->value() + Fl::e_dx * roller_x->step() ); + roller_y->value( roller_y->value() + Fl::e_dy * roller_y->step() ); return 1; } return 0; @@ -98,6 +99,7 @@ struct {int n; const char* text;} table[] = { {FL_Meta_L, "FL_Meta_L"}, {FL_Meta_R, "FL_Meta_R"}, {FL_Menu, "FL_Menu"}, + {FL_Help, "FL_Help"}, {FL_Num_Lock, "FL_Num_Lock"}, {FL_KP_Enter, "FL_KP_Enter"} }; @@ -129,7 +131,7 @@ int main(int argc, char** argv) { keyname = "0"; else if (k < 256) { sprintf(buffer, "'%c'", k); - } else if (k >= FL_F && k <= FL_F_Last) { + } else if (k > FL_F && k <= FL_F_Last) { sprintf(buffer, "FL_F+%d", k - FL_F); } else if (k >= FL_KP && k <= FL_KP_Last) { sprintf(buffer, "FL_KP+'%c'", k-FL_KP); @@ -148,5 +150,5 @@ int main(int argc, char** argv) { } // -// End of "$Id: keyboard.cxx,v 1.5.2.3.2.2 2001/12/21 14:35:34 easysw Exp $". +// End of "$Id: keyboard.cxx,v 1.5.2.3.2.3 2001/12/22 07:16:12 matthiaswm Exp $". // diff --git a/test/keyboard_ui.fl b/test/keyboard_ui.fl index ce87acb5d..207e33bb3 100644 --- a/test/keyboard_ui.fl +++ b/test/keyboard_ui.fl @@ -8,680 +8,680 @@ snap 3 Function {make_window()} {open } { Fl_Window my_window {open - xywh {461 296 496 193} + xywh {461 296 494 203} class MyWindow visible } { Fl_Button {} { label {Esc } user_data FL_Escape user_data_type {void*} callback key_cb - xywh {15 50 20 20} labelsize 8 + xywh {15 60 20 20} labelsize 8 } Fl_Button {} { label F1 user_data {FL_F+1} user_data_type {void*} callback key_cb - xywh {50 50 20 20} labelsize 10 + xywh {50 60 20 20} labelsize 10 } Fl_Button {} { label F2 user_data {FL_F+2} user_data_type {void*} callback key_cb - xywh {70 50 20 20} labelsize 10 + xywh {70 60 20 20} labelsize 10 } Fl_Button {} { label F3 user_data {FL_F+3} user_data_type {void*} callback key_cb - xywh {90 50 20 20} labelsize 10 + xywh {90 60 20 20} labelsize 10 } Fl_Button {} { label F4 user_data {FL_F+4} user_data_type {void*} callback key_cb - xywh {110 50 20 20} labelsize 10 + xywh {110 60 20 20} labelsize 10 } Fl_Button {} { label F5 user_data {FL_F+5} user_data_type {void*} callback key_cb - xywh {140 50 20 20} labelsize 10 + xywh {140 60 20 20} labelsize 10 } Fl_Button {} { label F6 user_data {FL_F+6} user_data_type {void*} callback key_cb - xywh {160 50 20 20} labelsize 10 + xywh {160 60 20 20} labelsize 10 } Fl_Button {} { label F7 user_data {FL_F+7} user_data_type {void*} callback key_cb - xywh {180 50 20 20} labelsize 10 + xywh {180 60 20 20} labelsize 10 } Fl_Button {} { label F8 user_data {FL_F+8} user_data_type {void*} callback key_cb - xywh {200 50 20 20} labelsize 10 + xywh {200 60 20 20} labelsize 10 } Fl_Button {} { label F9 user_data {FL_F+9} user_data_type {void*} callback key_cb - xywh {230 50 20 20} labelsize 10 + xywh {230 60 20 20} labelsize 10 } Fl_Button {} { label F10 user_data {FL_F+10} user_data_type {void*} callback key_cb - xywh {250 50 20 20} labelsize 10 + xywh {250 60 20 20} labelsize 10 } Fl_Button {} { label F11 user_data {FL_F+11} user_data_type {void*} callback key_cb - xywh {270 50 20 20} labelsize 10 + xywh {270 60 20 20} labelsize 10 } Fl_Button {} { label F12 user_data {FL_F+12} user_data_type {void*} callback key_cb - xywh {290 50 20 20} labelsize 10 + xywh {290 60 20 20} labelsize 10 } Fl_Button {} { label {Print } user_data FL_Print user_data_type {void*} callback key_cb - xywh {325 50 20 20} labelsize 8 + xywh {325 60 20 20} labelsize 8 } Fl_Button {} { label {Sclk } user_data FL_Scroll_Lock user_data_type {void*} callback key_cb - xywh {345 50 20 20} labelsize 8 + xywh {345 60 20 20} labelsize 8 } Fl_Button {} { label {Paus } user_data FL_Pause user_data_type {void*} callback key_cb - xywh {365 50 20 20} labelsize 8 + xywh {365 60 20 20} labelsize 8 } Fl_Button {} { label {`} callback key_cb - xywh {15 80 20 20} labelsize 10 + xywh {15 90 20 20} labelsize 10 } Fl_Button {} { label 1 callback key_cb - xywh {35 80 20 20} labelsize 10 + xywh {35 90 20 20} labelsize 10 } Fl_Button {} { label 2 callback key_cb - xywh {55 80 20 20} labelsize 10 + xywh {55 90 20 20} labelsize 10 } Fl_Button {} { label 3 callback key_cb - xywh {75 80 20 20} labelsize 10 + xywh {75 90 20 20} labelsize 10 } Fl_Button {} { label 4 callback key_cb - xywh {95 80 20 20} labelsize 10 + xywh {95 90 20 20} labelsize 10 } Fl_Button {} { label 5 callback key_cb - xywh {115 80 20 20} labelsize 10 + xywh {115 90 20 20} labelsize 10 } Fl_Button {} { label 6 callback key_cb - xywh {135 80 20 20} labelsize 10 + xywh {135 90 20 20} labelsize 10 } Fl_Button {} { label 7 callback key_cb - xywh {155 80 20 20} labelsize 10 + xywh {155 90 20 20} labelsize 10 } Fl_Button {} { label 8 callback key_cb - xywh {175 80 20 20} labelsize 10 + xywh {175 90 20 20} labelsize 10 } Fl_Button {} { label 9 callback key_cb - xywh {195 80 20 20} labelsize 10 + xywh {195 90 20 20} labelsize 10 } Fl_Button {} { label 0 callback key_cb - xywh {215 80 20 20} labelsize 10 + xywh {215 90 20 20} labelsize 10 } Fl_Button {} { label {-} callback key_cb - xywh {235 80 20 20} labelsize 10 + xywh {235 90 20 20} labelsize 10 } Fl_Button {} { label {=} callback key_cb - xywh {255 80 20 20} labelsize 10 + xywh {255 90 20 20} labelsize 10 } Fl_Button {} { label Bksp user_data FL_BackSpace user_data_type {void*} callback key_cb - xywh {275 80 35 20} labeltype SHADOW_LABEL labelsize 8 align 20 + xywh {275 90 35 20} labeltype SHADOW_LABEL labelsize 8 align 20 } Fl_Button {} { label {Ins } user_data FL_Insert user_data_type {void*} callback key_cb - xywh {325 80 20 20} labelsize 8 + xywh {325 90 20 20} labelsize 8 } Fl_Button {} { label Home user_data FL_Home user_data_type {void*} callback key_cb - xywh {345 80 20 20} labelsize 8 + xywh {345 90 20 20} labelsize 8 } Fl_Button {} { label {pgup } user_data FL_Page_Up user_data_type {void*} callback key_cb - xywh {365 80 20 20} labelsize 8 + xywh {365 90 20 20} labelsize 8 } Fl_Button {} { label Num user_data FL_Num_Lock user_data_type {void*} callback key_cb - xywh {400 80 20 20} labelsize 8 + xywh {400 90 20 20} labelsize 8 } Fl_Button {} { label {/} user_data {FL_KP+'/'} user_data_type {void*} callback key_cb - xywh {420 80 20 20} labelsize 10 + xywh {420 90 20 20} labelsize 10 } Fl_Button {} { label {*} user_data {FL_KP+'*'} user_data_type {void*} callback key_cb - xywh {440 80 20 20} labelsize 10 + xywh {440 90 20 20} labelsize 10 } Fl_Button {} { label {-} user_data {FL_KP+'-'} user_data_type {void*} callback key_cb - xywh {460 80 20 20} labelsize 10 + xywh {460 90 20 20} labelsize 10 } Fl_Button {} { label Tab user_data FL_Tab user_data_type {void*} callback key_cb - xywh {15 100 27 20} labelsize 8 align 20 + xywh {15 110 27 20} labelsize 8 align 20 } Fl_Button {} { label Q callback key_cb - xywh {42 100 20 20} labelsize 10 + xywh {42 110 20 20} labelsize 10 } Fl_Button {} { label W callback key_cb - xywh {62 100 20 20} labelsize 10 + xywh {62 110 20 20} labelsize 10 } Fl_Button {} { label E callback key_cb - xywh {82 100 20 20} labelsize 10 + xywh {82 110 20 20} labelsize 10 } Fl_Button {} { label R callback key_cb - xywh {102 100 20 20} labelsize 10 + xywh {102 110 20 20} labelsize 10 } Fl_Button {} { label T callback key_cb - xywh {122 100 20 20} labelsize 10 + xywh {122 110 20 20} labelsize 10 } Fl_Button {} { label Y callback key_cb - xywh {142 100 20 20} labelsize 10 + xywh {142 110 20 20} labelsize 10 } Fl_Button {} { label U callback key_cb - xywh {162 100 20 20} labelsize 10 + xywh {162 110 20 20} labelsize 10 } Fl_Button {} { label I callback key_cb - xywh {182 100 20 20} labelsize 10 + xywh {182 110 20 20} labelsize 10 } Fl_Button {} { label O callback key_cb - xywh {202 100 20 20} labelsize 10 + xywh {202 110 20 20} labelsize 10 } Fl_Button {} { label P callback key_cb - xywh {222 100 20 20} labelsize 10 + xywh {222 110 20 20} labelsize 10 } Fl_Button {} { label {[} callback key_cb - xywh {242 100 20 20} labelsize 10 + xywh {242 110 20 20} labelsize 10 } Fl_Button {} { label {]} callback key_cb - xywh {262 100 20 20} labelsize 10 + xywh {262 110 20 20} labelsize 10 } Fl_Button {} { label {\\} user_data {'|'} callback key_cb - xywh {282 100 28 20} labelsize 10 align 20 + xywh {282 110 28 20} labelsize 10 align 20 } Fl_Button {} { label {Del } user_data FL_Delete user_data_type {void*} callback key_cb - xywh {325 100 20 20} labelsize 8 + xywh {325 110 20 20} labelsize 8 } Fl_Button {} { label {End } user_data FL_End user_data_type {void*} callback key_cb - xywh {345 100 20 20} labelsize 8 + xywh {345 110 20 20} labelsize 8 } Fl_Button {} { label {pgdn } user_data FL_Page_Down user_data_type {void*} callback key_cb - xywh {365 100 20 20} labelsize 8 + xywh {365 110 20 20} labelsize 8 } Fl_Button {} { label 7 user_data {FL_KP+'7'} user_data_type {void*} callback key_cb - xywh {400 100 20 20} labelsize 10 + xywh {400 110 20 20} labelsize 10 } Fl_Button {} { label 8 user_data {FL_KP+'8'} user_data_type {void*} callback key_cb - xywh {420 100 20 20} labelsize 10 + xywh {420 110 20 20} labelsize 10 } Fl_Button {} { label 9 user_data {FL_KP+'9'} user_data_type {void*} callback key_cb - xywh {440 100 20 20} labelsize 10 + xywh {440 110 20 20} labelsize 10 } Fl_Button {} { label {+} user_data {FL_KP+'+'} user_data_type {void*} callback key_cb - xywh {460 100 20 40} labelsize 10 align 17 + xywh {460 110 20 40} labelsize 10 align 17 } Fl_Button {} { label Lock user_data FL_Caps_Lock user_data_type {void*} callback key_cb - xywh {15 120 36 20} labelsize 8 align 20 + xywh {15 130 36 20} labelsize 8 align 20 } Fl_Button {} { label A callback key_cb - xywh {51 120 20 20} labelsize 10 + xywh {51 130 20 20} labelsize 10 } Fl_Button {} { label S callback key_cb - xywh {71 120 20 20} labelsize 10 + xywh {71 130 20 20} labelsize 10 } Fl_Button {} { label D callback key_cb - xywh {91 120 20 20} labelsize 10 + xywh {91 130 20 20} labelsize 10 } Fl_Button {} { label F callback key_cb - xywh {111 120 20 20} labelsize 10 + xywh {111 130 20 20} labelsize 10 } Fl_Button {} { label G callback key_cb - xywh {131 120 20 20} labelsize 10 + xywh {131 130 20 20} labelsize 10 } Fl_Button {} { label H callback key_cb - xywh {151 120 20 20} labelsize 10 + xywh {151 130 20 20} labelsize 10 } Fl_Button {} { label J callback key_cb - xywh {171 120 20 20} labelsize 10 + xywh {171 130 20 20} labelsize 10 } Fl_Button {} { label K callback key_cb - xywh {191 120 20 20} labelsize 10 + xywh {191 130 20 20} labelsize 10 } Fl_Button {} { label L callback key_cb - xywh {211 120 20 20} labelsize 10 + xywh {211 130 20 20} labelsize 10 } Fl_Button {} { label {;} callback key_cb - xywh {231 120 20 20} labelsize 10 + xywh {231 130 20 20} labelsize 10 } Fl_Button {} { label {'} callback key_cb - xywh {251 120 20 20} labelsize 10 + xywh {251 130 20 20} labelsize 10 } Fl_Button {} { label Enter user_data FL_Enter user_data_type {void*} callback key_cb - xywh {271 120 39 20} labelsize 8 align 20 + xywh {271 130 39 20} labelsize 8 align 20 } Fl_Button {} { label 4 user_data {FL_KP+'4'} user_data_type {void*} callback key_cb - xywh {400 120 20 20} labelsize 10 + xywh {400 130 20 20} labelsize 10 } Fl_Button {} { label 5 user_data {FL_KP+'5'} user_data_type {void*} callback key_cb - xywh {420 120 20 20} labelsize 10 + xywh {420 130 20 20} labelsize 10 } Fl_Button {} { label 6 user_data {FL_KP+'6'} user_data_type {void*} callback key_cb - xywh {440 120 20 20} labelsize 10 + xywh {440 130 20 20} labelsize 10 } Fl_Button {} { label Shift user_data FL_Shift_L user_data_type {void*} callback key_cb - xywh {15 140 45 20} labelsize 8 align 20 + xywh {15 150 45 20} labelsize 8 align 20 } Fl_Button {} { label Z callback key_cb - xywh {60 140 20 20} labelsize 10 + xywh {60 150 20 20} labelsize 10 } Fl_Button {} { label X callback key_cb - xywh {80 140 20 20} labelsize 10 + xywh {80 150 20 20} labelsize 10 } Fl_Button {} { label C callback key_cb - xywh {100 140 20 20} labelsize 10 + xywh {100 150 20 20} labelsize 10 } Fl_Button {} { label V callback key_cb - xywh {120 140 20 20} labelsize 10 + xywh {120 150 20 20} labelsize 10 } Fl_Button {} { label B callback key_cb - xywh {140 140 20 20} labelsize 10 + xywh {140 150 20 20} labelsize 10 } Fl_Button {} { label N callback key_cb - xywh {160 140 20 20} labelsize 10 + xywh {160 150 20 20} labelsize 10 } Fl_Button {} { label M callback key_cb - xywh {180 140 20 20} labelsize 10 + xywh {180 150 20 20} labelsize 10 } Fl_Button {} { label {,} callback key_cb - xywh {200 140 20 20} labelsize 10 + xywh {200 150 20 20} labelsize 10 } Fl_Button {} { label {.} callback key_cb - xywh {220 140 20 20} labelsize 10 + xywh {220 150 20 20} labelsize 10 } Fl_Button {} { label {/} callback key_cb - xywh {240 140 20 20} labelsize 10 + xywh {240 150 20 20} labelsize 10 } Fl_Button {} { label Shift user_data FL_Shift_R user_data_type {void*} callback key_cb - xywh {260 140 50 20} labelsize 8 align 20 + xywh {260 150 50 20} labelsize 8 align 20 } Fl_Button {} { label {@8->} user_data FL_Up user_data_type {void*} callback key_cb - xywh {345 140 20 20} labeltype SHADOW_LABEL labelsize 10 labelcolor 47 + xywh {345 150 20 20} labeltype SHADOW_LABEL labelsize 10 labelcolor 47 } Fl_Button {} { label 1 user_data {FL_KP+'1'} user_data_type {void*} callback key_cb - xywh {400 140 20 20} labelsize 10 + xywh {400 150 20 20} labelsize 10 } Fl_Button {} { label 2 user_data {FL_KP+'2'} user_data_type {void*} callback key_cb - xywh {420 140 20 20} labelsize 10 + xywh {420 150 20 20} labelsize 10 } Fl_Button {} { label 3 user_data {FL_KP+'3'} user_data_type {void*} callback key_cb - xywh {440 140 20 20} labelsize 10 + xywh {440 150 20 20} labelsize 10 } Fl_Button {} { user_data FL_KP_Enter user_data_type {void*} callback key_cb - xywh {460 140 20 40} + xywh {460 150 20 40} } Fl_Button {} { label Ctrl user_data FL_Control_L user_data_type {void*} callback key_cb - xywh {15 160 30 20} labelsize 8 align 20 + xywh {15 170 30 20} labelsize 8 align 20 } Fl_Button {} { label {Meta } user_data FL_Meta_L user_data_type {void*} callback key_cb - xywh {45 160 30 20} labelsize 8 + xywh {45 170 30 20} labelsize 8 } Fl_Button {} { label {Alt } user_data FL_Alt_L user_data_type {void*} callback key_cb - xywh {75 160 30 20} labelsize 8 + xywh {75 170 30 20} labelsize 8 } Fl_Button {} { user_data {' '} user_data_type {void*} callback key_cb - xywh {105 160 85 20} labelsize 10 + xywh {105 170 85 20} labelsize 10 } Fl_Button {} { label {Alt } user_data FL_Alt_R user_data_type {void*} callback key_cb - xywh {190 160 30 20} labelsize 8 + xywh {190 170 30 20} labelsize 8 } Fl_Button {} { label {Meta } user_data FL_Meta_R user_data_type {void*} callback key_cb - xywh {220 160 30 20} labelsize 8 + xywh {220 170 30 20} labelsize 8 } Fl_Button {} { label {Menu } user_data FL_Menu user_data_type {void*} callback key_cb - xywh {250 160 30 20} labelsize 8 + xywh {250 170 30 20} labelsize 8 } Fl_Button {} { label Ctrl user_data FL_Control_R user_data_type {void*} callback key_cb - xywh {280 160 30 20} labelsize 8 align 20 + xywh {280 170 30 20} labelsize 8 align 20 } Fl_Button {} { label {@4->} user_data FL_Left user_data_type {void*} callback key_cb - xywh {325 160 20 20} labeltype SHADOW_LABEL labelsize 10 labelcolor 47 + xywh {325 170 20 20} labeltype SHADOW_LABEL labelsize 10 labelcolor 47 } Fl_Button {} { label {@2->} user_data FL_Down user_data_type {void*} callback key_cb - xywh {345 160 20 20} labeltype SHADOW_LABEL labelsize 10 labelcolor 47 + xywh {345 170 20 20} labeltype SHADOW_LABEL labelsize 10 labelcolor 47 } Fl_Button {} { label {@6->} user_data FL_Right user_data_type {void*} callback key_cb - xywh {365 160 20 20} labeltype SHADOW_LABEL labelsize 10 labelcolor 47 + xywh {365 170 20 20} labeltype SHADOW_LABEL labelsize 10 labelcolor 47 } Fl_Button {} { label 0 user_data {FL_KP+'0'} user_data_type {void*} callback key_cb - xywh {400 160 40 20} labelsize 10 align 20 + xywh {400 170 40 20} labelsize 10 align 20 } Fl_Button {} { label {.} user_data {FL_KP+'.'} user_data_type {void*} callback key_cb - xywh {440 160 20 20} labelsize 10 + xywh {440 170 20 20} labelsize 10 } Fl_Button {} { label {shift } user_data FL_SHIFT user_data_type {void*} callback shift_cb - xywh {400 15 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 + xywh {400 10 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 } Fl_Button {} { label {lock } user_data FL_CAPS_LOCK user_data_type {void*} callback shift_cb - xywh {420 15 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 + xywh {420 10 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 } Fl_Button {} { label ctrl user_data FL_CTRL user_data_type {void*} callback shift_cb - xywh {440 15 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 + xywh {440 10 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 } Fl_Button {} { label alt user_data FL_ALT user_data_type {void*} callback shift_cb - xywh {460 15 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 + xywh {460 10 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 } Fl_Button {} { label num user_data FL_NUM_LOCK user_data_type {void*} callback shift_cb - xywh {400 25 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 + xywh {400 20 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 } Fl_Button {} { label {?} user_data 0x20 user_data_type {void*} callback shift_cb - xywh {420 25 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 + xywh {420 20 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 } Fl_Button {} { label {meta } user_data FL_META user_data_type {void*} callback shift_cb - xywh {440 25 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 + xywh {440 20 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 } Fl_Button {} { label sclk user_data FL_SCROLL_LOCK user_data_type {void*} callback shift_cb - xywh {460 25 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 + xywh {460 20 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 } Fl_Button {} { label b1 user_data FL_BUTTON1 user_data_type {void*} callback shift_cb - xywh {400 35 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 + xywh {400 30 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 } Fl_Button {} { label b2 user_data FL_BUTTON2 user_data_type {void*} callback shift_cb - xywh {420 35 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 + xywh {420 30 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 } Fl_Button {} { label b3 user_data FL_BUTTON3 user_data_type {void*} callback shift_cb - xywh {440 35 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 + xywh {440 30 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 } Fl_Button {} { label whl user_data 0x800 user_data_type {void*} callback shift_cb - xywh {460 35 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 + xywh {460 30 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 } Fl_Button {} { label {?} user_data 0x1000 user_data_type {void*} callback shift_cb - xywh {400 45 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 + xywh {400 40 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 } Fl_Button {} { label {?} user_data 0x2000 user_data_type {void*} callback shift_cb - xywh {420 45 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 + xywh {420 40 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 } Fl_Button {} { label {?} user_data 0x4000 user_data_type {void*} callback shift_cb - xywh {440 45 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 + xywh {440 40 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 } Fl_Button {} { label {?} user_data 0x8000 user_data_type {void*} callback shift_cb - xywh {460 45 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 + xywh {460 40 20 10} box THIN_UP_BOX selection_color 3 labelsize 8 } Fl_Output key_output { label {Fl::event_key():} @@ -689,14 +689,33 @@ Function {make_window()} {open } Fl_Box {} { label {Fl::event_state():} - xywh {395 15 85 40} labelsize 8 align 5 + xywh {395 10 85 40} labelsize 8 align 5 } Fl_Output text_output { label {Fl::event_text():} xywh {195 15 190 30} labelsize 8 align 5 } - Fl_Roller roller {selected - xywh {480 15 10 40} maximum 0 + Fl_Button {} { + label help + user_data FL_Help user_data_type {void*} + callback key_cb + xywh {400 60 20 20} labelsize 8 + } + Fl_Button {} { + label {=} + user_data {FL_KP+'='} user_data_type {void*} + callback key_cb + xywh {420 60 20 20} labelsize 10 + } + Fl_Dial roller_x { + label {x:} + callback wheel_cb selected + xywh {440 60 20 20} box ROUND_UP_BOX selection_color 49 labelsize 9 align 5 step 0.1 + } + Fl_Dial roller_y { + label {y:} + callback wheel_cb selected + xywh {460 60 20 20} box ROUND_UP_BOX selection_color 49 labelsize 9 align 5 step 0.1 } } }