Adding new test harness
[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 Flora License, Version 1.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://floralicense.org/license/
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 // EXTERNAL INCLUDES
21 #include <string>
22
23 // INTERNAL INCLUDES
24 #define __DALI_STYLE_MONITOR_H__
25 #include <dali/public-api/object/base-handle.h>
26 #include <dali/public-api/signals/dali-signal-v2.h>
27 #include <dali/public-api/adaptor-framework/common/style-change.h>
28
29 namespace Dali
30 {
31
32 namespace Internal
33 {
34 namespace Adaptor
35 {
36 class StyleMonitor;
37 }
38 }
39
40 class StyleMonitor : public BaseHandle
41 {
42 public: // Typedefs
43   typedef SignalV2< void (StyleMonitor, StyleChange) > StyleChangeSignalV2;
44   static const std::string DEFAULT_FONT_FAMILY;
45   static const float       DEFAULT_FONT_SIZE;
46
47 public: // Creation & Destruction
48   StyleMonitor();
49   StyleMonitor(const StyleMonitor& monitor);
50   static StyleMonitor Get();
51   virtual ~StyleMonitor();
52   static StyleMonitor DownCast( BaseHandle handle );
53   using BaseHandle::operator=;
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__