[dali_1.0.21] Merge branch 'tizen'
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / toolkit-style-monitor.h
1 #ifndef __DALI_TOOLKIT_TOOLKIT_STYLE_MONITOR_H__
2 #define __DALI_TOOLKIT_TOOLKIT_STYLE_MONITOR_H__
3
4 /*
5  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <string>
23
24 // INTERNAL INCLUDES
25 #define __DALI_STYLE_MONITOR_H__
26 #include <dali/public-api/object/base-handle.h>
27 #include <dali/public-api/signals/dali-signal-v2.h>
28 #include <dali/public-api/adaptor-framework/style-change.h>
29
30 namespace Dali
31 {
32
33 namespace Internal
34 {
35 namespace Adaptor
36 {
37 class StyleMonitor;
38 }
39 }
40
41 class StyleMonitor : public BaseHandle
42 {
43 public: // Typedefs
44   typedef SignalV2< void (StyleMonitor, StyleChange) > StyleChangeSignalV2;
45   static const std::string DEFAULT_FONT_FAMILY;
46   static const float       DEFAULT_FONT_SIZE;
47
48 public: // Creation & Destruction
49   StyleMonitor();
50   StyleMonitor(const StyleMonitor& monitor);
51   static StyleMonitor Get();
52   ~StyleMonitor();
53   static StyleMonitor DownCast( BaseHandle handle );
54
55 public: // Style Information
56   std::string GetDefaultFontFamily() const;
57   float GetDefaultFontSize() const;
58   const std::string& GetTheme() const;
59   void SetTheme(std::string themeFilePath);
60
61 public: // Signals
62   StyleChangeSignalV2& StyleChangeSignal();
63   void EmitStyleChangeSignal(StyleChange handle);
64
65 public: // Operators
66   StyleMonitor& operator=(const StyleMonitor& monitor);
67
68 public:
69   StyleMonitor(Internal::Adaptor::StyleMonitor* styleMonitor);
70 };
71
72
73 } // namespace Dali
74
75 #endif // __DALI_TOOLKIT_TOOLKIT_STYLE_MONITOR_H__