added wxInputHandler and initial support for it in wxControl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxUNIVERSAL@8132 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
47
include/wx/univ/inphand.h
Normal file
47
include/wx/univ/inphand.h
Normal file
@@ -0,0 +1,47 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/univ/inphand.h
|
||||
// Purpose: wxInputHandler class maps the keyboard and mouse events to the
|
||||
// actions which then are performed by the control
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 18.08.00
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
// Licence: wxWindows license
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_UNIV_INPHAND_H_
|
||||
#define _WX_UNIV_INPHAND_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "inphand.h"
|
||||
#endif
|
||||
|
||||
#include "wx/control.h" // for wxControlAction
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxInputHandler: maps the events to the actions
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxInputHandler
|
||||
{
|
||||
public:
|
||||
// map a keyboard event to an action (pressed == TRUE if the key was
|
||||
// pressed, FALSE if released)
|
||||
virtual wxControlAction Map(const wxKeyEvent& event, bool pressed) = 0;
|
||||
|
||||
// map a mouse event to an action
|
||||
virtual wxControlAction Map(const wxMouseEvent& event) = 0;
|
||||
|
||||
// virtual dtor for any base class
|
||||
virtual ~wxInputHandler();
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// the control names which can be passed to wxTheme::GetInputHandler()
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#define wxCONTROL_DEFAULT _T("control")
|
||||
#define wxCONTROL_BUTTON _T("button")
|
||||
|
||||
#endif // _WX_UNIV_INPHAND_H_
|
Reference in New Issue
Block a user