MyGUI
3.0.1
Main Page
Related Pages
Namespaces
Data Structures
Files
Examples
File List
Globals
MyGUIEngine
src
MyGUI_SubWidgetManager.cpp
Go to the documentation of this file.
1
7
/*
8
This file is part of MyGUI.
9
10
MyGUI is free software: you can redistribute it and/or modify
11
it under the terms of the GNU Lesser General Public License as published by
12
the Free Software Foundation, either version 3 of the License, or
13
(at your option) any later version.
14
15
MyGUI is distributed in the hope that it will be useful,
16
but WITHOUT ANY WARRANTY; without even the implied warranty of
17
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
GNU Lesser General Public License for more details.
19
20
You should have received a copy of the GNU Lesser General Public License
21
along with MyGUI. If not, see <http://www.gnu.org/licenses/>.
22
*/
23
#include "
MyGUI_Precompiled.h
"
24
#include "
MyGUI_SubWidgetManager.h
"
25
#include "
MyGUI_FactoryManager.h
"
26
#include "
MyGUI_CommonStateInfo.h
"
27
28
#include "
MyGUI_SubSkin.h
"
29
#include "
MyGUI_MainSkin.h
"
30
#include "
MyGUI_RotatingSkin.h
"
31
#include "
MyGUI_SimpleText.h
"
32
#include "
MyGUI_EditText.h
"
33
#include "
MyGUI_RawRect.h
"
34
#include "
MyGUI_TileRect.h
"
35
36
namespace
MyGUI
37
{
38
39
MYGUI_INSTANCE_IMPLEMENT
( SubWidgetManager )
40
41
void
SubWidgetManager
::initialise()
42
{
43
MYGUI_ASSERT
(!mIsInitialise,
INSTANCE_TYPE_NAME
<<
" initialised twice"
);
44
MYGUI_LOG
(Info,
"* Initialise: "
<<
INSTANCE_TYPE_NAME
);
45
46
FactoryManager
& factory =
FactoryManager::getInstance
();
47
48
factory.
registerFactory
<
SubSkinStateInfo
>(
"BasisSkin/State"
,
"SubSkin"
);
49
factory.
registerFactory
<
SubSkinStateInfo
>(
"BasisSkin/State"
,
"MainSkin"
);
50
factory.
registerFactory
<
SubSkinStateInfo
>(
"BasisSkin/State"
,
"RotatingSkin"
);
51
factory.
registerFactory
<
SubSkinStateInfo
>(
"BasisSkin/State"
,
"RawRect"
);
52
factory.
registerFactory
<
TileRectStateInfo
>(
"BasisSkin/State"
,
"TileRect"
);
53
factory.
registerFactory
<
EditTextStateInfo
>(
"BasisSkin/State"
,
"EditText"
);
54
factory.
registerFactory
<
EditTextStateInfo
>(
"BasisSkin/State"
,
"SimpleText"
);
55
56
factory.
registerFactory
<
SubSkin
>(
"BasisSkin"
);
57
factory.
registerFactory
<
MainSkin
>(
"BasisSkin"
);
58
factory.
registerFactory
<
RotatingSkin
>(
"BasisSkin"
);
59
factory.
registerFactory
<
RawRect
>(
"BasisSkin"
);
60
factory.
registerFactory
<
TileRect
>(
"BasisSkin"
);
61
factory.
registerFactory
<
EditText
>(
"BasisSkin"
);
62
factory.
registerFactory
<
SimpleText
>(
"BasisSkin"
);
63
64
MYGUI_LOG
(Info,
INSTANCE_TYPE_NAME
<<
" successfully initialized"
);
65
mIsInitialise =
true
;
66
}
67
68
void
SubWidgetManager::shutdown
()
69
{
70
if
(!mIsInitialise)
return
;
71
MYGUI_LOG
(Info,
"* Shutdown: "
<<
INSTANCE_TYPE_NAME
);
72
73
FactoryManager
& factory =
FactoryManager::getInstance
();
74
75
factory.
unregisterFactory
(
"BasisSkin/State"
,
"SubSkin"
);
76
factory.
unregisterFactory
(
"BasisSkin/State"
,
"MainSkin"
);
77
factory.
unregisterFactory
(
"BasisSkin/State"
,
"RotatingSkin"
);
78
factory.
unregisterFactory
(
"BasisSkin/State"
,
"RawRect"
);
79
factory.
unregisterFactory
(
"BasisSkin/State"
,
"TileRect"
);
80
factory.
unregisterFactory
(
"BasisSkin/State"
,
"EditText"
);
81
factory.
unregisterFactory
(
"BasisSkin/State"
,
"SimpleText"
);
82
83
factory.
unregisterFactory
<
SubSkin
>(
"BasisSkin"
);
84
factory.
unregisterFactory
<
MainSkin
>(
"BasisSkin"
);
85
factory.
unregisterFactory
<
RotatingSkin
>(
"BasisSkin"
);
86
factory.
unregisterFactory
<
RawRect
>(
"BasisSkin"
);
87
factory.
unregisterFactory
<
TileRect
>(
"BasisSkin"
);
88
factory.
unregisterFactory
<
EditText
>(
"BasisSkin"
);
89
factory.
unregisterFactory
<
SimpleText
>(
"BasisSkin"
);
90
91
MYGUI_LOG
(Info,
INSTANCE_TYPE_NAME
<<
" successfully shutdown"
);
92
mIsInitialise =
false
;
93
}
94
95
}
// namespace MyGUI
Generated by
1.8.1.2