gtk_pairs

gtk_pairs — The pairs dialog.

Synopsis

GtkWidget *         (*VisuUiPairsBuildWidgetsFunc)      ();
void                (*VisuUiPairsInitFunc)              (void);
struct              VisuUiPairsIter;
void                (*VisuUiPairsSetValuesFunc)         (VisuPairLink *data);
gchar *             (*VisuUiPairsToLabelFunc)           (VisuPairLink *data);
void                visu_ui_pairs_init                  ();
void                visu_ui_pairs_initBuild             (VisuUiMain *main);
void                visu_ui_pairs_iter_empty            (VisuUiPairsIter *iter);
void                visu_ui_pairs_iter_nextSelected     (VisuUiPairsIter *iter);
void                visu_ui_pairs_iter_startSelected    (VisuUiPairsIter *iter);
void                visu_ui_pairs_newIter               (VisuUiPairsIter *iter);
gboolean            visu_ui_pairs_select                (const VisuPairLink *data);
void                visu_ui_pairs_setSpecificLabels     (GtkTreeIter *iter,
                                                         const gchar *label);
void                visu_ui_pairs_show                  (VisuUiMain *main);
void                visu_ui_pairs_update                (VisuUiMain *main,
                                                         VisuData *dataObj,
                                                         gboolean force);

Description

The pair dialog provides a list of pairs as min/max distances between species to draw pairs. A set of two species can have several pairs drawn.

This dialog also hosts widgets that depend on the pair method that is used for a given link.

Finally, it has also a second tab where a graph of g(r) can be drawn.

Details

VisuUiPairsBuildWidgetsFunc ()

GtkWidget *         (*VisuUiPairsBuildWidgetsFunc)      ();

Prototype of functions that create a container GtkWidgets will all element needed to change characteristic of a model.

Returns :

a newly allocated GtkWidget.

VisuUiPairsInitFunc ()

void                (*VisuUiPairsInitFunc)              (void);

Prototype of functions called once on V_Sim start-up.


struct VisuUiPairsIter

struct VisuUiPairsIter {
  VisuElement *ele1;
  VisuElement *ele2;
  VisuPairLink *data;
  GtkTreeIter iter;

  /* Private data. */
  GList *selected;
  GList *current;
};

An iterator on pairs.

VisuElement *ele1;

the VisuElement on one side ;

VisuElement *ele2;

the VisuElement on the other side ;

VisuPairLink *data;

the VisuPairLink information on the link between ele1 and ele2 ;

GtkTreeIter iter;

the GtkTreeIter corresponding to this link ;

GList *selected;

a private attribute ;

GList *current;

an other private attribute.

VisuUiPairsSetValuesFunc ()

void                (*VisuUiPairsSetValuesFunc)         (VisuPairLink *data);

Prototype of functions used to update the widgets with given pair data.

data :

informations about a pair.

VisuUiPairsToLabelFunc ()

gchar *             (*VisuUiPairsToLabelFunc)           (VisuPairLink *data);

Create a string, internationalised and in UTF-8, that describes the given pair data. This string is used in a column tree view to summarize the pair description.

data :

information about a pair.

Returns :

a newly created string.

visu_ui_pairs_init ()

void                visu_ui_pairs_init                  ();

Initialise the default values for the pair dialog. It does not build the interface, use visu_ui_pairs_initBuild() to do it.


visu_ui_pairs_initBuild ()

void                visu_ui_pairs_initBuild             (VisuUiMain *main);

Create the dialog window for pairs.

main :

the command panel the about dialog is associated to.

visu_ui_pairs_iter_empty ()

void                visu_ui_pairs_iter_empty            (VisuUiPairsIter *iter);

Free internals of the iterator. This routine is automatically called by visu_ui_pairs_iter_nextSelected() when arriving at the end of selection.

iter :

an iterator.

Since 3.7


visu_ui_pairs_iter_nextSelected ()

void                visu_ui_pairs_iter_nextSelected     (VisuUiPairsIter *iter);

Go to the next selected pair or set iter->data to NULL if none.

iter :

an iterator.

visu_ui_pairs_iter_startSelected ()

void                visu_ui_pairs_iter_startSelected    (VisuUiPairsIter *iter);

Initialise the given iterator iter on the first selected pair or set iter->data to NULL if none. If iter->data is not NULL, visu_ui_pairs_iter_nextSelected() must be called until iter->data is NULL to be sure that iter->selected list is freed.

iter :

an iterator. [out caller-allocates]

visu_ui_pairs_newIter ()

void                visu_ui_pairs_newIter               (VisuUiPairsIter *iter);

This method is used by bindings to initialise a new VisuUiPairsIter object.

iter :

an iterator. [out caller-allocates]

Since 3.7


visu_ui_pairs_select ()

gboolean            visu_ui_pairs_select                (const VisuPairLink *data);

Select in the UI the given data.

data :

a VisuPairLink object.

Returns :

TRUE if the data pair is indeed selected.

Since 3.7


visu_ui_pairs_setSpecificLabels ()

void                visu_ui_pairs_setSpecificLabels     (GtkTreeIter *iter,
                                                         const gchar *label);

Change the specific label shown in the treeview of pairs for the given iter. An iter in this treeview can be retrieve using the _VisuUiPairsIter objects.

iter :

the GtkTreeIter to set the label ;

label :

the value of the label to be set.

visu_ui_pairs_show ()

void                visu_ui_pairs_show                  (VisuUiMain *main);

Shows the pairs dialog and run possible update of the interface.

main :

the container for pairs dialog.

Since 3.6


visu_ui_pairs_update ()

void                visu_ui_pairs_update                (VisuUiMain *main,
                                                         VisuData *dataObj,
                                                         gboolean force);

Update the list of pairs. This routine must be called only after visu_ui_pairs_initBuild() has been called. The job is done only if the window is visible or if the force argument is used.

main :

the command panel the about dialog is associated to ;

dataObj :

the VisuData the pairs are related to (can be NULL, if none is loaded) ;

force :

build the pairs even if the window is hidden.