2 * Copyright (c) 2012 - 2015 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 #ifndef __CANDIDATE_MULTI_LINE_EFL_H__
19 #define __CANDIDATE_MULTI_LINE_EFL_H__
20 #include "candidate.h"
21 #include <Elementary.h>
23 #define CANDIDATE_BAR_NUM 8
24 #define CANDIDATE_MORE_ONE_LINE 8
26 typedef struct _candidate_item_size
30 } candidate_item_size;
32 class EflMultiLineCandidate: public Candidate
35 EflMultiLineCandidate(Evas_Object *);
36 ~EflMultiLineCandidate();
39 void update(const std::vector<std::string> &candidates);
40 void rotate(int degree);
42 bool get_floating_mode();
43 void more_btn_clicked();
44 void more_btn_released();
45 void close_btn_clicked();
46 void item_pressed(std::string str);
47 void item_pressed(Evas_Object *);
48 void item_released(Evas_Object *);
49 void item_moved(Evas_Object *);
51 sclu32 soft_candidate_handle_key_event(const char *key_name);
52 bool soft_candidate_flag(){return m_highlight_mode;}
56 void make_more_view();
57 void show_more_view();
58 void hide_more_view();
62 Evas_Object *create_candidate_button(const char *style, Evas_Object_Event_Cb mouse_down_cb);
64 void register_access_object(Evas_Object* obj, std::string name, const Elm_Access_Action_Cb access_action = NULL, const void *data = NULL);
65 Evas_Object *get_candidate_item(candidate_item_size item_text_size);
66 candidate_item_size get_candidate_item_text_size(std::string srcStr);
67 Evas_Object * get_candidate_separate_line_vertical();
68 Evas_Object * get_candidate_separate_line_horizon();
70 std::vector<std::string> cur_candidates;
71 Evas_Object *m_window;
77 std::string m_candidateFontName;
78 int m_candidateFontSize;
80 Evas_Object * m_stringWidthCalObj;
81 Evas_Object * m_candidateScrollerBg;
82 Evas_Object * m_candidateScroller;
83 Evas_Object * m_candidateTable;
84 Evas_Object * m_candidateMoreBtn;
85 Evas_Object * m_candidateCloseBtn;
86 Evas_Object * m_candidateMoreScrollerBg;
87 Evas_Object * m_candidateMoreScroller;
88 Evas_Object * m_candidateMoreTable;
90 int m_focused_candidate_index;
91 bool m_highlight_mode;
92 std::vector<Evas_Object *> m_candidates_item;