wxBinderEvtHandler Class Reference

This is a wxEvtHandler which can be attached to any wxWindow-derived class. More...

#include <keybinder.h>

Collaboration diagram for wxBinderEvtHandler:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 wxBinderEvtHandler (wxKeyBinder *p, wxWindow *tg)
 Attaches this event handler to the given window.
virtual ~wxBinderEvtHandler ()
 Removes this event handler from the window you specified during construction (the target window).
bool IsAttachedTo (wxWindow *p)
 Returns TRUE if this event handler is attached to the given window.
wxKeyBinderGetBinder () const
 Returns the wxKeyBinder which is called-back by this event handler.
wxWindow * GetTargetWnd () const
 Returns the window which this event handler is filtering.

Protected Member Functions

void OnChar (wxKeyEvent &event)
 The event handler for wxKeyEvents.

Private Attributes

wxKeyBinderm_pBinder
 The wxKeyBinder called by wxBinderEvtHandler when receving a wxKeyEvent.
wxWindow * m_pTarget
 The target window which will process the keyevents if they're not registered hotkeys (this check is done by wxKeyBinder).


Detailed Description

This is a wxEvtHandler which can be attached to any wxWindow-derived class.

It handles only the key events calling a wxKeyBinder to process them. wxKeyBinder will process only hotkeys and will skip any other unregistered key combination. In these cases wxBinderEvtHandler just returns and wxWidgets will call the next handler in the chain (which is usually the wxWindow which was attached to this wxBinderEvtHandler).


Constructor & Destructor Documentation

wxBinderEvtHandler::wxBinderEvtHandler ( wxKeyBinder p,
wxWindow *  tg 
) [inline]

Attaches this event handler to the given window.

The given keybinder will be called on each keyevent.

virtual wxBinderEvtHandler::~wxBinderEvtHandler (  )  [inline, virtual]

Removes this event handler from the window you specified during construction (the target window).


Member Function Documentation

wxKeyBinder* wxBinderEvtHandler::GetBinder (  )  const [inline]

Returns the wxKeyBinder which is called-back by this event handler.

wxWindow* wxBinderEvtHandler::GetTargetWnd (  )  const [inline]

Returns the window which this event handler is filtering.

bool wxBinderEvtHandler::IsAttachedTo ( wxWindow *  p  )  [inline]

Returns TRUE if this event handler is attached to the given window.

void wxBinderEvtHandler::OnChar ( wxKeyEvent &  event  )  [protected]

The event handler for wxKeyEvents.

References m_pBinder, and wxKeyBinder::OnChar().


Member Data Documentation

The wxKeyBinder called by wxBinderEvtHandler when receving a wxKeyEvent.

Referenced by OnChar().

wxWindow* wxBinderEvtHandler::m_pTarget [private]

The target window which will process the keyevents if they're not registered hotkeys (this check is done by wxKeyBinder).


The documentation for this class was generated from the following files:

Generated on Sun Nov 23 00:06:38 2008 for Keybinder by  doxygen 1.5.7.1