Line data Source code
1 :
2 : /* Copyright (c) 2011-2017, Stefan Eilemann <eile@eyescale.ch>
3 : * Daniel Nachbaur <danielnachbaur@gmail.com>
4 : *
5 : * This library is free software; you can redistribute it and/or modify it under
6 : * the terms of the GNU Lesser General Public License version 2.1 as published
7 : * by the Free Software Foundation.
8 : *
9 : * This library is distributed in the hope that it will be useful, but WITHOUT
10 : * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 : * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12 : * details.
13 : *
14 : * You should have received a copy of the GNU Lesser General Public License
15 : * along with this library; if not, write to the Free Software Foundation, Inc.,
16 : * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 : */
18 :
19 : #ifndef EQSEQUEL_DETAIL_MASTERCONFIG_H
20 : #define EQSEQUEL_DETAIL_MASTERCONFIG_H
21 :
22 : #include "config.h" // base class
23 :
24 : namespace seq
25 : {
26 : namespace detail
27 : {
28 : class MasterConfig : public Config
29 : {
30 : public:
31 : explicit MasterConfig(eq::ServerPtr parent);
32 :
33 : bool init() final;
34 : bool run(co::Object* frameData) final;
35 : bool exit() final;
36 :
37 3 : bool needRedraw() final { return _redraw; }
38 : uint32_t startFrame() final;
39 :
40 : protected:
41 : virtual ~MasterConfig();
42 :
43 : private:
44 : uint128_t _currentViewID;
45 : bool _redraw;
46 :
47 : bool handleEvent(EventICommand command) final;
48 : bool handleEvent(eq::EventType type, const SizeEvent& event) final;
49 : bool handleEvent(eq::EventType type, const PointerEvent& event) final;
50 : bool handleEvent(eq::EventType type, const KeyEvent& event) final;
51 : bool handleEvent(const AxisEvent& event) final;
52 : bool handleEvent(const ButtonEvent& event) final;
53 : bool handleEvent(eq::EventType type, const Event& event) final;
54 : void addStatistic(const Statistic& stat) final;
55 : template <class E>
56 : bool _handleEvent(eq::EventType type, E& event);
57 : template <class E>
58 : bool _handleEvent(E& event);
59 : };
60 : }
61 : }
62 :
63 : #endif // EQSEQUEL_DETAIL_MASTERCONFIG_H
|