add .desktop + icon for test prog, add multiple bubble layouts - use top-left

by default.



SVN revision: 37466
This commit is contained in:
Carsten Haitzler 2008-11-05 05:27:42 +00:00
parent 62306c24cc
commit dd41a7761c
12 changed files with 741 additions and 341 deletions

View File

@ -57,4 +57,5 @@ data/Makefile
data/themes/Makefile
data/images/Makefile
data/objects/Makefile
data/desktop/Makefile
])

View File

@ -1,3 +1,3 @@
AUTOMAKE_OPTIONS = 1.4 foreign
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = themes images objects
SUBDIRS = themes images objects desktop

View File

@ -0,0 +1,10 @@
4AUTOMAKE_OPTIONS = 1.4 foreign
MAINTAINERCLEANFILES = Makefile.in
desktopdir = $(datadir)/applications
desktop_DATA = elementary_test.desktop
icondir = $(datadir)/icons
icon_DATA = elementary.png
EXTRA_DIST = elementary_test.desktop elementary.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@ -0,0 +1,9 @@
[Desktop Entry]
Encoding=UTF-8
Name=Elementary Test
Comment=Elementary Test Application
Exec=elementary_test
Icon=elementary
Terminal=false
Type=Application
Categories=Application;Utilities;

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 B

View File

@ -3078,132 +3078,511 @@ collections {
}
///////////////////////////////////////////////////////////////////////////////
group { name: "elm/bubble/base/default";
images {
image: "bubble_1.png" COMP;
image: "bubble_shine.png" COMP;
group { name: "elm/bubble/top_left/default";
alias: "elm/bubble/base/default";
images {
image: "bubble_3.png" COMP;
image: "bubble_shine3.png" COMP;
}
parts {
part { name: "elm.swallow.icon";
type: SWALLOW;
description { state: "default" 0.0;
fixed: 1 1;
align: 0.0 0.0;
aspect: 1.0 1.0;
aspect_preference: VERTICAL;
rel1 {
relative: 0.0 0.0;
offset: 4 4;
}
rel2 {
to_y: "elm.text";
relative: 0.0 1.0;
offset: 4 -1;
}
}
}
parts {
part { name: "elm.swallow.icon";
type: SWALLOW;
description { state: "default" 0.0;
fixed: 1 1;
align: 0.0 1.0;
aspect: 1.0 1.0;
aspect_preference: VERTICAL;
rel1 {
to_y: "elm.text";
relative: 0.0 0.0;
offset: 4 0;
}
rel2 {
relative: 0.0 1.0;
offset: 4 -5;
}
}
}
part { name: "elm.text";
type: TEXT;
mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
align: 0.0 1.0;
fixed: 0 1;
rel1 {
to_x: "elm.swallow.icon";
relative: 1.0 1.0;
offset: 4 -5;
}
rel2 {
to_x: "elm.info";
relative: 0.0 1.0;
offset: -5 -5;
}
color: 0 0 0 255;
text {
font: "Sans:style=Bold,Edje-Vera-Bold";
size: 10;
min: 0 1;
max: 0 1;
align: 0.0 1.0;
}
}
}
part { name: "elm.info";
type: TEXT;
mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
align: 1.0 1.0;
fixed: 1 1;
rel1 {
relative: 1.0 1.0;
offset: -5 -5;
}
rel2 {
relative: 1.0 1.0;
offset: -5 -5;
}
color: 0 0 0 64;
text {
font: "Sans:style=Bold,Edje-Vera-Bold";
size: 10;
min: 1 1;
max: 1 1;
align: 1.0 1.0;
}
}
}
part { name: "base0";
mouse_events: 0;
description { state: "default" 0.0;
rel2 {
to_y: "elm.swallow.icon";
relative: 1.0 0.0;
offset: -1 -1;
}
image {
normal: "bubble_1.png";
border: 36 11 10 19;
}
fill.smooth: 0;
}
}
part { name: "elm.swallow.content";
type: SWALLOW;
description { state: "default" 0.0;
rel1 {
to: "base0";
offset: 9 8;
}
rel2 {
to: "base0";
offset: -10 -17;
}
}
}
part { name: "shine";
mouse_events: 0;
description { state: "default" 0.0;
rel1 {
to: "base0";
offset: 5 4;
}
rel2 {
to: "base0";
relative: 1.0 0.5;
offset: -6 -16;
}
image {
normal: "bubble_shine.png";
border: 5 5 5 0;
}
fill.smooth: 0;
}
}
part { name: "elm.text";
type: TEXT;
mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
align: 0.0 0.0;
fixed: 0 1;
rel1 {
to_x: "elm.swallow.icon";
relative: 1.0 0.0;
offset: 4 4;
}
rel2 {
to_x: "elm.info";
relative: 0.0 0.0;
offset: -5 4;
}
color: 0 0 0 255;
text {
font: "Sans:style=Bold,Edje-Vera-Bold";
size: 10;
min: 0 1;
max: 0 1;
align: 0.0 0.0;
}
}
}
}
part { name: "elm.info";
type: TEXT;
mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
align: 1.0 0.0;
fixed: 1 1;
rel1 {
relative: 1.0 0.0;
offset: -5 4;
}
rel2 {
relative: 1.0 0.0;
offset: -5 4;
}
color: 0 0 0 64;
text {
font: "Sans:style=Bold,Edje-Vera-Bold";
size: 10;
min: 1 1;
max: 1 1;
align: 1.0 0.0;
}
}
}
part { name: "base0";
mouse_events: 0;
description { state: "default" 0.0;
rel1 {
to_y: "elm.swallow.icon";
relative: 0.0 1.0;
offset: 0 0;
}
image {
normal: "bubble_3.png";
border: 36 11 18 9;
}
fill.smooth: 0;
}
}
part { name: "elm.swallow.content";
type: SWALLOW;
description { state: "default" 0.0;
rel1 {
to: "base0";
offset: 9 16;
}
rel2 {
to: "base0";
offset: -10 -9;
}
}
}
part { name: "shine";
mouse_events: 0;
description { state: "default" 0.0;
rel1 {
to: "base0";
offset: 5 4;
}
rel2 {
to: "base0";
relative: 1.0 0.5;
offset: -6 7;
}
image {
normal: "bubble_shine3.png";
border: 36 5 14 0;
}
fill.smooth: 0;
}
}
}
}
group { name: "elm/bubble/top_right/default";
images {
image: "bubble_4.png" COMP;
image: "bubble_shine4.png" COMP;
}
parts {
part { name: "elm.swallow.icon";
type: SWALLOW;
description { state: "default" 0.0;
fixed: 1 1;
align: 1.0 0.0;
aspect: 1.0 1.0;
aspect_preference: VERTICAL;
rel1 {
relative: 1.0 0.0;
offset: -5 4;
}
rel2 {
to_y: "elm.text";
relative: 1.0 1.0;
offset: -5 -1;
}
}
}
part { name: "elm.text";
type: TEXT;
mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
align: 0.0 0.0;
fixed: 0 1;
rel1 {
relative: 0.0 0.0;
offset: 4 4;
}
rel2 {
to_x: "elm.info";
relative: 0.0 0.0;
offset: -5 4;
}
color: 0 0 0 255;
text {
font: "Sans:style=Bold,Edje-Vera-Bold";
size: 10;
min: 0 1;
max: 0 1;
align: 0.0 0.0;
}
}
}
part { name: "elm.info";
type: TEXT;
mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
align: 1.0 0.0;
fixed: 1 1;
rel1 {
relative: 1.0 0.0;
offset: -5 4;
}
rel2 {
to_x: "elm.swallow.icon";
relative: 0.0 0.0;
offset: -5 4;
}
color: 0 0 0 64;
text {
font: "Sans:style=Bold,Edje-Vera-Bold";
size: 10;
min: 1 1;
max: 1 1;
align: 1.0 0.0;
}
}
}
part { name: "base0";
mouse_events: 0;
description { state: "default" 0.0;
rel1 {
to_y: "elm.swallow.icon";
relative: 0.0 1.0;
offset: 0 0;
}
image {
normal: "bubble_4.png";
border: 11 36 18 9;
}
fill.smooth: 0;
}
}
part { name: "elm.swallow.content";
type: SWALLOW;
description { state: "default" 0.0;
rel1 {
to: "base0";
offset: 9 16;
}
rel2 {
to: "base0";
offset: -10 -9;
}
}
}
part { name: "shine";
mouse_events: 0;
description { state: "default" 0.0;
rel1 {
to: "base0";
offset: 5 4;
}
rel2 {
to: "base0";
relative: 1.0 0.5;
offset: -6 7;
}
image {
normal: "bubble_shine4.png";
border: 5 36 14 0;
}
fill.smooth: 0;
}
}
}
}
group { name: "elm/bubble/bottom_left/default";
images {
image: "bubble_1.png" COMP;
image: "bubble_shine.png" COMP;
}
parts {
part { name: "elm.swallow.icon";
type: SWALLOW;
description { state: "default" 0.0;
fixed: 1 1;
align: 0.0 1.0;
aspect: 1.0 1.0;
aspect_preference: VERTICAL;
rel1 {
to_y: "elm.text";
relative: 0.0 0.0;
offset: 4 0;
}
rel2 {
relative: 0.0 1.0;
offset: 4 -5;
}
}
}
part { name: "elm.text";
type: TEXT;
mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
align: 0.0 1.0;
fixed: 0 1;
rel1 {
to_x: "elm.swallow.icon";
relative: 1.0 1.0;
offset: 4 -5;
}
rel2 {
to_x: "elm.info";
relative: 0.0 1.0;
offset: -5 -5;
}
color: 0 0 0 255;
text {
font: "Sans:style=Bold,Edje-Vera-Bold";
size: 10;
min: 0 1;
max: 0 1;
align: 0.0 1.0;
}
}
}
part { name: "elm.info";
type: TEXT;
mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
align: 1.0 1.0;
fixed: 1 1;
rel1 {
relative: 1.0 1.0;
offset: -5 -5;
}
rel2 {
relative: 1.0 1.0;
offset: -5 -5;
}
color: 0 0 0 64;
text {
font: "Sans:style=Bold,Edje-Vera-Bold";
size: 10;
min: 1 1;
max: 1 1;
align: 1.0 1.0;
}
}
}
part { name: "base0";
mouse_events: 0;
description { state: "default" 0.0;
rel2 {
to_y: "elm.swallow.icon";
relative: 1.0 0.0;
offset: -1 -1;
}
image {
normal: "bubble_1.png";
border: 36 11 10 19;
}
fill.smooth: 0;
}
}
part { name: "elm.swallow.content";
type: SWALLOW;
description { state: "default" 0.0;
rel1 {
to: "base0";
offset: 9 8;
}
rel2 {
to: "base0";
offset: -10 -17;
}
}
}
part { name: "shine";
mouse_events: 0;
description { state: "default" 0.0;
rel1 {
to: "base0";
offset: 5 4;
}
rel2 {
to: "base0";
relative: 1.0 0.5;
offset: -6 -16;
}
image {
normal: "bubble_shine.png";
border: 5 5 5 0;
}
fill.smooth: 0;
}
}
}
}
group { name: "elm/bubble/bottom_right/default";
images {
image: "bubble_2.png" COMP;
image: "bubble_shine.png" COMP;
}
parts {
part { name: "elm.swallow.icon";
type: SWALLOW;
description { state: "default" 0.0;
fixed: 1 1;
align: 1.0 1.0;
aspect: 1.0 1.0;
aspect_preference: VERTICAL;
rel1 {
to_y: "elm.text";
relative: 1.0 0.0;
offset: -5 0;
}
rel2 {
relative: 1.0 1.0;
offset: -5 -5;
}
}
}
part { name: "elm.text";
type: TEXT;
mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
align: 0.0 1.0;
fixed: 0 1;
rel1 {
relative: 0.0 1.0;
offset: 4 -5;
}
rel2 {
to_x: "elm.info";
relative: 0.0 1.0;
offset: -5 -5;
}
color: 0 0 0 255;
text {
font: "Sans:style=Bold,Edje-Vera-Bold";
size: 10;
min: 0 1;
max: 0 1;
align: 0.0 1.0;
}
}
}
part { name: "elm.info";
type: TEXT;
mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
align: 1.0 1.0;
fixed: 1 1;
rel1 {
relative: 1.0 1.0;
offset: -5 -5;
}
rel2 {
to_x: "elm.swallow.icon";
relative: 0.0 1.0;
offset: -5 -5;
}
color: 0 0 0 64;
text {
font: "Sans:style=Bold,Edje-Vera-Bold";
size: 10;
min: 1 1;
max: 1 1;
align: 1.0 1.0;
}
}
}
part { name: "base0";
mouse_events: 0;
description { state: "default" 0.0;
rel2 {
to_y: "elm.swallow.icon";
relative: 1.0 0.0;
offset: -1 -1;
}
image {
normal: "bubble_2.png";
border: 11 36 10 19;
}
fill.smooth: 0;
}
}
part { name: "elm.swallow.content";
type: SWALLOW;
description { state: "default" 0.0;
rel1 {
to: "base0";
offset: 9 8;
}
rel2 {
to: "base0";
offset: -10 -17;
}
}
}
part { name: "shine";
mouse_events: 0;
description { state: "default" 0.0;
rel1 {
to: "base0";
offset: 5 4;
}
rel2 {
to: "base0";
relative: 1.0 0.5;
offset: -6 -16;
}
image {
normal: "bubble_shine.png";
border: 5 5 5 0;
}
fill.smooth: 0;
}
}
}
}
///////////////////////////////////////////////////////////////////////////////
group { name: "elm/icon/home/default"; min: 32 32;
images.image: "icon_home.png" COMP; parts { part { name: "base";

View File

@ -1249,219 +1249,219 @@ my_bt_17(void *data, Evas_Object *obj, void *event_info)
static void
my_win_main(void)
{
Evas_Object *win, *bg, *bx0, *lb, *bx, *bt, *sc, *fr;
/* 1 create an elm window - it returns an evas object. this is a little
* special as the object lives in the canvas that is inside the window
* so what is returned is really inside the window, but as you manipulate
* the evas object returned - the window will respond. elm_win makes sure
* of that so you can blindly treat it like any other evas object
* pretty much, just as long as you know it has special significance */
/* the first parameter is a "parent" window - eg for a dialog you want to
* have a main window it is related to, here it is NULL meaning there
* is no parent. "main" is the name of the window - used by the window
* manager for identifying the window uniquely amongst all the windows
* within this application (and all instances of the application). the
* type is a basic window (the final parameter) */
win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
/* set the title of the window - this is in the titlebar */
elm_win_title_set(win, "Elementary Tests");
/* set a callback on the window when "delete-request" is emitted as
* a callback. when this happens my_win_del() is called and the
* data pointer (first param) is passed the final param here (in this
* case it is NULL). This is how you can pass specific things to a
* callback like objects or data layered on top */
evas_object_smart_callback_add(win, "delete-request", my_win_del, NULL);
/* add a background to our window. this just uses the standard theme set
* background. without a backgorund, you could make a window seem
* transparent with elm_win_alpha_set(win, 1); for example. if you have
* a compositor running this will make the window able to be
* semi-transparent and any space not filled by object/widget pixels will
* be transparent or translucent based on alpha. if you do not have a
* comnpositor running this should fall back to using shaped windows
* (which have a mask). both these features will be slow and rely on
* a lot more resources, so only use it if you need it. */
bg = elm_bg_add(win);
/* set weight to 1.0 x 1.0 == expand in both x and y direction */
evas_object_size_hint_weight_set(bg, 1.0, 1.0);
/* tell the window that this object is to be resized along with the window.
* also as a result this object will be one of several objects that
* controls the minimum/maximum size of the window */
elm_win_resize_object_add(win, bg);
/* and show the background */
evas_object_show(bg);
/* add a box layout widget to the window */
bx0 = elm_box_add(win);
/* allow base box (bx0) to expand in x and y */
evas_object_size_hint_weight_set(bx0, 1.0, 1.0);
/* tell the window that the box affects window size and also will be
* resized when the window is */
elm_win_resize_object_add(win, bx0);
evas_object_show(bx0);
fr = elm_frame_add(win);
elm_frame_label_set(fr, "Information");
elm_box_pack_end(bx0, fr);
evas_object_show(fr);
lb = elm_label_add(win);
elm_label_label_set(lb,
"Please slect a test from the list below<br>"
"by clicking the test button to show the<br>"
"test window.");
elm_frame_content_set(fr, lb);
evas_object_show(lb);
/* add a scroller object - anything inside is scrollable */
sc = elm_scroller_add(win);
/* add scroller to main box */
evas_object_size_hint_weight_set(sc, 1.0, 1.0);
evas_object_size_hint_align_set(sc, -1.0, -1.0);
elm_box_pack_end(bx0, sc);
evas_object_show(sc);
/* add a box layout widget to the window */
bx = elm_box_add(win);
/* set weight to 1.0 x 1.0 == expand in x and y) */
evas_object_size_hint_weight_set(bx, 1.0, 0.0);
/* set the box ad the content in the scrolled view*/
elm_scroller_content_set(sc, bx);
/* show the box, scroller and main box */
evas_object_show(bx);
/* create a button */
bt = elm_button_add(win);
/* set the button label */
elm_button_label_set(bt, "Bg Plain");
/* add a callback to be run when the button is clicked */
evas_object_smart_callback_add(bt, "clicked", my_bt_1, NULL);
/* the button should fill any space it is given horizontally */
evas_object_size_hint_align_set(bt, -1.0, 0.0);
/* put the button at the end of the box */
elm_box_pack_end(bx, bt);
/* show the button */
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Bg Image");
evas_object_smart_callback_add(bt, "clicked", my_bt_2, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Icon Transparent");
evas_object_smart_callback_add(bt, "clicked", my_bt_3, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Box Vert");
evas_object_smart_callback_add(bt, "clicked", my_bt_4, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Box Horiz");
evas_object_smart_callback_add(bt, "clicked", my_bt_5, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Buttons");
evas_object_smart_callback_add(bt, "clicked", my_bt_6, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Toggles");
evas_object_smart_callback_add(bt, "clicked", my_bt_7, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Table");
evas_object_smart_callback_add(bt, "clicked", my_bt_8, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Clock");
evas_object_smart_callback_add(bt, "clicked", my_bt_9, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Layout");
evas_object_smart_callback_add(bt, "clicked", my_bt_10, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Hover");
evas_object_smart_callback_add(bt, "clicked", my_bt_11, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Hover 2");
evas_object_smart_callback_add(bt, "clicked", my_bt_12, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Entry");
evas_object_smart_callback_add(bt, "clicked", my_bt_13, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Entry Scrolled");
evas_object_smart_callback_add(bt, "clicked", my_bt_14, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Notepad");
evas_object_smart_callback_add(bt, "clicked", my_bt_15, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Anchorview");
evas_object_smart_callback_add(bt, "clicked", my_bt_16, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Anchorblock");
evas_object_smart_callback_add(bt, "clicked", my_bt_17, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
/* set an initial window size */
evas_object_resize(win, 320, 520);
/* show the window */
evas_object_show(win);
Evas_Object *win, *bg, *bx0, *lb, *bx, *bt, *sc, *fr;
/* 1 create an elm window - it returns an evas object. this is a little
* special as the object lives in the canvas that is inside the window
* so what is returned is really inside the window, but as you manipulate
* the evas object returned - the window will respond. elm_win makes sure
* of that so you can blindly treat it like any other evas object
* pretty much, just as long as you know it has special significance */
/* the first parameter is a "parent" window - eg for a dialog you want to
* have a main window it is related to, here it is NULL meaning there
* is no parent. "main" is the name of the window - used by the window
* manager for identifying the window uniquely amongst all the windows
* within this application (and all instances of the application). the
* type is a basic window (the final parameter) */
win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
/* set the title of the window - this is in the titlebar */
elm_win_title_set(win, "Elementary Tests");
/* set a callback on the window when "delete-request" is emitted as
* a callback. when this happens my_win_del() is called and the
* data pointer (first param) is passed the final param here (in this
* case it is NULL). This is how you can pass specific things to a
* callback like objects or data layered on top */
evas_object_smart_callback_add(win, "delete-request", my_win_del, NULL);
/* add a background to our window. this just uses the standard theme set
* background. without a backgorund, you could make a window seem
* transparent with elm_win_alpha_set(win, 1); for example. if you have
* a compositor running this will make the window able to be
* semi-transparent and any space not filled by object/widget pixels will
* be transparent or translucent based on alpha. if you do not have a
* comnpositor running this should fall back to using shaped windows
* (which have a mask). both these features will be slow and rely on
* a lot more resources, so only use it if you need it. */
bg = elm_bg_add(win);
/* set weight to 1.0 x 1.0 == expand in both x and y direction */
evas_object_size_hint_weight_set(bg, 1.0, 1.0);
/* tell the window that this object is to be resized along with the window.
* also as a result this object will be one of several objects that
* controls the minimum/maximum size of the window */
elm_win_resize_object_add(win, bg);
/* and show the background */
evas_object_show(bg);
/* add a box layout widget to the window */
bx0 = elm_box_add(win);
/* allow base box (bx0) to expand in x and y */
evas_object_size_hint_weight_set(bx0, 1.0, 1.0);
/* tell the window that the box affects window size and also will be
* resized when the window is */
elm_win_resize_object_add(win, bx0);
evas_object_show(bx0);
fr = elm_frame_add(win);
elm_frame_label_set(fr, "Information");
elm_box_pack_end(bx0, fr);
evas_object_show(fr);
lb = elm_label_add(win);
elm_label_label_set(lb,
"Please slect a test from the list below<br>"
"by clicking the test button to show the<br>"
"test window.");
elm_frame_content_set(fr, lb);
evas_object_show(lb);
/* add a scroller object - anything inside is scrollable */
sc = elm_scroller_add(win);
/* add scroller to main box */
evas_object_size_hint_weight_set(sc, 1.0, 1.0);
evas_object_size_hint_align_set(sc, -1.0, -1.0);
elm_box_pack_end(bx0, sc);
evas_object_show(sc);
/* add a box layout widget to the window */
bx = elm_box_add(win);
/* set weight to 1.0 x 1.0 == expand in x and y) */
evas_object_size_hint_weight_set(bx, 1.0, 0.0);
/* set the box ad the content in the scrolled view*/
elm_scroller_content_set(sc, bx);
/* show the box, scroller and main box */
evas_object_show(bx);
/* create a button */
bt = elm_button_add(win);
/* set the button label */
elm_button_label_set(bt, "Bg Plain");
/* add a callback to be run when the button is clicked */
evas_object_smart_callback_add(bt, "clicked", my_bt_1, NULL);
/* the button should fill any space it is given horizontally */
evas_object_size_hint_align_set(bt, -1.0, 0.0);
/* put the button at the end of the box */
elm_box_pack_end(bx, bt);
/* show the button */
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Bg Image");
evas_object_smart_callback_add(bt, "clicked", my_bt_2, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Icon Transparent");
evas_object_smart_callback_add(bt, "clicked", my_bt_3, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Box Vert");
evas_object_smart_callback_add(bt, "clicked", my_bt_4, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Box Horiz");
evas_object_smart_callback_add(bt, "clicked", my_bt_5, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Buttons");
evas_object_smart_callback_add(bt, "clicked", my_bt_6, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Toggles");
evas_object_smart_callback_add(bt, "clicked", my_bt_7, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Table");
evas_object_smart_callback_add(bt, "clicked", my_bt_8, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Clock");
evas_object_smart_callback_add(bt, "clicked", my_bt_9, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Layout");
evas_object_smart_callback_add(bt, "clicked", my_bt_10, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Hover");
evas_object_smart_callback_add(bt, "clicked", my_bt_11, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Hover 2");
evas_object_smart_callback_add(bt, "clicked", my_bt_12, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Entry");
evas_object_smart_callback_add(bt, "clicked", my_bt_13, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Entry Scrolled");
evas_object_smart_callback_add(bt, "clicked", my_bt_14, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Notepad");
evas_object_smart_callback_add(bt, "clicked", my_bt_15, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Anchorview");
evas_object_smart_callback_add(bt, "clicked", my_bt_16, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
bt = elm_button_add(win);
elm_button_label_set(bt, "Anchorblock");
evas_object_smart_callback_add(bt, "clicked", my_bt_17, NULL);
evas_object_size_hint_align_set(bt, -1.0, 0.0);
elm_box_pack_end(bx, bt);
evas_object_show(bt);
/* set an initial window size */
evas_object_resize(win, 320, 520);
/* show the window */
evas_object_show(win);
}
int

View File

@ -283,9 +283,6 @@ extern "C" {
// * scroller could do with page up/down/left/right buttons and and idea of
// a page size
// * tab widget focusing (not useful for touchscreen tho...)
// * frame needs to be able to use custom frame style
// * button needs to be able to use custom frame style
// * toggle needs to be able to use custom frame style
// * entry has no way to show its focused vs other entries
// * entry selection conflicts with finger scroll
// * toolbar widget (edje + box + button + separators)
@ -307,5 +304,9 @@ extern "C" {
// * need to get toplevel
// * need "dialogbutton" widget (bigger button for bottom of wins)
// * need dialog window widget
// * need a phone-number widget (hilight country dial prefixes, add flags,
// photos of contacts that match etc.)
// * need imageview widget (for large not iconic images)
// * labels with "" are 0x0 size, but with " " are correct vertically. check
#endif