From: Prince Kumar Dubey Date: Mon, 14 Jun 2010 09:31:45 +0000 (+0530) Subject: [elm_pagecontrol & elm_segmentcontrol] Doxygen comment added. X-Git-Tag: beat-winset-test_0.1.1-40~266 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a7866d34be1d1deda9158388418cbff8ce6d4925;p=framework%2Fuifw%2Felementary.git [elm_pagecontrol & elm_segmentcontrol] Doxygen comment added. --- diff --git a/src/lib/elm_pagecontrol.c b/src/lib/elm_pagecontrol.c index 71c9890..75a8bba 100755 --- a/src/lib/elm_pagecontrol.c +++ b/src/lib/elm_pagecontrol.c @@ -1,6 +1,14 @@ #include #include "elm_priv.h" +/** + * @defgroup PageControl PageControl + * + * A page control is a succession of dots centered in the control. + * Each dot corresponds to a page in the application’s document (or other data-model entity), + * with the white dot indicating the currently viewed page. + */ + #define PADDING 9 typedef struct _Widget_Data Widget_Data; @@ -202,6 +210,14 @@ static void _layout(Evas_Object *o, Evas_Object_Box_Data *priv, void *data) return; } +/** + * Add a new pagecontrol to the parent + * @param parent The parent object + * @return The new object or NULL if it cannot be created + * + * @ingroup PageControl + */ + EAPI Evas_Object * elm_page_control_add(Evas_Object *parent) { @@ -257,7 +273,14 @@ elm_page_control_add(Evas_Object *parent) return obj; } -EAPI void elm_page_control_page_count_set(Evas_Object *obj, unsigned int page_count) +/** + * The number of pages for the pagecontrol to show as dots. + * @param obj The pagecontrol object + * @param page_count Number of pages + * + * @ingroup PageControl + */ +EAPI void elm_page_control_page_count_set(Evas_Object *obj, unsigned int page_count) { Widget_Data *wd = elm_widget_data_get(obj); if (!wd) @@ -294,6 +317,13 @@ EAPI void elm_page_control_page_count_set(Evas_Object *obj, unsigned int page_co wd->page_count = page_count; } +/** + * Set current/displayed page to given page number or id. + * @param obj The pagecontrol object + * @param page_id Page number or Page Id + * + * @ingroup PageControl + */ EAPI void elm_page_control_page_id_set(Evas_Object *obj, unsigned int page_id) { @@ -317,6 +347,13 @@ void elm_page_control_page_id_set(Evas_Object *obj, unsigned int page_id) edje_object_part_drag_value_set(wd->base, "elm.drag.part", cur_position,0); } +/** + * Get current/displayed page number or id. + * @param obj The pagecontrol object + * @return The current/displayed page id/number. + * + * @ingroup PageControl + */ EAPI unsigned int elm_page_control_page_id_get(Evas_Object *obj) { diff --git a/src/lib/elm_segment_control.c b/src/lib/elm_segment_control.c index edb17dd..b2351f6 100755 --- a/src/lib/elm_segment_control.c +++ b/src/lib/elm_segment_control.c @@ -4,11 +4,11 @@ /** * @addtogroup SegmentControl SegmentControl * - * The SegmentControl button allows for 1 or more selectors to be created to select 1 - * of a set of options. - * - * Signals that you can add callbacks for are: - * + * SegmentControl object is a horizontal control made of multiple segments, + * each segment functioning as a discrete button. A segmented control affords a compact means to group together a number of controls. + * A segmented control can display a title or an image. The UISegmentedControl object automatically resizes segments to fit proportionally + * within their superview unless they have a specific width set. When you add and remove segments, + * you can request that the action be animated with sliding and fading effects. */ typedef struct _Widget_Data Widget_Data; struct _Widget_Data @@ -163,6 +163,13 @@ _layout(Evas_Object *o, Evas_Object_Box_Data *priv, void *data) return; } +/** + * Add a new segmentcontrol to the parent + * @param parent The parent object + * @return The new object or NULL if it cannot be created + * + * @ingroup SegmentControl SegmentControl + */ EAPI Evas_Object * elm_segment_control_add(Evas_Object *parent) { @@ -467,6 +474,17 @@ static void _queue_list(Evas_Object *obj) wd->count = eina_list_count(wd->seg_ctrl); } +/** + * Add a new segment to segmentcontrol + * @param obj The SegmentControl object + * @param icon The icon object for added segment + * @param label The label for added segment + * @param animate If 1 the action be animated with sliding effects default 0. + * @return The new segment or NULL if it cannot be created + * + * @ingroup SegmentControl SegmentControl + */ + EAPI Elm_Segment_Item * elm_segment_control_add_segment(Evas_Object *obj, Evas_Object *icon, const char *label, Eina_Bool animate) { @@ -549,6 +567,17 @@ _item_search(Evas_Object *obj, Elm_Segment_Item *item) return NULL; } +/** + * Insert a new segment to segmentcontrol + * @param obj The SegmentControl object + * @param icon The icon object for added segment + * @param label The label for added segment + * @param index The position at which segment to be inserted + * @param animate If 1 the action be animated with sliding effects default 0. + * @return The new segment or NULL if it cannot be created + * + * @ingroup SegmentControl SegmentControl + */ EAPI void elm_segment_control_insert_segment_at(Evas_Object *obj, Evas_Object *icon, const char *label, unsigned int index, Eina_Bool animate) { @@ -602,7 +631,14 @@ elm_segment_control_insert_segment_at(Evas_Object *obj, Evas_Object *icon, const return; } - +/** + * Delete a segment to segmentcontrol + * @param obj The SegmentControl object + * @param item The Segment to be deleted + * @param animate If 1 the action be animated with sliding effects default 0. + * + * @ingroup SegmentControl SegmentControl + */ EAPI void elm_segment_control_delete_segment(Evas_Object *obj, Elm_Segment_Item *item, Eina_Bool animate) { @@ -638,6 +674,14 @@ elm_segment_control_delete_segment(Evas_Object *obj, Elm_Segment_Item *item, Ein return; } +/** + * Delete a segment to segmentcontrol + * @param obj The SegmentControl object + * @param index The position at which segment to be deleted + * @param animate If 1 the action be animated with sliding effects default 0. + * + * @ingroup SegmentControl SegmentControl + */ EAPI void elm_segment_control_delete_segment_at(Evas_Object *obj, unsigned int index, Eina_Bool animate) @@ -681,7 +725,14 @@ elm_segment_control_delete_segment_at(Evas_Object *obj, unsigned int index, Ein return; } - +/** + * Get the label of a segment of segmentcontrol + * @param obj The SegmentControl object + * @param index The index of the segment + * @return The label + * + * @ingroup SegmentControl SegmentControl + */ EAPI const char * elm_segment_control_get_segment_label_at(Evas_Object *obj, unsigned int index) @@ -698,6 +749,14 @@ elm_segment_control_get_segment_label_at(Evas_Object *obj, unsigned int index) return NULL; } +/** + * Get the icon of a segment of segmentcontrol + * @param obj The SegmentControl object + * @param index The index of the segment + * @return The icon object + * + * @ingroup SegmentControl SegmentControl + */ EAPI Evas_Object * elm_segment_control_get_segment_icon_at(Evas_Object *obj, unsigned int index) @@ -714,6 +773,15 @@ elm_segment_control_get_segment_icon_at(Evas_Object *obj, unsigned int index) return NULL; } +/** + * Get the currently selected segment of segmentcontrol + * @param obj The SegmentControl object + * @param value The current segment id + * @return The selected Segment + * + * @ingroup SegmentControl SegmentControl + */ + EAPI Elm_Segment_Item * elm_segment_control_selected_segment_get(const Evas_Object *obj, int *value) { @@ -734,6 +802,14 @@ elm_segment_control_selected_segment_get(const Evas_Object *obj, int *value) return NULL; } +/** + * Get the count of segments of segmentcontrol + * @param obj The SegmentControl object + * @return The count of Segments + * + * @ingroup SegmentControl SegmentControl + */ + EAPI int elm_segment_control_get_segment_count(Evas_Object *obj) {