NCBI C++ ToolKit
ievent_handler.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef __GUI_WIDGETS_GL___IEVENT_HANDLER__HPP
2 #define __GUI_WIDGETS_GL___IEVENT_HANDLER__HPP
3 
4 /* $Id: ievent_handler.hpp 30858 2014-07-31 14:05:43Z ucko $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Authors: Andrey Yazhuk
30  *
31  * File Description:
32  *
33  */
34 
35 #include <corelib/ncbistl.hpp>
36 #include <corelib/ncbistd.hpp>
37 
38 #include <gui/opengl/glpane.hpp>
39 
40 // This header must (at least indirectly) precede any wxWidgets headers.
42 
43 #include <wx/event.h>
44 
45 
47 
48 ///////////////////////////////////////////////////////////////////////////////
49 /// IGlEventHandler
51 {
52 public:
53  virtual ~IGlEventHandler() {};
54 
55  virtual void SetPane(CGlPane* /*pane*/) { _ASSERT(false); };
56  virtual wxEvtHandler* GetEvtHandler() = 0;
57 };
58 
59 
60 ///////////////////////////////////////////////////////////////////////////////
61 /// IGenericHandlerHost
63 {
64 public:
65  /// redraws the Host and the handler
66  virtual void GHH_Redraw() = 0;
67 
68  /// changes the cursor in the hosting window
69  virtual void GHH_SetCursor(const wxCursor& cursor) = 0;
70 
71  /// captures mouse events in the hosting window for D&D
72  virtual void GHH_CaptureMouse() = 0;
73 
74  /// releases captured mouse
75  virtual void GHH_ReleaseMouse() = 0;
76 
77  virtual ~IGenericHandlerHost() {};
78 };
79 
80 
82 
83 #endif // __GUI_WIDGETS_GL___IEVENT_HANDLER__HPP
class CGlPane
Definition: glpane.hpp:62
IGenericHandlerHost.
virtual void GHH_ReleaseMouse()=0
releases captured mouse
virtual ~IGenericHandlerHost()
virtual void GHH_Redraw()=0
redraws the Host and the handler
virtual void GHH_CaptureMouse()=0
captures mouse events in the hosting window for D&D
virtual void GHH_SetCursor(const wxCursor &cursor)=0
changes the cursor in the hosting window
IGlEventHandler.
virtual ~IGlEventHandler()
virtual void SetPane(CGlPane *)
virtual wxEvtHandler * GetEvtHandler()=0
Include a standard set of the NCBI C++ Toolkit most basic headers.
Workaround for wxWidgets header errors in certain configurations; MUST be included (at least indirect...
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define NCBI_GUIWIDGETS_GL_EXPORT
Definition: gui_export.h:529
The NCBI C++/STL use hints.
#define _ASSERT
Modified on Sat Jul 13 13:38:21 2024 by modify_doxy.py rev. 669887