cgv
event_handler.h
1 #pragma once
2 
3 #include <cgv/base/group.h>
4 #include <cgv/base/traverser.h>
5 #include "event.h"
6 #include "control.h"
7 
8 #include "lib_begin.h"
9 
10 namespace cgv {
11  namespace gui {
12 
14 class CGV_API event_handler : public base::traverse_policy
15 {
16 protected:
17  //std::vector<abst_control>
18 public:
20  event_handler();
22  bool grab_focus();
24  virtual bool handle(event& e) = 0;
26  virtual void stream_help(std::ostream& os) = 0;
28 
31  bool add_key_control(const std::string& property, const std::string& options, cgv::base::group_ptr group = cgv::base::group_ptr());
32 };
33 
34  }
35 }
36 
37 #include <cgv/config/lib_end.h>
cgv::gui::event_handler
interface for all classes that want to receive events
Definition: event_handler.h:15
cgv::base::traverse_policy
nodes should inherit from this policy class to allow selective tree traversals
Definition: traverser.h:24
cgv::data::ref_ptr< group, true >
cgv::gui::event_handler::stream_help
virtual void stream_help(std::ostream &os)=0
overload to stream help information to the given output stream
cgv::gui::event
Definition: event.h:59
cgv::gui::event_handler::handle
virtual bool handle(event &e)=0
overload and implement this method to handle events
cgv
the cgv namespace
Definition: vr_calib.cxx:9