Enlightenment CVS committal
Author : dj2
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/bin/tests
Modified Files:
ewl_tree2.c
Log Message:
- add a scrollpane to tree2
- note, setting the header scrollable will cause ewl to loop forever on
shutdown. I think this is due to a container bug.
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/bin/tests/ewl_tree2.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- ewl_tree2.c 20 Aug 2006 21:09:05 -0000 1.9
+++ ewl_tree2.c 21 Aug 2006 01:24:07 -0000 1.10
@@ -32,6 +32,9 @@
Ewl_Sort_Direction sort);
static int tree2_test_data_count_get(void *data);
+static void ewl_tree2_cb_scroll_headers(Ewl_Widget *w, void *ev, void *data);
+static void ewl_tree2_cb_scroll_visible(Ewl_Widget *w, void *ev, void *data);
+
void
test_info(Ewl_Test *test)
{
@@ -46,11 +49,17 @@
static int
create_test(Ewl_Container *box)
{
- Ewl_Widget *tree;
+ Ewl_Widget *tree, *o, *o2;
Ewl_Model *model;
Ewl_View *view;
void *data;
+ o2 = ewl_hbox_new();
+ ewl_container_child_append(box, o2);
+ ewl_object_fill_policy_set(EWL_OBJECT(o2),
+ EWL_FLAG_FILL_VSHRINK | EWL_FLAG_FILL_HFILL);
+ ewl_widget_show(o2);
+
/* create our data */
data = tree2_test_data_setup();
@@ -93,6 +102,22 @@
ewl_view_header_fetch_set(view, tree2_test_data_header_fetch);
ewl_tree2_column_append(EWL_TREE2(tree), model, view);
+ /* create the checkbuttons for the top box */
+ o = ewl_checkbutton_new();
+ ewl_button_label_set(EWL_BUTTON(o), "Scroll headers");
+ ewl_container_child_append(EWL_CONTAINER(o2), o);
+ ewl_callback_append(o, EWL_CALLBACK_CLICKED,
+ ewl_tree2_cb_scroll_headers, tree);
+ ewl_widget_show(o);
+
+ o = ewl_checkbutton_new();
+ ewl_button_label_set(EWL_BUTTON(o), "Scroll visible");
+ ewl_container_child_append(EWL_CONTAINER(o2), o);
+ ewl_checkbutton_checked_set(EWL_CHECKBUTTON(o), TRUE);
+ ewl_callback_append(o, EWL_CALLBACK_CLICKED,
+ ewl_tree2_cb_scroll_visible, tree);
+ ewl_widget_show(o);
+
return 1;
}
@@ -262,4 +287,25 @@
return d->count;
}
+
+static void
+ewl_tree2_cb_scroll_headers(Ewl_Widget *w, void *ev __UNUSED__, void *data)
+{
+ Ewl_Tree2 *tree;
+
+ tree = data;
+ ewl_tree2_scroll_headers_set(tree,
+ ewl_checkbutton_is_checked(EWL_CHECKBUTTON(w)));
+}
+
+static void
+ewl_tree2_cb_scroll_visible(Ewl_Widget *w, void *ev __UNUSED__, void *data)
+{
+ Ewl_Tree2 *tree;
+
+ tree = data;
+ ewl_tree2_scroll_visible_set(tree,
+ ewl_checkbutton_is_checked(EWL_CHECKBUTTON(w)));
+}
+
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs