Warning, /utilities/okteta/gui/controller/IDEAS is written in an unsupported language. File is not indexed.

0001 Keyboard-Controller is simpler than the Mouse-Controller:
0002 The AbstractController::handleKeyPress(keyEvent) is a stateless method which passes
0003 the input event in a priority chain of controllers until one accepts it.
0004 The controller may only depend on the state of the view, but not on previous input.
0005 (This may change in the future with VI-like control)
0006 
0007 Mouse-Controller is different, as it is usually a series of inputs which defines
0008 a command. And several commands may share part of the start sequence.
0009 
0010 Which complicates things as there may be reactions already on the first input, like
0011 a UI-button state change (down) on the press-down of a mouse button. So should
0012 only those share the start which share the reaction, or should the first dominate the reaction?
0013 What about extending with a new controller? Can the same start be solved by shared base-classes?
0014 
0015 Also in the case of an unknown input sequence the latest input has to be restated
0016 as the first in a next row.
0017 
0018 So the algorithm might be:
0019 
0020 Reset all controllers to active
0021 
0022 For input
0023   if all active
0024     try is two
0025   end if
0026   for try of two
0027     for all active controllers
0028       pass input
0029       if controller done
0030         set input taken
0031         reset all controllers
0032         break
0033       else if controller rejected
0034         set controller inactive
0035       else // if controller 
0036         set input taken
0037     end for
0038     if input not taken
0039       if try is first
0040         reset all controllers
0041       else
0042         break
0043     end if
0044   end try
0045 end for
0046 
0047 Example:
0048 LMB Click to set cursor
0049 LMB click to set selection
0050 LMB Click to mark word - starts by doubleclickpress
0051 LMB Click to mark words by moving the cursor - starts also by doubleclickpress
0052 LMB Click to drag
0053 some share e.g. autoscroll-timer