parent
d4d44ef9ed
commit
960b0e9da6
|
@ -48,7 +48,8 @@ WGT_PREVIEW = \
|
||||||
hover:preview-00.png:widget_preview_hover:90:170 \
|
hover:preview-00.png:widget_preview_hover:90:170 \
|
||||||
anchorview:preview-00.png:widget_preview_anchorview:100:30 \
|
anchorview:preview-00.png:widget_preview_anchorview:100:30 \
|
||||||
anchorblock:preview-00.png:widget_preview_anchorblock:100:30 \
|
anchorblock:preview-00.png:widget_preview_anchorblock:100:30 \
|
||||||
pager:preview-00.png:widget_preview_pager:100:100
|
pager:preview-00.png:widget_preview_pager:100:100 \
|
||||||
|
separator:preview-00.png:widget_preview_separator:10:80
|
||||||
|
|
||||||
widget-build:
|
widget-build:
|
||||||
@$(MAKE) -C widgets
|
@$(MAKE) -C widgets
|
||||||
|
|
|
@ -2876,6 +2876,33 @@
|
||||||
* @example pager_example_01.c
|
* @example pager_example_01.c
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @page tutorial_separator Separator example
|
||||||
|
* @dontinclude separator_example_01.c
|
||||||
|
*
|
||||||
|
* In this example we are going to pack two rectangles in a box, and have a
|
||||||
|
* separator in the middle.
|
||||||
|
*
|
||||||
|
* So we start we the window, background, box and rectangle creation, all pretty
|
||||||
|
* normal stuff:
|
||||||
|
* @until pack_end
|
||||||
|
*
|
||||||
|
* Once we have our first rectangle in the box we create and add our separator:
|
||||||
|
* @until pack_end
|
||||||
|
* @note Since our box is in horizontal mode it's a good idea to set the
|
||||||
|
* separator to be horizontal too.
|
||||||
|
*
|
||||||
|
* And now we add our second rectangle and run the main loop:
|
||||||
|
* @until ELM_MAIN
|
||||||
|
*
|
||||||
|
* This example will look like this:
|
||||||
|
*
|
||||||
|
* @image html screenshots/separator_example_01.png
|
||||||
|
* @image eps screenshots/separator_example_01.eps width=\textwidth
|
||||||
|
*
|
||||||
|
* @example separator_example_01.c
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @page bg_example_01_c bg_example_01.c
|
* @page bg_example_01_c bg_example_01.c
|
||||||
* @include bg_example_01.c
|
* @include bg_example_01.c
|
||||||
|
|
|
@ -150,6 +150,9 @@
|
||||||
* @li @ref Scroller
|
* @li @ref Scroller
|
||||||
* @li @ref SegmentControl
|
* @li @ref SegmentControl
|
||||||
* @li @ref Separator
|
* @li @ref Separator
|
||||||
|
*
|
||||||
|
* @image html img/widget/separator/preview-00.png
|
||||||
|
* @image latex img/widget/separator/preview-00.eps
|
||||||
* @li @ref Slider
|
* @li @ref Slider
|
||||||
* @li @ref Slideshow
|
* @li @ref Slideshow
|
||||||
* @li @ref Spinner
|
* @li @ref Spinner
|
||||||
|
|
|
@ -63,7 +63,8 @@ widget_preview_hover \
|
||||||
widget_preview_anchorview \
|
widget_preview_anchorview \
|
||||||
widget_preview_anchorblock \
|
widget_preview_anchorblock \
|
||||||
widget_preview_flip \
|
widget_preview_flip \
|
||||||
widget_preview_pager
|
widget_preview_pager \
|
||||||
|
widget_preview_separator
|
||||||
|
|
||||||
LDADD = $(top_builddir)/src/lib/libelementary.la @ELEMENTARY_EWEATHER_LIBS@ @ELEMENTARY_EDBUS_LIBS@ @ELEMENTARY_EFREET_LIBS@ @ELEMENTARY_LIBS@ @EIO_LIBS@ @my_libs@
|
LDADD = $(top_builddir)/src/lib/libelementary.la @ELEMENTARY_EWEATHER_LIBS@ @ELEMENTARY_EDBUS_LIBS@ @ELEMENTARY_EFREET_LIBS@ @ELEMENTARY_LIBS@ @EIO_LIBS@ @my_libs@
|
||||||
|
|
||||||
|
@ -109,5 +110,6 @@ EXTRA_DIST = \
|
||||||
widget_preview_label.c \
|
widget_preview_label.c \
|
||||||
widget_preview_layout.c \
|
widget_preview_layout.c \
|
||||||
widget_preview_pager.c \
|
widget_preview_pager.c \
|
||||||
|
widget_preview_separator.c \
|
||||||
widget_preview_tmpl_foot.c \
|
widget_preview_tmpl_foot.c \
|
||||||
widget_preview_tmpl_head.c
|
widget_preview_tmpl_head.c
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
#include "widget_preview_tmpl_head.c"
|
||||||
|
|
||||||
|
Evas_Object *o = elm_separator_add(win);
|
||||||
|
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
elm_win_resize_object_add(win, o);
|
||||||
|
evas_object_show(o);
|
||||||
|
|
||||||
|
#include "widget_preview_tmpl_foot.c"
|
|
@ -77,7 +77,8 @@ SRCS = \
|
||||||
theme_example.edc \
|
theme_example.edc \
|
||||||
layout_example.edc \
|
layout_example.edc \
|
||||||
ctxpopup_example_01.c \
|
ctxpopup_example_01.c \
|
||||||
pager_example_01.c
|
pager_example_01.c \
|
||||||
|
separator_example_01.c
|
||||||
|
|
||||||
pkglib_PROGRAMS =
|
pkglib_PROGRAMS =
|
||||||
|
|
||||||
|
@ -144,7 +145,8 @@ pkglib_PROGRAMS += \
|
||||||
fileselector_entry_example \
|
fileselector_entry_example \
|
||||||
index_example_01 \
|
index_example_01 \
|
||||||
index_example_02 \
|
index_example_02 \
|
||||||
pager_example_01
|
pager_example_01 \
|
||||||
|
separator_example_01
|
||||||
|
|
||||||
# This variable will hold the list of screenshots that will be made
|
# This variable will hold the list of screenshots that will be made
|
||||||
# by "make screenshots". Each item in the list is of the form:
|
# by "make screenshots". Each item in the list is of the form:
|
||||||
|
@ -186,7 +188,8 @@ SCREENSHOTS = \
|
||||||
fileselector_example:fileselector_example.png:0.0 \
|
fileselector_example:fileselector_example.png:0.0 \
|
||||||
index_example_02:index_example_03.png:0.3 \
|
index_example_02:index_example_03.png:0.3 \
|
||||||
ctxpopup_example_01:ctxpopup_example_01.png:0.0 \
|
ctxpopup_example_01:ctxpopup_example_01.png:0.0 \
|
||||||
pager_example_01:pager_example_01.png:0.0
|
pager_example_01:pager_example_01.png:0.0 \
|
||||||
|
separator_example_01:separator_example_01.png:0.0
|
||||||
|
|
||||||
HTML_SS_DIR=$(top_builddir)/doc/html/screenshots
|
HTML_SS_DIR=$(top_builddir)/doc/html/screenshots
|
||||||
LATEX_SS_DIR=$(top_builddir)/doc/latex/screenshots
|
LATEX_SS_DIR=$(top_builddir)/doc/latex/screenshots
|
||||||
|
|
|
@ -0,0 +1,59 @@
|
||||||
|
//Compile with:
|
||||||
|
//gcc -g `pkg-config --cflags --libs elementary` separator_example_01.c -o separator_example_01
|
||||||
|
|
||||||
|
#include <Elementary.h>
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include "elementary_config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
EAPI int
|
||||||
|
elm_main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
Evas_Object *win, *bg, *bx, *rect, *separator;
|
||||||
|
Elm_Animator *animator;
|
||||||
|
char buf[256];
|
||||||
|
|
||||||
|
win = elm_win_add(NULL, "separator", ELM_WIN_BASIC);
|
||||||
|
elm_win_title_set(win, "Separator");
|
||||||
|
elm_win_autodel_set(win, EINA_TRUE);
|
||||||
|
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||||
|
|
||||||
|
bg = elm_bg_add(win);
|
||||||
|
elm_win_resize_object_add(win, bg);
|
||||||
|
evas_object_show(bg);
|
||||||
|
|
||||||
|
bx = elm_box_add(win);
|
||||||
|
elm_box_horizontal_set(bx, EINA_TRUE);
|
||||||
|
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
elm_win_resize_object_add(win, bx);
|
||||||
|
evas_object_show(bx);
|
||||||
|
|
||||||
|
rect = evas_object_rectangle_add(evas_object_evas_get(win));
|
||||||
|
evas_object_color_set(rect, 0, 255, 0, 255);
|
||||||
|
evas_object_size_hint_min_set(rect, 90, 200);
|
||||||
|
evas_object_size_hint_weight_set(rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_size_hint_align_set(rect, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
evas_object_show(rect);
|
||||||
|
elm_box_pack_end(bx, rect);
|
||||||
|
|
||||||
|
separator = elm_separator_add(win);
|
||||||
|
elm_separator_horizontal_set(separator, EINA_TRUE);
|
||||||
|
evas_object_show(separator);
|
||||||
|
elm_box_pack_end(bx, separator);
|
||||||
|
|
||||||
|
rect = evas_object_rectangle_add(evas_object_evas_get(win));
|
||||||
|
evas_object_color_set(rect, 0, 0, 255, 255);
|
||||||
|
evas_object_size_hint_min_set(rect, 90, 200);
|
||||||
|
evas_object_size_hint_weight_set(rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
evas_object_size_hint_align_set(rect, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
evas_object_show(rect);
|
||||||
|
elm_box_pack_end(bx, rect);
|
||||||
|
|
||||||
|
evas_object_show(win);
|
||||||
|
|
||||||
|
elm_run();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
ELM_MAIN()
|
|
@ -9125,11 +9125,42 @@ extern "C" {
|
||||||
* wheel (simple style, no text, no progression, only pulse is available)
|
* wheel (simple style, no text, no progression, only pulse is available)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* separator */
|
/**
|
||||||
|
* @defgroup Separator Separator
|
||||||
|
*
|
||||||
|
* @brief Separator is a very thin object used to separate other objects.
|
||||||
|
*
|
||||||
|
* A separator can be vertical or horizontal.
|
||||||
|
*
|
||||||
|
* @ref tutorial_separator is a good example of how to use a separator.
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* @brief Add a separator object to @p parent
|
||||||
|
*
|
||||||
|
* @param parent The parent object
|
||||||
|
*
|
||||||
|
* @return The separator object, or NULL upon failure
|
||||||
|
*/
|
||||||
EAPI Evas_Object *elm_separator_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
|
EAPI Evas_Object *elm_separator_add(Evas_Object *parent) EINA_ARG_NONNULL(1);
|
||||||
|
/**
|
||||||
|
* @brief Set the horizontal mode of a separator object
|
||||||
|
*
|
||||||
|
* @param obj The separator object
|
||||||
|
* @param horizontal If true, the separator is horizontal
|
||||||
|
*/
|
||||||
EAPI void elm_separator_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) EINA_ARG_NONNULL(1);
|
EAPI void elm_separator_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) EINA_ARG_NONNULL(1);
|
||||||
|
/**
|
||||||
|
* @brief Get the horizontal mode of a separator object
|
||||||
|
*
|
||||||
|
* @param obj The separator object
|
||||||
|
* @return If true, the separator is horizontal
|
||||||
|
*
|
||||||
|
* @see elm_separator_horizontal_set()
|
||||||
|
*/
|
||||||
EAPI Eina_Bool elm_separator_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
EAPI Eina_Bool elm_separator_horizontal_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
|
||||||
/* smart callbacks called:
|
/**
|
||||||
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* spinner */
|
/* spinner */
|
||||||
|
|
|
@ -1,14 +1,6 @@
|
||||||
#include <Elementary.h>
|
#include <Elementary.h>
|
||||||
#include "elm_priv.h"
|
#include "elm_priv.h"
|
||||||
|
|
||||||
/**
|
|
||||||
* @defgroup Separator Separator
|
|
||||||
*
|
|
||||||
* A separator is a widget that adds a very thin object to separate other
|
|
||||||
* objects.
|
|
||||||
* A separator can be vertical or horizontal.
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef struct _Widget_Data Widget_Data;
|
typedef struct _Widget_Data Widget_Data;
|
||||||
|
|
||||||
struct _Widget_Data
|
struct _Widget_Data
|
||||||
|
@ -66,15 +58,6 @@ _sizing_eval(Evas_Object *obj)
|
||||||
evas_object_size_hint_align_set(obj, maxw, maxh);
|
evas_object_size_hint_align_set(obj, maxw, maxh);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Add a separator object to @p parent
|
|
||||||
*
|
|
||||||
* @param parent The parent object
|
|
||||||
*
|
|
||||||
* @return The separator object, or NULL upon failure
|
|
||||||
*
|
|
||||||
* @ingroup Separator
|
|
||||||
*/
|
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
elm_separator_add(Evas_Object *parent)
|
elm_separator_add(Evas_Object *parent)
|
||||||
{
|
{
|
||||||
|
@ -101,14 +84,6 @@ elm_separator_add(Evas_Object *parent)
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the horizontal mode of a separator object
|
|
||||||
*
|
|
||||||
* @param obj The separator object
|
|
||||||
* @param horizontal If true, the separator is horizontal
|
|
||||||
*
|
|
||||||
* @ingroup Separator
|
|
||||||
*/
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_separator_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
|
elm_separator_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
|
||||||
{
|
{
|
||||||
|
@ -121,14 +96,6 @@ elm_separator_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
|
||||||
_theme_hook(obj);
|
_theme_hook(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the horizontal mode of a separator object
|
|
||||||
*
|
|
||||||
* @param obj The separator object
|
|
||||||
* @return If true, the separator is horizontal
|
|
||||||
*
|
|
||||||
* @ingroup Separator
|
|
||||||
*/
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
elm_separator_horizontal_get(const Evas_Object *obj)
|
elm_separator_horizontal_get(const Evas_Object *obj)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue