neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
i_view.hpp
Go to the documentation of this file.
1// i_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>
23#include <neogfx/core/event.hpp>
26
27namespace neogfx::mvc
28{
29 class i_view
30 {
31 public:
32 declare_event(activated)
33 declare_event(deactivated)
34 public:
35 virtual const i_widget& as_widget() const = 0;
36 virtual i_widget& as_widget() = 0;
37 public:
38 virtual const i_model& model() const = 0;
39 virtual i_model& model() = 0;
40 virtual void update() = 0;
41 public:
42 virtual bool is_strong() const = 0;
43 virtual bool is_weak() const = 0;
44 virtual bool is_active() const = 0;
45 virtual void activate() = 0;
46 virtual void deactivate() = 0;
47 };
48}
virtual bool is_active() const =0
virtual i_model & model()=0
virtual void deactivate()=0
virtual declare_event(activated) declare_event(deactivated) public i_widget & as_widget()=0
virtual void update()=0
virtual void activate()=0
virtual bool is_strong() const =0
virtual bool is_weak() const =0
virtual const i_model & model() const =0
#define declare_event(declName,...)
Definition i_event.hpp:305