2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
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 #include "ge-ui-util.h"
20 #include "ge-button.h"
21 #include "ge-strings.h"
23 #define GE_BTN_NF_TITLE "naviframe/title/gallery_efl"
25 Evas_Object *ge_but_create_title_but(ge_ugdata *ugd, Evas_Object *parent, ge_but_mode mode)
27 ge_dbg("Button mode: %d", mode);
28 Evas_Object* btn = NULL;
30 GE_CHECK_NULL(parent);
32 btn = elm_button_add(parent);
35 elm_object_theme_set(btn, ugd->th);
37 elm_object_style_set(btn, GE_BTN_NF_TITLE);
38 evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND,
40 evas_object_size_hint_align_set(btn, EVAS_HINT_FILL, 0.5);
44 elm_object_text_set(btn,
45 (char*)_GE_GETSYSTEMSTR("IDS_COM_SK_DONE"));
48 elm_object_text_set(btn,
49 (char*)_GE_GETSYSTEMSTR("IDS_COM_SK_CANCEL"));
55 evas_object_show(btn);
60 Evas_Object *_ge_but_create_but(Evas_Object *parent, ge_but_mode mode, But_Smart_Cb cb_func, const void *data)
62 ge_dbg("Button mode: %d", mode);
63 Evas_Object *btn = NULL;
64 GE_CHECK_NULL(parent);
66 btn = elm_button_add(parent);
71 elm_object_text_set(btn,
72 (char*)_GE_GETSYSTEMSTR("IDS_COM_SK_OK"));
75 elm_object_text_set(btn,
76 (char*)_GE_GETSYSTEMSTR("IDS_COM_SK_CANCEL"));
83 evas_object_smart_callback_add(btn, "clicked", cb_func, data);