neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
skin_manager.hpp
Go to the documentation of this file.
1// skin_manager.hpp
2/*
3 neogfx C++ App/Game Engine
4 Copyright (c) 2020 Leigh Johnston. All Rights Reserved.
5
6 This program is free software: you can redistribute it and / or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#pragma once
21
22#include <neogfx/neogfx.hpp>
23#include <unordered_set>
26
27namespace neogfx
28{
30 {
31 public:
32 define_declared_event(SkinRegistered, skin_registered, i_skin&)
34 private:
35 typedef std::unordered_set<i_skin*> skin_list;
36 public:
38 public:
40 public:
41 uint32_t skin_count() const override;
42 const i_skin& skin(uint32_t aIndex) const override;
43 i_skin& skin(uint32_t aIndex) override;
44 void register_skin(i_skin& aSkin) override;
45 void unregister_skin(i_skin& aSkin) override;
46 public:
47 bool skin_active() const override;
48 const i_skin& active_skin() const override;
49 i_skin& active_skin() override;
50 void activate_skin(i_skin& aSkin) override;
51 private:
52 skin_list iSkins;
53 i_skin* iActiveSkin;
54 default_skin iDefaultSkin;
55 };
56}
uint32_t skin_count() const override
void unregister_skin(i_skin &aSkin) override
static skin_manager & instance()
void register_skin(i_skin &aSkin) override
const i_skin & active_skin() const override
define_declared_event(SkinRegistered, skin_registered, i_skin &) define_declared_event(SkinUnregistered
void activate_skin(i_skin &aSkin) override
bool skin_active() const override
Definition plf_hive.h:79
#define define_declared_event(name, declName,...)
Definition event.hpp:195