Adding UrlHistoryList class and other classes managing display of 'URL from history'
[profile/tv/apps/web/browser.git] / services / QuickAccess / UrlHistoryList / UrlHistoryList.h
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef URLHISTORYLIST_H_
18 #define URLHISTORYLIST_H_
19
20 #include <memory>
21 #include <Evas.h>
22
23 #include "services/HistoryService/HistoryItem.h"
24
25 using namespace std;
26
27 namespace tizen_browser
28 {
29
30 namespace services
31 {
32 class WidgetListManager;
33 typedef shared_ptr<WidgetListManager> WidgetListManagerPtr;
34 }
35
36 namespace base_ui
37 {
38
39 /**
40  * Manages list of url matches (URL from history). Manages top layout, creates
41  * widget displaying url items.
42  */
43 class UrlHistoryList
44 {
45 public:
46         UrlHistoryList();
47         virtual ~UrlHistoryList();
48         void show();
49         void createLayout(Evas_Object* parentLayout);
50         Evas_Object *getLayout();
51
52         /**
53          * \brief entered url is edited (edited before acceptation)
54          */
55         void onURLEntryEdit(const string& editedUrl,
56                         shared_ptr<services::HistoryItemVector> matchedEntries);
57         void onMouseClick();
58
59 private:
60
61         Evas_Object* m_layout;
62         string m_edjFilePath;
63
64         services::WidgetListManagerPtr m_widgetListManager;
65
66 };
67
68 } /* namespace base_ui */
69 } /* namespace tizen_browser */
70
71 #endif /* URLHISTORYLIST_H_ */