Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUi_UiBuilderXmlHandler.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://floralicense.org/license/
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 /**
18 * @file    FUi_UiBuilderXmlHandler.h
19 * @brief      This is the header file for the %_UiBuilderXmlHandler class.
20 *
21 * This header file contains the declarations of the %_UiBuilderXmlHandler class.
22 */
23
24 #ifndef _FUI_INTERNAL_UI_BUILDER_XML_HANDLER_H_
25 #define _FUI_INTERNAL_UI_BUILDER_XML_HANDLER_H_
26
27
28
29 #include <libxml/tree.h>
30 #include <FBase.h>
31 #include <FIo.h>
32 #include "FUi_UiBuilder.h"
33
34 namespace Tizen { namespace Ui
35 {
36 /**
37 * @class   _UiBuilderXmlHandler
38 * @brief      This class is an implementation of a %_UiBuilderXmlHandler.
39 * @since 2.0
40 *
41 * The %_UiBuilerXmlHandler Class contains that control's information by parsing the XML.
42 *
43 *
44 */
45 class _UiBuilderXmlHandler
46         : public Tizen::Base::Object
47 {
48 public:
49         _UiBuilderXmlHandler(void);
50         virtual ~_UiBuilderXmlHandler(void);
51         bool Construct(_UiBuilder* pGenerator);
52
53         result ParseXml(char* pXmlBuffer, int size);
54         void SetAttribute(const xmlChar** pAtts);
55         void SetProperty(const xmlChar** pAtts);
56         void SetItem(const xmlChar* pName, const xmlChar** pAtts);
57         void SetXmlVersion(const xmlChar** pAttributes);
58         void ParseAttribute(const xmlChar** pAttributes, int index, const Tizen::Base::String& name);
59
60 private:
61         _UiBuilderXmlHandler(const _UiBuilderXmlHandler& rhs);
62         _UiBuilderXmlHandler& operator =(const _UiBuilderXmlHandler& rhs);
63
64 public:
65         static const int LAYOUT_SETTING = -1;
66         _UiBuilder* __pGenerator;
67         _UiBuilderControl* __pControl;
68         bool __formXmlResolutionExists;
69         Tizen::Base::String __errorLog;
70         result __errorResult;
71
72 private:
73         int __layoutMode;
74         Tizen::Base::String __xPosition;
75         Tizen::Base::String __yPosition;
76         Tizen::Base::String __width;
77         Tizen::Base::String __height;
78
79         _UiBuilderControlLayout* __pProperty;
80 }; // _UiBuilderXmlHandler
81
82 } } // Tizen::Ui
83
84 #endif  //_FUI_INTERNAL_UI_BUILDER_XML_HANDLER_H_