3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (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
9 // http://floralicense.org/license/
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.
19 /*@file: IntMultipleWindowForm.h
20 *@brief: The IntMultipleWindowForm provides multiple instance of mainscenes and displays them in a Listview
24 #ifndef _INT_MULTIPLE_WINDOW_FORM_H_
25 #define _INT_MULTIPLE_WINDOW_FORM_H_
28 #include <FGraphics.h>
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
45 *@brief Default constructor
47 MultipleWindowForm(void);
50 *@brief Default destructor
52 virtual ~MultipleWindowForm(void);
55 *@brief Constructing and Initializing MultipleWindowForm
57 bool Initialize(void);
61 *Used to create instances and set styles for the form content.
63 virtual result OnInitializing(void);
66 *Called on terminate of a form
68 virtual result OnTerminating(void);
70 // ISceneEventListener
73 *Called after setting as current scene.
75 virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
78 *Called when the current scene is deactivated.
80 virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
82 // IFormBackEventListener
84 *Called when the current Form control needs to be closed to revert back to the previous Form control.
86 virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
88 // IActionEventListener
90 *Called when an action event occurs.
92 virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
94 // IListViewItemEventListener
96 *Called when the state of an element in the ListContextItem is changed.
98 virtual void OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state);
101 *Called when the state of an element in the ListViewItem in the ListView or GroupedListView is changed.
103 virtual void OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status);
106 *Called when the ListItem is swept.
108 virtual void OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, Tizen::Ui::Controls::SweepDirection direction);
111 *Called when the item or the element is long pressed.
113 virtual void OnListViewItemLongPressed(Tizen::Ui::Controls::ListView& listView, int index, int elementId, bool& invokeListViewItemCallback);
115 //IListViewItemProvider
117 *Called when items need to be loaded.
119 virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int index, int itemWidth);
122 *Called when items need to be loaded.
124 virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth);
127 *Called when the IconListView is about to be drawn and requests the listener to set the number of total items.
129 virtual int GetItemCount(void);
131 //IOrientationEventListener
133 *Called when an orientation event occurs.
135 void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
138 static const int IDA_FORMAT_BITMAP = 500;
139 static const int IDA_FORMAT_DELETE_BITMAP = 501;
140 static const int IDA_FORMAT_TITLE_STRING = 502;
141 static const int IDA_FORMAT_URL_STRING = 503;
142 static const int IDA_BUTTON_NEW = 504;
143 static const int IDA_BUTTON_BACK = 505;
144 static const int IDA_BUTTON_CLOSEALL = 506;
145 static const int IDA_FORMAT_CUSTOM = 507;
147 static const int IDA_CONFIRMATION_NO = 1000;
148 static const int IDA_CONFIRMATION_YES = 1001;
150 // __pList Pointer to ListView
151 Tizen::Ui::Controls::ListView* __pList;
152 // __pListIconImage Pointer to Bitmap contains list icon image
153 Tizen::Graphics::Bitmap* __pListIconImage;
154 // __pListDeleteImage Pointer to Bitmap contains list delete image
155 Tizen::Graphics::Bitmap* __pListDeleteImage;
156 ConfirmationPopup* __pConfirmationPopup;
160 #endif /* _INT_MULTIPLE_WINDOW_FORM_H_ */