Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src
Modified Files:
ewl_menu_base.c ewl_menu_base.h ewl_textarea.c ewl_textarea.h
Log Message:
Docs for the textarea and the base menu class.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_menu_base.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- ewl_menu_base.c 30 Jun 2003 05:58:59 -0000 1.13
+++ ewl_menu_base.c 31 Aug 2003 05:47:09 -0000 1.14
@@ -8,12 +8,14 @@
void __item_clicked(Ewl_Widget * w, void *ev_data, void *user_data);
/**
- * ewl_menu_base_init - initialize a menu to starting values
- * @menu: the menu to initialize
- * @follows: the widget the menu will follow
- * @type: the menu type
+ * @param menu: the menu item to initialize
+ * @param image: the icon for the menu item
+ * @param title: the label for the menu item
+ * @return Returns nothing.
+ * @brief Initialize a menu item to default values
*
- * Returns nothing. Sets up the internal variables for the menu.
+ * Sets up the internal variables for the menu item and places the icon from
+ * @a image and label from @a title in the menu item.
*/
void ewl_menu_base_init(Ewl_Menu_Base * menu, char *image, char *title)
{
@@ -51,12 +53,10 @@
}
/**
- * ewl_menu_item_new - create a new menu item to place in a menu
- * @image: the path to the image to use as an icon
- * @text: the text to display for the menu item
- *
- * Returns a pointer to a newly allocated menu item on success, NULL on
- * failure.
+ * @param image: the path to the image to use as an icon
+ * @param text: the text to display for the menu item
+ * @return Returns a pointer to a new menu item on success, NULL on failure.
+ * @brief Create a new menu item to place in a menu
*/
Ewl_Widget *ewl_menu_item_new(char *image, char *text)
{
@@ -76,13 +76,14 @@
}
/**
- * ewl_menu_item_init - initialize the fields of a menu item to their defaults
- * @item: the item to be initialized
- * @image: the path to image to be used, NULL for no image
- * @text: the text for this menuitem
+ * @param item: the item to be initialized
+ * @param image: the path to image to be used, NULL for no image
+ * @param text: the text for this menuitem
+ * @return Returns no value.
+ * @brief Initialize the fields of a menu item to their defaults
*
- * Returns no value. Initializes a menu item to default values and adds the
- * image pointed to by the path @image, and adds the text in @text.
+ * Initializes a menu item to default values and adds the
+ * image pointed to by the path @a image, and adds the text in @a text.
*/
void ewl_menu_item_init(Ewl_Menu_Item * item, char *image, char *text)
{
@@ -149,9 +150,8 @@
}
/**
- * ewl_menu_separator_new - create a separator menu item
- *
- * Returns a new menu item separator on success, NULL on failure.
+ * @return Returns a new menu item separator on success, NULL on failure.
+ * @brief Create a separator menu item
*/
Ewl_Menu_Separator *ewl_menu_separator_new()
{
@@ -170,10 +170,11 @@
}
/**
- * ewl_menu_separator_init - initialize a menu separator item
- * @sep: the menu separator item to initialize
+ * @param sep: the menu separator item to initialize
+ * @return Returns no value.
+ * @brief Initialize a menu separator item
*
- * Returns no value. Sets up the internal fields of the menu separator item to
+ * Sets up the internal fields of the menu separator item to
* some sane defaults.
*/
void ewl_menu_separator_init(Ewl_Menu_Separator *sep)
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_menu_base.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ewl_menu_base.h 30 Jun 2003 05:58:59 -0000 1.4
+++ ewl_menu_base.h 31 Aug 2003 05:47:09 -0000 1.5
@@ -1,61 +1,77 @@
#ifndef __EWL_MENU_BASE_H__
#define __EWL_MENU_BASE_H__
-typedef struct _ewl_menu_item Ewl_Menu_Item;
-
+/**
+ * @file ewl_menu_base.h
+ * Defines the basic menu classes that are extended to an actual menu
+ * implementation by inheriting classes such as Ewl_Menu and Ewl_IMenu.
+ */
+
+/**
+ * This serves as a basis for all menu related entries. It provides the most
+ * basic layout facilities for items in a menu.
+ */
+typedef struct Ewl_Menu_Item Ewl_Menu_Item;
+
+/**
+ * @def EWL_MENU_ITEM(mi)
+ * Typecasts a pointer to an Ewl_Menu_Item pointer.
+ */
#define EWL_MENU_ITEM(mi) ((Ewl_Menu_Item *)mi)
-struct _ewl_menu_item
+/**
+ * @struct Ewl_Menu_Item
+ * Inherits from Ewl_Box to gain it's layout abilities, places policy on top
+ * of the box framework to provide a simple menu layout of icon and label.
+ */
+struct Ewl_Menu_Item
{
- /*
- * The grid allows for easy layout of the icon and text.
- */
- Ewl_Box box;
-
- /*
- * The image in this menu item.
- */
- Ewl_Widget *icon;
-
- /*
- * The text for this menu item.
- */
- Ewl_Widget *text;
-
- /*
- * Indicates if this is inside a menu. This is actually only used by
- * the menus, but placed here for simplicity.
- */
- int submenu;
+
+ Ewl_Box box; /**< Inherit from Ewl_Box for layout */
+ Ewl_Widget *icon; /**< The image in this menu item. */
+ Ewl_Widget *text; /**< The text label for this menu item. */
+ int submenu; /**< Indicates if this is inside a menu. */
};
-typedef struct _ewl_menu_separator Ewl_Menu_Separator;
-
+/**
+ * A simple separator widget for putting lines between items in the menu.
+ * Special widget so enclosing menus can assume it can be treated as an
+ * Ewl_Menu_Item.
+ */
+typedef struct Ewl_Menu_Separator Ewl_Menu_Separator;
+
+/**
+ * @def EWL_MENU_SEPARATOR(s)
+ * Typecasts a pointer to an Ewl_Menu_Separator pointer.
+ */
#define EWL_MENU_SEPARATOR(s) ((Ewl_Menu_Separator *)s)
-struct _ewl_menu_separator
+/**
+ * @struct Ewl_Menu_Separator
+ * Inherits from Ewl_Menu_Item and limits it's functionality to simply provide
+ * a separator between items in a menu.
+ */
+struct Ewl_Menu_Separator
{
- Ewl_Menu_Item item;
+ Ewl_Menu_Item item; /**< Inherit from Ewl_Menu_Item */
};
-typedef struct _ewl_menu_base Ewl_Menu_Base;
-
+/**
+ * Provides the basic functionality common to the various menu classes.
+ */
+typedef struct Ewl_Menu_Base Ewl_Menu_Base;
+
+/**
+ * @def EWL_MENU_BASE(menu)
+ * Typecasts a pointer to an Ewl_Menu_Base pointer.
+ */
#define EWL_MENU_BASE(menu) ((Ewl_Menu_Base *) menu)
-struct _ewl_menu_base
+struct Ewl_Menu_Base
{
- /*
- * Inherit the item so that we can place menus inside other menus
- */
- Ewl_Menu_Item item;
-
- /*
- * The popup portion of the menu
- *
- * FIXME: Should this become a separate pop-up menu class?
- */
- Ewl_Widget *popup;
- Ewl_Widget *popbox;
+ Ewl_Menu_Item item; /**< Inherit from Ewl_Menu_Item */
+ Ewl_Widget *popup; /**< The popup portion of the menu */
+ Ewl_Widget *popbox; /**< Box for layout in popup */
};
Ewl_Widget *ewl_menu_item_new(char *image, char *title);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_textarea.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- ewl_textarea.c 25 Aug 2003 19:40:43 -0000 1.13
+++ ewl_textarea.c 31 Aug 2003 05:47:09 -0000 1.14
@@ -10,11 +10,11 @@
void __ewl_textarea_update_size(Ewl_TextArea * ta);
/**
- * ewl_textarea_new - allocate a new text area widget
- * @text: the initial text of the textarea
+ * @param text: the initial text of the textarea
+ * @return Returns a pointer to a new textarea on success, NULL on failure.
+ * @brief Allocate a new text area widget
*
- * Returns a pointer to a newly allocated text area widget on success, NULL on
- * failure. Sets the text initially to @text if not NULL.
+ * Sets the text initially to @a text if not NULL.
*/
Ewl_Widget *ewl_textarea_new(char *text)
{
@@ -31,12 +31,12 @@
}
/**
- * ewl_textarea_init - initialize the fields and callbacks of a text area
- * @ta: the text area to be initialized
- * @text: the text to be displayed initially in the text area
+ * @param ta: the text area to be initialized
+ * @param text: the text to be displayed initially in the text area
+ * @return Returns no value.
+ * @brief Initialize the fields and callbacks of a text area
*
- * Returns no value. Sets the internal fields and callbacks of a text area to
- * their defaults.
+ * Sets the internal fields and callbacks of a text area to their defaults.
*/
void ewl_textarea_init(Ewl_TextArea * ta, char *text)
{
@@ -63,12 +63,13 @@
}
/**
- * ewl_textarea_set_text - set the text of a text area widget
- * @ta: the text area widget to set the text
- * @text: the text to set in the text area widget @ta
+ * @param ta: the text area widget to set the text
+ * @param text: the text to set in the text area widget @a ta
+ * @return Returns no value.
+ * @brief Set the text of a text area widget
*
- * Returns no value. Sets the text of the text area widget @ta to a copy of
- * the contents of @text.
+ * Sets the text of the text area widget @a ta to a copy of the contents of
+ * @a text.
*/
void ewl_textarea_set_text(Ewl_TextArea * ta, char *text)
{
@@ -95,10 +96,9 @@
}
/**
- * ewl_textarea_get_text - retrieve the text of a text widget
- * @ta: the text widget to retrieve text contents
- *
- * Returns a pointer to a copy of the text in @ta on success, NULL on failure.
+ * @param ta: the text widget to retrieve text contents
+ * @return Returns a copy of the text in @a ta on success, NULL on failure.
+ * @brief Retrieve the text of a text widget
*/
char *ewl_textarea_get_text(Ewl_TextArea * ta)
{
@@ -109,10 +109,9 @@
}
/**
- * ewl_textarea_get_etox - retrieve the etox for performing text manipulation
- * @ta: the textarea to reveal it's etox
- *
- * Returns a pointer to the textarea's etox on success, NULL on failure.
+ * @param ta: the textarea to reveal it's etox
+ * @return Returns a pointer to the textarea's etox on success, NULL on failure.
+ * @brief Retrieve the etox for performing text manipulation
*/
Evas_Object *ewl_textarea_get_etox(Ewl_TextArea * ta)
{
@@ -122,11 +121,12 @@
}
/**
- * ewl_textarea_set_context - put a context into the textarea for etox creation
- * @ta: the textarea to be assigned a context
- * @context: the context to be set for the text area
+ * @param ta: the textarea to be assigned a context
+ * @param context: the context to be set for the text area
+ * @return Returns no value.
+ * @brief Put a context into the textarea for etox creation
*
- * Returns no value. Uses @context when creating/modifying the etox in @ta.
+ * Uses @a context when creating/modifying the etox in @a ta.
*/
void ewl_textarea_set_context(Ewl_TextArea * ta, Etox_Context * context)
{
@@ -140,11 +140,9 @@
}
/**
- * ewl_textarea_get_context - return the setup context for the text area
- * @ta: the textarea to retrieve it's assigned context
- *
- * Returns a pointer to the assigned context in @ta if one exists, otherwise
- * NULL.
+ * @param ta: the textarea to retrieve it's assigned context
+ * @return Returns the assigned context in @a ta if one exists, otherwise NULL.
+ * @brief Return the setup context for the text area
*/
Etox_Context *ewl_textarea_get_context(Ewl_TextArea * ta)
{
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_textarea.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- ewl_textarea.h 6 Aug 2003 03:14:24 -0000 1.5
+++ ewl_textarea.h 31 Aug 2003 05:47:09 -0000 1.6
@@ -2,17 +2,34 @@
#ifndef __EWL_TEXTAREA_H__
#define __EWL_TEXTAREA_H__
-typedef struct _ewl_textarea Ewl_TextArea;
+/**
+ * @file ewl_textarea.h
+ * Defines a class for multi-line text layout and formatting.
+ */
-#define EWL_TEXTAREA(textarea) ((Ewl_TextArea *) textarea)
-
-struct _ewl_textarea {
- Ewl_Widget widget;
+/**
+ * Provides for layout of text across multiple lines, as well as formatting
+ * portions of the text in different ways, and wrapping around obstacles.
+ */
+typedef struct Ewl_TextArea Ewl_TextArea;
- char *text;
+/**
+ * @def EWL_TEXTAREA(textarea)
+ * Typecasts a pointer to an Ewl_TextArea pointer.
+ */
+#define EWL_TEXTAREA(textarea) ((Ewl_TextArea *) textarea)
- Evas_Object *etox;
- Etox_Context *etox_context;
+/**
+ * @struct Ewl_TextArea
+ * Inherits from the Ewl_Widget class and extends it to provide for multi-line
+ * text layout, obstacle wrapping, and a variety of formatting.
+ */
+struct Ewl_TextArea
+{
+ Ewl_Widget widget; /**< Inherit from Ewl_Widget */
+ char *text; /**< The initial text in the textarea */
+ Evas_Object *etox; /**< The Etox does the actual layout work */
+ Etox_Context *etox_context; /**< Contains various format settings */
};
Ewl_Widget *ewl_textarea_new(char *text);
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs