Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src


Modified Files:
        ewl_box.c ewl_cursor.c ewl_cursor.h ewl_entry.c ewl_tree.h 


Log Message:
Don't change the box's appearance because the orientation changed.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_box.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -3 -r1.44 -r1.45
--- ewl_box.c   19 Feb 2003 02:18:05 -0000      1.44
+++ ewl_box.c   21 Feb 2003 23:04:17 -0000      1.45
@@ -165,10 +165,12 @@
                DRETURN(DLEVEL_STABLE);
 
        b->orientation = o;
+       /*
        if (o == EWL_ORIENTATION_HORIZONTAL)
                ewl_widget_set_appearance(w, "hbox");
        else
                ewl_widget_set_appearance(w, "vbox");
+        */
 
        ewl_widget_configure(w);
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_cursor.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- ewl_cursor.c        14 Jan 2003 21:45:00 -0000      1.9
+++ ewl_cursor.c        21 Feb 2003 23:04:18 -0000      1.10
@@ -22,6 +22,28 @@
 }
 
 /**
+ * ewl_cursor_init - initialize the cursor to default values and appearance
+ * @c: the cursor to initialize
+ *
+ * Returns no value. Sets the default values and appearance for the cursor @c.
+ */
+void ewl_cursor_init(Ewl_Cursor * c)
+{
+       Ewl_Widget     *w;
+
+       DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR("c", c);
+
+       w = EWL_WIDGET(c);
+
+       ewl_widget_init(w, "cursor");
+
+       c->position = 1;
+
+       DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+/**
  * ewl_cursor_set_position - set the current position of the cursor
  * @w: the cursor widget to change position
  * @p: the index of the cursor position within the entry widget's text
@@ -29,7 +51,7 @@
  * Returns no value. Changes the position of the cursor so that the entry
  * widget can update it appropriately.
  */
-void ewl_cursor_set_position(Ewl_Widget * w, int p)
+void ewl_cursor_set_position(Ewl_Widget * w, unsigned int p)
 {
        Ewl_Cursor     *c;
 
@@ -38,6 +60,8 @@
 
        c = EWL_CURSOR(w);
 
+       if (p == 0)
+               p = 1;
        c->position = p;
 
        ewl_callback_call(w, EWL_CALLBACK_VALUE_CHANGED);
@@ -61,26 +85,4 @@
        c = EWL_CURSOR(w);
 
        DRETURN_INT(c->position, DLEVEL_STABLE);
-}
-
-/**
- * ewl_cursor_init - initialize the cursor to default values and appearance
- * @c: the cursor to initialize
- *
- * Returns no value. Sets the default values and appearance for the cursor @c.
- */
-void ewl_cursor_init(Ewl_Cursor * c)
-{
-       Ewl_Widget     *w;
-
-       DENTER_FUNCTION(DLEVEL_STABLE);
-       DCHECK_PARAM_PTR("c", c);
-
-       w = EWL_WIDGET(c);
-
-       ewl_widget_init(w, "cursor");
-
-       c->position = 1;
-
-       DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_cursor.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- ewl_cursor.h        25 May 2002 05:46:40 -0000      1.6
+++ ewl_cursor.h        21 Feb 2003 23:04:19 -0000      1.7
@@ -9,12 +9,12 @@
 struct _ewl_cursor {
        Ewl_Widget      widget;
 
-       int             position;
+       unsigned int    position;
 };
 
 Ewl_Widget     *ewl_cursor_new(void);
 void            ewl_cursor_init(Ewl_Cursor * c);
-void            ewl_cursor_set_position(Ewl_Widget * w, int p);
+void            ewl_cursor_set_position(Ewl_Widget * w, unsigned int p);
 int             ewl_cursor_get_position(Ewl_Widget * w);
 
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_entry.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -3 -r1.42 -r1.43
--- ewl_entry.c 19 Feb 2003 02:18:05 -0000      1.42
+++ ewl_entry.c 21 Feb 2003 23:04:19 -0000      1.43
@@ -1,9 +1,7 @@
 
 #include <Ewl.h>
 
-void            ewl_entry_init(Ewl_Entry * e);
-void            __ewl_entry_realize(Ewl_Widget * w, void *ev_data,
-                                   void *user_data);
+void            ewl_entry_init(Ewl_Entry * e, char *text);
 void            __ewl_entry_configure(Ewl_Widget * w, void *ev_data,
                                      void *user_data);
 void            __ewl_entry_key_down(Ewl_Widget * w, void *ev_data,
@@ -49,63 +47,19 @@
 
        ZERO(e, Ewl_Entry, 1);
 
-       e->text = ewl_text_new(text);
-       e->cursor = ewl_cursor_new();
-       e->selection = ewl_selection_new();
-
-       ewl_entry_init(e);
-
-       ewl_container_append_child(EWL_CONTAINER(e), e->text);
-       ewl_container_append_child(EWL_CONTAINER(e), e->selection);
-       ewl_container_append_child(EWL_CONTAINER(e), e->cursor);
+       ewl_entry_init(e, text);
 
        DRETURN_PTR(EWL_WIDGET(e), DLEVEL_STABLE);
 }
 
 /**
- * ewl_entry_set_text - set the text for an entry widget
- * @e: the entry widget to change the text
- * @t: the text to set for the entry widget
- *
- * Returns no value. Change the text of the entry widget @e to the string @t.
- */
-void ewl_entry_set_text(Ewl_Entry * e, char *t)
-{
-       DENTER_FUNCTION(DLEVEL_STABLE);
-       DCHECK_PARAM_PTR("e", e);
-
-       ewl_text_set_text(EWL_TEXT(e->text), t);
-
-       DLEAVE_FUNCTION(DLEVEL_STABLE);
-}
-
-/**
- * ewl_entry_get_text - get the text from an entry widget
- * @e: the entry widget to retrieve the text
- *
- * Returns the text contained in the entry widget @e on success, NULL on
- * failure.
- */
-char           *ewl_entry_get_text(Ewl_Entry * e)
-{
-       Ewl_Widget     *w;
-
-       DENTER_FUNCTION(DLEVEL_STABLE);
-       DCHECK_PARAM_PTR_RET("e", e, NULL);
-
-       w = EWL_WIDGET(e);
-
-       DRETURN_PTR(ewl_text_get_text(EWL_TEXT(e->text)), DLEVEL_STABLE);
-}
-
-/**
  * ewl_entry_init - initialize an entry widget to default values
  * @e: the entry widget to initialize
  *
  * Returns no value. Initializes the entry widget @e to it's default values
  * and callbacks.
  */
-void ewl_entry_init(Ewl_Entry * e)
+void ewl_entry_init(Ewl_Entry * e, char *text)
 {
        Ewl_Widget     *w;
 
@@ -121,10 +75,21 @@
 
        w->recursive = FALSE;
 
+       e->text = ewl_text_new(text);
+       ewl_container_append_child(EWL_CONTAINER(e), e->text);
+       ewl_widget_show(e->text);
+
+       e->cursor = ewl_cursor_new();
+       ewl_container_append_child(EWL_CONTAINER(e), e->selection);
+       ewl_widget_show(e->selection);
+
+       e->selection = ewl_selection_new();
+       ewl_container_append_child(EWL_CONTAINER(e), e->cursor);
+       ewl_widget_show(e->cursor);
+
        /*
         * Attach necessary callback mechanisms 
         */
-       ewl_callback_append(w, EWL_CALLBACK_REALIZE, __ewl_entry_realize, NULL);
        ewl_callback_append(w, EWL_CALLBACK_CONFIGURE,
                            __ewl_entry_configure, NULL);
        ewl_callback_append(w, EWL_CALLBACK_KEY_DOWN, __ewl_entry_key_down,
@@ -140,27 +105,40 @@
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
 
-
-/*
- * Draw the appearance information for the entry widget
+/**
+ * ewl_entry_set_text - set the text for an entry widget
+ * @e: the entry widget to change the text
+ * @t: the text to set for the entry widget
+ *
+ * Returns no value. Change the text of the entry widget @e to the string @t.
  */
-void __ewl_entry_realize(Ewl_Widget * w, void *ev_data, void *user_data)
+void ewl_entry_set_text(Ewl_Entry * e, char *t)
 {
-       Ewl_Entry      *e;
-
        DENTER_FUNCTION(DLEVEL_STABLE);
-       DCHECK_PARAM_PTR("w", w);
+       DCHECK_PARAM_PTR("e", e);
 
-       e = EWL_ENTRY(w);
+       ewl_text_set_text(EWL_TEXT(e->text), t);
 
-       ewl_widget_show(e->text);
-       ewl_widget_realize(e->cursor);
-       ewl_widget_hide(e->cursor);
+       DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
 
-       ewl_widget_realize(e->selection);
-       ewl_widget_hide(e->selection);
+/**
+ * ewl_entry_get_text - get the text from an entry widget
+ * @e: the entry widget to retrieve the text
+ *
+ * Returns the text contained in the entry widget @e on success, NULL on
+ * failure.
+ */
+char           *ewl_entry_get_text(Ewl_Entry * e)
+{
+       Ewl_Widget     *w;
 
-       DLEAVE_FUNCTION(DLEVEL_STABLE);
+       DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR_RET("e", e, NULL);
+
+       w = EWL_WIDGET(e);
+
+       DRETURN_PTR(ewl_text_get_text(EWL_TEXT(e->text)), DLEVEL_STABLE);
 }
 
 void __ewl_entry_configure(Ewl_Widget * w, void *ev_data, void *user_data)
@@ -587,10 +565,8 @@
 {
        if (o == EWL_ORIENTATION_HORIZONTAL)
                ewl_object_set_preferred_w(EWL_OBJECT(entry),
-                                          ewl_object_get_preferred_w(EWL_OBJECT
-                                                                     (text)));
+                          ewl_object_get_preferred_w(EWL_OBJECT(text)));
        else
                ewl_object_set_preferred_h(EWL_OBJECT(entry),
-                                          ewl_object_get_preferred_h(EWL_OBJECT
-                                                                     (text)));
+                          ewl_object_get_preferred_h(EWL_OBJECT(text)));
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_tree.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- ewl_tree.h  20 Feb 2003 05:17:40 -0000      1.2
+++ ewl_tree.h  21 Feb 2003 23:04:20 -0000      1.3
@@ -45,5 +45,6 @@
 Ewl_Widget *ewl_tree_new(unsigned short columns);
 int ewl_tree_init(Ewl_Tree *tree, unsigned short columns);
 void ewl_tree_set_columns(Ewl_Tree *tree, unsigned short columns);
+Ewl_Widget *ewl_tree_add(Ewl_Tree *tree, Ewl_Row *prow, Ewl_Widget **children);
 
 #endif




-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to