cgv
Loading...
Searching...
No Matches
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
10namespace cgv {
11 namespace gui {
12
15{
16protected:
17 //std::vector<abst_control>
18public:
22 bool grab_focus();
28 virtual bool handle(event& e) = 0;
30 virtual void stream_help(std::ostream& os) = 0;
32
35 bool add_key_control(const std::string& property, const std::string& options, cgv::base::group_ptr group = cgv::base::group_ptr());
36};
37
38 }
39}
40
41#include <cgv/config/lib_end.h>
nodes should inherit from this policy class to allow selective tree traversals
Definition traverser.h:24
interface for all classes that want to receive events
virtual void stream_help(std::ostream &os)=0
overload to stream help information to the given output stream
virtual bool handle(event &e)=0
overload and implement this method to handle events
the cgv namespace
Definition print.h:11