CGUIEvent Class Reference

Search Toolkit Book for CGUIEvent

#include <gui_event.hpp>

List of all members.


Detailed Description

CGUIEvent provides mapping of FLTK events to Semantic Events.

Goals: 1. To isolate programs from the complexities of platform-dependent bindings of mouse and keyboard events to Actions. 2. To simplify event handling in programs by mapping multiple FLTK events to a single Semantic Event (for instance 'Ctrl'+C and 'Ctrl'+'Ins' - > eCopy) 3. To provide uniform and consistent mapping of Events to Actions controlled in one place. 4. To provide workarounds for some deficiencies of FLTK event handling system.

CGUIEvent support two type of Semantic Events - mouse events and shortcuts. Both types of events may emit Signals depending on the current state of modifiers , however, there is a significant difference in a way mapping is declared.

States for mouse events are explicintly declared and registered in CGUIEvent using RegisterState() function. Then it is possible to bind a Signal to a particular mouse Event depending on the current State. States for mouse events represent different GUI modes, user enter a mode by pressing a combination of modifier keys and remains in this mode by holding the keys pressed.

Shortcuts also depend on pressed modifiers, but defining Shortcuts does not require registering special states. RegisterShortcut() function takes a combination of modifiers and an action key. If action key is pressed while specified combination of modifiers is being hold - CGUIEvent generates a Signal corresponding to shortcut. Handling shortcuts does not change current state and so do not interfere with handling of mouse events.

Definition at line 81 of file gui_event.hpp.

Public Types

enum  EGUIState {
  eDefaultState, eSelectState, eSelectIncState, eSelectExtState,
  eLast
}

Static Public Member Functions

New wxWidgets API
static EGUIState wxGetSelectState (const wxMouseEvent &event)
static EGUIState wxGetSelectState (const wxKeyEvent &event)


Member Enumeration Documentation

enum CGUIEvent::EGUIState
 

Enumerator:
eDefaultState 
eSelectState 
eSelectIncState 
eSelectExtState 
eLast 

Definition at line 106 of file gui_event.hpp.


Member Function Documentation

CGUIEvent::EGUIState CGUIEvent::wxGetSelectState const wxKeyEvent &  event  )  [static]
 

Definition at line 53 of file gui_event.cpp.

References eSelectExtState.

CGUIEvent::EGUIState CGUIEvent::wxGetSelectState const wxMouseEvent &  event  )  [static]
 

Definition at line 42 of file gui_event.cpp.

References eSelectExtState.

Referenced by CSelectionControl::OnKeyDown(), CMapControl::OnKeyDown(), CSeqMarkHandler::OnLeftDoubleClick(), CBookmarksHandler::OnLeftDoubleClick(), CSeqGraphicPane::OnLeftDown(), IPhyloTreeRenderer::OnLeftDown(), CHitMatrixGraph::OnLeftDown(), CSeqMarkHandler::OnLeftDown(), CLinearSelHandler::OnLeftDown(), CCrossAlnPane::OnLeftDown(), IPhyloTreeRenderer::OnLeftUp(), CHitMatrixGraph::OnLeftUp(), CSelectionControl::OnMouseDown(), CSelListController< Item >::x_OnKeyDown(), CSelListController< Item >::x_OnLeftDown(), and CSelListController< Item >::x_OnLeftUp().


The documentation for this class was generated from the following files:
Generated on Mon Dec 7 12:02:54 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Mon Dec 07 16:23:14 2009 by modify_doxy.py rev. 173732