Andre Poenitz <[EMAIL PROTECTED]> writes: | This patch makes the work areas (both xforms and qt2) producing directly | FuncRequests for the mouse clicks. For the double and triple clicks I've | introduced new lfuns LFUN_MOUSE_DOUBLE and LFUN_MOUSE_TRIPLE (which btw | would enable insets to handle them, for mathed there is a bug on bugzilla | pending on that...) | | Of course, the actual handling of thes events should be shifted to the | LyXText and Insets eventually, right now I left it in the BufferView do | keep the patch small. | | I think this is conceptually sound, but as it has a bit bigger scope than | yesterdays "shift stuff from BufferView_pimpl::dispatch to | LyXText::dispatch" I thought I'd better ask.
Not too bad. But I feel that the switch/cases are a bit too big and really should be kept in separate functions. Also, one thing I'd really like to see (not necessarily in this patch), is to split the mouse lfuns ... not that is not what I want... I want it to be possible to do a \bind mouse-button-1 place-cursor kindo of binding. This means that the mouse buttons must be seen as a kind of keyboard-key. (keysym if you want) This also implies that there should not be _any_ kind of special LFUNS for mouse handling, but that you use key-bindings to achieve that instead. Then we should not need any kind of special casing in the code on "which button was pressed" or any explicit mouse button handling at all. FYI: X already has keysyms for these, that we could "artificially" use if we want to do so: (tripple click is missing) #define XK_Pointer_Left 0xFEE0 #define XK_Pointer_Right 0xFEE1 #define XK_Pointer_Up 0xFEE2 #define XK_Pointer_Down 0xFEE3 #define XK_Pointer_UpLeft 0xFEE4 #define XK_Pointer_UpRight 0xFEE5 #define XK_Pointer_DownLeft 0xFEE6 #define XK_Pointer_DownRight 0xFEE7 #define XK_Pointer_Button_Dflt 0xFEE8 #define XK_Pointer_Button1 0xFEE9 #define XK_Pointer_Button2 0xFEEA #define XK_Pointer_Button3 0xFEEB #define XK_Pointer_Button4 0xFEEC #define XK_Pointer_Button5 0xFEED #define XK_Pointer_DblClick_Dflt 0xFEEE #define XK_Pointer_DblClick1 0xFEEF #define XK_Pointer_DblClick2 0xFEF0 #define XK_Pointer_DblClick3 0xFEF1 #define XK_Pointer_DblClick4 0xFEF2 #define XK_Pointer_DblClick5 0xFEF3 #define XK_Pointer_Drag_Dflt 0xFEF4 #define XK_Pointer_Drag1 0xFEF5 #define XK_Pointer_Drag2 0xFEF6 #define XK_Pointer_Drag3 0xFEF7 #define XK_Pointer_Drag4 0xFEF8 #define XK_Pointer_Drag5 0xFEFD -- Lgb