Add atspi accessibility support
[platform/core/uifw/libscl-ui.git] / scl / include / scluibuilder.h
1 /*
2  * Copyright (c) 2012 - 2014 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 #include <map>
19 #include <string>
20 #include "sclgwes.h"
21 #include "sclutils.h"
22
23 #ifndef __SCL_UIBUILDER_H__
24 #define __SCL_UIBUILDER_H__
25
26 //SCL_BEGIN_DECLS
27
28 namespace scl
29 {
30
31 /**
32  * @brief The base class to work as a soft-based keyboard
33  *
34  * This class implements all functions for working as a soft-based keyboard
35  * In side of ISE developer, they can modify it by their requirements.
36  */
37 class CSCLUIBuilder
38 {
39     friend class CSCLFontProxy;
40
41 private:
42     CSCLUIBuilder();
43 public:
44     virtual ~CSCLUIBuilder();
45
46     static CSCLUIBuilder* get_instance();
47
48     void init(sclwindow parent);
49     sclboolean show_layout(const sclwindow window, const scl16 x = 0, const scl16 y = 0, const scl16 width = 0, const scl16 height = 0);
50     sclboolean draw_button(const sclwindow window, scldrawctx draw_ctx, const scl16 key_index, const SCLButtonState state, const sclboolean force_draw_bg = FALSE);
51     sclboolean show_magnifier(const sclwindow window, scldrawctx draw_ctx);
52     sclboolean show_autopopup(const sclwindow parent, scldrawctx draw_ctx, const scl16 key_index);
53
54 private:
55     sclboolean draw_button_all(const sclwindow window, const scldrawctx draw_ctx, const scl16 x, const scl16 y, const scl16 width, const scl16 height);
56     scldrawing draw_button_bg_by_sw(const sclwindow window, const scldrawctx draw_ctx, const scl16 key_index, const SCLButtonState state);
57     sclboolean draw_window_bg_by_sw(const sclwindow window, const scldrawctx draw_ctx, const SclSize size,
58         const scldouble line_width, const SclColor line_color, const SclColor fill_color);
59     scldrawing draw_button_bg_by_img(const sclwindow window, const scldrawctx draw_ctx, const scl16 key_index,
60         SCLButtonState state, SCLShiftState shift);
61     scldrawing draw_button_bg_by_layoutimg(const sclwindow window, const scldrawctx draw_ctx, const scl16 key_index,
62         const SCLButtonState state, const sclboolean shift);
63     sclboolean draw_button_label(const sclwindow window, const scldrawctx draw_ctx, const scl16 key_index,
64                                  SCLButtonState state, SCLShiftState shift);
65
66     sclboolean draw_magnifier_label(const sclwindow window, const scldrawctx draw_ctx, const scl16 label_index, const sclchar* label);
67
68     const sclchar* get_button_text_to_read(const sclwindow window, const scl16 key_index, SCLShiftState shift_index);
69
70 protected:
71     /* Backend Primitive */
72     CSCLGwes *m_gwes;
73     CSCLUtils *m_utils;
74 };
75
76 }
77
78 //SCL_END_DECLS
79
80 #endif //__SCL_UIBUILDER_H__