neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
i_skin_manager.hpp
Go to the documentation of this file.
1// i_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>
25
26namespace neogfx
27{
29 {
30 public:
31 declare_event(skin_registered, i_skin&)
32 declare_event(skin_unregistered, i_skin&)
33 public:
34 struct skin_not_found : std::logic_error { skin_not_found() : std::logic_error{ "neogfx::i_skin_manager::skin_not_found" } {} };
35 struct no_skin_active : std::logic_error { no_skin_active() : std::logic_error{ "neogfx::i_skin_manager::no_skin_active" } {} };
36 public:
37 virtual ~i_skin_manager() = default;
38 public:
39 virtual uint32_t skin_count() const = 0;
40 virtual const i_skin& skin(uint32_t aIndex) const = 0;
41 virtual i_skin& skin(uint32_t aIndex) = 0;
42 virtual void register_skin(i_skin& aSkin) = 0;
43 virtual void unregister_skin(i_skin& aSkin) = 0;
44 public:
45 virtual bool skin_active() const = 0;
46 virtual const i_skin& active_skin() const = 0;
47 virtual i_skin& active_skin() = 0;
48 virtual void activate_skin(i_skin& aSkin) = 0;
49 public:
50 static uuid const& iid() { static uuid const sIid{ 0xd764030b, 0x4b1, 0x411c, 0xa36c, { 0x74, 0xcf, 0xb4, 0x7a, 0x8a, 0x55 } }; return sIid; }
51 };
52}
virtual void unregister_skin(i_skin &aSkin)=0
declare_event(skin_registered, i_skin &) declare_event(skin_unregistered
virtual void register_skin(i_skin &aSkin)=0
virtual bool skin_active() const =0
virtual const i_skin & skin(uint32_t aIndex) const =0
virtual i_skin & skin(uint32_t aIndex)=0
virtual void activate_skin(i_skin &aSkin)=0
virtual uint32_t skin_count() const =0
virtual ~i_skin_manager()=default
static uuid const & iid()
virtual const i_skin & active_skin() const =0
virtual i_skin & active_skin()=0
#define declare_event(declName,...)
Definition i_event.hpp:305