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
>
23
#include <
neogfx/core/i_event.hpp
>
24
#include <
neogfx/gui/widget/i_skin.hpp
>
25
26
namespace
neogfx
27
{
28
class
i_skin_manager
:
public
i_service
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
}
neogfx::i_skin_manager
Definition
i_skin_manager.hpp:29
neogfx::i_skin_manager::unregister_skin
virtual void unregister_skin(i_skin &aSkin)=0
neogfx::i_skin_manager::declare_event
declare_event(skin_registered, i_skin &) declare_event(skin_unregistered
neogfx::i_skin_manager::register_skin
virtual void register_skin(i_skin &aSkin)=0
neogfx::i_skin_manager::skin_active
virtual bool skin_active() const =0
neogfx::i_skin_manager::skin
virtual const i_skin & skin(uint32_t aIndex) const =0
neogfx::i_skin_manager::skin
virtual i_skin & skin(uint32_t aIndex)=0
neogfx::i_skin_manager::activate_skin
virtual void activate_skin(i_skin &aSkin)=0
neogfx::i_skin_manager::skin_count
virtual uint32_t skin_count() const =0
neogfx::i_skin_manager::~i_skin_manager
virtual ~i_skin_manager()=default
neogfx::i_skin_manager::iid
static uuid const & iid()
Definition
i_skin_manager.hpp:50
neogfx::i_skin_manager::active_skin
virtual const i_skin & active_skin() const =0
neogfx::i_skin_manager::active_skin
virtual i_skin & active_skin()=0
neogfx::i_skin
Definition
i_skin.hpp:33
neolib::services::i_service
Definition
services.hpp:57
i_skin.hpp
neogfx
Definition
action.hpp:28
i_event.hpp
neogfx.hpp
declare_event
#define declare_event(declName,...)
Definition
i_event.hpp:305
neogfx::i_skin_manager::no_skin_active
Definition
i_skin_manager.hpp:35
neogfx::i_skin_manager::no_skin_active::no_skin_active
no_skin_active()
Definition
i_skin_manager.hpp:35
neogfx::i_skin_manager::skin_not_found
Definition
i_skin_manager.hpp:34
neogfx::i_skin_manager::skin_not_found::skin_not_found
skin_not_found()
Definition
i_skin_manager.hpp:34
neolib::uuid
Definition
uuid.hpp:51
include
neogfx
gui
widget
i_skin_manager.hpp
Generated by
1.9.8