SimpleScroller.cpp
WebTitleBar.cpp
RelatedWebPages.cpp
- SearchBox.cpp
CustomPopup.cpp
)
HistoryList.h
WebTitleBar.h
RelatedWebPages.h
- SearchBox.h
CustomPopup.h
)
ErrorMessage.edc
RelatedPages.edc
Tooltip.edc
- SearchBox.edc
CustomPopup.edc
)
+++ /dev/null
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "SearchBox.h"
-#include "BrowserLogger.h"
-
-namespace tizen_browser
-{
-namespace base_ui
-{
-
-SearchBox::SearchBox(Evas_Object *parent)
-{
- std::string edjFilePath = EDJE_DIR;
- edjFilePath.append("SimpleUI/SearchBox.edj");
- elm_theme_extension_add(NULL, edjFilePath.c_str());
-
- m_entry_layout = elm_layout_add(parent);
- if(!elm_layout_file_set(m_entry_layout, edjFilePath.c_str(), "search_box"))
- throw std::runtime_error("Layout file not found: " + edjFilePath);
-
- m_webSearchEntry = elm_entry_add(m_entry_layout);
-
- elm_object_style_set(m_webSearchEntry, "search_entry");
-
- elm_entry_single_line_set(m_webSearchEntry, EINA_TRUE);
- elm_entry_scrollable_set(m_webSearchEntry, EINA_TRUE);
-
- search_caseSensitive = false;
-
- elm_object_translatable_part_text_set(m_webSearchEntry, "elm.guide", "Search");
-
- evas_object_smart_callback_add(m_webSearchEntry, "changed,user", SearchBox::searchNext, this);
-
- //Add Case sensitive checkbox
- m_caseSensitive = elm_check_add(m_entry_layout);
- elm_object_part_text_set(m_caseSensitive, "default", "Match case");
- elm_object_part_text_set(m_caseSensitive, "on", "Match case");
- elm_object_part_text_set(m_caseSensitive, "off", "Match case");
- elm_check_state_set(m_caseSensitive, EINA_FALSE);
- elm_object_part_content_set(m_entry_layout, "search_opts_case", m_caseSensitive);
-
- //Add prev and next buttons
- m_searchPrev = elm_button_add(m_entry_layout);
- elm_object_style_set(m_searchPrev, "default_button");
- elm_object_part_text_set(m_searchPrev, "default", "Prev");
- elm_object_part_content_set(m_entry_layout, "search_opts_prev", m_searchPrev);
-
- m_searchNext = elm_button_add(m_entry_layout);
- elm_object_style_set(m_searchNext, "default_button");
- elm_object_part_text_set(m_searchNext, "default", "Next");
- elm_object_part_content_set(m_entry_layout, "search_opts_next", m_searchNext);
-
- evas_object_smart_callback_add(m_searchNext, "clicked", SearchBox::searchNext, this);
- evas_object_smart_callback_add(m_searchPrev, "clicked", SearchBox::searchPrev, this);
- evas_object_smart_callback_add(m_caseSensitive, "changed", SearchBox::caseSensitiveChanged, this);
-
- elm_object_part_content_set(m_entry_layout, "search_entry_swallow", m_webSearchEntry);
-
- hide();
-}
-
-Evas_Object* SearchBox::getContent()
-{
- return m_entry_layout;
-}
-
-void SearchBox::hide()
-{
- elm_object_signal_emit(m_entry_layout, "elm,state,hide", "elm");
- elm_object_signal_emit(m_searchNext, "elm,state,hide", "elm");
- elm_object_signal_emit(m_searchPrev, "elm,state,hide", "elm");
- elm_object_signal_emit(m_webSearchEntry, "elm,state,hide", "elm");
- elm_entry_entry_set(m_webSearchEntry, "");
-// evas_object_hide(m_caseSensitive);
- visible = false;
-}
-
-void SearchBox::show()
-{
- elm_object_signal_emit(m_entry_layout, "elm,state,show", "elm");
- elm_object_signal_emit(m_searchNext, "elm,state,show", "elm");
- elm_object_signal_emit(m_searchPrev, "elm,state,show", "elm");
- elm_object_signal_emit(m_webSearchEntry, "elm,state,show", "elm");
-// evas_object_show(m_caseSensitive);
- visible = true;
-}
-
-bool SearchBox::is_visible()
-{
- return visible;
-}
-
-void SearchBox::searchNext(void *data, Evas_Object */*obj*/, void */*event_info*/)
-{
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- SearchBox *self = reinterpret_cast<SearchBox*>(data);
- std::string entry(elm_entry_markup_to_utf8(elm_entry_entry_get(self->m_webSearchEntry)));
-
- if (self->search_caseSensitive)
- self->textChanged(entry, EWK_FIND_OPTIONS_SHOW_HIGHLIGHT);
- else
- self->textChanged(entry, EWK_FIND_OPTIONS_SHOW_HIGHLIGHT | EWK_FIND_OPTIONS_CASE_INSENSITIVE);
-
-}
-
-void SearchBox::searchPrev(void *data, Evas_Object */*obj*/, void */*event_info*/)
-{
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- SearchBox *self = reinterpret_cast<SearchBox*>(data);
- std::string entry(elm_entry_markup_to_utf8(elm_entry_entry_get(self->m_webSearchEntry)));
-
- if (self->search_caseSensitive)
- self->textChanged(entry, EWK_FIND_OPTIONS_SHOW_HIGHLIGHT | EWK_FIND_OPTIONS_BACKWARDS);
- else
- self->textChanged(entry, EWK_FIND_OPTIONS_SHOW_HIGHLIGHT | EWK_FIND_OPTIONS_CASE_INSENSITIVE | EWK_FIND_OPTIONS_BACKWARDS);
-
-}
-
-void SearchBox::caseSensitiveChanged(void *data, Evas_Object */*obj*/, void */*event_info*/)
-{
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- SearchBox *self = reinterpret_cast<SearchBox*>(data);
- std::string entry(elm_entry_markup_to_utf8(elm_entry_entry_get(self->m_webSearchEntry)));
- self->search_caseSensitive = elm_check_state_get(self->m_caseSensitive);
-
- if (self->search_caseSensitive)
- self->textChanged(entry, EWK_FIND_OPTIONS_SHOW_HIGHLIGHT);
- else
- self->textChanged(entry, EWK_FIND_OPTIONS_SHOW_HIGHLIGHT | EWK_FIND_OPTIONS_CASE_INSENSITIVE);
-}
-
-
-}
-
-}
-
+++ /dev/null
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _SEARCHBOX_H
-#define _SEARCHBOX_H
-
-#include <boost/signals2/signal.hpp>
-#include <Elementary.h>
-#include <Evas.h>
-
-namespace tizen_browser
-{
-namespace base_ui
-{
-
-enum Ewk_Find_Options {
- EWK_FIND_OPTIONS_NONE, /**< no search flags, this means a case sensitive, no wrap, forward only search. */
- EWK_FIND_OPTIONS_CASE_INSENSITIVE = 1 << 0, /**< case insensitive search. */
- EWK_FIND_OPTIONS_AT_WORD_STARTS = 1 << 1, /**< search text only at the beginning of the words. */
- EWK_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START = 1 << 2, /**< treat capital letters in the middle of words as word start. */
- EWK_FIND_OPTIONS_BACKWARDS = 1 << 3, /**< search backwards. */
- EWK_FIND_OPTIONS_WRAP_AROUND = 1 << 4, /**< if not present search will stop at the end of the document. */
- EWK_FIND_OPTIONS_SHOW_OVERLAY = 1 << 5, /**< show overlay */
- EWK_FIND_OPTIONS_SHOW_FIND_INDICATOR = 1 << 6, /**< show indicator */
- EWK_FIND_OPTIONS_SHOW_HIGHLIGHT = 1 << 7 /**< show highlight */
-};
-
-class SearchBox{
-
-public:
- SearchBox(Evas_Object *parent);
- Evas_Object* getContent();
- void hide();
- void show();
- bool is_visible();
- boost::signals2::signal<void (std::string, int)> textChanged;
-
-private:
- Evas_Object* m_webSearchEntry;
- Evas_Object* m_entry_layout;
- Evas_Object* m_searchPrev;
- Evas_Object* m_searchNext;
- Evas_Object* m_caseSensitive;
-
- bool search_caseSensitive;
- bool visible;
-
- static void searchNext(void *data, Evas_Object */*obj*/, void */*event_info*/);
- static void searchPrev(void *data, Evas_Object */*obj*/, void */*event_info*/);
- static void caseSensitiveChanged(void *data, Evas_Object */*obj*/, void */*event_info*/);
-};
-
-}
-
-}
-
-#endif //_SEARCHBOX_H
m_netErrorHandler->networkError.connect(boost::bind(&SimpleUI::onNetworkError, this));
m_netErrorHandler->networkConnected.connect(boost::bind(&SimpleUI::onNetworkConnected, this));
-
-
- //m_searchBox = std::make_shared<tizen_browser::base_ui::SearchBox>(m_window.get());
- //m_searchBox->textChanged.connect(boost::bind(&SimpleUI::searchWebPage, this, _1, _2));
- //elm_object_part_content_set(m_mainLayout, "search_box", m_searchBox->getContent());
-
m_sessionService = std::dynamic_pointer_cast
<
tizen_browser::services::SessionStorage,
elm_theme_extension_add(NULL, edjePath("SimpleUI/ZoomItem.edj").c_str());
elm_theme_extension_add(NULL, edjePath("SimpleUI/TabItem.edj").c_str());
elm_theme_extension_add(NULL, edjePath("SimpleUI/ErrorMessage.edj").c_str());
- elm_theme_extension_add(NULL, edjePath("SimpleUI/SearchBox.edj").c_str());
elm_theme_overlay_add(0, edjePath("SimpleUI/ScrollerDefault.edj").c_str());
elm_theme_overlay_add(0, edjePath("SimpleUI/Tooltip.edj").c_str());
forwardEnable(false);
backEnable(false);
- m_simpleURI->setSearchIcon();
webTitleBar->hide();
- hideSearchBox();
-
hideProgressBar();
}
evas_object_hide(m_progressBar);
}
-
-void SimpleUI::showSearchBox()
-{
- if (m_searchBox.get())
- m_searchBox->show();
-}
-
-void SimpleUI::hideSearchBox()
-{
- if (m_searchBox.get())
- m_searchBox->hide();
-}
-
void SimpleUI::filterURL(const std::string& url)
{
BROWSER_LOGD("[%s] url=%s", __func__, url.c_str());
{
BROWSER_LOGD("[%s],", __func__);
SimpleUI *self = reinterpret_cast<SimpleUI*>(data);
- if (self->m_searchBox->is_visible())
- self->m_searchBox->hide();
- else if (!self->isHomePageActive() && !self->isErrorPageActive())
+ if (!self->isHomePageActive() && !self->isErrorPageActive())
{
self->m_simpleURI->clearFocus();
- self->m_searchBox->show();
}
}
#include "TabList.h"
#include "Settings.h"
#include "HistoryList.h"
-#include "SearchBox.h"
#include "NetworkErrorHandler.h"
#include "CustomPopup.h"
#include "Config.h"
void showSettingsMenu();
void hideSettingsMenu();
- void showSearchBox();
- void hideSearchBox();
-
void showProgressBar();
void hideProgressBar();
std::shared_ptr<tizen_browser::base_ui::BookmarksUI> m_bookmarksUI;
std::shared_ptr<tizen_browser::base_ui::ZoomList> m_zoomList;
std::shared_ptr<tizen_browser::base_ui::TabList> m_tabList;
- std::shared_ptr<tizen_browser::base_ui::SearchBox> m_searchBox;
std::shared_ptr<tizen_browser::services::PlatformInputManager> m_platformInputManager;
std::shared_ptr<tizen_browser::services::SessionStorage> m_sessionService;
tizen_browser::Session::Session m_currentSession;
#include "Spacer.edc"
-#include "SearchBox.edc"
#define DEBUG_RECT_OVER(over_part, r, g, b) \
part { name: __CONCAT("dbg_rect_at_", __stringify(__LINE__)); \
\
rel2 { to: "web_view"; relative: 1.0 1.0; }
}
}
- part { name: "search_box";
- type: SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- visible: 1;
- min: SEARCH_WIDTH SEARCH_HEIGHT;
- max: SEARCH_WIDTH SEARCH_HEIGHT;
- align: 1.0 0.0;
- rel1 {relative: 0.0 0.0; to: "web_view";}
- rel2 {relative: 1.0 1.0; to: "web_view";}
- }
- }
-
part {name: "popup_bg";
type: RECT;
+++ /dev/null
-#define SEARCH_ENTRY_WIDTH 200
-#define SEARCH_HEIGHT 60
-#define SEARCH_WIDTH 800
-#define OPT_BUTTON_WIDTH 160
-#define TRANSITION_VALUE 0.1
-collections {
- group { name: "elm/entry/selection/browser_entry";
- parts {
- part { name: "bg";
- scale:1;
- type: RECT;
- mouse_events: 0;
- description { state: "default" 0.0;
- color: 0 0 128 64;
- }
- }
- }
- }
- group { name: "elm/entry/cursor/browser_entry";
- parts {
- part { name: "bg";
- scale:1;
- type: RECT;
- mouse_events: 0;
- description { state: "default" 0.0;
- color: 69 149 255 255;
- min: 2 36;
- max: 2 36;
- visible: 0;
- }
- description {
- state: "focused" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- }
- }
- programs {
- program { name: "focused";
- signal: "elm,action,focus";
- source: "elm";
- action: STATE_SET "focused" 0.0;
- target: "bg";
- }
- program { name: "unfocused";
- signal: "elm,action,unfocus";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "bg";
- }
- }
- }
- group {
- name: "elm/entry/base-single/search_entry";
- styles {
- style {
- name: "browser-entry-uri-style-unselected";
- base: "font=Tizen:style=SVD_Medium font_size="32" wrap=none color=#CCCCCC";
- }
- style {
- name: "browser-entry-uri-style-selected";
- base: "font=Tizen:style=SVD_Medium font_size="32" wrap=none color=#3D3D3D";
- }
- }
- data {
- item: focus_highlight "off";
- }
- parts {
- part {
- name: "elm.guide";
- scale:1;
- type: TEXTBLOCK;
- mouse_events: 0;
- description { state: "default" 0.0;
- visible: 0;
- rel1.relative: 0.0 0.0;
- rel2.relative: 1.0 1.0;
- align: 0.0 0.0;
- text {
- style: "browser-entry-uri-style-unselected";
- min: 0 1;
- }
- }
- description { state: "visible" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- description { state: "hidden" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
- }
- part { name: "label.text.clip";
- scale:1;
- type: RECT;
- description {
- state: "default" 0.0;
- }
- }
- part {
- name: "elm.text";
- scale:1;
- multiline: 0;
- entry_mode: EDITABLE;
- select_mode: DEFAULT;
- cursor_mode: BEFORE;
- type: TEXTBLOCK;
- clip_to: "label.text.clip";
- source: "elm/entry/selection/browser_entry";
- source4: "elm/entry/cursor/browser_entry";
- description { state: "default" 0.0;
- visible: 0;
- rel1.relative: 0.0 0.0;
- rel2.relative: 1.0 1.0;
- align: 0.0 0.0;
- text {
- style: "browser-entry-uri-style-selected";
- min: 0 1;
- }
- }
- description { state: "visible" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- }
- }
- programs {
- program { name: "focus";
- signal: "load";
- source: "";
- action: FOCUS_SET;
- target: "elm.text";
- }
- program { name: "gdisabled";
- signal: "elm,guide,disabled";
- source: "elm";
- action: STATE_SET "hidden" 0.0;
- target: "elm.guide";
- }
- program { name: "genabled";
- signal: "elm,guide,enabled";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "elm.guide";
- }
- program {
- signal: "elm,state,show"; source: "elm";
- action: STATE_SET "visible" 0.0;
- transition: LINEAR TRANSITION_VALUE;
- target: "elm.guide";
- target: "elm.text";
- }
- program {
- signal: "elm,state,hide"; source: "elm";
- action: STATE_SET "default" 0.0;
- transition: LINEAR TRANSITION_VALUE;
- target: "elm.guide";
- target: "elm.text";
- }
- }
- }//group
- group{ name: "search_box";
- images {
- image: "search_searchbar_bg_foc.png" COMP;
- image: "search_searchbar_bg_nor.png" COMP;
- image: "ico_search.png" COMP;
- image: "ico_url.png" COMP;
- }
- parts{
- part { name: "bg_clipper";
- type: RECT;
- scale: 1;
- description{
- state: "default" 0.0;
- visible: 1;
- align: 0.0 0.0;
- color: 18 22 34 0;
- min: SEARCH_WIDTH SEARCH_HEIGHT;
- max: SEARCH_WIDTH SEARCH_HEIGHT;
- }
- description{
- state: "visible" 0.0;
- inherit: "default" 0.0;
- min: SEARCH_WIDTH SEARCH_HEIGHT;
- max: SEARCH_WIDTH SEARCH_HEIGHT;
- color: 18 22 34 245;
- visible: 1;
- }
- }
- part { name: "bg";
- type: IMAGE;
- scale: 1;
- clip_to: "bg_clipper";
- description{
- state: "default" 0.0;
- visible: 1;
- align: 0.0 1.0;
- color: 18 22 34 0;
- min: SEARCH_WIDTH SEARCH_HEIGHT*2;
- max: SEARCH_WIDTH SEARCH_HEIGHT*2;
- image.normal: "search_searchbar_bg_nor.png";
- image.border: 5 5 5 5;
- rel1 { relative: 0 0; to: "bg_clipper"; }
- rel2 { relative: 1 1; to: "bg_clipper"; }
- fill {
- type: SCALE;
- smooth: 0;
- origin {
- relative: 0 0;
- offset: 0 0;
- }
- size {
- relative: 1 1;
- offset: 0 0;
- }
- }
- }
- description{
- state: "visible" 0.0;
- inherit: "default" 0.0;
- min: SEARCH_WIDTH SEARCH_HEIGHT*2;
- max: SEARCH_WIDTH SEARCH_HEIGHT*2;
- color: 18 22 34 245;
- visible: 1;
- }
- }
- part { name: "search_swallow";
- type : SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- visible: 0;
- align: 0.0 0.85;
- min: SEARCH_ENTRY_WIDTH 40;
- max: SEARCH_ENTRY_WIDTH 40;
- rel1 { relative: 0 0; to: "bg"; offset: 30 0;}
- rel2 { relative: 1 1; to: "bg"; }
- fixed: 1 1;
- }
- description {
- state: "visible" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- }
- part { name: "bg_search_over";
- type : RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- color: 0 0 0 0;
- visible: 0;
- align: 0.0 0.5;
- rel1 { relative: 0 0; to: "search_swallow"; offset: 0 -5; }
- rel2 { relative: 1 1; to: "search_swallow"; }
- }
- description {
- state: "visible" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- }
- part { name: "bg_search";
- mouse_events: 1;
- scale:1;
- type: IMAGE;
- description {
- state: "default" 0.0;
- visible: 0;
- align: 0.0 0.5;
- min: SEARCH_ENTRY_WIDTH 40;
- max: SEARCH_ENTRY_WIDTH 40;
- fixed: 1 1;
- rel1 { relative: 0 0; to: "search_swallow"; offset: 0 -8; }
- rel2 { relative: 1 1; to: "search_swallow"; }
- image.normal: "search_searchbar_bg_nor.png";
- image.border: 5 5 5 5;
- fill {
- type: SCALE;
- smooth: 0;
- origin {
- relative: 0 0;
- offset: 0 0;
- }
- size {
- relative: 1 1;
- offset: 0 0;
- }
- }
- }
- description {
- state: "visible" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- }
- part {
- name: "search_over";
- type: RECT;
- mouse_events: 1;
- repeat_events: 1;
- description {
- state: "default" 0.0;
- visible: 1;
- color: 0 0 0 0;
- rel1 { relative: 0 0; to: "search_entry_swallow"; }
- rel2 { relative: 1 1; to: "search_entry_swallow"; }
- }
- }
- part { name: "search_entry_swallow";
- type : SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- visible: 0;
- align: 0.0 0.0;
- min: SEARCH_ENTRY_WIDTH-10 40;
- max: SEARCH_ENTRY_WIDTH-10 40;
- fixed: 1 1;
- rel1 { relative: 0 0; to: "search_swallow"; offset: 4 -4;}
- rel2 { relative: 1 1; to: "search_swallow";}
- }
- description {
- state: "visible" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- }
- part { name: "search_opts_prev";
- type : SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- color: 100 200 100 150;
- visible: 0;
- min: OPT_BUTTON_WIDTH SEARCH_HEIGHT;
- max: OPT_BUTTON_WIDTH SEARCH_HEIGHT;
- align: 0.0 0.0;
- rel1 { relative: 1 0; to: "search_entry_swallow"; offset: 15 -9; }
- rel2 { relative: 1 1; }
- }
- description {
- state: "visible" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- }
- part { name: "search_opts_next";
- type : SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- color: 100 100 200 150;
- visible: 0;
- min: OPT_BUTTON_WIDTH SEARCH_HEIGHT;
- max: OPT_BUTTON_WIDTH SEARCH_HEIGHT;
- align: 0.0 0.0;
- rel1 { relative: 1 0; to: "search_opts_prev"; }
- rel2 { relative: 1 1; }
- }
- description {
- state: "visible" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- }
- part { name: "search_opts_case";
- type : SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- visible: 0;
- min: OPT_BUTTON_WIDTH SEARCH_HEIGHT;
- max: OPT_BUTTON_WIDTH SEARCH_HEIGHT;
- align: 0.0 0.0;
- rel1 { relative: 1 0; to: "search_opts_next"; }
- rel2 { relative: 1 1; }
- }
- description {
- state: "visible" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- }
- }
- programs {
- program {
- signal: "elm,state,show"; source: "elm";
- action: STATE_SET "visible" 0.0;
- transition: LINEAR TRANSITION_VALUE;
- target: "bg";
- target: "bg_clipper";
- target: "search_entry_swallow";
- target: "bg_search";
- target: "search_opts_case";
- target: "search_opts_next";
- target: "search_opts_prev";
- }
- program {
- signal: "elm,state,hide"; source: "elm";
- action: STATE_SET "default" 0.0;
- transition: LINEAR TRANSITION_VALUE;
- target: "bg";
- target: "bg_clipper";
- target: "search_entry_swallow";
- target: "bg_search";
- target: "search_opts_case";
- target: "search_opts_next";
- target: "search_opts_prev";
- }
- }
- }
- group {
- name: "elm/button/base/default_button";
- parts {
- part {
- name: "bg";
- type: RECT;
- scale: 1;
- description { state: "default" 0.0;
- visible: 1;
- min: 150 40;
- max: 150 40;
- align: 0.5 0.5;
- fixed: 1 1;
- color: 225 225 225 0;
- }
- description { state: "visible" 0.0;
- inherit: "default" 0.0;
- color: 225 225 225 255;
- }
- description { state: "focus" 0.0;
- inherit: "visible" 0.0;
- color: 69 143 255 255;
- }
- description { state: "dim" 0.0;
- inherit: "visible" 0.0;
- color: 225 225 225 102;
- }
- }
- part {
- name: "elm.text";
- type: TEXT;
- scale: 1;
- description { state: "default" 0.0;
- visible: 1;
- fixed: 1 1;
- align: 0.0 0.5;
- min: 90 40;
- max: 90 40;
- rel1 { relative: 0.0 0.0; to: "bg"; offset: 30 0;}
- rel2 { relative: 1.0 1.0; to: "bg";}
- color: 89 89 89 0;
- text {
- text: "Next";
- font: "font_name";
- size: 30;
- align: 0.5 0.5;
- }
- }
- description { state: "visible" 0.0;
- inherit: "default" 0.0;
- color: 89 89 89 255;
- }
- description { state: "focus" 0.0;
- inherit: "visible" 0.0;
- color: 255 255 255 255;
- text.font: "Tizen:style=Bold";
- }
- description { state: "dim" 0.0;
- inherit: "visible" 0.0;
- color: 89 89 89 102;
- }
- }
- part {
- name: "over";
- scale:1;
- mouse_events: 1;
- type: RECT;
- description {
- state: "default" 0.0;
- visible: 0;
- rel1 { relative: 0.0 0.0; to: "bg";}
- rel2 { relative: 1.0 1.0; to: "bg";}
- color: 0 0 0 0;
- }
- description { state: "visible" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- }
- }
- programs{
- program {
- name: "mouse_in";
- signal: "mouse,in";
- source: "over";
- action: STATE_SET "focus" 0.0;
- target: "elm.text";
- target: "bg";
- script {
- new st[31];
- new Float:vl;
- get_state(PART:"elm.text", st, 30, vl);
- if(!strcmp(st, "visible")) {
- set_state(PART:"bg", "focus", 0.0);
- set_state(PART:"elm.text", "focus", 0.0);
- }
- }
- }
- program {
- name: "mouse_out";
- signal: "mouse,out";
- source: "over";
- action: STATE_SET "default" 0.0;
- target: "elm.text";
- target: "bg";
- script {
- new st[31];
- new Float:vl;
- get_state(PART:"elm.text", st, 30, vl);
- if(!strcmp(st, "focus")) {
- set_state(PART:"bg", "visible", 0.0);
- set_state(PART:"elm.text", "visible", 0.0);
- }
- }
- }
- program {
- name: "mouse_click";
- signal: "mouse,clicked,1";
- source: "over";
- script {
- emit("elm,action,click", "");
- }
- }
- program {
- name: "disable";
- signal: "elm,state,disabled";
- source: "elm";
- action: STATE_SET "dim" 0.0;
- target: "elm.text";
- target: "bg";
- }
- program {
- name: "enable";
- signal: "elm,state,enabled";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "elm.text";
- target: "bg";
- }
- program {
- signal: "elm,state,show"; source: "elm";
- action: STATE_SET "visible" 0.0;
- transition: LINEAR TRANSITION_VALUE;
- target: "bg";
- target: "elm.text";
- target: "over";
- }
- program {
- signal: "elm,state,hide"; source: "elm";
- action: STATE_SET "default" 0.0;
- transition: LINEAR TRANSITION_VALUE;
- target: "bg";
- target: "elm.text";
- target: "over";
- }
- }
- }
-}
\ No newline at end of file