1aca4ff4913fef1b88209fe65616014d7e33f1fe
[platform/core/uifw/inputdelegator.git] / inc / MoreOption.h
1 /*
2  * Copyright (c) 2016 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 #pragma once
18
19 #include "w-input-selector.h"
20 #include <Elementary.h>
21 #include <efl_extension.h>
22
23 #define NUM_ITEMS 1
24
25 class MoreOption
26 {
27         Evas_Object *nf;
28         Evas_Object *more_option_layout;
29         Eext_Object_Item *item;
30         Eina_Bool option_opened;
31         void *voicedata;
32
33         public :
34                 MoreOption(Evas_Object *naviframe, void *voicedata);
35
36                 ~MoreOption();
37
38                 void Create();
39
40                 /**
41                  * Set option
42                  *
43                  */
44                 void SetContentLayout(Evas_Object *content);
45
46                 void Update();
47
48                 Evas_Object *getMoreOptionLayout(){return more_option_layout;};
49
50                 static void moreOptionOpened(void *data, Evas_Object * obj, void *event_info);
51                 static void moreOptionClosed(void *data, Evas_Object * obj, void *event_info);
52
53                 static void moreItemClicked(void *data, Evas_Object * obj, void *event_info);
54                 static void moreItemSelected(void *data, Evas_Object * obj, void *event_info);
55                 Eina_Bool isMoreOptionOpened(){ return option_opened;};
56                 Eina_Bool discard_popup_opened;
57
58         private :
59                 /**
60                  * Main layout
61                  *
62                  */
63                 void AddLayout();
64
65                 /**
66                  * Add layout for options
67                  *
68                  */
69                 void AddMorePage();
70
71                 /**
72                  * Add icon style button ( used in more option )
73                  *
74                  * @param parent evas object parent
75                  * @return launguage button object
76                  *
77                  */
78                 Evas_Object *AddLanguageIcon(Evas_Object *parent);
79
80                 /**
81                  * Show /Hide Cue button of More Option.
82                  *
83                  */
84                 void hideCue();
85                 void showCue();
86 };
87