Fixed Nabi Issues and Language related changes
[apps/osp/Internet.git] / inc / IntMultipleWindowForm.h
1 //
2
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.1 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://floralicense.org/license/
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 //!Internet
19 /*@file:         IntMultipleWindowForm.h
20  *@brief:        The IntMultipleWindowForm provides multiple instance of mainscenes and displays them in a Listview
21  *
22  */
23
24 #ifndef _INT_MULTIPLE_WINDOW_FORM_H_
25 #define _INT_MULTIPLE_WINDOW_FORM_H_
26
27 #include <FBase.h>
28 #include <FGraphics.h>
29 #include <FMedia.h>
30 #include <FSystem.h>
31 #include <FUi.h>
32
33 class MultipleWindowForm
34         : public Tizen::Ui::Controls::Form
35         , public Tizen::Ui::Controls::IFormBackEventListener
36         , public Tizen::Ui::Controls::IListViewItemEventListener
37         , public Tizen::Ui::Controls::IListViewItemProvider
38         , public Tizen::Ui::IActionEventListener
39         , public Tizen::Ui::IOrientationEventListener
40         , public Tizen::Ui::Scenes::ISceneEventListener
41
42
43 {
44 public:
45         /**
46         *@brief                 Default constructor
47         */
48         MultipleWindowForm(void);
49
50         /**
51         *@brief                 Default destructor
52         */
53         virtual ~MultipleWindowForm(void);
54
55         /**
56          *@brief        Constructing and Initializing MultipleWindowForm
57          */
58         bool Initialize(void);
59
60 public:
61         /**
62          *Used to create instances and set styles for the form content.
63          */
64         virtual result OnInitializing(void);
65
66         /**
67          *Called on terminate of a form
68          */
69         virtual result OnTerminating(void);
70
71         // ISceneEventListener
72
73         /**
74          *Called after setting as current scene.
75          */
76         virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
77
78         /**
79          *Called when the current scene is deactivated.
80          */
81         virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
82
83         // IFormBackEventListener
84         /**
85          *Called when the current Form control needs to be closed to revert back to the previous Form control.
86          */
87         virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
88
89         // IActionEventListener
90         /**
91          *Called when an action event occurs.
92          */
93         virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
94
95         // IListViewItemEventListener
96         /**
97          *Called when the state of an element in the ListContextItem is changed.
98          */
99         virtual void OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state);
100
101         /**
102          *Called when the state of an element in the ListViewItem in the ListView or GroupedListView is changed.
103          */
104         virtual void OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status);
105
106         /**
107          *Called when the ListItem is swept.
108          */
109         virtual void OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, Tizen::Ui::Controls::SweepDirection direction);
110
111         /**
112          *Called when the item or the element is long pressed.
113          */
114         virtual void OnListViewItemLongPressed(Tizen::Ui::Controls::ListView& listView, int index, int elementId, bool& invokeListViewItemCallback);
115
116         //IListViewItemProvider
117         /**
118          *Called when items need to be loaded.
119          */
120         virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int index, int itemWidth);
121
122         /**
123          *Called when items need to be loaded.
124          */
125         virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth);
126
127         /**
128          *Called when the IconListView is about to be drawn and requests the listener to set the number of total items.
129          */
130         virtual int GetItemCount(void);
131
132         //IOrientationEventListener
133         /**
134          *Called when an orientation event occurs.
135          */
136         void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
137
138 private:
139         static const int IDA_FORMAT_BITMAP = 500;
140         static const int IDA_FORMAT_DELETE_BITMAP = 501;
141         static const int IDA_FORMAT_TITLE_STRING = 502;
142         static const int IDA_FORMAT_URL_STRING = 503;
143         static const int IDA_BUTTON_NEW = 504;
144         static const int IDA_BUTTON_BACK = 505;
145         static const int IDA_BUTTON_CLOSEALL = 506;
146         static const int IDA_FORMAT_CUSTOM = 507;
147
148         static const int IDA_CONFIRMATION_NO = 1000;
149         static const int IDA_CONFIRMATION_YES = 1001;
150
151         // __pList Pointer to ListView
152         Tizen::Ui::Controls::ListView* __pList;
153         // __pListIconImage Pointer to Bitmap contains list icon image
154         Tizen::Graphics::Bitmap* __pListIconImage;
155         // __pListDeleteImage Pointer to Bitmap contains list delete image
156         Tizen::Graphics::Bitmap* __pListDeleteImage;
157         ConfirmationPopup* __pConfirmationPopup;
158         Tizen::Graphics::Point __startPosition;
159
160 };
161
162 #endif /* _INT_MULTIPLE_WINDOW_FORM_H_ */