Merge "Fix Ime Rotation" into tizen_2.1
[platform/framework/native/uifw.git] / inc / FUiCtrlGalleryItem.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
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
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 /**
19  * @file        FUiCtrlGalleryItem.h
20  * @brief       This is the header file for the %GalleryItem class.
21  *
22  * This header file contains the declarations of the %GalleryItem class and its helper classes.
23  */
24
25 #ifndef _FUI_CTRL_GALLERY_ITEM_H_
26 #define _FUI_CTRL_GALLERY_ITEM_H_
27
28 #include <FBaseObject.h>
29 #include <FBaseString.h>
30 #include <FGrpBitmap.h>
31 #include <FUiCtrlGalleryTypes.h>
32
33 namespace Tizen { namespace Ui { namespace Controls
34 {
35
36 class _GalleryItemImpl;
37
38 /**
39  * @class       GalleryItem
40  * @brief This class defines the common behavior for a %GalleryItem control.
41  *
42  * @since               2.0
43  *
44  * The %GalleryItem class represents an item of the Gallery control. An instance of the %GalleryItem class
45  * comprises of a bitmap image and its image rotation. @n @n
46  *
47  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_gallery.htm">Gallery</a>.
48  */
49 class _OSP_EXPORT_ GalleryItem
50         : public Tizen::Base::Object
51 {
52 public:
53         /**
54          * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
55          *
56          * @since 2.0
57          */
58         GalleryItem(void);
59
60         /**
61          * This destructor overrides Tizen::Base::Object::~Object().
62          *
63          * @since 2.0
64          */
65         virtual ~GalleryItem(void);
66
67 public:
68         /**
69          * Initializes this instance of %GalleryItem with the specified parameters.
70          *
71          * @since 2.0
72          *
73          * @return              An error code
74          * @param[in]   bitmap                  The default bitmap image
75          * @param[in]   rotation                The rotation of the bitmap image
76          * @exception   E_SUCCESS               The method is successful.
77          * @exception E_SYSTEM          A system error has occurred.
78          */
79         result Construct(const Tizen::Graphics::Bitmap& bitmap, GalleryImageRotation rotation = GALLERY_IMAGE_ROTATION_0);
80
81         /**
82          * Initializes this instance of %GalleryItem with the specified parameters.
83          * @if OSPCOMPAT
84          * @brief <i> [Compatibility] </i>
85          * @endif
86          * @since 2.0
87          * @if OSPCOMPAT
88          * @compatibility This method has compatibility issues with OSP compatible applications. @n
89          *                                      For more information, see @ref CompIoPathPage "here".
90          * @endif
91          * @return                                       An error code
92          * @param[in]  bitmap                 The default bitmap image
93          * @param[in]  filePath               The bitmap file path
94          * @param[in]  rotation               The rotation of the bitmap image
95          * @exception   E_SUCCESS                               The method is successful.
96          * @exception   E_OVERFLOW                              The image specified by @c filePath has caused an overflow.
97          * @exception   E_UNSUPPORTED_FORMAT    The image specified by @c filePath is not supported.
98          * @exception  E_FILE_NOT_FOUND       The specified file cannot be found or accessed.
99          * @exception  E_INTERRUPTED             The requested operation cannot be performed due to an interruption from another thread. @n
100          * @exception  E_ILLEGAL_ACCESS       The image specified by @c filePath parameter, is protected with DRM.
101          * @exception  E_SYSTEM                  A system error has occurred.
102          * @remarks  The specified file path is used to decode the original bitmap to show a more higher quality image when the corresponding item is zoomed.
103          */
104         result Construct(const Tizen::Graphics::Bitmap& bitmap, const Tizen::Base::String& filePath, GalleryImageRotation rotation = GALLERY_IMAGE_ROTATION_0);
105
106 private:
107         //
108         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
109         //
110         GalleryItem(const GalleryItem& rhs);
111
112         //
113         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
114         //
115         GalleryItem& operator =(const GalleryItem& rhs);
116
117 private:
118         _GalleryItemImpl* __pImpl;
119
120         friend class _GalleryItemImpl;
121 }; // GalleryItem
122
123 }}} // Tizen::Ui::Controls
124
125 #endif // _FUI_CTRL_GALLERY_ITEM_H_