TizenRefApp-9717 [Gallery] Add doxygen documentation to View classes 00/158200/5
authorAlexander\ Kovalenko <al.kovalenko@samsung.com>
Mon, 30 Oct 2017 08:40:13 +0000 (10:40 +0200)
committerAlexander\ Kovalenko <al.kovalenko@samsung.com>
Tue, 7 Nov 2017 12:16:33 +0000 (14:16 +0200)
Change-Id: If9b35853258825e3186f492178864aa3d28f0b4c

gallery/view/ImageGrid.h
gallery/view/ImageViewer.h
gallery/view/PageContent.h
gallery/view/TouchParser.h
gallery/view/helpers.h

index 2e796e49314820f1ffc108190f172553d504f5b6..2b84990c02d8cfeff4b2eb70487eda3f5105f725 100644 (file)
@@ -29,21 +29,57 @@ namespace gallery {
 
        UCL_DECLARE_REF_ALIASES(ImageGrid);
 
+       /**
+        * @brief Represents placement grid for images
+        */
        class ImageGrid : public ucl::ElmWidget {
        public:
                UCL_DECLARE_REF_ALIASES(IListener);
 
+               /**
+                * @brief Grid type
+                */
                enum class Type {
-                       HCOMB_3X3,
-                       LINEAR
+                       HCOMB_3X3,   /**< Honeycomb 3 by 3*/
+                       LINEAR       /**< Linear list, 1 at a time*/
                };
-
+               /**
+                * @brief Provides set of instruments for creation of ImageGrid object
+                *        with set of options
+                */
                class Builder final {
                public:
+                       /**
+                        * @brief Default constructor
+                        */
                        Builder();
+
+                       /**
+                        * @brief Sets type
+                        * @param[in] value Type
+                        * @return Reference to Builder object
+                        */
                        Builder &setType(Type value);
+
+                       /**
+                        * @brief Sets listener
+                        * @param[in] value Weak reference to IListener object
+                        * @return Reference to Builder object
+                        */
                        Builder &setListener(const IListenerWRef &value);
+
+                       /**
+                        * @brief Sets selection mode on startup
+                        * @param[in] value Value
+                        * @return Reference to Builder object
+                        */
                        Builder &setSelectModeStartup(bool value);
+
+                       /**
+                        * @brief Creates ImageGrid object
+                        * @param[in] parent Parent widget
+                        * @return Weak reference to ImageGrid object
+                        */
                        ImageGridSRef build(ElmWidget &parent) const;
                private:
                        Type m_type;
@@ -51,72 +87,187 @@ namespace gallery {
                        bool m_selectModeStartup;
                };
 
+               /**
+                * @brief Enumeration of item events
+                */
                enum class ItemEvent {
-                       CLICK,
-                       DOUBLE_TAP,
-                       TAP_AND_HOLD
+                       CLICK,        /**< Click*/
+                       DOUBLE_TAP,   /**< Double tap*/
+                       TAP_AND_HOLD  /**< Tap and hold*/
                };
 
+               /**
+                * @brief Represents listener
+                */
                class IListener : protected ucl::NonCopyable {
                public:
+
+                       /**
+                        * @brief Occurs when item is realized
+                        * @param[in] itemIndex Item index
+                        */
                        virtual void onItemRealized(int itemIndex) = 0;
+
+                       /**
+                        * @brief Occurs when item is unrealized
+                        * @param[in] itemIndex Item index
+                        */
                        virtual void onItemUnrealized(int itemIndex) = 0;
+
+                       /**
+                        * @brief Occurs when item event emerged
+                        * @param[in] itemIndex Item index
+                        * @param[in] event Event descriptor
+                        * @param[in] x X coordinate
+                        * @param[in] y Y coordinate
+                        */
                        virtual void onItemEvent(int itemIndex,
                                        ItemEvent event, int x, int y) = 0;
+
+                       /**
+                        * @brief Occurs when transition finishes
+                        */
                        virtual void onTransitionFinished() {}
                };
 
+               /**
+                * @Enumeration of item flags
+                */
                enum {
-                       UF_LOSE_IMAGE = 1,
-                       UF_LOSE_BG = 2,
-                       UF_BLOCK_CLICKS = 4,
-                       UF_SELECTED = 8
+                       UF_LOSE_IMAGE = 1,    /**< Make image transparent*/
+                       UF_LOSE_BG = 2,       /**< Make background transparent*/
+                       UF_BLOCK_CLICKS = 4,  /**< Is clickable*/
+                       UF_SELECTED = 8       /**< Is selected*/
                };
 
+               /**
+                * @brief Item parameters entry
+                */
                struct ItemParams final {
-                       std::string imagePath;
-                       std::string bgImagePath;
-                       int imageWidth;
-                       int imageHeight;
-                       int flags;
+                       std::string imagePath;    /**< Image path*/
+                       std::string bgImagePath;  /**< Background image path*/
+                       int imageWidth;           /**< Image width*/
+                       int imageHeight;          /**< Image height*/
+                       int flags;                /**< Flags*/
                };
 
+               /**
+                * @brief Item info entry
+                */
                struct ItemInfo final {
-                       int imageLoadSize;
-                       bool isImageLoadSizeFull;
-                       bool isImageLoaded;
+                       int imageLoadSize;        /**< Image load size*/
+                       bool isImageLoadSizeFull; /**< Is load full size*/
+                       bool isImageLoaded;       /**< Is image loaded*/
                };
 
+               /**
+                * @brief Provides unrealization
+                */
                class Unrealizer final : ucl::NonCopyable {
                public:
+                       /**
+                        * @brief Constructor
+                        * @param[in] imageGrid Image grid
+                        */
                        Unrealizer(ImageGrid &imageGrid);
+
+                       /**
+                        * @brief Destructor
+                        */
                        ~Unrealizer();
                private:
                        ImageGrid &m_imageGrid;
                };
 
        public:
+               /**
+                * @brief Sets listener
+                * @param[in] value Weak reference to IListener object
+                */
                void setListener(const IListenerWRef &listener);
 
+               /**
+                * @brief Sets item count
+                * @param[in] count Item count
+                * @return RES_OK on success, otherwise an error code on failure
+                */
                ucl::Result setItemCount(int count);
 
+               /**
+                * @brief Sets select mode enabled
+                * @param[in] enabled Value
+                * @return RES_OK on success, otherwise an error code on failure
+                */
                ucl::Result setSelectModeEnabled(bool enabled);
+
+               /**
+                * @brief Checks if select mode is active
+                * @return true if in select mode, otherwise - false
+                */
                bool isInSelectMode() const;
+
+               /**
+                * @brief Checks if in transition
+                * @return true if in transition, otherwise - false
+                */
                bool isInTransition() const;
 
+               /**
+                * @brief Updates image grid
+                */
                void update();
 
+               /**
+                * @brief Updates item
+                * @param[in] itemIndex Item index
+                * @param[in] params Item parameters
+                * @return RES_OK on success, otherwise an error code on failure
+                */
                ucl::Result updateItem(int itemIndex, const ItemParams &params);
 
+               /**
+                * @brief Checks if item is realized
+                * @param[in] itemInex Item index
+                * @return RES_OK on success, otherwise an error code on failure
+                */
                ucl::Result isItemRealized(int itemIndex) const;
 
+               /**
+                * @brief Gets item info
+                * @param[in] itemIndex Item index
+                * @param[out] info Item info
+                * @return RES_OK on success, otherwise an error code on failure
+                */
                ucl::Result getItemInfo(int itemIndex, ItemInfo &info) const;
 
+               /**
+                * @brief Gets scrolled to item index
+                * @return Index
+                */
                int getScrolledToItemIndex() const;
+
+               /**
+                * @brief Scrolls to item
+                * @param[in] itemInex Item index
+                * @return RES_OK on success, otherwise an error code on failure
+                */
                ucl::Result scrollToItem(int itemIndex);
+
+               /**
+                * @brief Brings in item
+                * @param[in] itemInex Item index
+                * @return RES_OK on success, otherwise an error code on failure
+                */
                ucl::Result bringInItem(int itemIndex);
 
+               /**
+                * @brief Activates rotary
+                */
                void activateRotary();
+
+               /**
+                * @brief Deactivates rotary
+                */
                void deactivateRotary();
 
        private:
index 409b010d16af01f927c8b0286d4d061c3e3f13fb..1118fbb598b176672cf63c26ab64d8f3f02bc750 100644 (file)
@@ -28,14 +28,50 @@ namespace gallery {
 
        UCL_DECLARE_REF_ALIASES(ImageViewer);
 
+       /**
+        * @brief Represents image viewer
+        */
        class ImageViewer final : public ucl::ElmWidget {
        public:
+
+               /**
+                * @brief Provides set of instruments for creation of
+                * ImageViewer object with set of options
+                */
                class Builder final {
                public:
+
+                       /**
+                        * @brief Constuctor
+                        */
                        Builder();
+
+                       /**
+                        * @brief Sets high resolution image path
+                        * @param[in] path Image path
+                        * @return Reference to Builder object
+                        */
                        Builder &setHighResImagePath(std::string path);
+
+                       /**
+                        * @brief Sets load size
+                        * @param[in] value Size
+                        * @return Reference to Builder object
+                        */
                        Builder &setLoadSize(int value);
+
+                       /**
+                        * @brief Set force load
+                        * @param[in] value Value
+                        * @return Reference to Builder object
+                        */
                        Builder &setForceLoad(bool value);
+
+                       /**
+                        * @brief Creates ImageViewer object
+                        * @param[in] parent Parent presenter
+                        * @return Shared reference to ImageViewer object
+                        */
                        ImageViewerSRef build(ucl::ElmWidget &parent) const;
                private:
                        std::string m_highResPath;
@@ -44,12 +80,46 @@ namespace gallery {
                };
 
        public:
+
+               /**
+                * @brief Sets low resolution image path
+                * @param[in] path image path
+                */
                void setLowResImagePath(const std::string &path);
+
+               /**
+                * @brief Zooms in
+                * @param[in] originX X coordinate of point that doesn't move during
+                *            zoom in process
+                * @param[in] originY Y coordinate of point that doesn't move during
+                *            zoom in process
+                * @return
+                */
                bool zoomIn(int originX, int originY);
+
+               /**
+                * @brief Zooms out
+                * @param[in] value Value
+                * @return true if zoomed out, false - if not
+                */
                bool zoomOut();
 
+               /**
+                * @brief Checks if zooming out
+                * @return true if zooming out, false - if not
+                */
                bool isZooming() const;
+
+               /**
+                * @brief Checks if zooming in
+                * @return true if zooming in, false - if not
+                */
                bool isZoomedIn() const;
+
+               /**
+                * @brief Checks if zoomed out
+                * @return true if zoomed out, false - if not
+                */
                bool isZoomedOut() const;
 
        private:
index 593600c3051fc32fc40de7c4b703d74fa8a69dba..c7d9461bbef3130ed51cd21115637f82e802bca6 100644 (file)
@@ -25,41 +25,100 @@ namespace gallery {
 
        UCL_DECLARE_REF_ALIASES(PageContent);
 
+       /**
+        * @brief Represents page content
+        */
        class PageContent final : public ucl::ElmWidget {
        public:
+
+               /**
+                * @brief Provides set of instruments for creation of
+                * PageContent object with set of options
+                */
                class Builder final {
                public:
+                       /**
+                        * @brief Default constructor
+                        */
                        Builder();
+
+                       /**
+                        * @brief Sets flags
+                        * @param[in] flags Flags
+                        * @return Reference to Builder object
+                        */
                        Builder &setFlags(int flags);
+
+                       /**
+                        * @brief Creates PageContent object
+                        * @param[in] parent Parent presenter
+                        * @return Shared reference to PageContent object
+                        */
                        PageContentSRef build(ucl::ElmWidget &parent) const;
                private:
                        int m_flags;
                };
 
+               /**
+                * @brief Enumeration of flags
+                */
                enum {
-                       FLAG_MORE_OPTIONS = 1,
-                       FLAG_SELECT_BUTTON = 2,
-                       FLAG_BOTTOM_BUTTON = 4,
+                       FLAG_MORE_OPTIONS = 1,                             /**< Select button flag*/
+                       FLAG_SELECT_BUTTON = 2,                            /**< Select button flag*/
+                       FLAG_BOTTOM_BUTTON = 4,                            /**< Bottom button flag*/
 
-                       FLAGS_SELECT_MODE = (FLAG_SELECT_BUTTON | FLAG_BOTTOM_BUTTON),
-                       FLAGS_ALL = (FLAG_MORE_OPTIONS | FLAGS_SELECT_MODE)
+                       FLAGS_SELECT_MODE =
+                                       (FLAG_SELECT_BUTTON | FLAG_BOTTOM_BUTTON), /**< Select mode flag*/
+                       FLAGS_ALL = FLAGS_SELECT_MODE                      /**< All flags*/
                };
 
+               /**
+                * @brief Enumeration of parts
+                */
                enum class Part {
-                       DEFAULT,
-                       OVERLAY,
-                       MORE_OPTIONS,
-                       SELECT_BUTTON,
-                       BOTTOM_BUTTON
+                       DEFAULT,           /**< Default*/
+                       OVERLAY,           /**< Overlay*/
+                       MORE_OPTIONS,      /**< More option button*/
+                       SELECT_BUTTON,     /**< Selector button*/
+                       BOTTOM_BUTTON      /**< Bottom button*/
                };
 
        public:
+
+               /**
+                * @brief Sets Evas object to part
+                * @param[in] widget Widget. @see ucl::Widget
+                * @param[in] part Part
+                * @return ListOptionDialog::Builder object
+                */
                ucl::Result set(ucl::Widget &widget, Part part = Part::DEFAULT);
+
+               /**
+                * @brief Clears part
+                * @param[in] part Part
+                * @return Evas object pointer
+                */
                Evas_Object *unset(Part part = Part::DEFAULT);
 
+               /**
+                * @brief Gets part
+                * @param[in] part Part
+                * @return Evas object pointer
+                */
                Evas_Object *get(Part part = Part::DEFAULT) const;
 
+               /**
+                * @brief Sets select button visible
+                * @param[in] visible Value
+                * @return RES_OK on success, otherwise an error code on failure
+                */
                ucl::Result setSelectButtonVisible(bool visible);
+
+               /**
+                * @brief Sets More options part visible
+                * @param[in] visible Value
+                * @return RES_OK on success, otherwise an error code on failure
+                */
                ucl::Result setMoreOptionsVisible(bool visible);
 
        private:
index be391a39f4e9310a8082aa72d1fff168a6bb91d3..209e2ba22f8ef0c854a786f91df8df11fcbe948c 100644 (file)
@@ -25,8 +25,14 @@ namespace gallery {
 
        UCL_DECLARE_REF_ALIASES(TouchParser);
 
+       /**
+        * @brief Provides touch parsing options
+        */
        class TouchParser final : public ucl::RefCountAware {
        public:
+               /**
+                * @brief Tap handler type
+                */
                using TapHandler = ucl::WeakDelegate<void(int x, int y)>;
 
        private:
@@ -35,8 +41,22 @@ namespace gallery {
                virtual ~TouchParser();
 
        public:
+               /**
+                * @brief Sets tap handler
+                * @param[in] handler Tap handler
+                */
                void setTapHandler(const TapHandler &handler);
+
+               /**
+                * @brief Sets double tap handler
+                * @param[in] handler Double tap handler
+                */
                void setDoubleTapHandler(const TapHandler &handler);
+
+               /**
+                * @brief Sets tap and hold handler
+                * @param[in] handler Tap and hold handler
+                */
                void setTapAndHoldHandler(const TapHandler &handler);
 
        private:
index 3183748248ef0755ee30c630cb28f4fed69cf9cd..3c3eb7d3ad2c15a47630739b75d1ede5c7c4eee4 100644 (file)
 
 namespace gallery { namespace util {
 
+       /**
+        * @brief Creates circle surface
+        * @param[in] navi Naviframe object. @see ucl::Naviframe
+        * @return RES_OK on success, otherwise an error code on failure
+        */
        ucl::Result createCircleSurface(ucl::Naviframe &navi);
+
+       /**
+        * @brief Gets circle surface
+        * @param[in] widget ElmWidget object. @see ucl::ElmWidget
+        * @return Pointer to circle surface
+        */
        Eext_Circle_Surface *getCircleSurface(const ucl::ElmWidget &widget);
 
        void updateElmLanguage();
@@ -31,9 +42,25 @@ namespace gallery { namespace util {
 
 namespace gallery {
 
+       /**
+        * @brief Adds rotary event handler
+        * @param[in] func Callback function
+        * @param[in] data Pointer to data
+        */
        void addRotaryEventHandler(Eext_Rotary_Handler_Cb func, void *data);
+
+       /**
+        * @brief Deletes rotary event handler
+        * @param[in] func Callback function
+        * @param[in] data Pointer to data
+        */
        void delRotaryEventHandler(Eext_Rotary_Handler_Cb func, void *data);
 
+       /**
+        * @brief Gets image theme
+        * @param[in] fileName Input file
+        * @return Layout theme. @see ucl::LayoutTheme
+        */
        ucl::LayoutTheme getImageTheme(const char *fileName);
 }