Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

mlview-attribute-picker.c File Reference

The definition of the class MlViewAttributePicker. More...

#include <libxml/parser.h>
#include <libxml/valid.h>
#include <libxml/tree.h>
#include "mlview-attribute-picker.h"
#include "mlview-parsing-utils.h"
#include "utils.h"

Go to the source code of this file.

Data Structures

struct  _MlViewAttributePickerPrivate
 The private instance members of MlViewAttributePicker. More...


Defines

#define PRIVATE(object)   (object)->private

Functions

gint mlview_attribute_picker_get_type (void)
 Type builder.

GtkWidget * mlview_attribute_picker_new (gchar *a_title, MlViewAppContext *a_app_context)
 Builds a brand new attribute picker.

void mlview_attribute_picker_set_app_context (MlViewAttributePicker *a_picker, MlViewAppContext *a_app_context)
 Sets a new app context.

void mlview_attribute_picker_grab_focus_to_name_entry (MlViewAttributePicker *a_picker)
 Sets the focus to the name entry of MlViewAttributePicker widget.

void mlview_attribute_picker_grab_focus_to_value_entry (MlViewAttributePicker *a_picker)
 Sets the focus to the value entry of MlViewAttributePicker widget.

gchar * mlview_attribute_picker_get_attribute_name (MlViewAttributePicker *a_picker)
 Gets the content of the name entry of attribute picker.

gchar * mlview_attribute_picker_get_attribute_value (MlViewAttributePicker *a_picker)
 Gets the content of the value entry of the attribute picker.

xmlAttributeType mlview_attribute_picker_get_attribute_type (MlViewAttributePicker *a_picker)
 Gets the type of the last attribute the user has entered in the picker.

void mlview_attribute_picker_select_attribute_name (MlViewAttributePicker *a_picker)
 Graphically selects all the content of the name entry of the MlViewAttributePicker widget.

void mlview_attribute_picker_select_attribute_value (MlViewAttributePicker *a_picker)
 Graphically selects all the content of the value entry of the MlViewAttributePicker widget.

void mlview_attribute_picker_set_current_xml_node (MlViewAttributePicker *a_picker, xmlNode *a_xml_node)
 Associates an xml node to this picker.

void mlview_attribute_picker_set_attribute_completion (gboolean a_completion_on)
 Sets the attribute completion on/off.

void mlview_attribute_picker_build_attribute_name_choice_list (MlViewAttributePicker *a_picker, xmlNode *a_xml_node)
 Builds the attribute name completion list.


Detailed Description

The definition of the class MlViewAttributePicker.

This class is a business widget. It lets the user enter the name/value of an attribute. It can for example perform an attribute name completion given the xmlNode on which the attribute is to be defined.

Definition in file mlview-attribute-picker.c.


Define Documentation

#define PRIVATE object       (object)->private
 

Definition at line 77 of file mlview-attribute-picker.c.

Referenced by mlview_attribute_picker_build_attribute_name_choice_list(), mlview_attribute_picker_get_attribute_name(), mlview_attribute_picker_get_attribute_type(), mlview_attribute_picker_get_attribute_value(), mlview_attribute_picker_grab_focus_to_name_entry(), mlview_attribute_picker_grab_focus_to_value_entry(), mlview_attribute_picker_select_attribute_name(), mlview_attribute_picker_select_attribute_value(), mlview_attribute_picker_set_app_context(), and mlview_attribute_picker_set_current_xml_node().


Function Documentation

void mlview_attribute_picker_build_attribute_name_choice_list MlViewAttributePicker   a_picker,
xmlNode *    a_xml_node
 

Builds the attribute name completion list.

The list is built, cached in the current instance of MlViewAttributePicker, and displayed to the user whenever she clicks in the attribute names completion list. This function uses mlview_parsing_utils_build_attribute_name_completion_list() to actually build the completion list.

Parameters:
a_picker  the current instance of MlViewAttributePicker.
a_xml_node  the xmlNode used to build the attribute name completion list.

Definition at line 872 of file mlview-attribute-picker.c.

References MLVIEW_IS_ATTRIBUTE_PICKER, mlview_parsing_utils_build_attribute_name_completion_list(), and PRIVATE.

gchar* mlview_attribute_picker_get_attribute_name MlViewAttributePicker   a_picker
 

Gets the content of the name entry of attribute picker.

Parameters:
a_picker  the current instance of MlViewAttributePicker.
Returns:
a pointer to the name entry of attribute picker. DO NOT FREE THIS POINTER or you will hang the process.

Definition at line 736 of file mlview-attribute-picker.c.

References MLVIEW_IS_ATTRIBUTE_PICKER, and PRIVATE.

xmlAttributeType mlview_attribute_picker_get_attribute_type MlViewAttributePicker   a_picker
 

Gets the type of the last attribute the user has entered in the picker.

Parameters:
a_picker  the current instance of MlViewAttributePicker.
Returns:
the type of the last attribute entered by the user in the picker a_picker.

Definition at line 773 of file mlview-attribute-picker.c.

References MLVIEW_IS_ATTRIBUTE_PICKER, PRIVATE, and utils_is_white_string().

gchar* mlview_attribute_picker_get_attribute_value MlViewAttributePicker   a_picker
 

Gets the content of the value entry of the attribute picker.

Parameters:
a_picker  the current instance of MlViewAttributePicker.
Returns:
a pointer to the content of the value entry of the MlViewAttributePicker widget.

Definition at line 755 of file mlview-attribute-picker.c.

References MLVIEW_IS_ATTRIBUTE_PICKER, and PRIVATE.

gint mlview_attribute_picker_get_type void   
 

Type builder.

Returns:
the id of the type MlViewAttribute.

Definition at line 642 of file mlview-attribute-picker.c.

void mlview_attribute_picker_grab_focus_to_name_entry MlViewAttributePicker   a_picker
 

Sets the focus to the name entry of MlViewAttributePicker widget.

Parameters:
a_picker  the current instance of MlViewAttributePicker.

Definition at line 703 of file mlview-attribute-picker.c.

References MLVIEW_IS_ATTRIBUTE_PICKER, and PRIVATE.

void mlview_attribute_picker_grab_focus_to_value_entry MlViewAttributePicker   a_picker
 

Sets the focus to the value entry of MlViewAttributePicker widget.

Parameters:
a_picker  the current instance of MlViewAttributePicker.

Definition at line 719 of file mlview-attribute-picker.c.

References MLVIEW_IS_ATTRIBUTE_PICKER, and PRIVATE.

GtkWidget* mlview_attribute_picker_new gchar *    a_title,
MlViewAppContext   a_app_context
 

Builds a brand new attribute picker.

Parameters:
a_title  the title the window of the attribute picker.
a_app_context  the current application context.
Returns:
the widget of the attribute picker.

Definition at line 667 of file mlview-attribute-picker.c.

References mlview_app_context_set_window_icon(), mlview_attribute_picker_set_app_context(), and MLVIEW_TYPE_ATTRIBUTE_PICKER.

void mlview_attribute_picker_select_attribute_name MlViewAttributePicker   a_picker
 

Graphically selects all the content of the name entry of the MlViewAttributePicker widget.

Parameters:
a_picker  the current instance of MlViewAttributePicker.

Definition at line 798 of file mlview-attribute-picker.c.

References MLVIEW_IS_ATTRIBUTE_PICKER, and PRIVATE.

void mlview_attribute_picker_select_attribute_value MlViewAttributePicker   a_picker
 

Graphically selects all the content of the value entry of the MlViewAttributePicker widget.

Parameters:
a_picker  the current instance of MlViewAttributePicker.

Definition at line 816 of file mlview-attribute-picker.c.

References MLVIEW_IS_ATTRIBUTE_PICKER, and PRIVATE.

void mlview_attribute_picker_set_app_context MlViewAttributePicker   a_picker,
MlViewAppContext   a_app_context
 

Sets a new app context.

Parameters:
a_picker  the current instance of MlViewAttributePicker.
a_app_context  the new application context.

Definition at line 687 of file mlview-attribute-picker.c.

References MLVIEW_IS_ATTRIBUTE_PICKER, and PRIVATE.

Referenced by mlview_attribute_picker_new().

void mlview_attribute_picker_set_attribute_completion gboolean    a_completion_on
 

Sets the attribute completion on/off.

All the instances of MlViewAttributePicker of the current process will be affected by this method.

Parameters:
a_completion_on  wether to set the completion on or not.

Definition at line 855 of file mlview-attribute-picker.c.

void mlview_attribute_picker_set_current_xml_node MlViewAttributePicker   a_picker,
xmlNode *    a_xml_node
 

Associates an xml node to this picker.

That xml node is used for example to build the attribute name completion list if needed.

Parameters:
a_picker  the current instance of MlViewAttributePicker.
a_xml_node  the xmlNode to associate to the current node.

Definition at line 836 of file mlview-attribute-picker.c.

References MLVIEW_IS_ATTRIBUTE_PICKER, and PRIVATE.


Generated on Sat Jul 6 09:57:38 2002 for Gnome-MlView by doxygen1.2.16