GscTree

GscTree

Synopsis

                    GscTreePriv;
                    GscTree;
GtkWidget*          gsc_tree_new                        ();
gboolean            gsc_tree_get_selected_proposal      (GscTree *self,
                                                         GscProposal **proposal);
gboolean            gsc_tree_select_first               (GscTree *self);
gboolean            gsc_tree_select_last                (GscTree *self);
gboolean            gsc_tree_select_previous            (GscTree *self,
                                                         gint rows);
gboolean            gsc_tree_select_next                (GscTree *self,
                                                         gint rows);
void                gsc_tree_clear                      (GscTree *self);
void                gsc_tree_add_data                   (GscTree *self,
                                                         GscProposal *data);
gint                gsc_tree_get_num_proposals          (GscTree *self);
void                gsc_tree_filter                     (GscTree *self,
                                                         const gchar *filter);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBin
                                 +----GtkScrolledWindow
                                       +----GscTree

Implemented Interfaces

GscTree implements AtkImplementorIface and GtkBuildable.

Signals

  "proposal-selected"                              : Run First / Action
  "selection-changed"                              : Run First / Action

Description

Details

GscTreePriv

typedef struct _GscTreePriv GscTreePriv;


GscTree

typedef struct _GscTree GscTree;


gsc_tree_new ()

GtkWidget*          gsc_tree_new                        ();

Create a new GscTree

Returns :

the new GscTree

gsc_tree_get_selected_proposal ()

gboolean            gsc_tree_get_selected_proposal      (GscTree *self,
                                                         GscProposal **proposal);

Sets the param proposal to the selected proposal if there is an proposal selected.

self :

the GscTree

proposal :

Sets the ponter to the selected proposal.

Returns :

TRUE if there is an proposal selected

gsc_tree_select_first ()

gboolean            gsc_tree_select_first               (GscTree *self);

This functions selects the first proposal on the tree

self :

The GscTree

Returns :

TRUE if there is an proposal and it has been selected

gsc_tree_select_last ()

gboolean            gsc_tree_select_last                (GscTree *self);

This functions selects the last proposal on the tree

self :

The GscTree

Returns :

TRUE if there is an proposal and it has been selected

gsc_tree_select_previous ()

gboolean            gsc_tree_select_previous            (GscTree *self,
                                                         gint rows);

This functions selects the rows number of proposals before the current.

self :

The GscTree

rows :

the number of the previous proposals to select

Returns :

TRUE if there is an proposal and it has been selected. If rows=5 but the tree only have 3 proposals, it returns true too.

gsc_tree_select_next ()

gboolean            gsc_tree_select_next                (GscTree *self,
                                                         gint rows);

This functions selects the rows number of proposals after the current.

self :

The GscTree

rows :

the number of the next proposals to select

Returns :

TRUE if there is an proposal and it has been selected. If rows=5 but the tree only have 3 proposals, it returns true too.

gsc_tree_clear ()

void                gsc_tree_clear                      (GscTree *self);

Clear the tree model and free the proposals

self :

the GscTree

gsc_tree_add_data ()

void                gsc_tree_add_data                   (GscTree *self,
                                                         GscProposal *data);

Adds a new proposal into the tree

self :

The GscTree

data :

the proposal to add to the tree

gsc_tree_get_num_proposals ()

gint                gsc_tree_get_num_proposals          (GscTree *self);

self :

The GscTree

Returns :

The proposals number of this tree.

gsc_tree_filter ()

void                gsc_tree_filter                     (GscTree *self,
                                                         const gchar *filter);

This function filter the proposals in the current tree. This function filter the proposals by name (proposals stating by "filter")

self :

The GscTree

filter :

The filter to be applied.

Signal Details

The "proposal-selected" signal

void                user_function                      (GscTree *gsctree,
                                                        gpointer proposal,
                                                        gpointer user_data)      : Run First / Action

Emits when the user selects a proposal of this tree.

gsctree :

the object which received the signal.

proposal :

The GscProposal selected

user_data :

user data set when the signal handler was connected.

The "selection-changed" signal

void                user_function                      (GscTree *gsctree,
                                                        gpointer proposal,
                                                        gpointer user_data)      : Run First / Action

Emits when the user change the current proposal

gsctree :

the object which received the signal.

proposal :

The current GscProposal in the tree

user_data :

user data set when the signal handler was connected.