Simulant  21.12-194
A portable game engine for Windows, OSX, Linux, Dreamcast, and PSP
window_holder.h
1 /* * Copyright (c) 2011-2017 Luke Benstead https://simulant-engine.appspot.com
2  *
3  * This file is part of Simulant.
4  *
5  * Simulant is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Lesser General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * Simulant is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with Simulant. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #pragma once
20 
21 #include "../generic/property.h"
22 
23 namespace smlt {
24 
25 class Window;
26 
27 class WindowHolder {
28 public:
29  WindowHolder(Window* window):
30  window_(window) {}
31 
32  virtual ~WindowHolder() {}
33 
34  Property<Window* WindowHolder::*> window = { this, &WindowHolder::window_ };
35 
36 protected:
37  Window* _window() const { return window_; }
38 
39 private:
40  Window* window_;
41 };
42 
43 }
smlt::Property
Definition: property.h:202
smlt::WindowHolder
Definition: window_holder.h:27
smlt
Definition: animation.cpp:25
smlt::Window
Definition: window.h:65