72abd2e444657ad91c7f152b606c798478a94971
[profile/mobile/apps/native/accessibility-setting.git] / src / GenGroupItemData.hpp
1 #ifndef GEN_GROUP_ITEM_DATA_HPP
2 #define GEN_GROUP_ITEM_DATA_HPP
3
4 #include "TranslatedString.hpp"
5
6 #include <string>
7
8 enum class SwallowType : int {
9         INVALID = -1,
10         ICON_RADIO = 2,
11         CHECK = 3,
12         CHECK_RIGHT = 4,
13         CHECKICON = 5,
14         RADIO = 6,
15         TOGGLE =        7,
16         CHECK_RIGHT_INVISIBLE,
17         ICON_DOTTOOGLE,
18         ICON_SMALL_ICON,
19         ICON_IMAGE,
20         GIF,
21         BUTTON,
22         RADIO_RIGHT_PROPAGATE_EVENTS_SET,
23         RADIO_RIGHT,
24         RADIO_1BTN,
25         RADIO_1TEXT,
26         LINE_LAYOUT,
27         LAYOUT_EDITFIELD,
28         LAYOUT_SIMPLE_PASSWORD, /* for simple password */
29         LAYOUT_DATEFIELD,
30         LAYOUT_SLIDER,
31         LAYOUT_5STEP_SLIDER,
32         MAX
33 };
34
35 using SettingCallback = void (*)(void*, Evas_Object*, void*);
36
37 /**
38  * an item node in genlist
39  * @todo begings_to is requried?
40  */
41 class GenGroupItemData {
42 public:
43         void **pBack = nullptr;
44         Evas_Object *window = nullptr;
45         Evas *evas = nullptr;
46
47         Elm_Object_Item *item = nullptr;
48
49         SwallowType swallow_type;
50         std::string l_swallow_path;      /**< left image */
51         std::string r_swallow_path;      /**< right image */
52
53         /* output */
54         /**< slider, button, check, editfield, datefield */
55         Evas_Object *eo_check = nullptr;
56         /**< represent check value, slider value, datefield value etc.. */
57         int chk_status;
58         int chk_id;
59         SettingCallback chk_change_cb;
60
61         /* radio button */
62         /**< radio button */
63         Evas_Object *rgd = nullptr;
64
65         TranslatedString keyStr;                /**< title */
66         TranslatedString sub_desc;              /**< sub text */
67
68         /*      for input panel  */
69         /**< input panel type */
70         Elm_Input_Panel_Layout input_type;
71         /** the return key type in input method panel*/
72         Elm_Input_Panel_Return_Key_Type return_key_type;
73         bool input_panel_disable_flag;
74         /** do not autocapital the first char in edit field*/
75         int disable_auto_cap;
76
77         void *userdata = nullptr;       /**< just a reference, do not need release. */
78
79     /* popup */
80     Evas_Object *notify = nullptr; /**< act as any popup to show user any message */
81
82         /*record itc style for all genlist item with check/radio/toggle */
83         std::string itc;
84
85 private:
86 };
87
88 #endif