void MainUI::addHistoryItems(std::shared_ptr<services::HistoryItemVector> items)
{
BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
+ clearHistoryGenlist();
int i = 0;
- m_historyItems.clear();
for (auto it = items->begin(); it != items->end(); ++it) {
i++;
if (i > MAX_TILES_NUMBER)
{
BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
- for (auto it = m_tiles.begin(); it != m_tiles.end(); ++it)
+ for (auto it = m_tiles.begin(); it != m_tiles.end(); ++it) {
edje_object_signal_callback_del(elm_layout_edje_get(*it), "mouse,clicked,1", "over", _thumbClicked);
+ evas_object_del(*it);
+ }
+ m_tiles.clear();
m_historyItems.clear();
}
}
}
}
+ programs{
+ program {
+ name: "mouse_click";
+ signal: "mouse,clicked,1";
+ source: "over";
+ script {
+ emit("elm,action,click", "");
+ }
+ }
+ }
}
group { name: "elm/button/base/thumbButton";
min: 784 614;
max: 784 614;
align: 0.0 0.0;
- fixed: 0 0;
+ fixed: 1 1;
visible: 1;
rel1 {
relative: 0 0; to: "center_rect";
min: 378 294;
max: 378 294;
align: 0.0 0.0;
- fixed: 0 0;
+ fixed: 1 1;
visible: 1;
rel1 {
to: "center_rect";
min: 378 294;
max: 378 294;
align: 0.0 0.0;
- fixed: 0 0;
+ fixed: 1 1;
visible: 1;
rel1 {
to: "center_rect";
min: 378 294;
max: 378 294;
align: 0.0 0.0;
- fixed: 0 0;
+ fixed: 1 1;
visible: 1;
rel1 {
to: "center_rect";
min: 378 294;
max: 378 294;
align: 0.0 0.0;
- fixed: 0 0;
+ fixed: 1 1;
visible: 1;
rel1 {
to: "center_rect";
project(SimpleUI)
set(SimpleUI_SRCS
- NetworkErrorHandler.cpp
- HistoryList.cpp
SimpleUI.cpp
ButtonBar.cpp
SimplePopup.cpp
- ZoomList.cpp
- TabList.cpp
BookmarksManager.cpp
- Settings.cpp
- SimpleScroller.cpp
- WebTitleBar.cpp
- RelatedWebPages.cpp
- CustomPopup.cpp
)
set(SimpleUI_HEADERS
- NetworkErrorHandler.h
SimpleUI.h
ButtonBar.h
SimplePopup.h
- ZoomList.h
- TabList.h
BookmarksManager.h
- Settings.h
- SimpleScroller.h
- HistoryList.h
- WebTitleBar.h
- RelatedWebPages.h
- CustomPopup.h
)
include(Coreheaders)
LeftButtonBar.edc
RightButtonBar.edc
AuthenticationPopup.edc
- TabItem.edc
- ZoomItem.edc
BookmarksManager.edc
- Settings.edc
ScrollerDefault.edc
- HistoryItem.edc
- WebTitleBar.edc
ErrorMessage.edc
- RelatedPages.edc
Tooltip.edc
- CustomPopup.edc
)
foreach(edec ${edcFiles})
+++ /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 "HistoryList.h"
-#include "BrowserAssert.h"
-#include "BrowserLogger.h"
-#include "HistoryItem.h"
-#include "EflTools.h"
-#include <Evas.h>
-
-#if MERGE_ME
-#include <boost/date_time/posix_time/posix_time.hpp>
-#include <boost/date_time/date.hpp>
-#include <boost/date_time/date_defs.hpp>
-#include <boost/date_time/gregorian/gregorian.hpp>
-#endif
-
-namespace tizen_browser
-{
-namespace base_ui
-{
-
-
-HistoryList::HistoryList(std::shared_ptr<Evas_Object> mainWindow, Evas_Object* parentButton)
- : MenuButton(mainWindow, parentButton)
- ,m_genList(NULL)
- ,m_itemClass(NULL)
- ,m_lastFocusedItem(NULL)
- ,m_deleteSelected(false)
-{
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- std::string edjFilePath = EDJE_DIR;
- edjFilePath.append("SimpleUI/HistoryItem.edj");
- elm_theme_extension_add(0, edjFilePath.c_str());
-
- itemWidth = atoi(edje_file_data_get(edjFilePath.c_str(),"item_width"));
- itemHeight = atoi(edje_file_data_get(edjFilePath.c_str(),"item_height"));
- parentItemHeight = atoi(edje_file_data_get(edjFilePath.c_str(),"parent_item_height"));
- itemsCounter = 0;
- parentItemsCounter = 0;
-
- m_genList = elm_genlist_add(m_window.get());
- elm_object_style_set(m_genList, "history");
- elm_genlist_homogeneous_set(m_genList, EINA_FALSE);
- elm_genlist_multi_select_set(m_genList, EINA_FALSE);
- elm_genlist_select_mode_set(m_genList, ELM_OBJECT_SELECT_MODE_ALWAYS);
- elm_genlist_mode_set(m_genList, ELM_LIST_LIMIT);
- elm_genlist_decorate_mode_set(m_genList, EINA_TRUE);
- evas_object_size_hint_weight_set(m_genList, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
- evas_object_smart_callback_add(m_genList, "item,focused", focusItem, this);
- evas_object_smart_callback_add(m_genList, "item,unfocused", unFocusItem, NULL);
-
- m_itemClass = elm_genlist_item_class_new();
- m_itemClass->item_style = "history_item";
- m_itemClass->func.text_get = &listItemTextGet;
- m_itemClass->func.content_get = &listItemContentGet;
- m_itemClass->func.state_get = 0;
- m_itemClass->func.del = 0;
-
- m_itemClassNoFavicon = elm_genlist_item_class_new();
- m_itemClassNoFavicon->item_style = "history_item_no_favicon";
- m_itemClassNoFavicon->func.text_get = &listItemTextGet;
- m_itemClassNoFavicon->func.content_get = &listItemContentGet;
- m_itemClassNoFavicon->func.state_get = 0;
- m_itemClassNoFavicon->func.del = 0;
-
- m_parentItemClass= elm_genlist_item_class_new();
- m_parentItemClass->item_style = "history_parent_item";
- m_parentItemClass->func.text_get = &listParentItemTextGet;
- m_parentItemClass->func.content_get = 0;
- m_parentItemClass->func.state_get = 0;
- m_parentItemClass->func.del = 0;
-}
-
-HistoryList::~HistoryList()
-{
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-}
-
-void HistoryList::addItem(const std::shared_ptr<tizen_browser::services::HistoryItem> item)
-{
- BROWSER_LOGD("[%s:%d]:%s ", __PRETTY_FUNCTION__, __LINE__, item->getTitle().c_str());
- //first check if ther's a date item.
- GroupIterator parenIter = m_groupParent.find(item->getLastVisit().date());
- Elm_Object_Item* groupParent;
-
- ItemData * id = new ItemData;
- id->h_list = this;
- id->h_item = item.get();
- if(parenIter == m_groupParent.end()){
- groupParent = elm_genlist_item_append(m_genList, //genlist
- m_parentItemClass, //item Class
- //id.get(), //item data
- id,
- 0, //parent item
- ELM_GENLIST_ITEM_GROUP,//item type
- paretn_item_clicked_cb,
- NULL //data passed to above function
- );
- elm_object_item_disabled_set(groupParent, EINA_TRUE);
- m_groupParent[item->getLastVisit().date()] = groupParent;
- ++parentItemsCounter;
- } else {
- groupParent = parenIter->second;
- }
-
- Elm_Object_Item* elmItem = elm_genlist_item_append(m_genList, //genlist
- item->getFavIcon()->dataSize ? m_itemClass : m_itemClassNoFavicon, //item Class
- //id.get(), //item data
- id,
- groupParent, //parent item
- ELM_GENLIST_ITEM_NONE,//item type
- NULL,
- NULL //data passed to above function
- );
- id->e_item = elmItem;
-
-// m_items.push_back(item);
- ++itemsCounter;
-}
-
-void HistoryList::clearList()
-{
- elm_genlist_clear(m_genList);
- itemsCounter = 0;
- parentItemsCounter = 0;
- m_groupParent.clear();
-}
-
-void HistoryList::addItems(tzSrv::HistoryItemVector items)
-{
- clearList();
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- tzSrv::HistoryItemVectorConstIter end = items.end();
- for(tzSrv::HistoryItemVectorConstIter item = items.begin(); item!=end; item++){
- addItem(*item);
- }
-}
-
-Evas_Object* HistoryList::getContent()
-{
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- return m_genList;
-}
-
-MenuButton::ListSize HistoryList::calculateSize()
-{
- ListSize result;
-
- result.width = itemWidth;
-
- result.height = itemsCounter*itemHeight + parentItemsCounter*parentItemHeight + 16; //"16" is size of frame
- if (result.height > 868)
- result.height = 868;
-
- return result;
-}
-
-Evas_Object* HistoryList::getFirstFocus()
-{
- return m_genList;
-}
-
-Evas_Object* HistoryList::listItemContentGet(void* data, Evas_Object* obj, const char* part)
-{
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- ItemData * id = static_cast<ItemData *>(data);
- if(!strcmp(part, "favicon") && id->h_item->getFavIcon())
- {
- return tizen_browser::tools::EflTools::getEvasImage(id->h_item->getFavIcon(), obj);
- }
- else if(!strcmp(part, "content_click"))
- {
- Evas_Object *content_click = elm_button_add(obj);
- elm_object_style_set(content_click, "invisible_button");
- evas_object_smart_callback_add(content_click, "clicked", HistoryList::item_clicked_cb, id);
- return content_click;
- }
- else if(!strcmp(part, "del_click"))
- {
- Evas_Object *del_click = elm_button_add(obj);
- elm_object_style_set(del_click, "invisible_button");
- evas_object_smart_callback_add(del_click, "clicked", HistoryList::item_delete_clicked_cb, id);
- return del_click;
- }
- return NULL;
-}
-
-char* HistoryList::listItemTextGet(void* data, Evas_Object* /* obj */, const char* part)
-{
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- ItemData * id = static_cast<ItemData *>(data);
- if(!strcmp(part, "page_title"))
- {
- if(!id->h_item->getTitle().empty()){
- return strdup(id->h_item->getTitle().c_str());
- }
- }
- else if(!strcmp(part, "page_url"))
- {
- if(!id->h_item->getUrl().empty()){
- return strdup(id->h_item->getUrl().c_str());
- }
- }
-#if MERGE_ME
- else if(!strcmp(part, "page_time"))
- {
- std::string retstr = boost::posix_time::to_simple_string(id->h_item->getLastVisit().time_of_day());
- return strdup(retstr.c_str());
- }
-#endif
- return strdup("");
-}
-
-void HistoryList::item_clicked_cb(void* data, Evas_Object* /* obj */, void* /* event_info */)
-{
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- ItemData * id = static_cast<ItemData *>(data);
- id->h_list->clickedHistoryItem(id->h_item->getUrl());
-}
-
-void HistoryList::item_delete_clicked_cb(void* data, Evas_Object* /* obj */, void* /* event_info */)
-{
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- ItemData * id = static_cast<ItemData *>(data);
- id->h_list->deleteHistoryItem(id->h_item->getUrl());
- elm_object_item_del(id->e_item);
- elm_genlist_item_update(id->e_item);
- BROWSER_LOGD("[%s:%d] Genlist count: %d", __PRETTY_FUNCTION__, __LINE__, elm_genlist_items_count(id->h_list->m_genList));
-}
-
-char* HistoryList::listParentItemTextGet(void* data, Evas_Object* /* obj */, const char* /* part */ )
-{
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- ///\todo fix year out of range
- ItemData * id = static_cast<ItemData *>(data);
- std::string retstr = boost::gregorian::to_simple_string(id->h_item->getLastVisit().date());
- return strdup(retstr.c_str());
-
-}
-
-void HistoryList::paretn_item_clicked_cb(void* /* data */, Evas_Object* /* obj */, void* /* event_info */)
-{
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-}
-
-void HistoryList::focusItem(void* data, Evas_Object* /*obj*/, void* event_info)
-{
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- Elm_Object_Item *item = reinterpret_cast<Elm_Object_Item*>(event_info);
- elm_object_item_signal_emit( item, "mouse,in", "content_click");
-
- HistoryList *self = static_cast<HistoryList*>(data);
- self->m_lastFocusedItem = item;
-}
-
-void HistoryList::unFocusItem(void* /*data*/, Evas_Object* /*obj*/, void* event_info)
-{
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- Elm_Object_Item *item = reinterpret_cast<Elm_Object_Item*>(event_info);
- ItemData * id = reinterpret_cast<ItemData *>(elm_object_item_data_get(item));
- M_ASSERT(id);
- elm_object_item_signal_emit(item, "mouse,out", "content_click");
- elm_object_item_signal_emit(item, "mouse,out", "del_click");
- id->h_list->m_deleteSelected = false;
-}
-
-void HistoryList::rightPressed()
-{
- if(m_lastFocusedItem && elm_object_focus_get(elm_object_item_widget_get(m_lastFocusedItem))) {
- elm_object_item_signal_emit(m_lastFocusedItem, "mouse,in", "del_click");
- m_deleteSelected = true;
- }
-}
-
-void HistoryList::leftPressed()
-{
- if(m_lastFocusedItem && elm_object_focus_get(elm_object_item_widget_get(m_lastFocusedItem))) {
- elm_object_item_signal_emit(m_lastFocusedItem, "mouse,out", "del_click");
- elm_object_item_signal_emit(m_lastFocusedItem, "mouse,in", "content_click");
- m_deleteSelected = false;
- }
-}
-
-void HistoryList::enterPressed()
-{
- if(m_lastFocusedItem && elm_object_focus_get(elm_object_item_widget_get(m_lastFocusedItem))) {
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-
- ItemData * id = reinterpret_cast<ItemData *>(elm_object_item_data_get(m_lastFocusedItem));
- M_ASSERT(id);
- if(m_deleteSelected) {
- deleteHistoryItem(id->h_item->getUrl());
- elm_object_item_del(m_lastFocusedItem);
- elm_genlist_item_update(m_lastFocusedItem);
- }
- else
- clickedHistoryItem(id->h_item->getUrl());
- }
-}
-
-} /* end of namespace base_ui */
-} /* end of namespace tizen_browser */
+++ /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 HISTORYLIST_H
-#define HISTORYLIST_H
-#include <memory>
-#include <map>
-#include <string>
-#include <list>
-
-#include <boost/signals2/signal.hpp>
-#include <Evas.h>
-#include <Elementary.h>
-
-#include "MenuButton.h"
-
-#include "HistoryItem.h"
-
-namespace tizen_browser
-{
-namespace base_ui
-{
-
-namespace tzSrv = tizen_browser::services;
-
-class HistoryList : public MenuButton
-{
-public:
- HistoryList(std::shared_ptr<Evas_Object> mainWindow, Evas_Object* parentButton);
- ~HistoryList();
- void addItems(tzSrv::HistoryItemVector items);
- void addItem(const std::shared_ptr<tizen_browser::services::HistoryItem> item);
- virtual Evas_Object *getContent();
- virtual ListSize calculateSize();
- virtual Evas_Object* getFirstFocus();
- boost::signals2::signal<void (const std::string & )> clickedHistoryItem;
- boost::signals2::signal<void (const std::string & )> deleteHistoryItem;
- void clearList();
-
- void rightPressed();
- void leftPressed();
- void enterPressed();
-
-private:
-
- static Evas_Object* listItemContentGet(void *data, Evas_Object *obj, const char *part);
- static char* listItemTextGet(void *data, Evas_Object *obj, const char *part);
- static char* listParentItemTextGet(void *data, Evas_Object *obj, const char *part);
-
- static void paretn_item_clicked_cb(void *data, Evas_Object *obj, void *event_info);
- static void item_clicked_cb(void *data, Evas_Object *obj, void *event_info);
- static void item_delete_clicked_cb(void *data, Evas_Object *obj, void *event_info);
-
-private:
- struct ItemData{
- tizen_browser::base_ui::HistoryList * h_list;
- tizen_browser::services::HistoryItem * h_item;
- Elm_Object_Item * e_item;
- };
- Evas_Object *m_genList;
- Elm_Genlist_Item_Class *m_itemClass;
- Elm_Genlist_Item_Class *m_itemClassNoFavicon;
- Elm_Genlist_Item_Class *m_parentItemClass;
- int itemsCounter;
- int parentItemsCounter;
- int itemHeight;
- int itemWidth;
- int parentItemHeight;
- std::map<boost::gregorian::date, Elm_Object_Item*> m_groupParent;
- typedef std::map<boost::gregorian::date, Elm_Object_Item*>::iterator GroupIterator;
-
- static void focusItem(void* data, Evas_Object* obj, void* event_info);
- static void unFocusItem(void* data, Evas_Object* obj, void* event_info);
-
- Elm_Object_Item *m_lastFocusedItem;
- bool m_deleteSelected;
-};
-
-} /* end of namespace base_ui */
-} /* end of namespace tizen_browser */
-
-#endif // HISTORYLIST_H
+++ /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 "NetworkErrorHandler.h"
-
-#if PLATFORM(TIZEN)
-#include <network/net_connection.h>
-#endif
-
-namespace tizen_browser
-{
-namespace basic_ui
-{
-
-NetworkErrorHandler::NetworkErrorHandler()
-{
-#if PLATFORM(TIZEN)
- connection_create(&connection);
- connection_set_type_changed_cb(connection, onConnectionStateChanged, this);
-#endif
-}
-
-NetworkErrorHandler::~NetworkErrorHandler()
-{
-#if PLATFORM(TIZEN)
- connection_unset_type_changed_cb(connection);
- connection_destroy(connection);
-#endif
-}
-
-#if PLATFORM(TIZEN)
-void NetworkErrorHandler::onConnectionStateChanged(connection_type_e type, void* user_data)
-{
- NetworkErrorHandler *self = static_cast<NetworkErrorHandler*>(user_data);
- if(type == CONNECTION_TYPE_DISCONNECTED){
- self->networkError();
- }else{
- self->networkConnected();
- }
-}
-#endif
-
-} /* end of namespace basic_ui */
-} /* end of namespace tizen_browser */
+++ /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 NETWORKINGERRORHANDLER_H
-#define NETWORKINGERRORHANDLER_H
-
-#include "browser_config.h"
-#include <boost/signals2/signal.hpp>
-
-#if PLATFORM(TIZEN)
-#include <network/net_connection.h>
-#endif
-
-#include <memory.h>
-
-namespace tizen_browser
-{
-namespace basic_ui
-{
-
-
-
-class NetworkErrorHandler
-{
-
-public:
- NetworkErrorHandler();
- ~NetworkErrorHandler();
-
- boost::signals2::signal<void ()> networkError;
- boost::signals2::signal<void ()> networkConnected;
-
-private:
-#if PLATFORM(TIZEN)
- static void onConnectionStateChanged(connection_type_e type, void* user_data);
-#endif
-
- /**
- * @brief Typedef, RAI for connection ptr.
- *
- * dlopen return void*
- * dlclose return int
- */
-#if PLATFORM(TIZEN)
- connection_h connection;
-#endif
-};
-
-} /* end of namespace basic_ui */
-} /* end of namespace tizen_browser */
-
-#endif // NETWORKINGERRORHANDLER_H
+++ /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 "RelatedWebPages.h"
-#include "BrowserLogger.h"
-#include "BrowserAssert.h"
-#include "Tools/EflTools.h"
-
-namespace tizen_browser{
-namespace base_ui{
-
-typedef struct _BookmarkItemData
-{
- std::shared_ptr<tizen_browser::services::BookmarkItem> item;
- std::shared_ptr<tizen_browser::base_ui::RelatedWebPages> relatedWebPages;
-} BookmarkItemData;
-
-RelatedWebPages::RelatedWebPages() : m_parent(NULL), m_gengrid(NULL), m_item_class(NULL), m_gengridSetup(false)
-{
-
-}
-
-void RelatedWebPages::init(Evas_Object* p)
-{
- m_parent = p;
- m_gengrid = elm_gengrid_add(m_parent);
-
- evas_object_smart_callback_add(m_gengrid, "item,focused", focusItem, NULL);
- evas_object_smart_callback_add(m_gengrid, "item,unfocused", unFocusItem, NULL);
-
- if (!m_item_class) {
- m_item_class = elm_genlist_item_class_new();
- m_item_class->item_style = "rel_page_item";
- m_item_class->func.text_get = NULL;
- m_item_class->func.content_get = _grid_content_get;
- m_item_class->func.state_get = NULL;
- m_item_class->func.del = NULL;
- }
-}
-
-void RelatedWebPages::addRelatedPage(std::shared_ptr<tizen_browser::services::BookmarkItem> bi)
-{
- BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
- BookmarkItemData *itemData = new BookmarkItemData();
- itemData->item = bi;
- itemData->relatedWebPages = std::shared_ptr<tizen_browser::base_ui::RelatedWebPages>(this);
- /*Elm_Object_Item* bookmarkView =*/ elm_gengrid_item_append(m_gengrid, m_item_class, itemData, NULL, this);
- //m_map_bookmark_views.insert(std::pair<std::string,Elm_Object_Item*>(bi->getAddress(),bookmarkView));
-
- //setEmptyGengrid(false);
-}
-
-Evas_Object * RelatedWebPages::_grid_content_get(void *data, Evas_Object *obj, const char *part)
-{
- BROWSER_LOGD("%s:%d %s part=%s", __FILE__, __LINE__, __func__, part);
- BookmarkItemData *itemData = reinterpret_cast<BookmarkItemData*>(data);
-
- if (!strcmp(part, "elm.thumbnail")) {
- if (itemData->item->getThumbnail()) {
- Evas_Object * thumb = tizen_browser::tools::EflTools::getEvasImage(itemData->item->getThumbnail(), itemData->relatedWebPages->m_parent);
- return thumb;
- }
- else {
- return NULL;
- }
- }
- else if (!strcmp(part, "elm.label")) {
- Evas_Object *label = elm_label_add(obj);
- elm_object_style_set(label, "rel_pages_label");
- elm_object_text_set(label, itemData->item->getTittle().c_str());
- return label;
- }
- else if (!strcmp(part, "elm.thumbButton")) {
- Evas_Object *thumbButton = elm_button_add(obj);
- elm_object_style_set(thumbButton, "thumbButton");
- evas_object_smart_callback_add(thumbButton, "clicked", RelatedWebPages::_thumbSelected, data);
- return thumbButton;
- }
- return NULL;
-}
-
-Evas_Object * RelatedWebPages::getContent()
-{
- BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
- M_ASSERT(m_parent);
-
- /*if(!elm_gengrid_items_count(m_gengrid))
- elm_object_part_content_set(m_gengrid, "elm.swallow.empty", createNoBookmarksLabel());*/
-
- if(!m_gengridSetup) {
- std::string edjFilePath = EDJE_DIR;
- edjFilePath.append("SimpleUI/RelatedPages.edj");
- elm_theme_extension_add(NULL, edjFilePath.c_str());
-
-
- elm_object_style_set(m_gengrid, "rel_pages");
-
- elm_gengrid_align_set(m_gengrid, 0, 0);
- elm_gengrid_item_size_set(m_gengrid, 252, 222);
- elm_gengrid_select_mode_set(m_gengrid, ELM_OBJECT_SELECT_MODE_ALWAYS);
- elm_gengrid_multi_select_set(m_gengrid, EINA_FALSE);
- elm_gengrid_horizontal_set(m_gengrid, EINA_FALSE);
- elm_gengrid_highlight_mode_set(m_gengrid, EINA_TRUE);
- elm_scroller_policy_set(m_gengrid, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
- elm_scroller_page_size_set(m_gengrid, 0, 327);
-
- evas_object_size_hint_weight_set(m_gengrid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(m_gengrid, EVAS_HINT_FILL, EVAS_HINT_FILL);
-
- m_gengridSetup = true;
- }
- return m_gengrid;
-}
-
-void RelatedWebPages::deleteAllItems()
-{
- BROWSER_LOGD("Deleting all items from gengrid");
- elm_gengrid_clear(m_gengrid);
-}
-
-void RelatedWebPages::_thumbSelected(void * data, Evas_Object * /*obj*/, void * /*event_info*/)
-{
- BookmarkItemData * itemData = reinterpret_cast<BookmarkItemData *>(data);
- itemData->relatedWebPages->bookmarkClicked(itemData->item);
-}
-
-void RelatedWebPages::focusItem(void* /*data*/, Evas_Object* /*obj*/, void* event_info)
-{
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- Elm_Object_Item *item = reinterpret_cast<Elm_Object_Item*>(event_info);
- elm_object_item_signal_emit( item, "mouse,in", "over2");
-}
-
-void RelatedWebPages::unFocusItem(void* /*data*/, Evas_Object* /*obj*/, void* event_info)
-{
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- Elm_Object_Item *item = reinterpret_cast<Elm_Object_Item*>(event_info);
- elm_object_item_signal_emit( item, "mouse,out", "over2");
-}
-
-}
-
-}
+++ /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 RELATEDWEBPAGES_H
-#define RELATEDWEBPAGES_H
-
-#include <Elementary.h>
-#include "BookmarkItem.h"
-
-#include <boost/signals2/signal.hpp>
-
-namespace tizen_browser{
-namespace base_ui{
-
-class RelatedWebPages
-{
-public:
- RelatedWebPages();
- void init(Evas_Object* p);
- Evas_Object* getContent();
- void addRelatedPage(std::shared_ptr<tizen_browser::services::BookmarkItem> bi);
- void deleteAllItems();
-
- boost::signals2::signal<void (std::shared_ptr<tizen_browser::services::BookmarkItem>)> bookmarkClicked;
-
-private:
- Evas_Object *m_parent, *m_gengrid;
- Elm_Gen_Item_Class *m_item_class;
- bool m_gengridSetup;
-
- static Evas_Object* _grid_content_get(void *data, Evas_Object *obj, const char *part);
- static void _thumbSelected(void * data, Evas_Object * obj, void * event_info);
- static void focusItem(void* data, Evas_Object* obj, void* event_info);
- static void unFocusItem(void* data, Evas_Object* obj, void* event_info);
-};
-
-}
-
-}
-
-#endif // RELATEDWEBPAGES_H
+++ /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 "Settings.h"
-#include <memory>
-#include <string>
-#include <iostream>
-#include <Eina.h>
-#include <Evas.h>
-#include "BrowserLogger.h"
-
-namespace tizen_browser
-{
-namespace base_ui
-{
-
-SettingsItem::SettingsItem()
- : action(std::make_shared<Action>())
-{
-
-}
-SettingsItem::SettingsItem( std::shared_ptr<Action> action)
- : action(action)
-{
-
-}
-
-
-SettingsItem::SettingsItem(const SettingsItem& source)
- : action(source.action)
-{
-
-}
-SettingsItem::SettingsItem(const SettingsItem* source)
- : action(source->action)
-{
-
-}
-
-
-SettingsItem::~SettingsItem()
-{
- //elm_genlist_item_class_free(m_itemClass);??
-}
-
-Settings::Settings(std::shared_ptr< Evas_Object > mainWindow, Evas_Object* parentButton)
- : MenuButton(mainWindow, parentButton)
- , m_genlist(0)
- , m_itemClass(0)
- , m_internalPopup(0)
- , m_internalPopupVisible(false)
- , m_pointerModeEnabled(true)
-{
- std::string edjFilePath = EDJE_DIR;
- edjFilePath.append("SimpleUI/Settings.edj");
- elm_theme_extension_add(0, edjFilePath.c_str());
-
- m_genlist = elm_genlist_add(m_window.get());
-
- evas_object_smart_callback_add(m_genlist, "item,focused", focusItem, NULL);
- evas_object_smart_callback_add(m_genlist, "item,unfocused", unFocusItem, NULL);
-
- elm_object_style_set(m_genlist, "settings");
- elm_genlist_homogeneous_set(m_genlist, EINA_TRUE);
- elm_genlist_multi_select_set(m_genlist, EINA_FALSE);
-
- elm_genlist_select_mode_set(m_genlist, ELM_OBJECT_SELECT_MODE_ALWAYS);
-
- m_itemClass = elm_genlist_item_class_new();
- m_itemClass->item_style = "settings_item";
-
- m_itemClass->func.text_get = &gridTextGet;
- m_itemClass->func.content_get = &gridOptionLabelGet;
- m_itemClass->func.state_get = 0;
- m_itemClass->func.del = 0;
-}
-
-Settings::~Settings()
-{
-
-}
-
-Evas_Object* Settings::getContent()
-{
- return m_genlist;
-}
-
-tizen_browser::base_ui::MenuButton::ListSize Settings::calculateSize()
-{
- ListSize result;
-
- result.width = 490;
- result.height = 426;
-
- return result;
-}
-
-Evas_Object* Settings::getFirstFocus()
-{
- return m_genlist;
-}
-
-void Settings::addAction(sharedAction action)
-{
- std::shared_ptr<SettingsItem> settingsItem = std::make_shared<SettingsItem>(action);
- BROWSER_LOGD("[%s] %x: %s", __func__ , settingsItem.get(), settingsItem->action->getText().c_str() );
- Elm_Object_Item* elmItem= elm_genlist_item_append(m_genlist, //genlist
- m_itemClass, //item Class
- settingsItem.get(), //item data
- 0, //parent item
- ELM_GENLIST_ITEM_NONE,//item type
- itemClicked,
- this
- );
- m_settingsItemsMap[elmItem] = settingsItem;
- BROWSER_LOGD("[%s:%d] \n\t %x:%s ", __PRETTY_FUNCTION__, __LINE__, elmItem, settingsItem->action->getText().c_str());
- if(!settingsItem->action->isEnabled()){
- elm_object_item_disabled_set(elmItem, EINA_TRUE);
- }
- if(settingsItem->action->isCheckable()){
- elm_object_item_signal_emit(elmItem,
- (settingsItem->action->isChecked() ? "switch,on" : "switch,off")
- , "SettingsModel");
- } else {
- elm_object_item_signal_emit(elmItem, "switch,hide", "SettingsModel");
- }
- action->enabledChanged.connect(boost::bind(&Settings::onEnabledChanged, this, action));
- m_actionButtonMap[action] = elmItem;
-}
-
-void Settings::onEnabledChanged(sharedAction action)
-{
- BROWSER_LOGD("[%s]", __func__);
- refreshAction(action);
-}
-
-void Settings::refreshAction(sharedAction action)
-{
- BROWSER_LOGD("[%s]", __func__);
- if(action->isEnabled())
- elm_object_item_disabled_set(m_actionButtonMap[action], EINA_FALSE);
- else
- elm_object_item_disabled_set(m_actionButtonMap[action], EINA_TRUE);
-}
-
-char* Settings::gridTextGet(void* data, Evas_Object* /*obj*/, const char* part)
-{
- BROWSER_LOGD("[%s]", __func__);
- SettingsItem *settingsItem =reinterpret_cast<SettingsItem*>(data);
- if(!strcmp(part, "optionName")){
- if(!settingsItem->action->getText().empty()){
- return strdup(settingsItem->action->getText().c_str());
- }
- }
- return strdup("");
-}
-
-Evas_Object* Settings::gridOptionLabelGet(void* data, Evas_Object* obj, const char* part)
-{
- SettingsItem *settingsItem =reinterpret_cast<SettingsItem*>(data);
- if(!strcmp(part, "optionValue")){
- if(settingsItem->action->isEnabled() && settingsItem->action->isCheckable()){
- Evas_Object *label = elm_label_add(obj);
- elm_object_text_set(label, (settingsItem->action->isChecked() ? "On" :"Off" ));
- elm_object_style_set(label, "settings_label");
- return label;
- }
- }
- return NULL;
-
-}
-
-void Settings::itemClicked(void* data, Evas_Object* /*o*/, void* event_info)
-{
- BROWSER_LOGD("[%s]", __func__);
-
- Settings* settings = reinterpret_cast<Settings*>(data);
- Elm_Object_Item* elmItem = reinterpret_cast<Elm_Object_Item*>(event_info);
- BROWSER_LOGD("[%s:%d] \n\t %x", __PRETTY_FUNCTION__, __LINE__, elmItem);
- if(settings->m_settingsItemsMap.count(elmItem)){
- std::shared_ptr<SettingsItem> settingsItem(settings->m_settingsItemsMap[elmItem]);// elm_object_item_data_get(elmItem)
- if(settingsItem->action->isEnabled()){
- if(settingsItem->action->isCheckable()) {
- settings->showInternalPopup(elmItem);
- } else{
- settingsItem->action->trigger();
- }
- }
- }
-}
-
-void Settings::showInternalPopup(Elm_Object_Item* listItem)
-{
- BROWSER_LOGD("[%s]", __func__);
- m_internalPopupVisible = true;
- m_trackedItem = listItem;
-
- if(!m_internalPopup){
- m_internalPopup = elm_ctxpopup_add(m_window.get());
- evas_object_smart_callback_add(m_internalPopup, "dismissed", Settings::dismissedCtxPopup, this);
- }
- Evas_Object * buttonBox = elm_box_add(m_internalPopup);
- Evas_Object * radioOn = elm_radio_add(m_internalPopup);
- Evas_Object * radioOff = elm_radio_add(m_internalPopup);
-
-
- elm_object_text_set(radioOn, "On");
- elm_object_text_set(radioOff, "Off");
-
- elm_object_style_set(radioOn, "settings_radio");
- elm_object_style_set(radioOff, "settings_radio");
-
- elm_box_pack_end(buttonBox, radioOn);
- elm_box_pack_end(buttonBox, radioOff);
-
- m_checkState = (m_settingsItemsMap[m_trackedItem]->action->isChecked() ? CheckStateOn : CheckStateOff );
-
- elm_radio_state_value_set(radioOn, CheckStateOn);//true
- elm_radio_value_pointer_set(radioOn, reinterpret_cast<int*>(&m_checkState));
-
- elm_radio_state_value_set(radioOff, CheckStateOff);//false
- elm_radio_value_pointer_set(radioOff, reinterpret_cast<int*>(&m_checkState));
-
- elm_radio_group_add(radioOff, radioOn);
-
- evas_object_smart_callback_add(radioOn, "changed", radioChanged, this);
- evas_object_smart_callback_add(radioOff, "changed", radioChanged, this);
-
- evas_object_size_hint_weight_set(buttonBox, EVAS_HINT_EXPAND,EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(buttonBox, EVAS_HINT_FILL, EVAS_HINT_FILL);
-
- evas_object_show(buttonBox);
- evas_object_show(radioOn);
- evas_object_show(radioOff);
-
-
- elm_object_content_set(m_internalPopup, buttonBox);
- elm_ctxpopup_direction_priority_set(m_internalPopup,
- ELM_CTXPOPUP_DIRECTION_DOWN,
- ELM_CTXPOPUP_DIRECTION_DOWN,
- ELM_CTXPOPUP_DIRECTION_DOWN,
- ELM_CTXPOPUP_DIRECTION_DOWN);
- Evas_Coord w,h,x,y;
-
-#if PLATFORM(TIZEN)
- evas_object_geometry_get(elm_object_item_track(m_trackedItem), &x, &y, &w, &h);
-
- BROWSER_LOGD("[%s:%d] \n\tx:%d; y:%d; w:%d; h:%d ", __PRETTY_FUNCTION__, __LINE__,
- x, y, w, h);
- evas_object_move(m_internalPopup, x + 354, y);//354 is proper value
-#endif
-
- elm_object_style_set(m_internalPopup, "settings_button");
- evas_object_show(m_internalPopup);
- if(!m_pointerModeEnabled)
- elm_object_focus_set(radioOn, EINA_TRUE);
- elm_object_item_signal_emit(m_trackedItem, "selected", "SettingsModel");
- elm_object_signal_emit(m_genlist, "show_popup", "SettingsModel");
-}
-
-void Settings::dismissedCtxPopup(void* data, Evas_Object* obj, void* /*event_info*/)
-{
- BROWSER_LOGD("[%s]", __func__);
- Settings* settings = static_cast<Settings*>(data);
- evas_object_hide(obj);
- settings->m_internalPopup = 0;
- elm_object_signal_emit(settings->m_genlist, "hide_popup", "SettingsModel");
- elm_object_item_signal_emit(settings->m_trackedItem, "unselected", "SettingsModel");
-
-#if PLATFORM(TIZEN)
- elm_object_item_untrack(settings->m_trackedItem);
-#endif
- settings->m_internalPopupVisible = false;
-}
-
-void Settings::radioChanged(void* data, Evas_Object* /*obj*/, void* /*event_info*/)
-{
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- Settings *settings = static_cast<Settings*>(data);
- std::shared_ptr<SettingsItem> settingsItem(settings->m_settingsItemsMap[settings->m_trackedItem]);
- settingsItem->action->toggle();
- elm_object_item_signal_emit(settings->m_trackedItem,
- (settingsItem->action->isChecked() ? "switch,on" : "switch,off")
- , "SettingsModel");
- elm_genlist_item_update(settings->m_trackedItem);
- elm_object_signal_emit(settings->m_internalPopup, "elm,state,hide", "elm");
-}
-
-void Settings::focusItem(void* /*data*/, Evas_Object* /*obj*/, void* event_info)
-{
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- Elm_Object_Item *item = reinterpret_cast<Elm_Object_Item*>(event_info);
- elm_object_item_signal_emit( item, "mouse,in", "option*");
-}
-
-void Settings::unFocusItem(void* /*data*/, Evas_Object* /*obj*/, void* event_info)
-{
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- Elm_Object_Item *item = reinterpret_cast<Elm_Object_Item*>(event_info);
- elm_object_item_signal_emit( item, "mouse,out", "option*");
-}
-
-void Settings::setPointerModeEnabled (bool enabled)
-{
- m_pointerModeEnabled = enabled;
-}
-
-bool Settings::canBeDismissed()
-{
- BROWSER_LOGD("[%s]", __func__);
- bool internalPopupVisible = m_internalPopup && m_internalPopupVisible;
- if(internalPopupVisible) {
- elm_ctxpopup_dismiss(m_internalPopup);
- return false;
- }
- return true;
-}
-
-}//namespace base_ui
-
-}//namespace tizen_browser
+++ /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 SETTINGS_H
-#define SETTINGS_H
-#include <Evas.h>
-#include <Elementary.h>
-#include <string>
-#include <list>
-#include <map>
-#include <memory>
-#include <ostream>
-#include <deque>
-
-#include "Action.h"
-#include "MenuButton.h"
-
-namespace tizen_browser
-{
-namespace base_ui
-{
-
-struct SettingsItem{
- std::shared_ptr<Action> action;
- SettingsItem();
- SettingsItem(std::shared_ptr<Action> action);
- SettingsItem(const SettingsItem& source);
- SettingsItem(const SettingsItem* source);
- ~SettingsItem();
-};
-
-
-class Settings: public MenuButton
-{
-public:
- Settings(std::shared_ptr< Evas_Object > mainWindow, Evas_Object* parentButton);
- ~Settings();
- virtual Evas_Object *getContent();
- virtual ListSize calculateSize();
- virtual Evas_Object* getFirstFocus();
- void addAction(sharedAction action);
- void onEnabledChanged(sharedAction action);
- void refreshAction(sharedAction action);
- void setPointerModeEnabled (bool enabled);
-
- virtual bool canBeDismissed();
-private:
- static char *gridTextGet(void *data, Evas_Object* obj, const char *part);
- static Evas_Object *gridOptionLabelGet(void* data, Evas_Object* /*obj*/, const char* part);
- static void itemClicked(void *data, Evas_Object *o, void *event_info);
-
- void showInternalPopup(Elm_Object_Item* parent);
- static void dismissedCtxPopup(void* data, Evas_Object* obj, void* event_info);
- static void radioChanged(void *data, Evas_Object *obj, void *event_info);
-
-private:
- Evas_Object *m_genlist;
- Evas_Object *m_internalPopup;
- Elm_Object_Item *m_trackedItem;
- Elm_Genlist_Item_Class *m_itemClass;
- bool m_internalPopupVisible;
- bool m_pointerModeEnabled;
- std::map<Elm_Object_Item*, std::shared_ptr<SettingsItem>> m_settingsItemsMap;
- std::map<sharedAction, Elm_Object_Item*> m_actionButtonMap;
- enum CheckState{
- CheckStateOn=1
- ,CheckStateOff=2
- };
- CheckState m_checkState;
-
- static void focusItem(void* data, Evas_Object* obj, void* event_info);
- static void unFocusItem(void* data, Evas_Object* obj, void* event_info);
-};
-
-}//namespace base_ui
-
-}//namespace tizen_browser
-
-#endif // SETTINGS_H
+++ /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 "SimpleScroller.h"
-#include "BrowserLogger.h"
-
-namespace tizen_browser{
-namespace base_ui{
-
-SimpleScroller::SimpleScroller(Evas_Object* parent, Evas_Object *content)
-{
- m_scroller = elm_scroller_add(parent);
- elm_scroller_propagate_events_set(m_scroller, EINA_TRUE);
- evas_object_smart_callback_add(m_scroller, "edge,top", _scrollTopReached, m_scroller);
- evas_object_smart_callback_add(m_scroller, "edge,bottom", _scrollBottomReached, m_scroller);
- evas_object_smart_callback_add(m_scroller, "scroll,down", _scrollDown, m_scroller);
- evas_object_smart_callback_add(m_scroller, "scroll,up", _scrollUp, m_scroller);
- elm_object_focus_allow_set(m_scroller, EINA_FALSE);
- elm_scroller_policy_set(m_scroller, ELM_SCROLLER_POLICY_AUTO, ELM_SCROLLER_POLICY_AUTO);
- elm_scroller_content_min_limit(m_scroller, EINA_FALSE, EINA_FALSE);
- elm_object_content_set(m_scroller, content);
- evas_object_show(m_scroller);
-}
-
-Evas_Object* SimpleScroller::getEvasObjectPtr()
-{
- return m_scroller;
-}
-
-void SimpleScroller::_scrollTopReached(void* data, Evas_Object* /*obj*/, void* /*event_info*/)
-{
- BROWSER_LOGD("Top");
- elm_object_signal_emit(reinterpret_cast<Evas_Object*>(data), "hide,top,shadow", "");
-}
-
-void SimpleScroller::_scrollBottomReached(void* data, Evas_Object* /*obj*/, void* /*event_info*/)
-{
- BROWSER_LOGD("Bottom");
- elm_object_signal_emit(reinterpret_cast<Evas_Object*>(data), "hide,bottom,shadow", "");
-}
-
-void SimpleScroller::_scrollDown(void* data, Evas_Object* /*obj*/, void* /*event_info*/)
-{
- BROWSER_LOGD("Down");
- elm_object_signal_emit(reinterpret_cast<Evas_Object*>(data), "show,top,shadow", "");
-}
-
-void SimpleScroller::_scrollUp(void* data, Evas_Object* /*obj*/, void* /*event_info*/)
-{
- BROWSER_LOGD("Up");
- elm_object_signal_emit(reinterpret_cast<Evas_Object*>(data), "show,bottom,shadow", "");
-}
-
-}
-}
+++ /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 SIMPLESCROLLER_H
-#define SIMPLESCROLLER_H
-
-#include "Elementary.h"
-
-namespace tizen_browser{
-namespace base_ui{
-
-class SimpleScroller
-{
-public:
- SimpleScroller(Evas_Object* parent, Evas_Object *content);
- //void setContent(Evas_Object *content);
- Evas_Object* getEvasObjectPtr();
-private:
- Evas_Object *m_scroller;
-
- static void _scrollTopReached(void *data, Evas_Object *obj, void *event_info);
- static void _scrollBottomReached(void *data, Evas_Object *obj, void *event_info);
- static void _scrollDown(void *data, Evas_Object *obj, void *event_info);
- static void _scrollUp(void *data, Evas_Object *obj, void *event_info);
-};
-
-}
-}
-
-#endif // SIMPLESCROLLER_H
#include "BookmarkItem.h"
#include "boost/date_time/gregorian/gregorian.hpp"
#include "boost/date_time/posix_time/posix_time.hpp"
-#include "NetworkErrorHandler.h"
#include "SqlStorage.h"
#include "DetailPopup.h"
, m_mainLayout(nullptr)
, m_progressBar(nullptr)
, m_popup(nullptr)
- , m_settings()
, m_moreMenuUI()
, m_tabUI()
, m_bookmarkManagerUI()
, m_mainUI()
, m_initialised(false)
, m_isHomePageActive(false)
- , m_currentZoom(ZOOM_TYPE_100)
, items_vector()
, m_networkErrorPopup(0)
, m_wvIMEStatus(false)
std::dynamic_pointer_cast
<tizen_browser::base_ui::MainUI,tizen_browser::core::AbstractService>
(tizen_browser::core::ServiceManager::getInstance().getService("org.tizen.browser.mainui"));
-
- m_netErrorHandler =
- std::unique_ptr
- <tizen_browser::basic_ui::NetworkErrorHandler>
- (new tizen_browser::basic_ui::NetworkErrorHandler);
}
void SimpleUI::connectUISignals()
void SimpleUI::loadThemes()
{
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- elm_theme_extension_add(nullptr, edjePath("SimpleUI/ZoomItem.edj").c_str());
- elm_theme_extension_add(nullptr, edjePath("SimpleUI/TabItem.edj").c_str());
elm_theme_extension_add(nullptr, edjePath("SimpleUI/ErrorMessage.edj").c_str());
elm_theme_overlay_add(0, edjePath("SimpleUI/ScrollerDefault.edj").c_str());
bookmarkCheck();
}
-void SimpleUI::showZoomMenu()
-{
- if(!m_zoomList){
- BROWSER_LOGD("[%s:%d] - create ", __PRETTY_FUNCTION__, __LINE__);
- m_zoomList = std::make_shared<ZoomList>(m_window,
- rightButtonBar->getButton("zoom_in_button"));
- m_zoomList->addItem("300%", ZOOM_TYPE_300);
- m_zoomList->addItem("200%", ZOOM_TYPE_200);
- m_zoomList->addItem("150%", ZOOM_TYPE_150);
- m_zoomList->addItem("100%", ZOOM_TYPE_100);
- m_zoomList->addItem("75%", ZOOM_TYPE_75);
- m_zoomList->addItem("50%", ZOOM_TYPE_50);
-
- m_zoomList->zoomChanged.connect(boost::bind(&SimpleUI::zoomLevelChanged, this, _1));
- }
-
- zoom_type currentZoomType;
-
- currentZoomType = static_cast<zoom_type> (m_webEngine->getZoomFactor());
-
- //Handling Initial case
- if(m_webEngine->getZoomFactor() == 0){
- m_webEngine->setZoomFactor(100);
- m_currentZoom = static_cast<zoom_type> (100);
- currentZoomType = ZOOM_TYPE_100;
- }
- //each tab may have another zoom, but there is only one instance of zoomlist
- //so we should refresh value of zoom every time
- m_zoomList->setZoom(currentZoomType);
- BROWSER_LOGD("Current zoom factor from webkit %d%%", m_webEngine->getZoomFactor());
-
- m_platformInputManager->returnPressed.disconnect_all_slots();
- m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_zoomList.get()));
- hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_zoomList.get()));
- m_zoomList->showPopup();
-}
-
-void SimpleUI::zoomLevelChanged(int zoom_level)
-{
- m_webEngine->setZoomFactor(zoom_level);
- m_currentZoom = static_cast<zoom_type> (zoom_level);
-}
-
-void SimpleUI::AddBookmarkPopup(std::string& str)
-{
- BROWSER_LOGD("[%s]", __func__);
- if(!m_bookmarks_manager){
- m_bookmarks_manager = std::make_shared<BookmarksManager>(m_window,
- rightButtonBar->getButton("bookmark_button"));
- m_bookmarks_manager->addAction( m_bookmarks_manager_Add_NewFolder);
- m_bookmarks_manager->addAction( m_bookmarks_manager_BookmarkBar);
- m_bookmarks_manager->addAction( m_bookmarks_manager_Folder1);
- m_bookmarks_manager->addAction( m_bookmarks_manager_Folder2);
- m_bookmarks_manager->addAction( m_bookmarks_manager_Folder3);
- }
- m_platformInputManager->returnPressed.disconnect_all_slots();
- m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_bookmarks_manager.get()));
- hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_bookmarks_manager.get()));
- m_bookmarks_manager->showPopup();
-}
-
-void SimpleUI::AddNewFolderPopup(std::string& str)
-{
- BROWSER_LOGD("[%s]", __func__);
-}
-
void SimpleUI::showTabUI()
{
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
#include "HistoryService.h"
#include "BookmarkManagerUI.h"
#include "SimpleURI.h"
-#include "SimpleScroller.h"
-#include "WebTitleBar.h"
#include "PlatformInputManager.h"
#include "SessionStorage.h"
#include "SqlStorage.h"
#include "Action.h"
#include "SimplePopup.h"
#include "WebConfirmation.h"
-#include "ZoomList.h"
-#include "TabList.h"
#include "BookmarksManager.h"
-#include "Settings.h"
-#include "HistoryList.h"
-#include "NetworkErrorHandler.h"
-#include "CustomPopup.h"
#include "Config.h"
namespace tizen_browser{
*/
void deleteBookmark(void);
- /**
- * \brief shows Zoom showZoomMenu
- */
- void showZoomMenu();
-
- void zoomLevelChanged(int zoom_level);
-
void showHistory();
void hideHistory();
- void AddBookmarkPopup(std::string& str);
- void AddNewFolderPopup(std::string& str);
void addBookmarkFolders();
void newFolderBookmarkManager(const char* title, int by_user);
Evas_Object *m_popup;
Evas_Object *m_entry;
Evas_Object *m_errorLayout;
- CustomPopup *m_ownPopup;
- SimpleScroller *m_scroller;
std::shared_ptr<basic_webengine::AbstractWebEngine<Evas_Object>> m_webEngine;
std::shared_ptr<tizen_browser::base_ui::SimpleURI> m_simpleURI;
std::shared_ptr<ButtonBar> leftButtonBar;
- std::shared_ptr<ButtonBar> webviewbar;
-
std::shared_ptr<ButtonBar> rightButtonBar;
std::shared_ptr<tizen_browser::interfaces::AbstractFavoriteService> m_favoriteService;
std::shared_ptr<tizen_browser::services::HistoryService> m_historyService;
std::shared_ptr<tizen_browser::base_ui::HistoryUI> m_historyUI;
std::shared_ptr<tizen_browser::base_ui::SettingsUI> m_settingsUI;
std::shared_ptr<tizen_browser::base_ui::TabUI> m_tabUI;
- 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::services::PlatformInputManager> m_platformInputManager;
std::shared_ptr<tizen_browser::services::SessionStorage> m_sessionService;
tizen_browser::Session::Session m_currentSession;
std::shared_ptr<BookmarksManager> m_bookmarks_manager;
- std::shared_ptr<Settings> m_settings;
- std::shared_ptr<HistoryList> m_historyList;
- std::shared_ptr<WebTitleBar> webTitleBar;
bool m_initialised;
bool m_isHomePageActive;
- zoom_type m_currentZoom;
int m_tabLimit;
int m_favoritesLimit;
bool m_wvIMEStatus;
Ewk_Context *m_ewkContext;
std::vector<std::shared_ptr<tizen_browser::services::HistoryItem>> items_vector;
- std::unique_ptr<tizen_browser::basic_ui::NetworkErrorHandler> m_netErrorHandler;
SimplePopup* m_networkErrorPopup;
void searchWebPage(std::string &text, int flags);
+++ /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 "TabList.h"
-#include "BrowserAssert.h"
-#include "BrowserLogger.h"
-#include "EflTools.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-namespace tizen_browser
-{
-namespace base_ui
-{
-
-const int TabList::ScrollBorderValue = 8;
-
-TabList::TabList(std::shared_ptr< Evas_Object > parent, Evas_Object* parentButton)
- : MenuButton(parent, parentButton)
- , m_list(NULL)
- , m_box(NULL)
- , m_deleteSelected(false)
-{
- m_box = elm_box_add(m_window.get());
- evas_object_size_hint_align_set(m_box, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(m_box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(m_box);
-
- m_newTabBtn = elm_button_add(m_box);
- elm_object_style_set(m_newTabBtn, "new_tab_elem");
- evas_object_smart_callback_add(m_newTabBtn, "clicked", TabList::_newTab_clicked_cb, (void*)this);
- //evas_object_smart_callback_add(m_newTabBtn, "focused", TabList::newButtonFocused, this);
- //evas_object_smart_callback_add(m_newTabBtn, "unfocused", TabList::newButtonUnFocused, this);
- evas_object_show(m_newTabBtn);
-
- m_list = elm_list_add(m_box);
- evas_object_size_hint_align_set(m_list, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(m_list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_list_mode_set(m_list, ELM_LIST_SCROLL);
- elm_list_multi_select_set(m_list, EINA_FALSE);
- elm_list_select_mode_set(m_list, ELM_OBJECT_SELECT_MODE_ALWAYS);
-
- evas_object_smart_callback_add(m_list, "item,focused", TabList::focusItem, this);
- evas_object_smart_callback_add(m_list, "item,unfocused", TabList::unFocusItem, this);
-
- elm_object_focus_next_object_set(m_newTabBtn, m_list, ELM_FOCUS_DOWN);
-
- elm_object_style_set(m_list, "tab_list");
-
- elm_box_pack_end(m_box, m_newTabBtn);
- elm_box_pack_end(m_box, m_list);
-
- elm_list_go(m_list);
-
- //elm_object_focus_next_object_set(m_newTabBtn, m_list, ELM_FOCUS_DOWN);
-
- evas_object_show(m_list);
-}
-
-void TabList::addItem(std::shared_ptr<tizen_browser::basic_webengine::TabContent> tab)
-{
- tab_data *data = new tab_data();
- data->id = tab->getId();
- data->tab_list = this;
-
- Evas_Object *end = elm_button_add(m_list);
- Evas_Object *icon = elm_button_add(m_list);
-
-
- elm_object_focus_allow_set(end, EINA_TRUE);
- elm_object_focus_allow_set(icon, EINA_TRUE);
-
- elm_object_style_set(end, "invisible_button");
- elm_object_style_set(icon, "invisible_button");
-
- Evas_Object * thumbnail = tizen_browser::tools::EflTools::getEvasImage(tab->getThumbnail(), icon);
- if (thumbnail)
- elm_object_part_content_set(icon, "e.swallow.icon", thumbnail);
- else
- BROWSER_LOGD("[%s] Empty thumbnail added to tabs vector", __func__);
-
- evas_object_smart_callback_add(icon, "clicked", TabList::_item_clicked_cb, (void *)data);
- evas_object_smart_callback_add(end, "clicked", TabList::_deleteTab_clicked_cb, (void *)data);
- Elm_Object_Item *item = elm_list_item_append(m_list, tab->getTitle().c_str(), icon, end, NULL, data);
-
- elm_object_focus_next_object_set(elm_list_item_object_get(item),
- elm_object_item_part_content_get(item, "elm.swallow.end"), ELM_FOCUS_RIGHT);
-
- m_items[tab->getId()] = item;
-
- elm_list_go(m_list);
-}
-
-void TabList::addItems(std::vector<std::shared_ptr<tizen_browser::basic_webengine::TabContent>> items)
-{
- clearItems();
- for (std::vector<std::shared_ptr<tizen_browser::basic_webengine::TabContent> >::iterator it = items.begin(); it != items.end(); ++it) {
- addItem(*it);
- }
-}
-
-void TabList::clearItems()
-{
- m_items.clear();
-
- /*
- * Calling elm_list_clear in this case makes that list cannot receive focus anymore.
- * So deleting item by item is necessary.
- */
- Elm_Object_Item *item;
- while((item = elm_list_first_item_get(m_list)))
- elm_object_item_del(item);
-}
-
-void TabList::replaceItems(std::vector< std::shared_ptr< basic_webengine::TabContent > > items)
-{
- clearItems();
- addItems(items);
-}
-
-int TabList::getItemcCount()
-{
- return m_items.size();
-}
-
-Evas_Object* TabList::getContent()
-{
- return m_box;
-}
-
-MenuButton::ListSize TabList::calculateSize()
-{
- elm_object_focus_allow_set(m_list, m_items.size() ? EINA_TRUE : EINA_FALSE);
-
- ListSize result;
-
- result.width = 390;
-
- result.height = 89 * (getItemcCount()+1) + 8;
-
- int x, y, w, h;
- Evas_Object *focusDown = elm_object_focus_next_object_get(m_newTabBtn, ELM_FOCUS_DOWN);
- evas_object_geometry_get(focusDown, &x, &y, &w, &h);
- BROWSER_LOGD("%d %d %d %d\n", x, y, w, h);
-
- const int listMaxHeight = atoi(edje_file_data_get((std::string(EDJE_DIR) + "SimpleUI/TabItem.edj").c_str(),"list_max_height"));
- if (result.height > listMaxHeight)
- result.height = listMaxHeight;
-
- return result;
-}
-
-void TabList::_item_clicked_cb(void* data, Evas_Object */*obj*/, void */*event_info*/)
-{
- tab_data *tab = static_cast<tab_data*>(data);
- tab->tab_list->tabClicked(tab->id);
- tab->tab_list->hidePopup();
-}
-
-void TabList::_newTab_clicked_cb(void* data, Evas_Object */*obj*/, void */*event_info*/)
-{
- TabList *self = reinterpret_cast<TabList*>(data);
- self->newTabClicked();
- self->hidePopup();
-}
-
-void TabList::_deleteTab_clicked_cb(void* data, Evas_Object */*obj*/, void */*event_info*/)
-{
- tab_data *tab = static_cast<tab_data*>(data);
- tab->tab_list->tabDelete(tab->id);
- tab->tab_list->hidePopup();
-}
-
-void TabList::setCurrentTabId(tizen_browser::basic_webengine::TabId currentTabId)
-{
- m_currentTabId = currentTabId;
-}
-
-void TabList::disableNewTabBtn(bool disabled)
-{
- elm_object_disabled_set(m_newTabBtn, disabled);
-}
-
-void TabList::onPopupShow()
-{
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-
- if(m_items.find(m_currentTabId) != m_items.end())
- elm_object_item_signal_emit(m_items[m_currentTabId], "highlight,selected", "");
-}
-
-Evas_Object* TabList::getFirstFocus()
-{
- BROWSER_LOGD("[%s:%d] m_newTabBtn: %x ", __PRETTY_FUNCTION__, __LINE__, m_newTabBtn);
- return m_newTabBtn;
-}
-
-void TabList::focusItem(void* data, Evas_Object* /*obj*/, void* event_info)
-{
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- TabList *self = reinterpret_cast<TabList*>(data);
- Elm_Object_Item *item = reinterpret_cast<Elm_Object_Item*>(event_info);
- BROWSER_LOGD("[%s:%d] Item: %s ", __PRETTY_FUNCTION__, __LINE__, elm_object_item_part_text_get(item,"elm.text"));
- //elm_object_signal_emit(elm_object_item_ item, "mouse,in", "elm.swallow.icon");
- elm_object_item_signal_emit( item, "mouse,in", "elm.swallow.icon");
- //elm.swallow.end
- //Evas_Object* delIcon = elm_object_part_content_get(item, "elm.swallow.end");
- self->m_lastFocusedItem = item;
-}
-
-void TabList::unFocusItem(void* data, Evas_Object* /*obj*/, void* event_info)
-{
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- TabList *self = reinterpret_cast<TabList*>(data);
- Elm_Object_Item *item = reinterpret_cast<Elm_Object_Item*>(event_info);
- BROWSER_LOGD("[%s:%d] Item: %s ", __PRETTY_FUNCTION__, __LINE__, elm_object_item_part_text_get(item,"elm.text"));
- //elm_object_signal_emit(elm_object_item_ item, "mouse,in", "elm.swallow.icon");
- elm_object_item_signal_emit(item, "mouse,out", "elm.swallow.end");
- elm_object_item_signal_emit(item, "mouse,out", "elm.swallow.icon");
-
- self->m_deleteSelected = false;
-}
-
-void TabList::newButtonFocused(void* /*data*/, Evas_Object* /*obj*/, void* /*event_info*/)
-{
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-}
-
-void TabList::newButtonUnFocused(void* data, Evas_Object* /*obj*/, void* /*event_info*/)
-{
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- TabList *self = reinterpret_cast<TabList*>(data);
- //EFL BUG workaround: it looks like button do not get "unfocus" signal each time.
- elm_object_signal_emit(self->m_newTabBtn, "elm,action,unfocus","elm");
-}
-
-void TabList::rightPressed()
-{
- if(m_lastFocusedItem && elm_object_focus_get(elm_object_item_widget_get(m_lastFocusedItem))) {
- elm_object_item_signal_emit(m_lastFocusedItem, "mouse,out", "elm.swallow.icon");
- elm_object_item_signal_emit(m_lastFocusedItem, "mouse,in", "elm.swallow.end");
- m_deleteSelected = true;
- }
-}
-
-void TabList::leftPressed()
-{
- if(m_lastFocusedItem && elm_object_focus_get(elm_object_item_widget_get(m_lastFocusedItem))) {
- elm_object_item_signal_emit(m_lastFocusedItem, "mouse,out", "elm.swallow.end");
- elm_object_item_signal_emit(m_lastFocusedItem, "mouse,in", "elm.swallow.icon");
- m_deleteSelected = false;
- }
-}
-
-void TabList::enterPressed()
-{
- if(m_lastFocusedItem && elm_object_focus_get(elm_object_item_widget_get(m_lastFocusedItem))) {
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
-
- tab_data *td = static_cast<tab_data*>(elm_object_item_data_get(m_lastFocusedItem));
- M_ASSERT(td);
-
- if(m_deleteSelected) {
- tabDelete(td->id);
- }
- else {
- tabClicked(td->id);
- }
- hidePopup();
- }
-}
-
-}
-
-}
+++ /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 TABLIST_H
-#define TABLIST_H
-
-#include <boost/signals2/signal.hpp>
-#include <Elementary.h>
-
-#include "TabId.h"
-#include "SimpleScroller.h"
-
-#include "MenuButton.h"
-
-namespace tizen_browser
-{
-namespace base_ui
-{
-
-class TabList:public MenuButton{
-
-public:
- TabList(std::shared_ptr<Evas_Object> parent, Evas_Object* parentButton);
- void addItem(std::shared_ptr<tizen_browser::basic_webengine::TabContent>);
- void addItems(std::vector<std::shared_ptr<tizen_browser::basic_webengine::TabContent>>);
- void clearItems();
- void replaceItems(std::vector< std::shared_ptr< tizen_browser::basic_webengine::TabContent > > items);
- virtual Evas_Object *getContent();
- virtual ListSize calculateSize();
- virtual Evas_Object* getFirstFocus();
- boost::signals2::signal<void ()> newTabClicked;
- boost::signals2::signal<void (tizen_browser::basic_webengine::TabId)> tabClicked;
- boost::signals2::signal<void (tizen_browser::basic_webengine::TabId)> tabDelete;
- int getItemcCount();
- void setCurrentTabId(tizen_browser::basic_webengine::TabId currentTabId);
- void disableNewTabBtn(bool disabled);
- void onPopupShow();
-
- void rightPressed();
- void leftPressed();
- void enterPressed();
-private:
- std::map<tizen_browser::basic_webengine::TabId, Elm_Object_Item*> m_items;
- tizen_browser::basic_webengine::TabId m_currentTabId;
- Evas_Object *m_list, *m_box, *m_newTabBtn;
- static void _item_clicked_cb(void* data, Evas_Object *obj, void *event_info);
- static void _newTab_clicked_cb(void* data, Evas_Object *obj, void *event_info);
- static void _deleteTab_clicked_cb(void* data, Evas_Object *obj, void *event_info);
- static void focusItem(void* data, Evas_Object* obj, void *event_info);
- static void unFocusItem(void* data, Evas_Object* obj, void *event_info);
- static void newButtonFocused(void* data, Evas_Object* obj, void *event_info);
- static void newButtonUnFocused(void* data, Evas_Object* obj, void *event_info);
- struct tab_data{
- tizen_browser::basic_webengine::TabId id;
- TabList *tab_list;
- };
-
- Elm_Object_Item *m_lastFocusedItem;
- bool m_deleteSelected;
-
- /**
- * Above this size tablist is scrolled.
- */
- static const int ScrollBorderValue;
-};
-
-}
-
-}
-
-#endif //TABLIST_H
+++ /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 <Elementary.h>
-#include "BrowserLogger.h"
-#include "EflTools.h"
-
-#include "WebTitleBar.h"
-
-// show bar by this time (seconds) - due to IA Guidline
-#define DELAY_TIME 4.0
-
-namespace tizen_browser
-{
-namespace base_ui
-{
-
-WebTitleBar::WebTitleBar(Evas_Object *parent, const std::string &edjFile, const std::string &groupName) :
- m_timer(NULL)
-{
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- std::string edjFilePath = EDJE_DIR;
- edjFilePath.append(edjFile);
- elm_theme_extension_add(NULL, edjFilePath.c_str());
- m_layout = elm_layout_add(parent);
- Eina_Bool layoutSetResult = elm_layout_file_set(m_layout, edjFilePath.c_str(), groupName.c_str());
- if(!layoutSetResult)
- BROWSER_LOGE("[%s:%d]: Layout file not found: ", __func__, __LINE__, edjFilePath.c_str());
- evas_object_size_hint_weight_set(m_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(m_layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
-}
-
-WebTitleBar::~WebTitleBar()
-{
- if(m_timer)
- ecore_timer_del(m_timer);
-}
-
-void WebTitleBar::setFavIcon(std::shared_ptr<tizen_browser::tools::BrowserImage> favicon)
-{
- BROWSER_LOGD("[%s:%d] faviconType:%d ", __PRETTY_FUNCTION__, __LINE__, favicon->imageType);
- if(favicon->imageType != tools::BrowserImage::ImageTypeNoImage){
- m_icon = tizen_browser::tools::EflTools::getEvasImage(favicon, m_layout);
- if(m_icon){
- evas_object_image_fill_set(m_icon, 0, 0, 37, 37);
- evas_object_resize(m_icon, 37, 37);
- elm_object_part_content_set(m_layout, "favicon", m_icon);
- evas_object_show(m_icon);
- } else {
- removeFavIcon();
- }
- } else {
- removeFavIcon();
- }
-}
-
-void WebTitleBar::removeFavIcon()
-{
- Evas_Object * favicon = elm_object_part_content_unset(m_layout, "favicon");
- evas_object_hide(favicon);
- if (favicon) {
- evas_object_del(favicon);
- }
-}
-
-
-void WebTitleBar::show(const std::string & title)
-{
- setTitle(title);
-
- if(m_timer)
- ecore_timer_del(m_timer);
-
- m_timer = ecore_timer_add(0.7, show_cb, this);
-}
-
-Eina_Bool WebTitleBar::show_cb(void * data)
-{
- WebTitleBar * self = static_cast<WebTitleBar *> (data);
- if(self->m_timer)
- ecore_timer_del(self->m_timer);
- self->m_timer = ecore_timer_add(DELAY_TIME, hide_cb, self);
- elm_object_signal_emit(self->m_layout, "show_webtitle_bar", "web");
- return ECORE_CALLBACK_CANCEL;
-}
-
-void WebTitleBar::setTitle(const std::string & title)
-{
- BROWSER_LOGD("Changing title on WebTitle bar to: %s", title.c_str());
- elm_object_part_text_set(m_layout, "text", title.c_str());
-}
-
-void WebTitleBar::hide()
-{
- hide_cb(this);
-}
-
-Eina_Bool WebTitleBar::hide_cb(void * data)
-{
- WebTitleBar * self = static_cast<WebTitleBar *> (data);
- elm_object_signal_emit(self->m_layout, "hide_webtitle_bar", "web");
- if(self->m_timer)
- ecore_timer_del(self->m_timer);
- self->m_timer = NULL;
- return ECORE_CALLBACK_CANCEL;
-}
-
-} /* end of base_ui */
-} /* end of tizen_browser */
+++ /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 WEBTITLEBAR_H
-#define WEBTITLEBAR_H
-
-#include <Evas.h>
-
-namespace tizen_browser
-{
-namespace base_ui
-{
-
-class WebTitleBar
-{
-public:
- WebTitleBar(Evas_Object * parent, const std::string &edjFile, const std::string &groupName);
- ~WebTitleBar();
-
- /**
- * @brief Return layout of the Web Title bar
- */
- Evas_Object * getContent() { return m_layout; };
-
- /**
- * @brief Show Web Title bar
- *
- * @param url title of webpage
- */
- void show(const std::string & title);
-
- /**
- * @brief Set favicon on Web tittle bar
- *
- * @param favicon Favicon image
- */
- void setFavIcon(std::shared_ptr<tizen_browser::tools::BrowserImage> favicon);
-
- /**
- * @brief remove favicon properly, and update view
- *
- */
- void removeFavIcon();
-
- /**
- * @brief Hide Web tittle bar
- */
- void hide();
-
-private:
- void setTitle(const std::string & title);
- static Eina_Bool show_cb(void * data);
- static Eina_Bool hide_cb(void * data);
- Evas_Object * m_layout;
- Evas_Object * m_icon;
- Ecore_Timer * m_timer;
-
-};
-
-} /* end of base_ui */
-} /* end of tizen_browser */
-
-#endif // WEBTITLEBAR_H
+++ /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 "ZoomList.h"
-#include "BrowserAssert.h"
-#include "BrowserLogger.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-namespace tizen_browser
-{
-namespace base_ui
-{
-
-
-ZoomList::ZoomList(std::shared_ptr< Evas_Object > mainWindow, Evas_Object* parentButton)
- : MenuButton(mainWindow, parentButton)
- , m_trackFirst(0)
- , m_items(0)
-{
- BROWSER_LOGD("[%s:%d] this: %x", __PRETTY_FUNCTION__, __LINE__, this);
- m_list = elm_list_add(m_window.get());
-
- evas_object_smart_callback_add(m_list, "item,focused", focusItem, this);
- evas_object_smart_callback_add(m_list, "item,unfocused", unFocusItem, this);
- evas_object_smart_callback_add(m_list, "activated", _item_clicked_cb, this);
-
- elm_object_style_set(m_list, "zoom_list");
- elm_list_mode_set(m_list, ELM_LIST_EXPAND);
- evas_object_size_hint_align_set(m_list, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(m_list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_list_go(m_list);
- evas_object_show(m_list);
-}
-
-ZoomList::~ZoomList()
-{
-}
-
-
-void ZoomList::addItem(const char* text, zoom_type value)
-{
- zoom_data *data = new zoom_data();
- data->value = value;
- data->zoom_list = this;
-
- elm_list_item_append(m_list, text, NULL, NULL, ZoomList::_item_clicked_cb, (void *)data);
- elm_list_go(m_list);
-
- m_items++;
-}
-
-void ZoomList::setZoom(zoom_type value)
-{
- Elm_Object_Item * item = elm_list_first_item_get(m_list);
- while (item != NULL)
- {
- zoom_type *elem_zoom = (zoom_type*)elm_object_item_data_get(item);
- edje_object_signal_emit(elm_list_item_object_get(item), "unchecked", "");
- if (*elem_zoom == value)
- {
- edje_object_signal_emit(elm_list_item_object_get(item), "default_checked", "");
- current_zoom = value;
- }
- item = elm_list_item_next(item);
- }
-}
-
-Evas_Object* ZoomList::getContent()
-{
- evas_object_resize(m_list, 390, 0);
- return m_list;
-}
-
-MenuButton::ListSize ZoomList::calculateSize()
-{
- ListSize result;
-
- result.width = 390;
- result.height = 590;
-
- return result;
-}
-
-void ZoomList::_item_clicked_cb(void* /*data*/, Evas_Object */*obj*/, void *event_info)
-{
- Elm_Object_Item *item = static_cast<Elm_Object_Item *>(event_info);
- zoom_data *zoom = static_cast<zoom_data*>(elm_object_item_data_get(item));
- M_ASSERT(zoom);
- if (zoom->value != zoom->zoom_list->current_zoom)
- {
- zoom->zoom_list->zoomChanged(zoom->value);
- edje_object_signal_emit(elm_list_item_object_get(item), "checked", "");
- item = elm_list_first_item_get(zoom->zoom_list->m_list);
- while (item != NULL)
- {
- zoom_type *elem_zoom = (zoom_type*)elm_object_item_data_get(item);
- if (*elem_zoom == zoom->zoom_list->current_zoom)
- {
- edje_object_signal_emit(elm_list_item_object_get(item), "unchecked", "");
- zoom->zoom_list->current_zoom = zoom->value;
- break;
- }
- item = elm_list_item_next(item);
- }
- }
- zoom->zoom_list->hidePopup();
-}
-
-Evas_Object* ZoomList::getFirstFocus()
-{
- return m_list;
-}
-
-void ZoomList::focusItem(void* /*data*/, Evas_Object* /*obj*/, void* event_info)
-{
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- Elm_Object_Item *item = reinterpret_cast<Elm_Object_Item*>(event_info);
- elm_object_item_signal_emit( item, "mouse,in", "over2");
-}
-
-void ZoomList::unFocusItem(void* /*data*/, Evas_Object* /*obj*/, void* event_info)
-{
- BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- Elm_Object_Item *item = reinterpret_cast<Elm_Object_Item*>(event_info);
- elm_object_item_signal_emit( item, "mouse,out", "over2");
-}
-
-}
-
-}
+++ /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 ZOOMLIST_H
-#define ZOOMLIST_H
-
-#include <boost/signals2/signal.hpp>
-#include <Elementary.h>
-#include <map>
-#include "MenuButton.h"
-
-namespace tizen_browser
-{
-namespace base_ui
-{
-
-typedef enum {
- ZOOM_TYPE_50 = 50,
- ZOOM_TYPE_75 = 75,
- ZOOM_TYPE_100 = 100,
- ZOOM_TYPE_150 = 150,
- ZOOM_TYPE_200 = 200,
- ZOOM_TYPE_300 = 300,
-} zoom_type;
-
-
-class ZoomList:public MenuButton{
-
-public:
- ZoomList(std::shared_ptr< Evas_Object > mainWindow, Evas_Object* parentButton);
- ~ZoomList();
- void addItem(const char* text, zoom_type value);
- void setZoom(zoom_type value);
- virtual Evas_Object *getContent();
- virtual ListSize calculateSize();
- boost::signals2::signal<void (int)> zoomChanged;
-
- virtual Evas_Object* getFirstFocus();
-
-private:
- Evas_Object *m_list;
- Evas_Object *m_trackFirst;
- zoom_type current_zoom;
- int m_items;
- static void _item_clicked_cb(void* data, Evas_Object *obj, void *event_info);
- struct zoom_data{
- zoom_type value;
- ZoomList *zoom_list;
- };
-
- static void focusItem(void* data, Evas_Object* obj, void* event_info);
- static void unFocusItem(void* data, Evas_Object* obj, void* event_info);
-};
-
-}
-
-}
-
-#endif //ZOOMLIST_H
+++ /dev/null
-collections {
- group {
- name: "entry_popup";
- parts {
- part {
- name: "label";
- type : TEXT;
- scale:1;
- description {
- state: "default" 0.0;
- visible: 1;
- //align: 0.0 0.0;
- rel1 { relative: 0.0 0.0;}
- rel2 { relative: 1.0 1.0;}
- min: 200 60;
- max: 200 60;
- text {
- text: "Label";
- min: 0 1;
- max: 1 1;
- size: 20;
- }
- }
- }
- part {
- name: "entry";
- type : SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- visible: 1;
- align: 0.0 0.0;
- min: 200 60;
- max: 200 60;
- rel1 { relative: 0.0 1.0; to: "label"; }
- rel2 { relative: 1.0 1.0; }
- }
- description {
- state: "hidden" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
- description {
- state: "visible" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- }
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-#define DEBUG_RECT_OVER(over_part, r, g, b) \
- part { name: __CONCAT("dbg_rect_at_", __stringify(__LINE__)); \
- \
-scale:1; \
- type : RECT; \
- repeat_events: 1; \
- description { \
- state: "default" 0.0; \
- visible: 1; \
- color: r g b 128; \
- rel1 { to: over_part; relative: 0 0; } \
- rel2 { to: over_part; relative: 1 1; } \
- } \
- }
-#define SPACER_ITEM_BR(spacer_name, W, H, elem) \
- part { name: spacer_name; \
- type: RECT; \
- scale:1; \
- description { \
- state: "default" 0.0; \
- visible: 1; \
- align: 0 1; \
- min: W H; \
- max: W H; \
- fixed: 1 1; \
- color: 255 255 255 10; \
- rel1 { relative: 0.0 1.0; to: elem;} \
- rel2 { relative: 1.0 1.0; to: elem;} \
- } \
- }
-#define WIDTH 436
-#define HEIGHT 136
-#define ITEM_WIDTH 374
-#define PARENT_ITEM_HEIGHT 36
-data { item: "item_width" ITEM_WIDTH; item: "item_height" HEIGHT; item: "parent_item_height" PARENT_ITEM_HEIGHT;}
-collections {
- group{
- name: "history";
- min: WIDTH 0;
- max: WIDTH 868;
- parts{
- part { name: "clipper";
- type: RECT;
- mouse_events: 0;
- description { state: "default" 0.0;
- rel1 {
- relative: 0 0;
- }
- rel2{
- relative: 1 1;
- }
- }
- }
- part{
- name: "background";
- type: RECT;
- description{
- state: "default" 0.0;
- color: 0 0 0 0;
- rel1{
- relative: 0 0;
- }
- rel2{
- relative: 1 1;
- }
- }
- }
- part{
- name: "elm.swallow.content";
- type: SWALLOW;
- clip_to: "clipper";
- mouse_events: 1;
- description{
- state: "default" 0.0;
- align: 0.0 0.0;
- fixed: 1 1;
- rel1{
- relative: 0 0;
- }
- rel2{
- relative: 1 1;
- }
- }
- }
- part{
- name: "elm.swallow.empty";
- type: SWALLOW;
- description{
- state: "default" 0.0;
- fixed: 1 1;
- rel1{
- relative: 0 0;
- }
- rel2{
- relative: 0 0;
- }
- }
- }
- }//parts
- }//group
- group {
- name: "elm/genlist/item/history_item/default";
- alias: "elm/genlist/item_odd/history_item/default";
- alias: "elm/genlist/item_compress/history_item/default";
- alias: "elm/genlist/item_compress_odd/history_item/default";
- min: WIDTH HEIGHT;
- max: WIDTH HEIGHT;
- images {
- image: "ico_delete.png" COMP;
- image: "thumbnail.png" COMP;
- }
- data.item: "texts" "page_title page_url page_time";
- data.item: "contents" "favicon content_click del_click";
- color_classes{
- color_class{
- name: "defaultBgColor";
- color: 18 22 34 255;
- }
- color_class{
- name: "focusBgColor";
- color: 69 143 255 255;
- }
- color_class{
- name: "highlightBgColor";
- color: 69 143 255 102;
- }
- color_class{
- name: "imageHighlight";
- color: 255 255 255 102;
- }
- color_class{
- name: "focusDelBgColor";
- color: 96 114 146 255;
- }
- color_class{
- name: "defaultTextColor";
- color: 211 211 211 255;
- }
- color_class{
- name: "focusTextColor";
- color: 255 255 255 255;
- }
- color_class{
- name: "highlightTextColor";
- color: 255 255 255 51;
- }
- color_class{
- name: "dateTextColor";
- color: 211 211 211 204;
- }
- color_class{
- name: "transparent";
- color: 0 0 0 0;
- }
- }
- parts {
- part {
- name: "bg_clipper";
- scale:1;
- mouse_events: 1;
- type: SWALLOW;
- description {
- state: "default" 0.0;
- color: 0 0 0 0;
- align: 0 0;
- min: WIDTH HEIGHT;
- max: WIDTH HEIGHT;
- }
- }
- part {
- name: "item_bg";
- type: RECT;
- scale: 1;
- description { state: "default" 0.0;
- visible: 1;
- fixed: 1 1;
- min: ITEM_WIDTH HEIGHT;
- max: ITEM_WIDTH HEIGHT;
- align: 0 1;
- rel1 { relative: 0.0 0.0;to: "bg_clipper";}
- rel2 { relative: 1.0 1.0;to: "bg_clipper";}
- color_class: defaultBgColor;
- }
- description { state: "focus" 0.0;
- inherit: "default" 0.0;
- color_class: focusBgColor;
- }
- }
- SPACER_ITEM_BR("horizontal_line", ITEM_WIDTH, 2, "bg_clipper")
- part {
- name: "favicon_bg";
- type: RECT;
- scale: 1;
- description { state: "default" 0.0;
- visible: 1;
- fixed: 1 0;
- min: 37 37;
- max: 37 37;
- align: 0.0 0.0;
- rel1 { relative: 0.0 0.0; to: "item_bg"; offset: 25 25;}
- rel2 { relative: 1.0 1.0; to: "item_bg";}
- color_class: transparent;
- }
- description { state: "highlight" 0.0;
- inherit: "default" 0.0;
- color_class: imageHighlight;
- }
- description { state: "focus" 0.0;
- inherit: "default" 0.0;
- color_class: focusTextColor;
- }
- }
- part {
- name: "favicon";
- type: SWALLOW;
- scale: 1;
- description { state: "default" 0.0;
- visible: 1;
- fixed: 1 1;
- min: 37 37;
- max: 37 37;
- align: 0.0 0.0;
- rel1 { relative: 0.0 0.0; to: "favicon_bg";}
- rel2 { relative: 1.0 1.0; to: "favicon_bg";}
- }
- description { state: "highlight" 0.0;
- inherit: "default" 0.0;
- color_class: imageHighlight;
- }
- description { state: "focus" 0.0;
- inherit: "default" 0.0;
- color_class: focusTextColor;
- }
- }
- part {
- name: "page_title";
- scale: 1;
- type: TEXT;
- description {
- state: "default" 0.0;
- visible: 1;
- fixed: 1 1;
- min: 275 40;
- max: 275 40;
- align: 0 0;
- rel1 { relative: 0.0 0.0; to: item_bg; offset:74 20;}
- rel2 { relative: 1.0 1.0; to: item_bg;}
- color_class: defaultTextColor;
- text {
- text: "Web page title";
- font: "font_name";
- size: 30;
- align: 0 1;
- }
- }
- description { state: "focus" 0.0;
- inherit: "default" 0.0;
- color_class: focusTextColor;
- }
- description { state: "highlight" 0.0;
- inherit: "default" 0.0;
- color_class: highlightTextColor;
- }
- }
- part {
- name: "page_url";
- scale: 1;
- type: TEXT;
- description {
- state: "default" 0.0;
- visible: 1;
- fixed: 1 1;
- min: 275 22;
- max: 275 22;
- align: 1 0;
- rel1 { relative: 0.0 1.0; to: "page_title";}
- rel2 { relative: 1.0 1.0; to: "page_title";}
- color_class: defaultTextColor;
- text {
- text: "http:/onet.pl";
- font: "font_name";
- size: 22;
- align: 0 0.5;
- }
- }
- description { state: "focus" 0.0;
- inherit: "default" 0.0;
- color_class: focusTextColor;
- }
- description { state: "highlight" 0.0;
- inherit: "default" 0.0;
- color_class: highlightTextColor;
- }
- }
- part {
- name: "page_time";
- scale: 1;
- type: TEXT;
- description {
- state: "default" 0.0;
- visible: 1;
- fixed: 1 1;
- min: 275 22;
- max: 275 22;
- align: 1 0;
- rel1 { relative: 0.0 1.0; to: "page_url";}
- rel2 { relative: 1.0 1.0; to: "page_url";}
- color_class: defaultTextColor;
- text {
- text: "10:25 AM";
- font: "font_name";
- size: 22;
- align: 0 0.5;
- }
- }
- description { state: "focus" 0.0;
- inherit: "default" 0.0;
- color_class: focusTextColor;
- }
- description { state: "highlight" 0.0;
- inherit: "default" 0.0;
- color_class: highlightTextColor;
- }
- }
- part {
- name: "del_bg";
- scale:1;
- mouse_events: 1;
- type: RECT;
- description {
- state: "default" 0.0;
- visible: 1;
- fixed: 1 1;
- align: 0 0;
- min: 54 HEIGHT;
- max: 54 HEIGHT;
- rel1 { relative: 1.0 0.0; to: "item_bg";}
- rel2 { relative: 1.0 1.0;to: "bg_clipper";}
- color_class: transparent;
- }
- description {
- state: "highlight" 0.0;
- inherit: "default" 0.0;
- color_class: focusBgColor;
- visible: 1;
- }
- description {
- state: "focus" 0.0;
- inherit: "default" 0.0;
- color_class: focusDelBgColor;
- visible: 1;
- }
- }
- part {
- name: "del_icon";
- type: IMAGE;
- scale: 1;
- description { state: "default" 0.0;
- visible: 0;
- fixed: 1 1;
- align: 0.5 0.5;
- min: 40 40;
- max: 40 40;
- rel1 { relative: 0.0 0.0; to: "del_bg";}
- rel2 { relative: 1.0 1.0; to: "del_bg";}
- image.normal: "ico_delete.png";
- }
- description { state: "highlight" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- description { state: "focus" 0.0;
- inherit: "highlight" 0.0;
- }
- }
- part {
- name: "over";
- scale:1;
- type: RECT;
- description {
- state: "default" 0.0;
- visible: 1;
- align: 0 0;
- fixed: 1 1;
- min: ITEM_WIDTH HEIGHT;
- max: ITEM_WIDTH HEIGHT;
- rel1 { relative: 0.0 0.0; to: "item_bg";}
- rel2 { relative: 1.0 1.0; to: "item_bg";}
- color_class: transparent;
- }
- description {
- state: "highlight" 0.0;
- inherit: "default" 0 0;
- color_class: highlightBgColor;
- visible: 1;
- }
- }
- part {
- name: "content_click";
- scale:1;
- type: SWALLOW;
- description {
- state: "default" 0.0;
- visible: 1;
- align: 0 0;
- fixed: 1 1;
- min: ITEM_WIDTH HEIGHT;
- max: ITEM_WIDTH HEIGHT;
- rel1 { relative: 0.0 0.0; to: "over";}
- rel2 { relative: 1.0 1.0; to: "over";}
- color_class: transparent;
- }
- }
- part {
- name: "del_over";
- scale:1;
- type: RECT;
- description {
- state: "default" 0.0;
- visible: 1;
- align: 0 0;
- fixed: 1 1;
- min: 54 HEIGHT;
- max: 54 HEIGHT;
- rel1 { relative: 0.0 0.0; to: "del_bg";}
- rel2 { relative: 1.0 1.0; to: "del_bg";}
- color_class: transparent;
- }
- }
- part {
- name: "del_click";
- scale:1;
- type: SWALLOW;
- description {
- state: "default" 0.0;
- visible: 1;
- align: 0 0;
- fixed: 1 1;
- min: 54 HEIGHT;
- max: 54 HEIGHT;
- rel1 { relative: 0.0 0.0; to: "del_over";}
- rel2 { relative: 1.0 1.0; to: "del_over";}
- color_class: transparent;
- }
- }
- }
- programs{
- program {
- name: "mouse_in_content_click";
- signal: "mouse,in";
- source: "content_click";
- script {
- emit("mouse_in_content_click", "");
- }
- }
- program {
- name: "mouse_out_content_click";
- signal: "mouse,out";
- source: "content_click";
- script {
- emit("mouse_out_content_click", "");
- }
- }
- program {
- name: "mouse_in_content";
- signal: "mouse_in_content_click";
- source: "";
- action: STATE_SET "focus" 0.0;
- target: "item_bg";
- target: "favicon";
- target: "page_title";
- target: "page_url";
- target: "page_time";
- target: "del_bg";
- target: "del_icon";
- }
- program {
- name: "mouse_out_content";
- signal: "mouse_out_content_click";
- source: "";
- action: STATE_SET "default" 0.0;
- target: "item_bg";
- target: "favicon";
- target: "page_title";
- target: "page_url";
- target: "page_time";
- target: "del_bg";
- target: "del_icon";
- }
- program {
- name: "mouse_in_del_click";
- signal: "mouse,in";
- source: "del_click";
- script {
- emit("mouse_in_del_click", "");
- }
- }
- program {
- name: "mouse_out_del_click";
- signal: "mouse,out";
- source: "del_click";
- script {
- emit("mouse_out_del_click", "");
- }
- }
- program {
- name: "mouse_in_del";
- signal: "mouse_in_del_click";
- source: "";
- action: STATE_SET "highlight" 0.0;
- target: "item_bg";
- target: "favicon";
- target: "page_title";
- target: "page_url";
- target: "page_time";
- target: "del_bg";
- target: "del_icon";
- target: "over";
- }
- program {
- name: "mouse_out_del";
- signal: "mouse_out_del_click";
- source: "";
- action: STATE_SET "default" 0.0;
- target: "item_bg";
- target: "favicon";
- target: "page_title";
- target: "page_url";
- target: "page_time";
- target: "del_bg";
- target: "del_icon";
- target: "over";
- }
- }
- }
-
-
- group {
- name: "elm/genlist/item/history_item_no_favicon/default";
- alias: "elm/genlist/item_odd/history_item_no_favicon/default";
- alias: "elm/genlist/item_compress/history_item_no_favicon/default";
- alias: "elm/genlist/item_compress_odd/history_item_no_favicon/default";
- inherit: "elm/genlist/item/history_item/default";
- images {
- image: "ico_page_37.png" COMP;
- }
- parts {
- part {
- name: "no_favicon";
- type: IMAGE;
- scale: 1;
- description { state: "default" 0.0;
- visible: 1;
- fixed: 1 1;
- min: 37 37;
- max: 37 37;
- align: 0.0 0.0;
- rel1 { relative: 0.0 0.0; to: "favicon_bg";}
- rel2 { relative: 1.0 1.0; to: "favicon_bg";}
- image.normal: "ico_page_37.png";
- }
- }
- }
- }
-
- /* ----------------------------------------------------------------- */
- group {
- name: "elm/genlist/item/history_parent_item/default";
- data.item: "texts" "date_text";
- min: WIDTH PARENT_ITEM_HEIGHT;
- max: WIDTH PARENT_ITEM_HEIGHT;
- parts {
- part {
- name: "bg_clipper";
- scale:1;
- type: RECT;
- description {
- state: "default" 0.0;
- visible: 0;
- align: 0 0;
- color: 0 0 0 0;
- min: WIDTH PARENT_ITEM_HEIGHT;
- max: WIDTH PARENT_ITEM_HEIGHT;
- }
- }
- part {
- name: "text_bg";
- scale:1;
- type: RECT;
- description {
- state: "default" 0.0;
- visible: 1;
- align: 0 0;
- color: 18 22 34 245;
- min: ITEM_WIDTH PARENT_ITEM_HEIGHT;
- max: ITEM_WIDTH PARENT_ITEM_HEIGHT;
- }
- }
- part {
- name: "date_text";
- type: TEXT;
- scale: 1;
- description { state: "default" 0.0;
- visible: 1;
- min: 324 PARENT_ITEM_HEIGHT;
- max: 324 PARENT_ITEM_HEIGHT;
- fixed: 1 1;
- align: 0 0;
- color_class: dateTextColor;
- rel1 { relative: 0.0 0.0; to: "text_bg"; offset: 25 0;}
- rel2 { relative: 1.0 1.0; to: "text_bg";}
- text {
- text: "March. 19. 2014";
- font: "font_name";
- size: 22;
- align: 0 0.5;
- }
- }
- }
- }
- }
- /* ----------------------------------------------------------------- */
- group{
- name: "elm/button/base/invisible_button";
- parts{
- part{
- name: "button";
- type: RECT;
- scale: 1;
- description { state: "default" 0.0;
- visible: 1;
- fixed: 1 1;
- color: 0 0 0 0;
- }
- }
- part{
- name: "over";
- type: RECT;
- scale: 1;
- description { state: "default" 0.0;
- visible: 1;
- fixed: 1 1;
- rel1 { relative: 0.0 0.0;to: "button";}
- rel2 { relative: 1.0 1.0;to: "button";}
- color: 0 0 0 0;
- }
- }
- }
- programs{
- program {
- name: "mouse_click";
- signal: "mouse,clicked,1";
- source: "over";
- script {
- emit("elm,action,click", "");
- }
- }
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-#define DEBUG_RECT_OVER(over_part, r, g, b) \
- part { name: __CONCAT("dbg_rect_at_", __stringify(__LINE__)); \
- \
-scale:1; \
- type : RECT; \
- repeat_events: 1; \
- description { \
- state: "default" 0.0; \
- visible: 1; \
- color: r g b 128; \
- rel1 { to: over_part; relative: 0 0; } \
- rel2 { to: over_part; relative: 1 1; } \
- } \
- }
-
-collections {
-
-group { name: "elm/label/base/rel_pages_label";
- styles {
- style { name: "textblock_white";
- base: "font=Sans font_size="24" color=#D3D3D3 ellipsis=1";
- }
- }
- styles {
- style { name: "textblock_white_bold";
- base: "font=Sans:style=Bold font_size="24" color=#D3D3D3 ellipsis=1";
- }
- }
-
- parts {
- part { name: "elm.text";
- type: TEXTBLOCK;
- description { state: "default" 0.0;
- rel1.relative: 0.0 0.0;
- rel2.relative: 1.0 1.0;
- align: 0.0 0.0;
- fixed: 1 1;
- min: 208 55;
- max: 208 55;
- text {
- style: "textblock_white";
- max: 1 1;
- }
- }
- description { state: "bold" 0.0;
- inherit: "default" 0.0;
- text {
- style: "textblock_white_bold";
- max: 1 1;
- }
- }
- }
- }
-}
-
-group {
- name: "elm/button/base/thumbButton";
- images {
- image: "ico_delete.png" COMP;
- }
- parts {
- part { name: "elm.swallow.content";
- type: RECT;
- mouse_events: 1;
- repeat_events: 1;
- description { state: "default" 0.0;
- color: 0 0 0 0;
- visible: 1;
- rel1.relative: 0.0 0.0;
- rel2.relative: 1.0 1.0;
- align: 0.0 0.0;
- }
- }
- }
-
- programs {
- program { name: "mouse,clicked";
- signal: "mouse,down,1";
- source: "elm.swallow.content";
- action: SIGNAL_EMIT "elm,action,click" "";
- }
- }
-}
-
-group {
- name: "elm/gengrid/base/rel_pages";
- data {
- item: "focus_highlight" "off";
- }
-
- parts {
- part { name: "clipper";
- type: RECT;
- mouse_events: 0;
- description { state: "default" 0.0;
- rel1 {
- relative: 0 0;
- }
- rel2{
- relative: 1 1;
- }
- }
- }
- part { name: "background";
- type: RECT;
- mouse_events: 0;
- description { state: "default" 0.0;
- color: 42 50 64 0;
- rel1 {
- relative: 0 0;
- }
- rel2{
- relative: 1 1;
- }
- }
- }
- part { name: "elm.swallow.content";
- type: SWALLOW;
- clip_to: "clipper";
- description { state: "default" 0.0;
- rel1 {relative: 0.0 0.0;}
- rel2 {relative: 1.0 1.0; offset: 14 14;}
- }
- }
- part { name: "elm.swallow.empty";
- type: SWALLOW;
- description { state: "default" 0.0;
- align: 0.5 0.5;
- rel1 {
- relative: 0.5 0.5;
- }
- rel2 {
- relative: 0.5 0.5;
- }
- }
- }
- }
- }
-group { name: "elm/gengrid/item/rel_page_item/default";
- data.item: "texts" "elm.text";
- data.item: "contents" "elm.thumbnail elm.text elm.label elm.thumbButton";
- images {
- image: "web_frame_selected.png" COMP;
- }
- parts {
- part { name: "bg";
- clip_to: "disclip";
- mouse_events: 0;
- description { state: "default" 0.0;
- visible: 0;
- color: 255 255 255 0;
- }
- }
- part { name: "elm.thumbnail";
- clip_to: "disclip";
- type: SWALLOW;
- description { state: "default" 0.0;
- fixed: 1 0;
- align: 0.0 0.0;
- min: 238 153;
- max: 238 153;
- rel1 {
- relative: 0.0 0.0;
- }
- rel2 {
- relative: 1.0 1.0;
- }
- }
- description { state: "selected";
- inherit: "default" 0.0;
- }
- }
- part { name: "focus_highlight";
- type: IMAGE;
- description { state: "default" 0.0;
- rel1 {
- to: "elm.thumbnail";
- relative: 0.0 0.0;
- }
- rel2 {
- to: "elm.thumbnail";
- relative: 1.0 1.0;
- }
- image.normal: "web_frame_selected.png";
- image.border: 8 8 8 0;
- image.border_scale: 1;
- image.middle: NONE;
- visible: 0;
- }
- description { state: "selected";
- inherit: "default" 0.0;
- visible: 1;
- }
- }
- part { name: "background";
- clip_to: "disclip";
- type: RECT;
- description { state: "default" 0.0;
- min: 238 55;
- max: 238 55;
- align: 0.0 0.0;
- color: 30 38 50 255;
- rel1 {
- to: "elm.thumbnail";
- relative: 0.0 1.0;
- offset: 0 0;
- }
- rel2 {
- relative: 1.0 1.0;
- }
- }
- description { state: "selected" 0.0;
- inherit: "default" 0.0;
- color: 70 143 254 255;
- }
- }
- part { name: "label_spacer";
- type: SPACER;
-description {
-state: "default" 0.0;
-min: 15 55;
-max: 15 55;
-align: 0.0 0.0;
-rel1{to: "background"; relative: 0.0 0.0;}
-}
-}
- part { name: "elm.label";
- clip_to: "disclip";
- type: SWALLOW;
- description { state: "default" 0.0;
- min: 208 55;
- max: 208 55;
- align: 0.0 0.0;
- rel1 { to: "label_spacer";
- relative: 1.0 0.0;
- }
- rel2 {
- to: "elm.thumbnail";
- relative: 1.0 1.0;
- }
- }
- }
- part { name: "disclip";
- type: RECT;
- description { state: "default" 0.0;
- rel1.to: "bg";
- rel2.to: "bg";
- }
- }
- part { name: "elm.thumbButton";
- clip_to: "disclip";
- type: SWALLOW;
- description { state: "default" 0.0;
- }
- }
- part { name: "over2";
- type: RECT;
- mouse_events: 1;
- repeat_events: 1;
- description { state: "default" 0.0;
- color: 0 0 0 0;
- rel1.to: "bg";
- rel2.to: "background";
- }
- }
- part { name: "over3";
- type: RECT;
- mouse_events: 1;
- repeat_events: 1;
- description { state: "default" 0.0;
- color: 0 0 0 0;
- rel1.to: "background";
- rel2.to: "background";
- }
- }
- }
- programs{
- program {
- name: "mouse_in";
- signal: "mouse,in";
- source: "over2";
- action: STATE_SET "selected" 0.0;
- target: "background";
- target: "focus_highlight";
- target: "elm.thumbnail";
- }
- program {
- name: "mouse_out";
- signal: "mouse,out";
- source: "over2";
- action: STATE_SET "default" 0.0;
- target: "background";
- target: "focus_highlight";
- target: "elm.thumbnail";
- }
- }
-}
-}
\ No newline at end of file
+++ /dev/null
-#define WIDTH 473
-#define HEIGHT 490
-#define DEBUG_RECT_OVER(over_part, r, g, b) \
- part { name: __CONCAT("dbg_rect_at_", __stringify(__LINE__)); \
- \
-scale:1; \
- type : RECT; \
- repeat_events: 1; \
- description { \
- state: "default" 0.0; \
- visible: 1; \
- color: r g b 128; \
- rel1 { to: over_part; relative: 0 0; } \
- rel2 { to: over_part; relative: 1 1; } \
- } \
- }
-data { item: "width" WIDTH; item: "height" HEIGHT; }
-color_classes{
- color_class{
- name: "defaultFontColor";
- color: 211 211 211 255;
- }
- color_class{
- name: "disabledFontColor";
- color: 60 60 60 160;
- }
- color_class{
- name: "selectedItemFontColor";
- color: 255 255 255 255;
- }
- color_class{
- name: "transparent";
- color: 0 0 0 0;
- }
- color_class{
- name: "selectedBackground";
- color: 69 143 255 255;
- }
- color_class{
- name: "dimmColor";
- color: 0 0 0 128;
- }
- color_class{
- name: "on_offBackgroundColor";
- color: 255 255 255 255;
- }
-}
-collections {
- group{ name: "elm/genlist/base/settings";
- min: 473 426;
- max: 473 426;
- parts{
- part { name: "clipper";
- type: RECT;
- mouse_events: 0;
- description { state: "default" 0.0;
- rel1 {
- relative: 0 0;
- }
- rel2{
- relative: 1 1;
- }
- }
- }
- part{
- name: "background";
- type: RECT;
- description{
- state: "default" 0.0;
- color: 18 22 34 255;
- rel1{
- relative: 0 0;
- }
- rel2{
- relative: 1 1;
- }
- }
- }
- part{
- name: "elm.swallow.content";
- type: SWALLOW;
- clip_to: "clipper";
- mouse_events: 1;
- description{
- state: "default" 0.0;
- align: 0.5 0.5;
- fixed: 1 1;
- rel1{
- relative: 0 0;
- }
- rel2{
- relative: 1 1;
- }
- }
- }
- part{
- name: "elm.swallow.empty";
- type: SWALLOW;
- description{
- state: "default" 0.0;
- fixed: 1 1;
- rel1{
- relative: 0.5 0.5;
- }
- rel2{
- relative: 0.5 0.5;
- }
- }
- }
- part{ name: "dimmer";
- type: RECT;
- description{
- state: "default" 0.0;
- color: 0 0 0 128;
- visible: 0;
- }
- description{
- state: "popup_show" 0.0;
- inherit: "default";
- visible:1;
- }
- }
- }//parts
- programs{
- program{
- name: "show_popup";
- signal: "show_popup";
- source: "SettingsModel";
- action: STATE_SET "popup_show" 0.0;
- target: "dimmer";
- }
- program{
- name: "hide_popup";
- signal: "hide_popup";
- source: "SettingsModel";
- action: STATE_SET "default" 0.0;
- target: "dimmer";
- }
- }
- }//group
- group{ name: "elm/genlist/item/settings_item/default";
- alias: "elm/genlist/item_odd/settings_item/default";
- alias: "elm/genlist/item_compress/settings_item/default";
- alias: "elm/genlist/item_compress_odd/settings_item/default";
- min: 473 80;
- max: 473 80;
- data.item: "texts" "optionName";
- data.item: "contents" "optionValue";
- parts{
- part{
- name: "value_helper";
- mouse_events:0;
- description{
- state: "default" 0.0;
- color: 0 0 0 0;
- }
- description{
- state: "on" 0.0;
- color: 0 0 0 0;
- }
- description{
- state: "off" 0.0;
- color: 0 0 0 0;
- }
- }
- part{
- name: "optionBackground";
- type: RECT;
- mouse_events: 1;
- description{
- state: "default" 0.0;
- color_class: "transparent";
- rel1{
- relative: 0.0 0.0;
- }
- rel2{
- relative: 1.0 1.0;
- }
- }
- description{
- state: "mouseOver" 0.0;
- inherit: "default";
- color_class: "selectedBackground";
- }
- description{
- state: "mouseOut" 0.0;
- inherit: "default";
- }
- description{
- state: "selected" 0.0;
- inherit: "mouseOver";
- }
- }
- part{ name:"optionName";
- type: TEXT;
- description{
- state: "default" 0.0;
- align: 0 0.5;
- min: 298 80;
- max: 298 80;
- color_class: "defaultFontColor";
- rel1{
- relative: 0.0 0.0;
- offset: 25 0;
- }
- rel2.relative: 1.0 1.0;
- text{
- size: 30;
- align: 0 0.5;
- }
- }
- description{
- state: "mouseOut" 0.0;
- inherit: "default";
- }
- description{
- state: "mouseOver" 0.0;
- inherit: "default" 0.0;
- color_class: "selectedItemFontColor";
- }
- description{
- state: "disabled" 0.0;
- inherit: "default" 0.0;
- color_class: "disabledFontColor";
- }
- }
- part{ name: "optionValue";
- type: SWALLOW;
- description{
- state: "default" 0.0;
- align: 0 0.5;
- fixed: 1 1;
- min: 100 40;
- max: 100 40;
- visible: 1;
- rel1{
- relative: 1.0 0.0;
- to: "optionName";
- offset: 25 0;
- }
- rel2{
- relative: 1.0 1.0;
- }
- }
- }
- programs{
- program{ name: "mouse_in";
- signal: "mouse,in";
- source: "option*";
- script{
- new cur_state_helper[31];
- new Float:index;
- get_state(PART:"optionName", cur_state_helper, 30, index);
- if(!strcmp(cur_state_helper,"default")){
- set_state(PART:"optionBackground", "mouseOver", 0.0);
- }
- }
- }
- program{ name: "mouse_out";
- signal: "mouse,out";
- source: "option*";
- script{
- new st[31];
- new Float:vl
- get_state(PART:"optionBackground", st, 30, vl);
- if(strcmp(st,"selected")){
- set_state(PART:"optionBackground", "mouseOut", 0.0);
- }
- }
- }
- program{ signal: "selected";
- source: "SettingsModel";
- action: STATE_SET "selected" 0.0;
- target: "optionBackground";
- }
- program{ signal: "unselected";
- source: "SettingsModel";
- action: STATE_SET "mouseOut" 0.0;
- target: "optionBackground";
- }
- program{ name: "go_disabled";
- signal: "elm,state,disabled"; source: "elm";
- action: STATE_SET "disabled" 0.0;
- target: "optionName";
- }
- program{ name: "go_enabled";
- signal: "elm,state,enabled"; source: "elm";
- action: STATE_SET "default" 0.0;
- target: "optionName";
- }
- program{ name: "go_Off";
- signal: "switch,off";
- source: "SettingsModel";
- action: STATE_SET "off" 0.0;
- target: "value_helper";
- }
- program{ name: "go_On";
- signal: "switch,on";
- source: "SettingsModel";
- action: STATE_SET "on" 0.0;
- target: "value_helper";
- }
- program{ name: "go_switch_hide";
- signal: "switch,hide";
- source: "SettingsModel";
- action: STATE_SET "default" 0.0;
- target: "value_helper";
- }
- }//programs
- }//parts
- }//group
- group{ name: "elm/ctxpopup/bg/settings_button";
- parts {
- part{
- name: "base_bg";
- type: RECT;
- mouse_events: 1;
- description{
- state: "default" 0.0;
- color: 0 0 0 0;
- }
- }
- }
- programs{
- program {
- signal: "mouse,clicked,*";
- source: "base_bg";
- action: SIGNAL_EMIT "elm,action,click" "";
- }
- }
- }//group: "elm/ctxpopup/bg/settings_button";
- group{ name: "elm/ctxpopup/base/settings_button";
- max: 0 0;
- parts{
- part{
- name: "base";
- scale: 1;
- type: RECT;
- description{
- state: "default" 0.0;
- min: 185 164;
- max: 185 164;
- //color: 0 0 0 0;
- color_class: "transparent";
- visible: 0;
- }
- description {
- state: "visible" 0.0;
- inherit: "default" 0.0;
- color_class: "on_offBackgroundColor";
- visible: 1;
- }
- }
- part{
- name: "elm.swallow.content";
- scale: 1;
- type: SWALLOW;
- description{
- state: "default" 0.0;
- rel1{
- to:"base";
- relative: 0 0;
- }
- rel2{
- to:"base";
- relative:1 1;
- }
- }
- }
- }
- programs {
- program {
- signal: "elm,state,show"; source: "elm";
- action: STATE_SET "visible" 0.0;
- transition: LINEAR 0.2;
- target: "base";
- }
- program {
- signal: "elm,state,hide"; source: "elm";
- action: STATE_SET "default" 0.0;
- transition: LINEAR 0.3;
- target: "base";
- after: "hide2";
- }
- program { name: "hide2";
- action: SIGNAL_EMIT "elm,action,hide,finished" "";
- }
- }
- }//group "elm/ctxpopup/base/settings_button";
- group{ name: "elm/radio/base/settings_radio";
- images.image: "check_foc.png" COMP;
- images.image: "check_nor.png" COMP;
- parts{
- part{name: "item_bg"; type: RECT; mouse_events:0;
- scale: 1;
- description{
- state: "default" 0.0;
- color_class: "transparent";
- min: 185 82;
- max: 185 82;
- }
- description{
- state: "mouse_over" 0.0;
- inherit: "default";
- color_class: "selectedBackground";
- }
- }
- part{name: "left_spacer"; type: SPACER;
- scale: 1;
- description{
- state: "default" 0.0;
- min: 20 82;
- max: 20 82;
- align: 0 0;
- rel1{
- relative:0 0;
- to: item_bg;
- }
- }
- }
- part{name: "elm.text"; type: TEXT; mouse_events: 0;
- scale: 1;
- description{
- state: "default" 0.0;
- color_class: "defaultFontColor";
- align: 0 0.5;
- rel1{
- relative: 1 0;
- to: "left_spacer";
- }
- rel2{
- relative: 0 1;
- to_x: "indicator";
- to_y: "right_spacer";
- }
- text{
- size: 30;
- align: 0 0.5;
- }
- }
- description{
- state: "mouse_over" 0.0;
- inherit: "default";
- color_class: "selectedItemFontColor";
- }
- }
- part { name: "indicator"; mouse_events: 0;
- scale: 1;
- type: IMAGE;
- description { state: "default" 0.0;
- align: 1 0.5;
- rel2{
- relative: 0 1;
- to: "right_spacer";
- }
- min: 38 38;
- max: 38 38;
- visible: 0;
- }
- description {
- state: "selected" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- image.normal: "check_foc.png";
- }
- description{
- state: "selected_mouse_over" 0.0;
- inherit: "selected";
- image.normal: "check_nor.png";
- }
- }
- part{ name: "right_spacer"; type: SPACER;
- scale: 1;
- description{
- state: "default" 0.0;
- min: 20 82;
- max: 20 82;
- align: 1 1;
- rel2{
- relative:1 1;
- to: item_bg;
- }
- }
- }
- part{ name: "event"; type: RECT;
- description{
- state: "default" 0.0;
- color: 0 0 0 0;
- }
- }
- }//parts
- script {
- public mouse_in() {
- new st[31];
- new Float:vl
- get_state(PART:"indicator", st, 30, vl)
- if(!strcmp(st,"selected"))
- set_state(PART:"indicator", "selected_mouse_over", 0.0);
- set_state(PART:"item_bg", "mouse_over", 0.0);
- set_state(PART:"elm.text", "mouse_over", 0.0);
- }
- public mouse_out() {
- new st[31];
- new Float:vl
- get_state(PART:"indicator", st, 30, vl)
- if(!strcmp(st,"selected_mouse_over"))
- set_state(PART:"indicator", "selected", 0.0);
- set_state(PART:"item_bg", "default", 0.0);
- set_state(PART:"elm.text", "default", 0.0);
- }
- }
- programs{
- program{
- signal: "mouse,clicked,1"; source: "event";
- action: SIGNAL_EMIT "elm,action,radio,toggle" "";
- }
- program{
- signal: "mouse,in"; source: "event";
- script{
- mouse_in();
- }
- }
- program{
- signal: "mouse,out"; source: "event";
- script{
- mouse_out();
- }
- }
- program{
- signal: "elm,action,focus"; source: "elm";
- script{
- mouse_in();
- }
- }
- program{
- signal: "elm,action,unfocus"; source: "elm";
- script{
- mouse_out();
- }
- }
- program{
- signal: "elm,state,radio,on"; source: "elm";
- action: STATE_SET "selected" 0.0;
- target: "indicator";
- }
- program{
- signal: "elm,state,radio,off"; source: "elm";
- action: STATE_SET "default" 0.0;
- target: "indicator";
- }
- }
- }//group "elm/radio/base/settings_radio";
-
- group { name: "elm/label/base/settings_label";
- styles {
- style { name: "label_style";
- base: "font="FNBD" font_size=30 text_class=tb_plain align=center color=#d3d3d3ff";
- tag: "br" "\n";
- tag: "hilight" "+ font="FNBD" color=#d3d3d3ff text_class=tb_plain";
- tag: "b" "+ font="FNBD" color=#d3d3d3ff text_class=tb_light";
- }
- }
- parts {
- part { name: "elm.text"; type: TEXTBLOCK;
- scale: 1;
- description { state: "default" 0.0;
- text { style: "label_style";
- min: 1 1;
- }
- }
- }
- }
- }
-}//collections
\ No newline at end of file
+++ /dev/null
-#define SPACER_ITEM_BR(spacer_name, W, H, elem) \
- part { name: spacer_name; \
- type: RECT; \
- scale:1; \
- description { \
- state: "default" 0.0; \
- visible: 1; \
- align: 0 0; \
- min: W H; \
- max: W H; \
- fixed: 1 1; \
- color: 18 22 34 245; \
- rel1 { relative: 0.0 0.0; to: elem;} \
- rel2 { relative: 1.0 1.0; to: elem;} \
- } \
- }
-#define WIDTH 436
-#define HEIGHT 89
-data { item: "width" WIDTH; item: "height" HEIGHT; item: "list_max_height" 868;}
-collections {
- group {
- name: "elm/list/item/tab_list";
- alias: "elm/list/item_odd/tab_list";
- alias: "elm/list/item_compress/tab_list";
- alias: "elm/list/item_compress_odd/tab_list";
- min: WIDTH HEIGHT;
- max: WIDTH HEIGHT;
- images {
- image: "ico_delete.png" COMP;
- image: "thumbnail.png" COMP;
- }
- parts {
- part {
- name: "bg_clipper";
- scale:1;
- mouse_events: 1;
- type: SWALLOW;
- description {
- state: "default" 0.0;
- color: 0 0 0 0;
- min: WIDTH HEIGHT;
- max: WIDTH HEIGHT;
- }
- }
- part {
- name: "tab_bg";
- type: RECT;
- scale: 1;
- description { state: "default" 0.0;
- visible: 1;
- fixed: 1 1;
- min: 374 87;
- max: 374 87;
- align: 0 1;
- rel1 { relative: 0.0 0.0;to: "bg_clipper";}
- rel2 { relative: 1.0 1.0;to: "bg_clipper";}
- color: 18 22 34 255;
- }
- description { state: "focus" 0.0;
- inherit: "default" 0.0;
- color: 69 143 255 255;
- }
- }
- SPACER_ITEM_BR("horizontal_line", 374, 2, "bg_clipper")
- part {
- name: "elm.text";
- type: TEXT;
- scale: 1;
- description { state: "default" 0.0;
- visible: 1;
- fixed: 1 1;
- align: 0.0 0.5;
- min: 249 79;
- max: 249 79;
- rel1 { relative: 0.0 0.0; to: "tab_bg"; offset: 100 0;}
- rel2 { relative: 1.0 1.0; to: "tab_bg";}
- color: 200 200 200 255;
- text {
- text: "";
- font: "font_name";
- size: 30;
- align: 0 0.5;
- }
- }
- description { state: "focus" 0.0;
- inherit: "default" 0.0;
- }
- description { state: "selected" 0.0;
- inherit: "default" 0.0;
- color: 255 255 255 255;
- text {
- text: "";
- font: "Tizen:style=Bold";
- size: 30;
- align: 0 0.5;
- }
- }
- description { state: "highlight" 0.0;
- inherit: "default" 0.0;
- color: 255 255 255 51;
- }
- }
- part {
- name: "elm.del.bg";
- scale:1;
- mouse_events: 1;
- type: RECT;
- description {
- state: "default" 0.0;
- visible: 0;
- fixed: 1 1;
- align: 0 0;
- min: 54 87;
- max: 54 87;
- rel1 { relative: 1.0 0.0; to: "tab_bg";}
- rel2 { relative: 1.0 1.0;to: "bg_clipper";}
- color: 96 114 146 255;
- }
- description {
- state: "highlight" 0.0;
- inherit: "default" 0.0;
- color: 69 143 255 255;
- visible: 1;
- }
- description {
- state: "focus" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- }
- part {
- name: "elm.del.icon";
- type: IMAGE;
- scale: 1;
- description { state: "default" 0.0;
- visible: 0;
- fixed: 1 1;
- align: 0.5 0.5;
- min: 40 40;
- max: 40 40;
- rel1 { relative: 0.0 0.0; to: "elm.del.bg";}
- rel2 { relative: 1.0 1.0; to: "elm.del.bg";}
- color: 255 255 255 255;
- image.normal: "ico_delete.png";
- }
- description { state: "highlight" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- description { state: "focus" 0.0;
- inherit: "highlight" 0.0;
- }
- }
- part {
- name: "elm.swallow.icon";
- scale: 1;
- type: SWALLOW;
- description {
- state: "default" 0.0;
- visible: 1;
- align: 0 0;
- fixed: 1 1;
- min: 374 87;
- max: 374 87;
- rel1 { relative: 0.0 0.0; to: "tab_bg";}
- rel2 { relative: 1.0 1.0; to: "tab_bg";}
- color: 0 0 0 0;
- }
- }
- part {
- name: "elm.swallow.end";
- scale: 1;
- type: SWALLOW;
- description {
- state: "default" 0.0;
- visible: 1;
- fixed: 1 1;
- align: 0 0;
- min: 54 87;
- max: 54 87;
- rel1 { relative: 1.0 0.0; to: "elm.swallow.icon";}
- rel2 { relative: 1.0 1.0; to: "elm.swallow.icon";}
- }
- }
- part {
- name: "over";
- scale:1;
- type: RECT;
- description {
- state: "default" 0.0;
- visible: 0;
- align: 0 0;
- fixed: 1 1;
- min: 374 87;
- max: 374 87;
- rel1 { relative: 0.0 0.0; to: "tab_bg";}
- rel2 { relative: 1.0 1.0; to: "tab_bg";}
- color: 0 0 0 0;
- }
- description {
- state: "highlight" 0.0;
- inherit: "default" 0 0;
- color: 69 143 255 51;
- visible: 1;
- }
- }
- }
- programs{
- program {
- name: "mouse_in_tab";
- signal: "mouse,in";
- source: "elm.swallow.icon";
- action: STATE_SET "focus" 0.0;
- target: "tab_bg";
- target: "elm.del.bg";
- target: "elm.del.icon";
- }
- program {
- name: "mouse_out_tab";
- signal: "mouse,out";
- source: "elm.swallow.icon";
- action: STATE_SET "default" 0.0;
- target: "tab_bg";
- target: "elm.del.bg";
- target: "elm.del.icon";
- }
- program {
- name: "mouse_in_del";
- signal: "mouse,in";
- source: "elm.swallow.end";
- script {
- new st[31];
- new Float:vl;
- get_state(PART:"elm.text", st, 30, vl);
- if(strcmp(st, "selected")) {
- set_state(PART:"elm.text", "highlight", 0.0);
- }
- set_state(PART:"elm.del.bg", "highlight", 0.0);
- set_state(PART:"elm.del.icon", "highlight", 0.0);
- set_state(PART:"over", "highlight", 0.0);
- }
- }
- program {
- name: "mouse_out_del";
- signal: "mouse,out";
- source: "elm.swallow.end";
- script {
- new st[31];
- new Float:vl;
- get_state(PART:"elm.text", st, 30, vl);
- if(strcmp(st, "selected")) {
- set_state(PART:"elm.text", "default", 0.0);
- }
- set_state(PART:"elm.del.bg", "default", 0.0);
- set_state(PART:"elm.del.icon", "default", 0.0);
- set_state(PART:"over", "default", 0.0);
- }
- }
- program {
- name: "mouse_click";
- signal: "mouse,clicked,1";
- source: "elm.swallow.icon";
- script {
- emit("elm,action,click", "");
- }
- }
- program {
- name: "mouse_click2";
- signal: "mouse,clicked,1";
- source: "elm.swallow.end";
- script {
- emit("elm,action,click", "");
- }
- }
- program {
- name: "highlight_selected_tab";
- signal: "highlight,selected";
- source: "";
- action: STATE_SET "selected" 0.0;
- target: "elm.text";
- }
- program {
- name: "focused";
- signal: "item,focused";
- //signal: "elm,state,selected";
- source: "";
- //action: SIGNAL_EMIT "mouse,in" "elm.swallow.icon";
- action: STATE_SET "focus" 0.0;
- target: "tab_bg";
- target: "elm.del.bg";
- target: "elm.del.icon";
- }
- program {
- name: "unfocused";
- signal: "item,unfocused";
- //signal: "elm,state,unselected";
- source: "";
- //action: SIGNAL_EMIT "mouse,out" "elm.swallow.icon";
- action: STATE_SET "default" 0.0;
- target: "tab_bg";
- target: "elm.del.bg";
- target: "elm.del.icon";
- }
- }
- }
- /* ----------------------------------------------------------------- */
- group {
- name: "elm/button/base/new_tab_elem";
- parts {
- part {
- name: "bg_clipper";
- scale:1;
- type: RECT;
- description {
- state: "default" 0.0;
- visible: 1;
- align: 0 0;
- color: 0 0 0 0;
- min: WIDTH 80;
- max: WIDTH 80;
- }
- }
- part {
- name: "bg";
- type: RECT;
- scale: 1;
- description { state: "default" 0.0;
- visible: 1;
- min: 374 80;
- max: 374 80;
- align: 0 0;
- fixed: 1 1;
- color: 18 22 34 255;
- }
- description { state: "focus" 0.0;
- inherit: "default" 0.0;
- color: 69 143 255 255;
- }
- }
- part {
- name: "elm.text";
- type: TEXT;
- scale: 1;
- description { state: "default" 0.0;
- visible: 1;
- fixed: 1 1;
- align: 0.0 0.5;
- min: 324 80;
- max: 324 80;
- rel1 { relative: 0.0 0.0; to: "bg"; offset: 25 0;}
- rel2 { relative: 1.0 1.0; to: "bg";}
- color: 255 255 255 255;
- text {
- text: "+ New tab";
- font: "font_name";
- size: 30;
- align: 0 0.5;
- }
- }
- description { state: "focus" 0.0;
- inherit: "default" 0.0;
- }
- description { state: "highlight" 0.0;
- inherit: "default" 0.0;
- color: 255 255 255 51;
- }
- description { state: "disabled" 0.0;
- inherit: "default" 0.0;
- color: 60 60 60 160;
- }
- }
- part {
- name: "over";
- scale:1;
- mouse_events: 1;
- type: RECT;
- description {
- state: "default" 0.0;
- visible: 1;
- rel1 { relative: 0.0 0.0; to: "bg";}
- rel2 { relative: 1.0 1.0; to: "bg";}
- color: 0 0 0 0;
- }
- }
- }
- programs{
- program {
- name: "mouse_in";
- signal: "mouse,in";
- source: "over";
- script {
- new st[31];
- new Float:vl;
- get_state(PART:"elm.text", st, 30, vl);
- if(strcmp(st, "disabled")) {
- set_state(PART:"bg", "focus", 0.0);
- }
- }
- }
- program {
- name: "mouse_out";
- signal: "mouse,out";
- source: "over";
- action: STATE_SET "default" 0.0;
- target: "bg";
- }
- 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 "disabled" 0.0;
- target: "elm.text";
- }
- program {
- name: "enable";
- signal: "elm,state,enabled";
- source: "elm";
- action: STATE_SET "default" 0.0;
- target: "elm.text";
- }
- program {
- name: "focused";
- signal: "elm,action,focus";
- source: "elm";
- //action: SIGNAL_EMIT "mouse,in" "elm.swallow.icon";
- script {
- new st[31];
- new Float:vl;
- get_state(PART:"elm.text", st, 30, vl);
- if(strcmp(st, "disabled")) {
- set_state(PART:"bg", "focus", 0.0);
- }
- }
- }
- program {
- name: "unfocused";
- signal: "elm,action,unfocus";
- source: "elm";
- //action: SIGNAL_EMIT "mouse,in" "elm.swallow.icon";
- action: STATE_SET "default" 0.0;
- target: "bg";
- }
- }
- }
- /* ----------------------------------------------------------------- */
- group{
- name: "elm/button/base/invisible_button";
- parts{
- part{
- name: "button";
- type: RECT;
- scale: 1;
- description { state: "default" 0.0;
- visible: 1;
- fixed: 1 1;
- color: 0 0 0 0;
- }
- }
- part {
- name: "e.swallow.icon";
- scale:1;
- mouse_events: 1;
- type: SWALLOW;
- description {
- state: "default" 0.0;
- visible: 1;
- align: 0 0.5;
- min: 79 79;
- max: 79 79;
- rel1 { relative: 0.0 0.0;to: "button"; offset: 4 0;}
- rel2 { relative: 1.0 1.0;to: "button";}
- }
- description { state: "focus" 0.0;
- inherit: "default" 0.0;
- }
- description { state: "highlight" 0.0;
- inherit: "default" 0.0;
- color: 255 255 255 51;
- }
- }
- part{
- name: "over";
- type: RECT;
- scale: 1;
- description { state: "default" 0.0;
- visible: 1;
- fixed: 1 1;
- rel1 { relative: 0.0 0.0;to: "button";}
- rel2 { relative: 1.0 1.0;to: "button";}
- color: 0 0 0 0;
- }
- }
- }
- programs{
- program {
- name: "mouse_click";
- signal: "mouse,clicked,1";
- source: "over";
- script {
- emit("elm,action,click", "");
- }
- }
- }
- }
-}
+++ /dev/null
-#define WEB_TITLE_BAR_WIDTH 1920
-#define WEB_TITLE_BAR_HEIGHT 87
-#define WEB_TITLE_BAR_TEXT_WIDTH 1691
-#define WEB_TITLE_BAR_TEXT_OFFSET 12
-#define WEB_TITLE_BAR_TEXT_SIZE 30
-#define WEB_TITLE_BAR_FAVICON_W_H 37
-#define WEB_TITLE_BAR_FAVICON_OFFSET 90
-
-collections{
- group{ name: "web_title_bar";
- styles {
- style { name: "text_style";
- base: "font=Sans font_size="WEB_TITLE_BAR_TEXT_SIZE" color=#D3D3D3 align=left";
- }
- }
- parts{
- part{ name: "web_title_bg";
- type: RECT;
- scale: 1;
- description { state: "default" 0.0;
- ///\todo No given color in guidlines
- color: 10 10 10 150;
- min: WEB_TITLE_BAR_WIDTH 0;
- max: WEB_TITLE_BAR_WIDTH 0;
- fixed: 1 1;
- align: 0 1;
- rel1 { relative: 0.0 1.0; }
- rel2 { relative: 1.0 1.0; }
- }
- description { state: "visible" 0.0;
- inherit: "default";
- min: WEB_TITLE_BAR_WIDTH WEB_TITLE_BAR_HEIGHT;
- max: WEB_TITLE_BAR_WIDTH WEB_TITLE_BAR_HEIGHT;
- }
- }
- part{ name: "favicon_spacer";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- min: WEB_TITLE_BAR_FAVICON_OFFSET WEB_TITLE_BAR_HEIGHT;
- max: WEB_TITLE_BAR_FAVICON_OFFSET WEB_TITLE_BAR_HEIGHT;
- fixed: 1 1;
- align: 0 0;
- rel1{ relative: 0.0 0.0; to: "web_title_bg"; }
- rel2{ relative: 1.0 1.0; to: "web_title_bg"; }
- }
- }
- part{ name: "title_spacer";
- type: SPACER;
- scale: 1;
- description { state: "default" 0.0;
- min: WEB_TITLE_BAR_TEXT_OFFSET WEB_TITLE_BAR_HEIGHT;
- max: WEB_TITLE_BAR_TEXT_OFFSET WEB_TITLE_BAR_HEIGHT;
- fixed: 1 1;
- align: 0.0 0.0;
- rel1{ relative: 1.0 0.0; to_x: "favicon"; }
- rel2{ relative: 1.0 1.0; to: "web_title_bg"; }
- }
- }
-
- part{ name: "favicon";
- type: SWALLOW;
- scale: 1;
- description { state: "default" 0.0;
- min: WEB_TITLE_BAR_FAVICON_W_H WEB_TITLE_BAR_FAVICON_W_H;
- max: WEB_TITLE_BAR_FAVICON_W_H WEB_TITLE_BAR_FAVICON_W_H;
- fixed: 1 1;
- align: 0.0 0.5;
- rel1 { to: "favicon_spacer"; relative: 1 0; }
- rel2 { to: "favicon_spacer"; }
- }
- }
- part{ name: "text";
- type: TEXTBLOCK;
- scale: 1;
- description { state: "default" 0.0;
- color: 211 211 211 255;
- min: WEB_TITLE_BAR_TEXT_WIDTH WEB_TITLE_BAR_HEIGHT;
- max: WEB_TITLE_BAR_TEXT_WIDTH WEB_TITLE_BAR_HEIGHT;
- visible: 1;
- fixed: 1 1;
- text {
- text: "";
- style: "text_style";
- }
- rel1 { relative: 1.0 0.0; to: "title_spacer"; offset: 0 WEB_TITLE_BAR_HEIGHT;}
- rel2 { relative: 1.0 1.0; to: "web_title_bg"; }
- align: 0.0 0.0;
- }
- description { state: "visible" 0.0;
- inherit: "default" 0.0;
- rel1 { relative: 1.0 0.0; to: "title_spacer"; offset: 0 0;}
- }
- }
- }
- programs{
- program{
- name: "show_bar";
- signal: "show_webtitle_bar";
- source: "web";
- action: STATE_SET "visible" 0.0;
- target: "web_title_bg";
- target: "text";
- transition: LINEAR 0.5;
- }
- program{
- name: "hide_bar";
- signal: "hide_webtitle_bar";
- source: "web";
- action: STATE_SET "default" 0.0;
- target: "web_title_bg";
- target: "text";
- transition: LINEAR 0.5;
- }
- }
-}
+++ /dev/null
-#define SPACER_ITEM_BR(spacer_name, W, H) \
- part { name: spacer_name; \
- type: RECT; \
- scale:1; \
- description { \
- state: "default" 0.0; \
- visible: 1; \
- align: 1 1; \
- min: W H; \
- max: W H; \
- fixed: 1 1; \
- color: 255 255 255 10; \
- rel1 { relative: 0.0 1.0; to: "bg";} \
- rel2 { relative: 1.0 1.0; to: "bg";} \
- } \
- }
-
-#define WIDTH 374
-#define HEIGHT 82
-
-data { item: "width" WIDTH; item: "height" HEIGHT; }
-
-collections {
- group {
- name: "elm/list/item/zoom_list";
- alias: "elm/list/item_odd/zoom_list";
- alias: "elm/list/item_compress/zoom_list";
- alias: "elm/list/item_compress_odd/zoom_list";
- min: WIDTH HEIGHT;
- max: WIDTH HEIGHT;
- images {
- image: "check_nor.png" COMP;
- image: "check_foc.png" COMP;
- }
- parts {
- part {
- name: "bg_clipper";
- scale:1;
- mouse_events: 0;
- type: RECT;
- description {
- state: "default" 0.0;
- min: WIDTH HEIGHT;
- color: 0 0 0 0;
- }
- }
- part {
- name: "bg";
- type: RECT;
- scale: 1;
- description { state: "default" 0.0;
- visible: 1;
- fixed: 1 1;
- align: 0.0 0.0;
- min: WIDTH HEIGHT;
- max: WIDTH HEIGHT;
- color: 18 22 34 255;
- }
- description { state: "highlight" 0.0;
- inherit: "default" 0.0;
- }
- description { state: "focus" 0.0;
- inherit: "default" 0.0;
- color: 69 143 255 255;
- }
- description { state: "highlight focus" 0.0;
- inherit: "focus" 0.0;
- }
- }
- SPACER_ITEM_BR("content_br", 374, 2)
- part {
- name: "elm.swallow.icon";
- type: IMAGE;
- scale: 1;
- description { state: "default" 0.0;
- visible: 0;
- fixed: 1 1;
- align: 0.0 0.0;
- min: 38 38;
- max: 38 38;
- rel1 { relative: 1.0 0.0; to: "elm.text"; offset: 15 21;}
- rel2 { relative: 1.0 1.0; to: "elm.text";}
- color: 255 255 255 255;
- image.normal: "check_foc.png";
- }
- description { state: "highlight" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- description { state: "focus" 0.0;
- inherit: "default" 0.0;
- }
- description { state: "highlight focus" 0.0;
- inherit: "highlight" 0.0;
- image.normal: "check_nor.png";
- }
- }
- part {
- name: "elm.text";
- type: TEXT;
- scale: 1;
- description { state: "default" 0.0;
- visible: 1;
- fixed: 1 1;
- align: 0.0 0.0;
- min: 281 80;
- max: 281 80;
- rel1 { relative: 0.0 0.0; to: "bg"; offset: 25 0;}
- rel2 { relative: 1.0 1.0; to: "bg";}
- color: 255 255 255 255;
- text {
- text: "";
- font: "font_name";
- size: 30;
- align: 0 0.5;
- }
- }
- description { state: "highlight" 0.0;
- inherit: "default" 0.0;
- color: 69 143 255 255;
- }
- description { state: "focus" 0.0;
- inherit: "default" 0.0;
- }
- description { state: "highlight focus" 0.0;
- inherit: "focus" 0.0;
- }
- }
- part {
- name: "over2";
- scale:1;
- type: RECT;
- mouse_events: 1;
- description {
- state: "default" 0.0;
- color: 0 0 0 0;
- rel1 { to: "bg_clipper"; relative: 0 0; }
- rel2 { to: "bg_clipper"; relative: 1 1; }
- }
- }
- }
- programs{
- program {
- name: "mouse_in";
- signal: "mouse,in";
- source: "over2";
- script {
- new st[31];
- new Float:vl;
- get_state(PART:"bg", st, 30, vl);
- if(!strcmp(st, "highlight")) {
- set_state(PART:"bg", "highlight focus", 0.0);
- set_state(PART:"elm.text", "highlight focus", 0.0);
- set_state(PART:"elm.swallow.icon", "highlight focus", 0.0);
- }
- else {
- set_state(PART:"bg", "focus", 0.0);
- set_state(PART:"elm.text", "focus", 0.0);
- set_state(PART:"elm.swallow.icon", "focus", 0.0);
- }
- }
- }
- program {
- name: "mouse_out";
- signal: "mouse,out";
- source: "over2";
- action: STATE_SET "default" 0.0;
- target: "bg";
- target: "elm.text";
- target: "elm.swallow.icon";
- script {
- new st[31];
- new Float:vl;
- get_state(PART:"bg", st, 30, vl);
- if(!strcmp(st, "highlight focus")) {
- set_state(PART:"bg", "highlight", 0.0);
- set_state(PART:"elm.text", "highlight", 0.0);
- set_state(PART:"elm.swallow.icon", "highlight", 0.0);
- }
- else if(!strcmp(st, "highlight")) {
- set_state(PART:"bg", "highlight", 0.0);
- set_state(PART:"elm.text", "highlight", 0.0);
- set_state(PART:"elm.swallow.icon", "highlight", 0.0);
- }
- else {
- set_state(PART:"bg", "default", 0.0);
- set_state(PART:"elm.text", "default", 0.0);
- set_state(PART:"elm.swallow.icon", "default", 0.0);
- }
- }
- }
- program {
- name: "checked";
- signal: "checked";
- source: "";
- action: STATE_SET "highlight focus" 0.0;
- target: "bg";
- target: "elm.text";
- target: "elm.swallow.icon";
- }
- program {
- name: "unchecked";
- signal: "unchecked";
- source: "";
- action: STATE_SET "default" 0.0;
- target: "bg";
- target: "elm.text";
- target: "elm.swallow.icon";
- }
- program {
- name: "default_checked";
- signal: "default_checked";
- source: "";
- action: STATE_SET "highlight" 0.0;
- target: "bg";
- target: "elm.text";
- target: "elm.swallow.icon";
- }
- }
- }
-}