neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
view.hpp
Go to the documentation of this file.
1// view.hpp
2/*
3neogfx C++ App/Game Engine
4Copyright (c) 2015, 2020 Leigh Johnston. All Rights Reserved.
5
6This program is free software: you can redistribute it and / or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation, either version 3 of the License, or
9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#pragma once
21
22#include <neogfx/neogfx.hpp>
25
26namespace neogfx::mvc
27{
28 class i_controller;
29
30 class view : public framed_scrollable_widget, public i_view
31 {
33 public:
34 define_declared_event(Activated, activated)
35 define_declared_event(Deactivated, deactivated)
36 public:
37 view(i_controller& aController, i_model& aModel);
38 public:
39 const i_widget& as_widget() const override;
40 i_widget& as_widget() override;
41 const i_model& model() const override;
42 i_model& model() override;
43 public:
44 bool is_active() const override;
45 void activate() override;
46 void deactivate() override;
47 private:
48 i_controller& iController;
49 i_model& iModel;
50 bool iActive;
51 };
52}
const i_widget & as_widget() const override
i_model & model() override
const i_model & model() const override
void deactivate() override
void activate() override
i_widget & as_widget() override
bool is_active() const override
#define meta_object(...)
Definition i_object.hpp:28
#define define_declared_event(name, declName,...)
Definition event.hpp:195