elementary/dayselector - New widget Elc_dayselector
[framework/uifw/elementary.git] / doc / examples.dox
index eff1698..0811bee 100644 (file)
  *
  * @ref clock_example
  *
+ * @ref datetime_example
+ *
+ * @ref dayselector_example
+ *
  * @ref mapbuf_example
 
  * @ref map_example_01
  * @until }
  *
  * The next callback will be used when setting the overlay (using
- * elm_bg_overlay_set()):
+ * elm_object_content_set()):
  *
  * @skip _cb_overlay_changed
  * @until }
  *
  * @skipline elm_radio_value_set
  *
- * Then we add a checkbox for the elm_bg_overlay_set() function:
+ * Then we add a checkbox for the elm_object_content_set() function for the bg:
  *
  * @skip check_add
  * @until evas_object_show
  *
  * Now look at the code of the @c _cb_overlay_changed again. If the checkbox
  * state is checked, an overlay will be added to the background. It's done by
- * creating an Edje object, and setting it with elm_bg_overlay_set() to the
+ * creating an Edje object, and setting it with elm_object_content_set() to the
  * background object. For information about what are and how to set Edje
  * object, look at the Edje documentation.
  *
  */
 
 /**
+ * @page datetime_example Datetime widget example
+ *
+ * This code places three Elementary Datetime widgets on a window, each of
+ * them exemplifying the widget's different usage.
+ *
+ * The first of them is <b>"only Date display"</b>:
+ * @dontinclude datetime_example.c
+ * @skip only DATE
+ * @until evas_object_show
+ *
+ * For <b>"only Time display"</b>, see the second datetime:
+ * @dontinclude datetime_example.c
+ * @skip only TIME
+ * @until evas_object_show
+ *
+ * The third one will display datetime shows both <b>Date and Time</b>, corresponding format will be
+ * taken from system @b locale. Note, besides, that the strings are different
+ *  for different language settings.
+ *
+ * <b>Datetime format</b> can be programmatically set by using 
+ * elm_datetime_format_set():
+ * @dontinclude datetime_example.c
+ * @skip DATE and TIME
+ * @until evas_object_show
+ * The default format of any locale consists:
+ * - Year Field
+ * - Month Field
+ * - Date Field
+ * - Hour Field(12hr/24hr format)
+ * - Minute Field
+ * - AM/PM (if exists).
+ *
+ * This is how the example program's window looks like with the datetime widget
+ * showing only date, only time and both date & time:
+ *
+ * @image html screenshots/datetime_example.png
+ * @image latex screenshots/datetime_example.eps width=\textwidth
+ *
+ * See the full @ref datetime_example_c "source code" for
+ * this example.
+ *
+ * @example datetime_example.c
+ */
+
+/**
+ * @page dayselector_example Dayselector widget example
+ *
+ * This code places two Elementary dayselector widgets on a window, each of
+ * them exemplifying the different widget styles.
+ *
+ * The first of them is the dayselector in default style:
+ * @dontinclude dayselector_example.c
+ * @skip weekdays starting from Sunday
+ * @until evas_object_show
+ *
+ * As you see, the default style displays the weekdays starting from Sunday.
+ *
+ * One can select/unselect a day just by clicking on the day object.
+ * The selection toggles once it is being pressed.
+ *
+ *
+ * For showing weekdays starting from Monday, see the second dayselector:
+ * @dontinclude dayselector_example.c
+ * @skip weekdays starting from Monday
+ * @until evas_object_show
+ *
+ *
+ * The following code exemplifies the selection APIs of Dayselector:
+ * @dontinclude dayselector_example.c
+ * @skip Callback function
+ * @until End of clicked callback
+ *
+ *
+ * See the full @ref dayselector_example.c "example", whose window should
+ * look like this picture:
+ *
+ * @image html screenshots/dayselector_example.png
+ * @image latex screenshots/dayselector_example.eps width=\textwidth
+ *
+ * See the full @ref dayselector_example_c "source code" for this example.
+ *
+ * @example dayselector_example.c
+ */
+
+/**
  * @page mapbuf_example Mapbuf Widget Example
  *
  * This code places a Elementary mapbuf widget on a window,
  */
 
 /**
- * @page map_example_02 Map Example - Markers Usage
+ * @page map_example_02 Map Example - Overlay Usage
  *
  * This code places a Elementary map widget on a window,
- * to exemplify part of the widget's API, related to markers.
+ * to exemplify part of the widget's API, related to overlays.
  *
- * We'll start this example the same way
+ * We'll start this example in the same way
  * @ref map_example_01 "Map Example 1". Adding a map with buttons to control
  * zoom, so if you didn't read it yet, just do it now.
  * @dontinclude map_example_02.c
  * @skipline elm_map_add
  * @until zoom_fill
  *
- * Markers can be placed over the map to represent anything we want. Let's
- * say we want to represent some countries and cities with markers. To add
- * a mark we need a marker class and also a group class.
- *
- * A marker class can be created as the following code does:
- * @skipline marker_class_new
- * @until style_set
- *
- * These lines create a new class, set a function to return the object
- * to be displayed inside the bubble that opens when a user clicks over
- * the mark, set the function to retrieve an icon to be placed inside
- * the marker, and defines the style of this marker. It can be @c empty
- * that will just show the icon, @c radio, that will place a blue circle,
- * and @c radio2 that will place a green circle.
- *
- * The group classes can be created in a very similar way, but you won't
- * set callback functions to get stuff to be placed inside the bubble,
- * since clicking over a group marker will just get the content
- * of all the markers composing the group and place on this bubble.
- * The limit of markers to get can be set with function
- * elm_map_max_marker_per_group_set() but we won't need on this example.
- * But we can set the zoom required to display the marks that belongs
- * to this group class, so if the zoom is less than this value, nothing
- * will be show. The group marker style will be used when markers are
- * near each other, and the count of markers grouped will be placed
- * inside the group marker.
- * @skipline group_class_new
- * @until displayed_set
- *
- * For marker and group classes to represent a country, the same is done:
- * @skipline marker_class_new
- * @until displayed_set
- *
- * Next we'll create some markers representing cities and coutries.
- * We'll append them in a list, to close up them later. To create a marker
- * we need to pass the coordinates, marker class, group class and optionally,
- * data:
- * @skipline marker_add
- * @until data_chile
- * @until append
+ * Overlays can be placed over the map to represent anything we want. Let's
+ * say we want to represent some countries and cities with overlays. 
+ * 
+ * Before we create city or country overlays, let's create class overlays. 
+ *
+ * @skipline elm_map_overlay_class_add
+ * @until elm_map_overlay_icon_set
+ * These lines create a class overlay which represents cities.
+ * This class overlay will be used for grouping city overlays. 
+ * Later city overlays in the same class are appended to this class overlay. 
+ * if city overlays are near each other, they will be grouped.
+ *
+ * We can set the icon for the class so that the icon will be displayed 
+ * when city overlays are grouped.
+ * We can set the zoom required to display the overlays that belongs
+ * to this class, so if the zoom is less than this value, nothing
+ * will be shown. 
+ * 
+ * Country class can be created in the same way.
+ * @skipline elm_map_overlay_class_add
+ * @until elm_map_overlay_icon_set
+ *
+ * Next we'll create some overlays representing cities and coutries.
+ * We set the data for the overlay so that can be used later when 
+ * clicked callback is called.
+ * We'll append them into city class to be grouped.
+ * We'll append them in a list, to close up them later. 
+ * To create a default overlay, we need to pass the coordinates.
+ * @skipline elm_map_overlay_add
+ * @until eina_list_append
+ *
+ * We subscribe a smart callback "overlay,clicked" to create bubble on 
+ * the clicked overlay.
+ * @dontinclude map_example_02.c
+ * @skipline "overlay,clicked"
+ *
+ * Finally, on our @c main function, we ask the map to show all the overlays
+ * with the biggest zoom possible, passing the list of overlays added.
+ * @skipline elm_map_overlays_show
  *
  * We have created a specific structure for this example to store the name
  * of the place and a path to a image file to represent it.
  * @dontinclude map_example_02.c
  * @skipline typedef
- * @until Marker_Data;
+ * @until Overlay_Data;
  *
  * We'll create instances for each place:
  * @skipline argentina
  * @until sky_03
  *
- * Finally, on our @c main function, we ask the map to show all the markers
- * with the biggest zoom possible, passing the list of markers added:
- * @skipline list_show
- *
- * Actually the zoom is not what we want, so after the download of the map
- * is concluded, let's set another zoom level. For this we add a callback
- * for @c "downloaded" signal:
- * @skipline callback_add
- *
- * The callback function will simply set the zoom level we want and remove
- * the callback, otherwise it would be called all the time, after the map
- * is downloaded:
+  * To return an icon, all we need to do is to add a elm_icon and return it:
  * @dontinclude map_example_02.c
- * @skipline _map_downloaded
- * @until }
- *
- * We added two kinds of callback functions when we added the markers.
- * One will return the content of the bubbles, and other the icon to be
- * placed inside the marker.
- *
- * To return an icon, all we need to do is add a elm_icon and return it:
- * @dontinclude map_example_02.c
- * @skip static Evas_Object
- * @skip }
- * @skipline static Evas_Object
+ * @skipline _icon_get(
  * @until }
  *
- * For the content, let's return something more elaboreate. We will return
+ * For the content, let's return something more elaborate. We will return
  * a box with an image representing the place, and the name of this place:
- * @skipline static Evas_Object
+ * @skipline _box_get(
  * @until }
  *
  * See @ref map_example_02.c "map_example_02.c" for full source,
  * start point, and would like that he enters the address of his
  * destination in a entry, and we'll trace a route on the map.
  *
- * We'll start this example the same way
+ * We'll start this example in the same way
  * @ref map_example_01 "Map Example 1". Adding a map with buttons to control
  * zoom, so if you didn't read it yet, just do it now. Actually there is
  * a change, that we're aligning buttons to the top, since we wan't a
  *
  * This code places a Elementary diskselector widgets on a window,
  * along with some buttons trigerring actions on it (though its API).
- * It covers most of Elm_Diskselector_Item functions.
+ * It covers most of diskselector item functions.
  *
  * On our @c main function, we are adding a default diskselector with
  * 3 items. We are only setting their labels (second parameter of function
  *
  * If you want to free this data, or handle that the way you need when the
  * item is deleted, set a callback function for that, with
- * elm_diskselector_item_del_cb_set().
+ * elm_object_item_del_cb_set().
  *
  * As you can see we check if @c it is not @c NULL after appending it.
  * If an error happens, we won't try to set a function for it.
  * @skipline _del_cb
  * @until }
  *
- * To delete an item we simple need to call elm_diskselector_item_del() with
+ * To delete an item we simple need to call elm_object_item_del() with
  * a pointer for such item.
  *
  * If you need, you can get selected item with
  *
  * This code places a Elementary list widgets on a window,
  * along with some buttons trigerring actions on it (though its API).
- * It covers most of Elm_List_Item functions.
+ * It covers most of elm_list_item functions.
  *
  * On our @c main function, we are adding a default list with
  * 3 items. We are only setting their labels (second parameter of function
  * @skipline _del_cb(
  * @until }
  *
- * To delete an item we simple need to call elm_list_item_del() with
+ * To delete an item we simple need to call elm_object_item_del() with
  * a pointer for such item.
  *
  * If you need, you can get selected item with
  * @skipline elm_toolbar_add
  * @until Update
  *
- * The only difference here is that we set shrink mode to #ELM_SHRINK_MODE_HIDE,
+ * The only difference here is that we set shrink mode to #ELM_TOOLBAR_SHRINK_HIDE,
  * that won't display items that doesn't fit to the window.
  *
  * Now, let's add an item with states. First, add the item just as any other.
  * @until }
  *
  * This call elm_layout_data_get() is used to fetch the string based on the key,
- * and elm_object_text_part_set() will set the part defined in the theme as
+ * and elm_object_part_text_set() will set the part defined in the theme as
  * "example/title" to contain this string. This key "example/title" has nothing
  * special. It's just an arbitrary convention that we are using in this example.
  * Every string in this example referencing a part of this theme will be of the
  * Finally, we have an area in this layout theme, in the bottom part of it,
  * reserved for adding an specific widget. Differently from the 2 parts
  * described until now, this one can only receive one widget with the call
- * elm_object_content_part_set() for the layout. If there was already an item on this specific part,
- * it will be deleted (one can use elm_object_content_part_unset() in order to remove
+ * elm_object_part_content_set() for the layout. If there was already an item on this specific part,
+ * it will be deleted (one can use elm_object_part_content_unset() in order to remove
  * it without deleting). An example of removing it without deleting, but
  * manually deleting this widget just after that, can be seen on the callback
  * for this button. Actually, the callback defined for this button will clean
  * Also notice that, for this last added button, we don't have to call
  * evas_object_show() on it. This is a particularity of the theme for layouts,
  * that will have total control over the properties like size, position,
- * visibility and clipping of a widget added with elm_object_content_part_set().
+ * visibility and clipping of a widget added with elm_object_part_content_set().
  * Again, read the Edje documentation to understand this better.
  *
  * Now we just put the code for the different callbacks specified for each kind
   * elm_image_no_scale_set() is used just to set this value to true (we
   * don't want to scale our image anyway, just resize it).
   *
-  * elm_image_scale_set() is used to allow the image to be resized to a size
+  * elm_image_resizable_set() is used to allow the image to be resized to a size
   * smaller than the original one, but not to a size bigger than it.
   *
   * elm_elm_image_smooth_set() will disable the smooth scaling, so the scale
   * elm_image_orient_set() is used to flip the image around the (1, 0) (0, 1)
   * diagonal.
   *
-  * elm_image_aspect_ratio_retained_set() is used to keep the original aspect
+  * elm_image_aspect_fixed_set() is used to keep the original aspect
   * ratio of the image, even when the window is resized to another aspect ratio.
   *
   * elm_image_fill_outside_set() is used to ensure that the image will fill the
   * elm_icon_no_scale_set() is used just to set this value to true (we
   * don't want to scale our icon anyway, just resize it).
   *
-  * elm_icon_scale_set() is used to allow the icon to be resized to a size
+  * elm_icon_resizable_set() is used to allow the icon to be resized to a size
   * smaller than the original one, but not to a size bigger than it.
   *
   * elm_elm_icon_smooth_set() will disable the smooth scaling, so the scale
  * @until evas_object_show
  *
  * Finally, we'll set the box as conformant's content, just like this:
- * @skipline elm_conformant_content_set
+ * @skipline elm_object_content_set
  *
  * Compare both examples code:
  * @ref conformant_example_01.c "conformant_example_01.c"
  * @until }
  *
  * It will get the last index item selected's data and find the
- * respective #Elm_Index_Item handle with elm_index_item_find(). We
- * need the latter to query the indexing letter string from, with
+ * respective index item handle(#Elm_Object_Item) with elm_index_item_find().
+ * We need the latter to query the indexing letter string from, with
  * elm_index_item_letter_get(). Next, comes the delition, itself,
  * which will also trigger the @c _index_item_del callback function,
  * as said above.
  * each index item to base our ordering on. The parameters on
  * @c _index_cmp have to be declared as void pointers because of the
  * @c Eina_Compare_Cb prototype requisition, but in this case we know
- * they'll be #Elm_Index_Item's:
+ * they'll be index item(#Elm_Object_Item)'s:
  * @dontinclude index_example_02.c
  * @skip ordering alphabetically
  * @until }
  */
 
 /**
- * @page tutorial_pager
- * @dontinclude pager_example_01.c
- *
- * In this example we'll have a pager with 3 rectangles on it, one blue, one
- * green and one blue, we'll also have 1 button for each rectangle. Pressing a
- * button will bring the associated rectangle to the front of the pager(promote
- * it).
- *
- * We start our example with some run of the mill code that you've seen in other
- * examples:
- * @until show
- *
- * And then we get right to creating our pager, setting a style and some basic
- * properties to it:
- * @until show
- *
- * Well a pager without any content is not of much use, so let's create the
- * first of our rectangles, add it to the pager and create the button for it:
- * @until smart_callback
- * @note The only line of above code that directly relates to our pager is the
- * call to elm_pager_content_push().
- *
- * And now we will do the same thing again twice for our next two rectangles:
- * @until smart_callback
- * @until smart_callback
- *
- * Now that we haver our widgets create we can get to running the main loop:
- * @until ELM_MAIN
- *
- * We also have the callback that is called when any of the buttons is pressed,
- * this callback is receiving the rectangle in it's @p data argument, so we
- * check if it's already on top and if not move it there:
- * @until }
- *
- * Our example will look like this:
- *
- * @image html screenshots/pager_example_01.png
- * @image latex screenshots/pager_example_01.eps width=\textwidth
- * @note Like all examples that involve animations the screenshot doesn't do it
- * justice, seeing it in action is a must.
- *
- * @example pager_example_01.c
- */
-
-/**
  * @page tutorial_separator Separator example
  * @dontinclude separator_example_01.c
  *
  * selection of the items. There, we print the item handle's value,
  * along with the callback function data. The latter will be @c NULL,
  * always, because it's what we pass when adding all icons. By using
- * elm_gengrid_item_data_get(), we can have the item data back and,
+ * elm_object_item_data_get(), we can have the item data back and,
  * with that, we're priting the item's path string. Finally, we
  * exemplify elm_gengrid_item_pos_get(), printing the item's position
  * in the grid:
  * and the entry itself doesn't, yet, support all the needed capabilities to
  * make this simpler. We begin by getting the format we are using in our
  * function from the button pressed.
- * @skip aid->pager = pager;
+ * @skip aid->naviframe = naviframe;
  * @until sizeof(fmt_close)
  *
  * Next we need to find out if we need to insert an opening or a closing tag.
  * elm_genlist_homogeneous_set() is set to false.
  *
  * Since the compress mode is active, the call to
- * elm_genlist_horizontal_mode_set() doesn't make difference, but the current
+ * elm_genlist_mode_set() doesn't make difference, but the current
  * option would make the list to have at least the width of the largest item.
  *
  * This list will support multiple selection, so we call
  */
 
 /**
+ * @page popup_example_01_c popup_example_01.c
+ * @include popup_example_01.c
+ *
+ * This example will initially look like this:
+ *
+ * @image html screenshots/popup_example_01.png
+ * @image latex screenshots/popup_example_01.eps width=\textwidth
+ *
+ * Once the popup is hidden after timeout:
+ *
+ * @image html screenshots/popup_example_01_a.png
+ * @image latex screenshots/popup_example_01_a.eps width=\textwidth
+ *
+ * @example popup_example_01.c
+ */
+
+ /** @page popup_example_02_c popup_example_02.c
+ * @include popup_example_02.c
+ *
+ * This example will look like this:
+ *
+ * @image html screenshots/popup_example_02.png
+ * @image latex screenshots/popup_example_02.eps width=\textwidth
+ *
+ * @example popup_example_02.c
+ */
+
+/**
+ * @page popup_example_03_c popup_example_03.c
+ * @include popup_example_03.c
+ *
+ * This example will look like this:
+ *
+ * @image html screenshots/popup_example_03.png
+ * @image latex screenshots/popup_example_03.eps width=\textwidth
+ *
+ * @example popup_example_03.c
+ */
+
+/**
  * @page tutorial_frame Frame example
  * @dontinclude frame_example_01.c
  *
  * accordingly and the URL bar needs to show the right address.
  *
  * @skip static void
- * @until pager_content_promote
+ * @until naviframe_item_simple_promote
  * @until }
  *
  * Other updates happen based on events from the web object, like title change
  * @example clock_example.c
  */
 
+ /**
+ * @page datetime_example_c Datetime example
+ * @include datetime_example.c
+ * @example datetime_example.c
+ */
+
+/**
+ * @page dayselector_example_c Dayselector example
+ * @include dayselector_example.c
+ * @example dayselector_example.c
+ */
+
 /**
  * @page flipselector_example_c Flipselector example
  * @include flipselector_example.c