Referência ao ficheiro src/interface/vapiGtkWindowSelectOperation.c

#include <gtk/gtk.h>
#include "vapiGroups.h"
#include "vapiGtkWindowSelectOperation.h"
#include "vapiGtkAux.h"
#include "vapiAux.h"
#include "vapiGtkTable.h"

Diagrama de dependências de inclusão para vapiGtkWindowSelectOperation.c:

Ir para o código fonte deste ficheiro.

Funções

void vapiGtkSelectOperationAuxAddToNotebook (GtkNotebook *notebook, GtkWidget *widget, const char *label)
void vapiGtkSelectOperationPopulateGroup (const char *GroupName, vapiGtkWindowSelectGroupStruct *GroupStruct)
void vapiGtkSelectOperationSelect (GtkTreeSelection *selection, vapiGtkWindowSelectGroupStruct *GroupStruct)
void vapiGtkSelectOperationSelectGetOptions (vEffect *Operation, vapiGtkWindowSelectGroupStruct *GroupStruct)
GtkWidget * vapiGtkSelectOperationSelectGetOptionsBooleans (vEffect *Operation, vapiGtkWindowSelectGroupStruct *GroupStruct)
GtkWidget * vapiGtkSelectOperationSelectGetOptionsChars (vEffect *Operation, vapiGtkWindowSelectGroupStruct *GroupStruct)
GtkWidget * vapiGtkSelectOperationSelectGetOptionsFloats (vEffect *Operation, vapiGtkWindowSelectGroupStruct *GroupStruct)
GtkWidget * vapiGtkSelectOperationSelectGetOptionsInts (vEffect *Operation, vapiGtkWindowSelectGroupStruct *GroupStruct)
void vapiGtkSelectOperationSelectGroup (GtkWidget *button, vapiGtkWindowSelectGroupStruct *GroupStruct)
void vapiGtkSelectOperationSelectToUse (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, vapiGtkWindowSelectGroupStruct *GroupStruct)
void vapiGtkSelectOperationSelectToUseFromButton (GtkWidget *button, vapiGtkWindowSelectGroupStruct *GroupStruct)
void vapiGtkSelectOperationStartOperationList (vapiGtkWindowSelectGroupStruct *GroupStruct)
void vapiGtkSelectOperationStartWindow (vGroupList *GroupList, vapiGtkWindowSelectGroupStruct *GroupStruct, GtkWidget *vBoxOperationGroups)


Documentação das funções

void vapiGtkSelectOperationAuxAddToNotebook ( GtkNotebook *  notebook,
GtkWidget *  widget,
const char *  label 
)

Definido na linha 9 do ficheiro vapiGtkWindowSelectOperation.c.

Referenciado por vapiGtkSelectOperationSelectGetOptions().

00011 {
00012         GtkWidget *Scrolled;
00013         Scrolled = gtk_scrolled_window_new (NULL, NULL);
00014         gtk_scrolled_window_set_policy ((GtkScrolledWindow *)
00015                                         Scrolled,
00016                                         GTK_POLICY_AUTOMATIC,
00017                                         GTK_POLICY_AUTOMATIC);
00018         gtk_container_add ((GtkContainer *) Scrolled, widget);
00019         gtk_notebook_append_page (notebook, Scrolled, gtk_label_new (label));
00020         gtk_widget_show_all ((GtkWidget *) notebook);
00021 
00022 }

Here is the caller graph for this function:

void vapiGtkSelectOperationPopulateGroup ( const char *  GroupName,
vapiGtkWindowSelectGroupStruct GroupStruct 
)

Definido na linha 124 do ficheiro vapiGtkWindowSelectOperation.c.

Referências _vEffect::briefDescription, _vEffect::Group, _vEffect::name, _vapiGtkWindowSelectGroupStruct::OperationList, OperationList, vapiOperationListCountElements() e vapiOperationListSelectItem().

Referenciado por vapiGtkSelectOperationSelectGroup() e vapiGtkSelectOperationStartWindow().

00127 {
00128         int i, NumberOfOperations;
00129         GtkTreeStore *treeStore;
00130         GtkTreeIter iter;
00131         GtkTextBuffer *MessagesBuffer;
00132         vEffect *Operation;
00133         treeStore = gtk_tree_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
00134         NumberOfOperations =
00135                 vapiOperationListCountElements (GroupStruct->OperationList);
00136         if (NumberOfOperations == 0)
00137         {
00138                 return;
00139         }
00140 
00141         for (i = 0; i < NumberOfOperations; i++)
00142         {
00143                 Operation =
00144                         vapiOperationListSelectItem (GroupStruct->
00145                                                      OperationList, i);
00146                 if (!strcmp (Operation->Group, GroupName)
00147                     || !strcmp ("Todas", GroupName))
00148                 {
00149                         gtk_tree_store_append (treeStore, &iter, NULL);
00150                         gtk_tree_store_set (treeStore, &iter, 0,
00151                                             Operation->name, 1,
00152                                             Operation->briefDescription, -1);
00153                 }
00154         }
00155 
00156         gtk_tree_view_set_model ((GtkTreeView *) GroupStruct->
00157                                  OperationTreeView,
00158                                  GTK_TREE_MODEL (treeStore));
00159         gtk_tree_view_columns_autosize ((GtkTreeView *) GroupStruct->
00160                                         OperationTreeView);
00161         g_object_unref (treeStore);
00162 
00163         /*
00164          * Colocar a caixa da descrição vazia.
00165          */
00166         MessagesBuffer =
00167                 gtk_text_view_get_buffer ((GtkTextView *) GroupStruct->
00168                                           txtOperationDescription);
00169 
00170         gtk_text_buffer_set_text (MessagesBuffer, " ", -1);
00171 }

Grafo de chamadas desta função:

Here is the caller graph for this function:

void vapiGtkSelectOperationSelect ( GtkTreeSelection *  selection,
vapiGtkWindowSelectGroupStruct GroupStruct 
)

Definido na linha 606 do ficheiro vapiGtkWindowSelectOperation.c.

Referências _vEffect::longDescription, OperationList, _vapiGtkWindowSelectGroupStruct::OperationTreeView, vapiGtkSelectOperationSelectGetOptions() e vapiOperationListSelectOperation().

Referenciado por vapiGtkSelectOperationStartOperationList().

00609 {
00610 
00611         vEffect *Operation;
00612         GtkTreeModel *treeModel;
00613         GtkTextBuffer *MessagesBuffer;
00614         GtkTreeIter iter;
00615         GValue gvalue = {
00616                 0,
00617         };
00618         char *OperationName;
00619         treeModel =
00620                 gtk_tree_view_get_model ((GtkTreeView *)
00621                                          GroupStruct->OperationTreeView);
00622         if (!gtk_tree_selection_get_selected (selection, &treeModel, &iter))
00623         {
00624                 return;
00625         }
00626         gtk_tree_model_get_value (treeModel, &iter, 0, &gvalue);
00627         OperationName = (char *) g_value_get_string (&gvalue);
00628         gtk_statusbar_push (GroupStruct->
00629                             stSelectOperation, 0,
00630                             g_strdup_printf
00631                             ("Seleccionada a Operação \"%s\" ",
00632                              OperationName));
00633         Operation =
00634                 vapiOperationListSelectOperation (GroupStruct->
00635                                                   OperationList,
00636                                                   OperationName);
00637         MessagesBuffer =
00638                 gtk_text_view_get_buffer ((GtkTextView *)
00639                                           GroupStruct->
00640                                           txtOperationDescription);
00641         gtk_text_buffer_set_text (MessagesBuffer,
00642                                   Operation->longDescription, -1);
00643         vapiGtkSelectOperationSelectGetOptions (Operation, GroupStruct);
00644 }

Grafo de chamadas desta função:

Here is the caller graph for this function:

void vapiGtkSelectOperationSelectGetOptions ( vEffect Operation,
vapiGtkWindowSelectGroupStruct GroupStruct 
)

Definido na linha 503 do ficheiro vapiGtkWindowSelectOperation.c.

Referências _vapiGtkWindowSelectGroupStruct::nbOptions, vapiGtkSelectOperationAuxAddToNotebook(), vapiGtkSelectOperationSelectGetOptionsBooleans(), vapiGtkSelectOperationSelectGetOptionsChars(), vapiGtkSelectOperationSelectGetOptionsFloats(), vapiGtkSelectOperationSelectGetOptionsInts() e vapiReturnStringPointer().

Referenciado por vapiGtkSelectOperationSelect().

00506 {
00507         GtkWidget *OptionsTables;
00508         GList *listOfFunctions = NULL, *listOfNames = NULL;
00509         GtkWidget *(*func) (vEffect *, vapiGtkWindowSelectGroupStruct *);
00510         int nbNumberOfPages, NumberOfFunctions, i;
00511         /*
00512          * São inseridas as funções e o seu nome em 2 listas.
00513          * Depois, um ciclo for corre a lista e executa as funções,
00514          *  (que dão o numero de variáveis para um determinado tipo de
00515          *  variável) e cria a janela de opções, com o nome do tipo retirado
00516          *  da 2ª lista.
00517          */
00518 
00519         /*
00520          * float.
00521          */
00522         listOfFunctions =
00523                 g_list_append (listOfFunctions,
00524                                &vapiGtkSelectOperationSelectGetOptionsFloats);
00525         listOfNames =
00526                 g_list_append (listOfNames,
00527                                (char *) vapiReturnStringPointer ("Decimais"));
00528 
00529         /*
00530          * Inteiros.
00531          */
00532         listOfFunctions =
00533                 g_list_append (listOfFunctions,
00534                                &vapiGtkSelectOperationSelectGetOptionsInts);
00535         listOfNames =
00536                 g_list_append (listOfNames,
00537                                (char *) vapiReturnStringPointer ("Inteiros"));
00538 
00539         /*
00540          * Caracteres.
00541          */
00542         listOfFunctions =
00543                 g_list_append (listOfFunctions,
00544                                &vapiGtkSelectOperationSelectGetOptionsChars);
00545         listOfNames =
00546                 g_list_append (listOfNames,
00547                                (char *)
00548                                vapiReturnStringPointer ("Caracteres"));
00549         /*
00550          * Booleans.
00551          */
00552         listOfFunctions =
00553                 g_list_append (listOfFunctions,
00554                                &vapiGtkSelectOperationSelectGetOptionsBooleans);
00555         listOfNames =
00556                 g_list_append (listOfNames,
00557                                (char *)
00558                                vapiReturnStringPointer ("Booleanas"));
00559                                /****/
00560         NumberOfFunctions = g_list_length (listOfFunctions);
00561         /*
00562          * Delete All pages so we can renew all.
00563          */
00564         nbNumberOfPages =
00565                 gtk_notebook_get_n_pages ((GtkNotebook *)
00566                                           GroupStruct->nbOptions);
00567 
00568         if (nbNumberOfPages > 0)
00569         {
00570                 for (i = 0; i < nbNumberOfPages; i++)
00571                 {
00572                         gtk_notebook_remove_page ((GtkNotebook *)
00573                                                   GroupStruct->nbOptions, 0);
00574                 }
00575         }
00576 
00577         for (i = 0; i < NumberOfFunctions; i++)
00578         {
00579                 func = g_list_nth_data (listOfFunctions, i);
00580                 OptionsTables = func (Operation, GroupStruct);
00581                 if (OptionsTables != NULL)
00582                 {
00583 
00584                         vapiGtkSelectOperationAuxAddToNotebook ((GtkNotebook
00585                                                                  *)
00586                                                                 GroupStruct->
00587                                                                 nbOptions,
00588                                                                 OptionsTables,
00589                                                                 g_list_nth_data
00590                                                                 (listOfNames,
00591                                                                  i));
00592                 }
00593         }
00594         for (i = 0; i < NumberOfFunctions; i++)
00595         {
00596                 free (g_list_nth_data (listOfNames, i));
00597         }
00598         g_list_free (listOfNames);
00599         g_list_free (listOfFunctions);
00600 
00601         gtk_notebook_set_current_page ((GtkNotebook *)
00602                                        GroupStruct->nbOptions, 0);
00603 }

Grafo de chamadas desta função:

Here is the caller graph for this function:

GtkWidget* vapiGtkSelectOperationSelectGetOptionsBooleans ( vEffect Operation,
vapiGtkWindowSelectGroupStruct GroupStruct 
)

Definido na linha 421 do ficheiro vapiGtkWindowSelectOperation.c.

Referências _vOptionsSettings::booleans, _vOptionsSettings::booleansNumber, _vOptBoolean::defaultValue e _vEffect::OptionsSettings.

Referenciado por vapiGtkSelectOperationSelectGetOptions().

00424 {
00425         GtkWidget *OptionsTable;
00426         GtkCellRenderer *renderer;
00427         GtkTreeStore *treeStore;
00428         GtkTreeIter iter;
00429         int i;
00430 
00431         if (Operation->OptionsSettings->booleansNumber == 0)
00432         {
00433                 return NULL;
00434         }
00435 
00436         OptionsTable = gtk_tree_view_new ();
00437 /*
00438          * Iniiar a Tabela
00439          */
00440         renderer = gtk_cell_renderer_text_new ();
00441 
00442 
00443         gtk_tree_selection_set_mode (gtk_tree_view_get_selection
00444                                      (GTK_TREE_VIEW
00445                                       (OptionsTable)), GTK_SELECTION_NONE);
00446 
00447         gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW
00448                                                      (OptionsTable), -1,
00449                                                      "Pos", renderer, "text",
00450                                                      0, NULL);
00451 
00452         gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW
00453                                                      (OptionsTable), -1,
00454                                                      "Nome", renderer,
00455                                                      "text", 1, NULL);
00456         gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW
00457                                                      (OptionsTable), -1,
00458                                                      "Descrição", renderer,
00459                                                      "text", 2, NULL);
00460         gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW
00461                                                      (OptionsTable), -1,
00462                                                      "Por Defeito", renderer,
00463                                                      "text", 3, NULL);
00464 
00465 
00466         treeStore =
00467                 gtk_tree_store_new (4, G_TYPE_INT, G_TYPE_STRING,
00468                                     G_TYPE_STRING, G_TYPE_STRING);
00469 
00470         for (i = 0; i < Operation->OptionsSettings->booleansNumber; i++)
00471         {
00472                 gtk_tree_store_append (treeStore, &iter, NULL);
00473 
00474                 gtk_tree_store_set (treeStore, &iter, 0, i,
00475                                     1,
00476                                     Operation->OptionsSettings->booleans[i].
00477                                     name,
00478                                     2,
00479                                     Operation->OptionsSettings->booleans[i].
00480                                     description, -1);
00481                 if (Operation->OptionsSettings->booleans[i].defaultValue)
00482                 {
00483                         gtk_tree_store_set (treeStore, &iter,
00484                                             3, "Verdadeiro", -1);
00485                 }
00486                 else
00487                 {
00488                         gtk_tree_store_set (treeStore, &iter, 3, "Falso", -1);
00489                 }
00490 
00491         }
00492 
00493         gtk_tree_view_set_model (GTK_TREE_VIEW
00494                                  (OptionsTable), GTK_TREE_MODEL (treeStore));
00495         g_object_unref (treeStore);
00496 
00497 
00498         return OptionsTable;
00499 
00500 }

Here is the caller graph for this function:

GtkWidget* vapiGtkSelectOperationSelectGetOptionsChars ( vEffect Operation,
vapiGtkWindowSelectGroupStruct GroupStruct 
)

Definido na linha 353 do ficheiro vapiGtkWindowSelectOperation.c.

Referências _vOptionsSettings::chars, _vOptionsSettings::charsNumber e _vEffect::OptionsSettings.

Referenciado por vapiGtkSelectOperationSelectGetOptions().

00356 {
00357         GtkWidget *OptionsTable;
00358         GtkCellRenderer *renderer;
00359         GtkTreeStore *treeStore;
00360         GtkTreeIter iter;
00361         int i;
00362 
00363         if (Operation->OptionsSettings->charsNumber == 0)
00364         {
00365                 return NULL;
00366         }
00367 
00368         OptionsTable = gtk_tree_view_new ();
00369 /*
00370          * Iniiar a Tabela
00371          */
00372         renderer = gtk_cell_renderer_text_new ();
00373 
00374 
00375         gtk_tree_selection_set_mode (gtk_tree_view_get_selection
00376                                      (GTK_TREE_VIEW
00377                                       (OptionsTable)), GTK_SELECTION_NONE);
00378 
00379         gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW
00380                                                      (OptionsTable), -1,
00381                                                      "Pos", renderer, "text",
00382                                                      0, NULL);
00383 
00384         gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW
00385                                                      (OptionsTable), -1,
00386                                                      "Nome", renderer,
00387                                                      "text", 1, NULL);
00388         gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW
00389                                                      (OptionsTable), -1,
00390                                                      "Descrição", renderer,
00391                                                      "text", 2, NULL);
00392 
00393 
00394         treeStore =
00395                 gtk_tree_store_new (3, G_TYPE_INT, G_TYPE_STRING,
00396                                     G_TYPE_STRING);
00397 
00398         for (i = 0; i < Operation->OptionsSettings->charsNumber; i++)
00399         {
00400                 gtk_tree_store_append (treeStore, &iter, NULL);
00401                 gtk_tree_store_set (treeStore, &iter, 0, i,
00402                                     1,
00403                                     Operation->OptionsSettings->chars[i].
00404                                     name,
00405                                     2,
00406                                     Operation->OptionsSettings->chars[i].
00407                                     description, -1);
00408 
00409         }
00410 
00411         gtk_tree_view_set_model (GTK_TREE_VIEW
00412                                  (OptionsTable), GTK_TREE_MODEL (treeStore));
00413         g_object_unref (treeStore);
00414 
00415 
00416         return OptionsTable;
00417 
00418 }

Here is the caller graph for this function:

GtkWidget* vapiGtkSelectOperationSelectGetOptionsFloats ( vEffect Operation,
vapiGtkWindowSelectGroupStruct GroupStruct 
)

Definido na linha 174 do ficheiro vapiGtkWindowSelectOperation.c.

Referências _vOptionsSettings::floats, _vOptionsSettings::floatsNumber e _vEffect::OptionsSettings.

Referenciado por vapiGtkSelectOperationSelectGetOptions().

00177 {
00178         GtkWidget *OptionsTable;
00179         GtkCellRenderer *renderer;
00180         GtkTreeStore *treeStore;
00181         GtkTreeIter iter;
00182         int i;
00183 
00184         if (Operation->OptionsSettings->floatsNumber == 0)
00185         {
00186                 return NULL;
00187         }
00188         OptionsTable = gtk_tree_view_new ();
00189 /*
00190          * Iniiar a Tabela
00191          */
00192         renderer = gtk_cell_renderer_text_new ();
00193 
00194 
00195         gtk_tree_selection_set_mode (gtk_tree_view_get_selection
00196                                      (GTK_TREE_VIEW
00197                                       (OptionsTable)), GTK_SELECTION_NONE);
00198 
00199         gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW
00200                                                      (OptionsTable), -1,
00201                                                      "Pos", renderer, "text",
00202                                                      0, NULL);
00203 
00204         gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW
00205                                                      (OptionsTable), -1,
00206                                                      "Nome", renderer,
00207                                                      "text", 1, NULL);
00208         gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW
00209                                                      (OptionsTable), -1,
00210                                                      "Descrição", renderer,
00211                                                      "text", 2, NULL);
00212         gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW
00213                                                      (OptionsTable), -1,
00214                                                      "Min", renderer,
00215                                                      "text", 3, NULL);
00216         gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW
00217                                                      (OptionsTable), -1,
00218                                                      "Max", renderer,
00219                                                      "text", 4, NULL);
00220         gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW
00221                                                      (OptionsTable), -1,
00222                                                      "Por Defeito", renderer,
00223                                                      "text", 5, NULL);
00224 
00225         treeStore =
00226                 gtk_tree_store_new (6, G_TYPE_INT, G_TYPE_STRING,
00227                                     G_TYPE_STRING, G_TYPE_STRING,
00228                                     G_TYPE_STRING, G_TYPE_STRING);
00229 
00230         for (i = 0; i < Operation->OptionsSettings->floatsNumber; i++)
00231         {
00232                 gtk_tree_store_append (treeStore, &iter, NULL);
00233                 gtk_tree_store_set (treeStore, &iter, 0, i,
00234                                     1,
00235                                     Operation->OptionsSettings->floats[i].
00236                                     name,
00237                                     2,
00238                                     Operation->OptionsSettings->floats[i].
00239                                     description,
00240                                     3,
00241                                     g_strdup_printf ("%1.2f",
00242                                                      Operation->
00243                                                      OptionsSettings->
00244                                                      floats[i].min), 4,
00245                                     g_strdup_printf ("%1.2f",
00246                                                      Operation->
00247                                                      OptionsSettings->
00248                                                      floats[i].max), 5,
00249                                     g_strdup_printf ("%1.2f",
00250                                                      Operation->
00251                                                      OptionsSettings->
00252                                                      floats[i].defaultValue),
00253                                     -1);
00254 
00255         }
00256 
00257         gtk_tree_view_set_model (GTK_TREE_VIEW
00258                                  (OptionsTable), GTK_TREE_MODEL (treeStore));
00259         g_object_unref (treeStore);
00260 
00261 
00262         return OptionsTable;
00263 
00264 }

Here is the caller graph for this function:

GtkWidget* vapiGtkSelectOperationSelectGetOptionsInts ( vEffect Operation,
vapiGtkWindowSelectGroupStruct GroupStruct 
)

Definido na linha 267 do ficheiro vapiGtkWindowSelectOperation.c.

Referências _vOptionsSettings::ints, _vOptionsSettings::intsNumber, _vOptint::max, _vOptint::min e _vEffect::OptionsSettings.

Referenciado por vapiGtkSelectOperationSelectGetOptions().

00270 {
00271         GtkWidget *OptionsTable;
00272         GtkCellRenderer *renderer;
00273         GtkTreeStore *treeStore;
00274         GtkTreeIter iter;
00275         int i;
00276 
00277         if (Operation->OptionsSettings->intsNumber == 0)
00278         {
00279                 return NULL;
00280         }
00281         OptionsTable = gtk_tree_view_new ();
00282         /*
00283          * Iniciar a Tabela
00284          */
00285         renderer = gtk_cell_renderer_text_new ();
00286 
00287 
00288         gtk_tree_selection_set_mode (gtk_tree_view_get_selection
00289                                      (GTK_TREE_VIEW
00290                                       (OptionsTable)), GTK_SELECTION_NONE);
00291 
00292         gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW
00293                                                      (OptionsTable), -1,
00294                                                      "Pos", renderer, "text",
00295                                                      0, NULL);
00296 
00297         gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW
00298                                                      (OptionsTable), -1,
00299                                                      "Nome", renderer,
00300                                                      "text", 1, NULL);
00301         gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW
00302                                                      (OptionsTable), -1,
00303                                                      "Descrição", renderer,
00304                                                      "text", 2, NULL);
00305         gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW
00306                                                      (OptionsTable), -1,
00307                                                      "Min", renderer,
00308                                                      "text", 3, NULL);
00309         gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW
00310                                                      (OptionsTable), -1,
00311                                                      "Max", renderer,
00312                                                      "text", 4, NULL);
00313         gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW
00314                                                      (OptionsTable), -1,
00315                                                      "Por Defeito", renderer,
00316                                                      "text", 5, NULL);
00317 
00318         treeStore =
00319                 gtk_tree_store_new (6, G_TYPE_INT, G_TYPE_STRING,
00320                                     G_TYPE_STRING, G_TYPE_INT, G_TYPE_INT,
00321                                     G_TYPE_INT);
00322 
00323         for (i = 0; i < Operation->OptionsSettings->intsNumber; i++)
00324         {
00325                 gtk_tree_store_append (treeStore, &iter, NULL);
00326                 gtk_tree_store_set (treeStore, &iter, 0, i,
00327                                     1,
00328                                     Operation->OptionsSettings->ints[i].
00329                                     name,
00330                                     2,
00331                                     Operation->OptionsSettings->ints[i].
00332                                     description,
00333                                     3,
00334                                     Operation->OptionsSettings->ints[i].min,
00335                                     4,
00336                                     Operation->OptionsSettings->ints[i].max,
00337                                     5,
00338                                     Operation->OptionsSettings->ints[i].
00339                                     defaultValue, -1);
00340 
00341         }
00342 
00343         gtk_tree_view_set_model (GTK_TREE_VIEW
00344                                  (OptionsTable), GTK_TREE_MODEL (treeStore));
00345         g_object_unref (treeStore);
00346 
00347 
00348         return OptionsTable;
00349 
00350 }

Here is the caller graph for this function:

void vapiGtkSelectOperationSelectGroup ( GtkWidget *  button,
vapiGtkWindowSelectGroupStruct GroupStruct 
)

Definido na linha 103 do ficheiro vapiGtkWindowSelectOperation.c.

Referências _vapiGtkWindowSelectGroupStruct::GroupButtonList, _vapiGtkWindowSelectGroupStruct::GroupList, _vapiGtkWindowSelectGroupStruct::stSelectOperation, vapiGroupListSelectItem(), vapiGtkSelectGroupButton() e vapiGtkSelectOperationPopulateGroup().

Referenciado por vapiGtkSelectOperationStartWindow().

00106 {
00107         int group;
00108         group = vapiGtkSelectGroupButton (button,
00109                                           GroupStruct->GroupList,
00110                                           &GroupStruct->GroupButtonList);
00111         if (group == -1)
00112         {
00113                 return;
00114         }
00115 
00116         vapiGtkSelectOperationPopulateGroup (vapiGroupListSelectItem
00117                                              (GroupStruct->GroupList, group),
00118                                              GroupStruct);
00119         gtk_statusbar_push (GroupStruct->stSelectOperation, 0,
00120                             "Seleccione uma Operação");
00121 }

Grafo de chamadas desta função:

Here is the caller graph for this function:

void vapiGtkSelectOperationSelectToUse ( GtkTreeView *  tree_view,
GtkTreePath *  path,
GtkTreeViewColumn *  column,
vapiGtkWindowSelectGroupStruct GroupStruct 
)

Definido na linha 647 do ficheiro vapiGtkWindowSelectOperation.c.

Referências _vEffect::name, OperationList, _vapiGtkWindowSelectGroupStruct::OperationTreeView, _vapiGtkWindowSelectGroupStruct::txtOperation, vapiGtkTableGetValueFromSelection(), vapiOperationListSelectOperation() e _vapiGtkWindowSelectGroupStruct::winSelectOperation.

Referenciado por vapiGtkSelectOperationStartWindow().

00652 {
00653         vEffect *Operation;
00654         GValue gvalue = {
00655                 0,
00656         };
00657         char *OperationName;
00658 
00659 
00660         vapiGtkTableGetValueFromSelection (GroupStruct->OperationTreeView,
00661                                            &gvalue, 0);
00662 
00663         OperationName = (char *) g_value_get_string (&gvalue);
00664 
00665         Operation =
00666                 vapiOperationListSelectOperation (GroupStruct->
00667                                                   OperationList,
00668                                                   OperationName);
00669         gtk_entry_set_text ((GtkEntry *) GroupStruct->txtOperation,
00670                             Operation->name);
00671         gtk_widget_hide (GroupStruct->winSelectOperation);
00672 
00673 
00674 }

Grafo de chamadas desta função:

Here is the caller graph for this function:

void vapiGtkSelectOperationSelectToUseFromButton ( GtkWidget *  button,
vapiGtkWindowSelectGroupStruct GroupStruct 
)

Definido na linha 677 do ficheiro vapiGtkWindowSelectOperation.c.

Referências _vEffect::name, OperationList, _vapiGtkWindowSelectGroupStruct::OperationTreeView, _vapiGtkWindowSelectGroupStruct::txtOperation, vapiOperationListSelectOperation() e _vapiGtkWindowSelectGroupStruct::winSelectOperation.

Referenciado por vapiGtkSelectOperationStartWindow().

00680 {
00681         vEffect *Operation;
00682         GtkTreeModel *treeModel;
00683         GtkTreeSelection *selection;
00684         GtkTreeIter iter;
00685         GValue gvalue = {
00686                 0,
00687         };
00688         char *OperationName;
00689         treeModel =
00690                 gtk_tree_view_get_model ((GtkTreeView *)
00691                                          GroupStruct->OperationTreeView);
00692         selection = gtk_tree_view_get_selection ((GtkTreeView *)
00693                                                  GroupStruct->
00694                                                  OperationTreeView);
00695         if (!gtk_tree_selection_get_selected (selection, &treeModel, &iter))
00696         {
00697                 return;
00698         }
00699 
00700         gtk_tree_selection_get_selected (selection, &treeModel, &iter);
00701 
00702         gtk_tree_model_get_value (treeModel, &iter, 0, &gvalue);
00703         OperationName = (char *) g_value_get_string (&gvalue);
00704 
00705         Operation =
00706                 vapiOperationListSelectOperation (GroupStruct->
00707                                                   OperationList,
00708                                                   OperationName);
00709         gtk_entry_set_text ((GtkEntry *) GroupStruct->txtOperation,
00710                             Operation->name);
00711         gtk_widget_hide (GroupStruct->winSelectOperation);
00712 
00713 }

Grafo de chamadas desta função:

Here is the caller graph for this function:

void vapiGtkSelectOperationStartOperationList ( vapiGtkWindowSelectGroupStruct GroupStruct  ) 

Definido na linha 25 do ficheiro vapiGtkWindowSelectOperation.c.

Referências _vapiGtkWindowSelectGroupStruct::OperationTreeView e vapiGtkSelectOperationSelect().

Referenciado por vapiGtkSelectOperationStartWindow().

00027 {
00028         GtkCellRenderer *renderer;
00029         GtkTreeSelection *TreeViewSelecttion;
00030         GtkTreeStore *treeStore;
00031 /*
00032          * Iniiar a Tabela
00033          */
00034         renderer = gtk_cell_renderer_text_new ();
00035 
00036 
00037         gtk_tree_selection_set_mode (gtk_tree_view_get_selection
00038                                      (GTK_TREE_VIEW
00039                                       (GroupStruct->OperationTreeView)),
00040                                      GTK_SELECTION_SINGLE);
00041 
00042         gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW
00043                                                      (GroupStruct->
00044                                                       OperationTreeView), -1,
00045                                                      "Nome", renderer, "text",
00046                                                      0, NULL);
00047 
00048         gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW
00049                                                      (GroupStruct->
00050                                                       OperationTreeView), -1,
00051                                                      "Descrição", renderer,
00052                                                      "text", 1, NULL);
00053 
00054         treeStore = gtk_tree_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
00055 
00056 
00057 
00058         gtk_tree_view_set_model (GTK_TREE_VIEW
00059                                  (GroupStruct->OperationTreeView),
00060                                  GTK_TREE_MODEL (treeStore));
00061         g_object_unref (treeStore);
00062 
00063         TreeViewSelecttion = gtk_tree_view_get_selection
00064                 ((GtkTreeView *) GroupStruct->OperationTreeView);
00065         g_signal_connect (G_OBJECT (TreeViewSelecttion),
00066                           "changed",
00067                           G_CALLBACK (vapiGtkSelectOperationSelect),
00068                           GroupStruct);
00069 
00070 }

Grafo de chamadas desta função:

Here is the caller graph for this function:

void vapiGtkSelectOperationStartWindow ( vGroupList GroupList,
vapiGtkWindowSelectGroupStruct GroupStruct,
GtkWidget *  vBoxOperationGroups 
)

Definido na linha 73 do ficheiro vapiGtkWindowSelectOperation.c.

Referências _vapiGtkWindowSelectGroupStruct::btSelectOperation, _vapiGtkWindowSelectGroupStruct::GroupButtonList, _vapiGtkWindowSelectGroupStruct::GroupList, _vapiGtkWindowSelectGroupStruct::OperationTreeView, _vapiGtkWindowSelectGroupStruct::stSelectOperation, vapiGtkGroupButtons(), vapiGtkSelectOperationPopulateGroup(), vapiGtkSelectOperationSelectGroup(), vapiGtkSelectOperationSelectToUse(), vapiGtkSelectOperationSelectToUseFromButton() e vapiGtkSelectOperationStartOperationList().

Referenciado por interface_os_linux().

00077 {
00078         vapiGtkSelectOperationStartOperationList (GroupStruct);
00079         GroupStruct->GroupList = GroupList;
00080         vapiGtkGroupButtons (GroupList,
00081                              &GroupStruct->GroupButtonList,
00082                              vBoxOperationGroups, G_CALLBACK
00083                              (vapiGtkSelectOperationSelectGroup),
00084                              GroupStruct);
00085         vapiGtkSelectOperationPopulateGroup ("Todas", GroupStruct);
00086         gtk_statusbar_push (GroupStruct->stSelectOperation, 0,
00087                             "Seleccione um Grupo de Operações e/ou uma Operação");
00088 
00089         g_signal_connect (G_OBJECT (GroupStruct->OperationTreeView),
00090                           "row-activated",
00091                           G_CALLBACK (vapiGtkSelectOperationSelectToUse),
00092                           GroupStruct);
00093 
00094         g_signal_connect (G_OBJECT (GroupStruct->btSelectOperation),
00095                           "clicked",
00096                           G_CALLBACK
00097                           (vapiGtkSelectOperationSelectToUseFromButton),
00098                           GroupStruct);
00099 }

Grafo de chamadas desta função:

Here is the caller graph for this function:


Gerado em Tue Jul 24 10:37:12 2007 para Vapi por  doxygen 1.5.1