#include <gtk/gtk.h>
#include <glade/glade.h>
#include "vapiMacroList.h"
#include "vapiMacro.h"
#include "vapiGtkMacrosTables.h"
#include "vapiGtkEventsMacros.h"
#include "vapiGtkInterface.h"
#include "vapiGtkTable.h"
#include "vapiGtkMacro.h"
#include "vapiMacroBypass.h"
Diagrama de dependências de inclusão para vapiGtkMacrosTables.c:
Ir para o código fonte deste ficheiro.
Estruturas de Dados | |
struct | _vMacroTables |
struct | _vMacroTagDecode |
Macros | |
#define | ByPassColumnName "Executar" |
#define | StopByColumnName "Mostrar" |
Definições de tipos | |
typedef _vMacroTagDecode | vMacroTagDecode |
Funções | |
void | vapiGtkCbMacroStart () |
void | vapiGtkMacroApplyAllMacros () |
char * | vapiGtkMacroGetMacroTag () |
static char * | vapiGtkMacroMacroTagEncode (vMacroTagDecode *MacroTagDecode) |
static void | vapiGtkMacrosTablesClean () |
void | vapiGtkMacrosTablesCleanToDefault () |
GtkWidget * | vapiGtkMacrosTablesCreateTable () |
void | vapiGtkMacrosTableSetSelectedMacro (GtkNotebook *notebook, gint arg1, gpointer user_data) |
void | vapiGtkMacrosTablesInit (GladeXML *xml, vMacroList *MacroList, GList **List0, GList **List1, GList **List2, vImages *Images) |
void | vapiGtkMacroTable () |
void | vapiGtkMacroTableAux (int macro_number, const char *previousMacroTag, int operationNumber) |
int | vapiGtkMacroTableGetSelected () |
GtkTreeStore * | vapiGtkMacroTableModel (vMacroHeader *MacroHeader, const char *macroTag) |
static int | vapiGtkMacroTablesAddTable (GtkWidget *table, GtkWidget *label) |
void | vapiGtkMacroTablesApplyUntil (const char *macroTag) |
vBoolean | vapiGtkMacroTableSelectRow (int row) |
static const char * | vapiGtkMacroTablesGetMacroTag (int notebook_page) |
GtkWidget * | vapiGtkMacroTablesGetTable (int notebook_page) |
static void | vapiGtkMacroTagDecodeAddIndex (vMacroTagDecode *MacroTagDecode, int newIndex) |
vMacroTagDecode * | vapiGtkTablesMacroTagDecoder (const char *macroTag) |
static void | vMacroTagDecodeFree (vMacroTagDecode *vFree) |
Variáveis | |
static struct _vMacroTables | MacroTables |
vMacroTablesSelect * | MacroTablesSelect |
#define ByPassColumnName "Executar" |
Definido na linha 12 do ficheiro vapiGtkMacrosTables.c.
Referenciado por vapiGtkMacrosTablesCreateTable() e vapiGtkMacrosTablesInit().
#define StopByColumnName "Mostrar" |
Definido na linha 13 do ficheiro vapiGtkMacrosTables.c.
Referenciado por vapiGtkMacrosTablesCreateTable() e vapiGtkMacrosTablesInit().
typedef struct _vMacroTagDecode vMacroTagDecode |
void vapiGtkCbMacroStart | ( | ) |
Definido na linha 479 do ficheiro vapiGtkMacrosTables.c.
Referências _vMacroTables::cbMacro, cbMacro, _vMacroTables::MacroList, MacroList, _vMacroHeader::MacroName, MacroTables, SelectedMacro, vapiMacroListCountElements() e vapiMacroListSelectItem().
Referenciado por interface_os_linux(), vapiGtkMacroChange(), vapiGtkMacroCreate(), vapiGtkMacroDeleteMacro() e vapiGtkMacroOpenFromXML().
00480 { 00481 00482 int i, ListSize; 00483 GtkTreeStore *treeStore; 00484 GtkTreeIter iter, iter2; 00485 vMacroHeader *MacroHeader; 00486 treeStore = gtk_tree_store_new (1, G_TYPE_STRING); 00487 ListSize = vapiMacroListCountElements (MacroTables.MacroList); 00488 if (ListSize > 0) 00489 { 00490 for (i = 0; i < ListSize; i++) 00491 { 00492 MacroHeader = 00493 vapiMacroListSelectItem (MacroTables. 00494 MacroList, i); 00495 gtk_tree_store_append (treeStore, &iter, NULL); 00496 gtk_tree_store_set (treeStore, &iter, 0, 00497 MacroHeader->MacroName, -1); 00498 if (i == SelectedMacro) 00499 { 00500 iter2 = iter; 00501 } 00502 00503 } 00504 } 00505 gtk_combo_box_set_model ((GtkComboBox *) MacroTables.cbMacro, 00506 GTK_TREE_MODEL (treeStore)); 00507 if (SelectedMacro > -1) 00508 { 00509 gtk_combo_box_set_active_iter ((GtkComboBox *) MacroTables. 00510 cbMacro, &iter2); 00511 } 00512 g_object_unref (treeStore); 00513 }
Grafo de chamadas desta função:
Here is the caller graph for this function:
void vapiGtkMacroApplyAllMacros | ( | ) |
Definido na linha 462 do ficheiro vapiGtkMacrosTables.c.
Referências MacroTables, vapiGtkMacroTablesApplyUntil() e vapiGtkMacroTablesGetMacroTag().
Referenciado por vapiGtkMacroSelectItem().
00463 { 00464 int currentNotebookPage; 00465 const char *macroTag; 00466 00467 currentNotebookPage = 00468 gtk_notebook_get_current_page ((GtkNotebook *) MacroTables. 00469 MacroNotebook); 00470 if (currentNotebookPage == 0) 00471 { 00472 return; 00473 } 00474 macroTag = vapiGtkMacroTablesGetMacroTag (currentNotebookPage); 00475 vapiGtkMacroTablesApplyUntil (macroTag); 00476 }
Grafo de chamadas desta função:
Here is the caller graph for this function:
char* vapiGtkMacroGetMacroTag | ( | ) |
Definido na linha 684 do ficheiro vapiGtkMacrosTables.c.
Referências MacroTables, v_printf(), vapiGtkMacroMacroTagEncode(), vapiGtkMacroTablesGetMacroTag() e vapiGtkTablesMacroTagDecoder().
Referenciado por vapiGtkMacroSelectItem(), vapiGtkMacroSetBypass() e vapiGtkMacroSetStopby().
00685 { 00686 int current_notebook_page; 00687 const gchar *tab_label; 00688 vMacroTagDecode *MacroTagDecode; 00689 00690 current_notebook_page = 00691 gtk_notebook_get_current_page ((GtkNotebook *) MacroTables. 00692 MacroNotebook); 00693 if (current_notebook_page == 0) 00694 { 00695 return v_printf ("0"); 00696 } 00697 00698 tab_label = vapiGtkMacroTablesGetMacroTag (current_notebook_page); 00699 00700 MacroTagDecode = vapiGtkTablesMacroTagDecoder (tab_label); 00701 00702 return vapiGtkMacroMacroTagEncode (MacroTagDecode); 00703 }
Grafo de chamadas desta função:
Here is the caller graph for this function:
char * vapiGtkMacroMacroTagEncode | ( | vMacroTagDecode * | MacroTagDecode | ) | [static] |
Definido na linha 664 do ficheiro vapiGtkMacrosTables.c.
Referências _vMacroTagDecode::Indexes, _vMacroTagDecode::NumberOfIndexes e v_printf().
Referenciado por vapiGtkMacroGetMacroTag().
00665 { 00666 int i; 00667 char *tempMacroTag, *macroTag; 00668 00669 00670 tempMacroTag = v_printf ("%d", MacroTagDecode->Indexes[0]); 00671 macroTag = tempMacroTag; 00672 for (i = 1; i < MacroTagDecode->NumberOfIndexes; i++) 00673 { 00674 macroTag = 00675 v_printf ("%s:%d", tempMacroTag, 00676 MacroTagDecode->Indexes[i]); 00677 free (tempMacroTag); 00678 tempMacroTag = macroTag; 00679 } 00680 return macroTag; 00681 }
Grafo de chamadas desta função:
Here is the caller graph for this function:
static void vapiGtkMacrosTablesClean | ( | ) | [static] |
Definido na linha 154 do ficheiro vapiGtkMacrosTables.c.
Referências MacroTables.
Referenciado por vapiGtkMacrosTablesCleanToDefault() e vapiGtkMacroTable().
00155 { 00156 int n_pages, i; 00157 00158 n_pages = 00159 gtk_notebook_get_n_pages ((GtkNotebook *) MacroTables. 00160 MacroNotebook); 00161 00162 if (n_pages == 1) 00163 { 00164 return; 00165 } 00166 for (i = (n_pages - 1); i > 0; i--) 00167 { 00168 00169 gtk_notebook_remove_page ((GtkNotebook *) MacroTables. 00170 MacroNotebook, i); 00171 } 00172 }
Here is the caller graph for this function:
void vapiGtkMacrosTablesCleanToDefault | ( | ) |
Definido na linha 175 do ficheiro vapiGtkMacrosTables.c.
Referências _vMacroTables::lblMainMacro, MacroTables, _vMacroTables::MainMacroTable e vapiGtkMacrosTablesClean().
Referenciado por vapiGtkMacroDeleteMacro(), vapiGtkMacroSelect() e vapiGtkMacrosTablesInit().
00176 { 00177 GtkTreeStore *treeStore; 00178 00179 vapiGtkMacrosTablesClean (); 00180 gtk_label_set_text ((GtkLabel *) MacroTables.lblMainMacro, 00181 "Tarefa Principal"); 00182 treeStore = 00183 gtk_tree_store_new (3, G_TYPE_INT, G_TYPE_OBJECT, 00184 G_TYPE_STRING); 00185 00186 gtk_tree_view_set_model (GTK_TREE_VIEW (MacroTables.MainMacroTable), 00187 GTK_TREE_MODEL (treeStore)); 00188 g_object_unref (treeStore); 00189 }
Grafo de chamadas desta função:
Here is the caller graph for this function:
GtkWidget* vapiGtkMacrosTablesCreateTable | ( | ) |
Definido na linha 355 do ficheiro vapiGtkMacrosTables.c.
Referências ByPassColumnName, StopByColumnName, vapiGtkMacroSetBypass() e vapiGtkMacroSetStopby().
Referenciado por vapiGtkMacroTableAux().
00356 { 00357 GtkCellRenderer *renderer; 00358 GtkWidget *tempTable; 00359 GtkTreeSelection *selection; 00360 00361 tempTable = gtk_tree_view_new (); 00362 00363 00364 selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tempTable)); 00365 gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE); 00366 00367 renderer = gtk_cell_renderer_text_new (); 00368 gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW 00369 (tempTable), -1, 00370 "id", renderer, "text", 00371 0, NULL); 00372 renderer = gtk_cell_renderer_toggle_new (); 00373 00374 g_signal_connect (renderer, "toggled", 00375 G_CALLBACK (vapiGtkMacroSetStopby), NULL); 00376 g_object_set (renderer, "activatable", TRUE, NULL); 00377 gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW 00378 (tempTable), -1, 00379 StopByColumnName, 00380 renderer, "active", 1, 00381 NULL); 00382 renderer = gtk_cell_renderer_toggle_new (); 00383 00384 g_signal_connect (renderer, "toggled", 00385 G_CALLBACK (vapiGtkMacroSetBypass), NULL); 00386 g_object_set (renderer, "activatable", TRUE, NULL); 00387 gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW 00388 (tempTable), -1, 00389 ByPassColumnName, 00390 renderer, "active", 2, 00391 NULL); 00392 00393 00394 renderer = gtk_cell_renderer_text_new (); 00395 gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW 00396 (tempTable), -1, 00397 "Operação", renderer, 00398 "text", 3, NULL); 00399 return tempTable; 00400 }
Grafo de chamadas desta função:
Here is the caller graph for this function:
void vapiGtkMacrosTableSetSelectedMacro | ( | GtkNotebook * | notebook, | |
gint | arg1, | |||
gpointer | user_data | |||
) |
Definido na linha 416 do ficheiro vapiGtkMacrosTables.c.
Referências _vMacroTables::MacroList, _vMacroTagDecode::MacroName, MacroTables, SelectedMacro, SelectedMacroGlobal, v_debug, vapiGtkMacroTablesGetMacroTag(), vapiGtkTablesMacroTagDecoder(), vapiMacroListMacroExist() e vMacroTagDecodeFree().
Referenciado por vapiGtkMacrosTablesInit().
00418 { 00419 int n_page; 00420 const char *macroTag; 00421 vMacroTagDecode *MacroTagDecode; 00422 n_page = gtk_notebook_get_current_page (notebook); 00423 00424 if (n_page == 0 && SelectedMacroGlobal >= 0) 00425 { 00426 SelectedMacro = SelectedMacroGlobal; 00427 return; 00428 } 00429 if (n_page == 0 && SelectedMacroGlobal < 0) 00430 { 00431 SelectedMacro = -1; 00432 return; 00433 } 00434 macroTag = vapiGtkMacroTablesGetMacroTag (n_page); 00435 00436 MacroTagDecode = vapiGtkTablesMacroTagDecoder (macroTag); 00437 00438 SelectedMacro = 00439 vapiMacroListMacroExist (MacroTables.MacroList, 00440 MacroTagDecode->MacroName, 0); 00441 if (SelectedMacro < 0) 00442 { 00443 /* 00444 * Confirmar que fic a -1; 00445 */ 00446 SelectedMacro = -1; 00447 } 00448 vMacroTagDecodeFree (MacroTagDecode); 00449 v_debug ("selected Macro agora %d", SelectedMacro); 00450 }
Grafo de chamadas desta função:
Here is the caller graph for this function:
void vapiGtkMacrosTablesInit | ( | GladeXML * | xml, | |
vMacroList * | MacroList, | |||
GList ** | List0, | |||
GList ** | List1, | |||
GList ** | List2, | |||
vImages * | Images | |||
) |
Definido na linha 58 do ficheiro vapiGtkMacrosTables.c.
Referências ByPassColumnName, _vMacroTables::cbMacro, _vMacroTablesSelect::imActual, _vMacroTablesSelect::Images, _vMacroTables::Images, _vMacroTables::lblMainMacro, _vMacroTablesSelect::Lists, _vMacroTables::MacroList, MacroList, _vMacroTablesSelect::MacroList, _vMacroTables::MacroNotebook, MacroTables, MacroTablesSelect, _vMacroTables::MainMacroTable, _vMacroTables::NotebookEventId, StopByColumnName, _vMacroTablesSelect::txtOperation, vapiGtkMacroSelect(), vapiGtkMacroSelectItem(), vapiGtkMacroSetBypass(), vapiGtkMacroSetStopby(), vapiGtkMacrosTablesCleanToDefault() e vapiGtkMacrosTableSetSelectedMacro().
Referenciado por interface_os_linux().
00061 { 00062 GtkCellRenderer *renderer; 00063 00064 MacroTablesSelect = malloc (sizeof (vMacroTablesSelect));; 00065 MacroTables.MacroNotebook = 00066 glade_xml_get_widget (xml, "MacroNotebook"); 00067 MacroTables.lblMainMacro = glade_xml_get_widget (xml, "lblMainMacro"); 00068 MacroTables.MainMacroTable = glade_xml_get_widget (xml, "treeMacro"); 00069 MacroTablesSelect->txtOperation = 00070 glade_xml_get_widget (xml, "txtOperation"); 00071 MacroTables.cbMacro = glade_xml_get_widget (xml, "cbMacro"); 00072 MacroTablesSelect->imActual = glade_xml_get_widget (xml, "imActual"); 00073 MacroTables.MacroList = MacroList; 00074 MacroTablesSelect->Images = Images; 00075 MacroTables.Images = Images; 00076 MacroTablesSelect->MacroList = MacroList; 00077 00078 MacroTablesSelect->Lists[0] = List0; 00079 MacroTablesSelect->Lists[1] = List1; 00080 MacroTablesSelect->Lists[2] = List2; 00081 00082 gtk_notebook_set_scrollable ((GtkNotebook *) MacroTables. 00083 MacroNotebook, TRUE); 00084 gtk_notebook_set_show_tabs ((GtkNotebook *) MacroTables. 00085 MacroNotebook, TRUE); 00086 00087 00088 gtk_tree_selection_set_mode (gtk_tree_view_get_selection 00089 (GTK_TREE_VIEW 00090 (MacroTables.MainMacroTable)), 00091 GTK_SELECTION_SINGLE); 00092 00093 renderer = gtk_cell_renderer_text_new (); 00094 gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW 00095 (MacroTables. 00096 MainMacroTable), -1, 00097 "id", renderer, "text", 00098 0, NULL); 00099 00100 renderer = gtk_cell_renderer_toggle_new (); 00101 g_signal_connect (renderer, "toggled", 00102 G_CALLBACK (vapiGtkMacroSetStopby), NULL); 00103 g_object_set (renderer, "activatable", TRUE, NULL); 00104 gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW 00105 (MacroTables. 00106 MainMacroTable), -1, 00107 StopByColumnName, 00108 renderer, "active", 1, 00109 NULL); 00110 00111 00112 renderer = gtk_cell_renderer_toggle_new (); 00113 g_signal_connect (renderer, "toggled", 00114 G_CALLBACK (vapiGtkMacroSetBypass), NULL); 00115 g_object_set (renderer, "activatable", TRUE, NULL); 00116 gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW 00117 (MacroTables. 00118 MainMacroTable), -1, 00119 ByPassColumnName, 00120 renderer, "active", 2, 00121 NULL); 00122 00123 00124 renderer = gtk_cell_renderer_text_new (); 00125 gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW 00126 (MacroTables. 00127 MainMacroTable), -1, 00128 "Operação", renderer, 00129 "text", 3, NULL); 00130 /* 00131 * Adicionar uma linha em banco para apenas aparecer o tÃtulo da Coluna 00132 */ 00133 vapiGtkMacrosTablesCleanToDefault (); 00134 00135 MacroTables.NotebookEventId = 00136 g_signal_connect_after (G_OBJECT (MacroTables.MacroNotebook), 00137 "switch-page", 00138 G_CALLBACK 00139 (vapiGtkMacrosTableSetSelectedMacro), 00140 NULL); 00141 00142 g_signal_connect (G_OBJECT (MacroTables.MainMacroTable), 00143 "row_activated", 00144 G_CALLBACK (vapiGtkMacroSelectItem), 00145 MacroTablesSelect); 00146 00147 00148 g_signal_connect (G_OBJECT (MacroTables.cbMacro), "changed", 00149 G_CALLBACK (vapiGtkMacroSelect), NULL); 00150 00151 }
Grafo de chamadas desta função:
Here is the caller graph for this function:
void vapiGtkMacroTable | ( | ) |
Definido na linha 192 do ficheiro vapiGtkMacrosTables.c.
Referências _vMacroTables::lblMainMacro, _vMacroHeader::Macro, _vMacroTables::MacroList, _vMacroHeader::MacroName, _vMacroTables::MacroNotebook, MacroTables, _vMacroTables::MainMacroTable, _vMacroTables::NotebookEventId, SelectedMacroGlobal, v_bypass_append(), v_bypass_reload(), v_bypass_set_updatable(), v_list_count_elements(), vapiGtkMacrosTablesClean(), vapiGtkMacroTableModel(), vapiMacroListSelectItem() e vFALSE.
Referenciado por vapiGtkMacroAppendItem(), vapiGtkMacroDeleteItem(), vapiGtkMacroInsertItem(), vapiGtkMacroItemMoveDown(), vapiGtkMacroItemMoveToBottom(), vapiGtkMacroItemMoveToTop(), vapiGtkMacroItemMoveUp(), vapiGtkMacroSelect(), vapiGtkMacroSetBypass(), vapiGtkMacroSetStopby() e vapiGtkMacroUpdateItemOptions().
00193 { 00194 GtkTreeStore *treeStore; 00195 int macro_number; 00196 vMacroHeader *MacroHeader; 00197 00198 if (SelectedMacroGlobal == -1) 00199 { 00200 return; 00201 } 00202 g_signal_handler_block (MacroTables.MacroNotebook, 00203 MacroTables.NotebookEventId); 00204 vapiGtkMacrosTablesClean (); 00205 v_bypass_reload (); 00206 macro_number = SelectedMacroGlobal; 00207 MacroHeader = 00208 vapiMacroListSelectItem (MacroTables.MacroList, macro_number); 00209 00210 gtk_label_set_text ((GtkLabel *) MacroTables.lblMainMacro, 00211 MacroHeader->MacroName); 00212 v_bypass_append ("0", v_list_count_elements (MacroHeader->Macro)); 00213 treeStore = vapiGtkMacroTableModel (MacroHeader, "0"); 00214 v_bypass_set_updatable (vFALSE); 00215 00216 gtk_tree_view_set_model (GTK_TREE_VIEW (MacroTables.MainMacroTable), 00217 GTK_TREE_MODEL (treeStore)); 00218 00219 g_object_unref (treeStore); 00220 00221 g_signal_handler_unblock (MacroTables.MacroNotebook, 00222 MacroTables.NotebookEventId); 00223 }
Grafo de chamadas desta função:
Here is the caller graph for this function:
void vapiGtkMacroTableAux | ( | int | macro_number, | |
const char * | previousMacroTag, | |||
int | operationNumber | |||
) |
Definido na linha 303 do ficheiro vapiGtkMacrosTables.c.
Referências _vMacroHeader::Macro, _vMacroTables::MacroList, _vMacroHeader::MacroName, MacroTables, SelectedMacro, v_bypass_append(), v_debug, v_list_count_elements(), vapiGtkMacrosTablesCreateTable(), vapiGtkMacroTableModel(), vapiGtkMacroTablesAddTable(), vapiMacroListSelectItem() e vapiMacroTag().
Referenciado por vapiGtkMacroTableModel().
00305 { 00306 /* 00307 * Adicionar uma Macro Secundária. 00308 */ 00309 vMacroHeader *MacroHeader; 00310 GtkWidget *tempLabel; 00311 GtkWidget *tempTable; 00312 int book_page_number; 00313 GtkTreeStore *treeStore; 00314 char *macroTag, *pageLabel; 00315 00316 if (macro_number < 0) 00317 { 00318 return; 00319 } 00320 MacroHeader = 00321 vapiMacroListSelectItem (MacroTables.MacroList, macro_number); 00322 macroTag = vapiMacroTag (previousMacroTag, operationNumber); 00323 v_bypass_append (macroTag, 00324 v_list_count_elements (MacroHeader->Macro)); 00325 pageLabel = 00326 g_strdup_printf ("%s %s", macroTag, MacroHeader->MacroName); 00327 tempLabel = gtk_label_new (pageLabel); 00328 00329 tempTable = vapiGtkMacrosTablesCreateTable (); 00330 00331 treeStore = vapiGtkMacroTableModel (MacroHeader, macroTag); 00332 00333 gtk_tree_view_set_model (GTK_TREE_VIEW (tempTable), 00334 GTK_TREE_MODEL (treeStore)); 00335 00336 book_page_number = vapiGtkMacroTablesAddTable (tempTable, tempLabel); 00337 00338 g_object_unref (treeStore); 00339 v_debug ("esta mcro é a seleccionada?: %d, %d", 00340 SelectedMacro, macro_number); 00341 00342 if (SelectedMacro == macro_number) 00343 { 00344 v_debug ("esta mcro é a seleccionada: %d, %d, %d", 00345 SelectedMacro, macro_number, book_page_number); 00346 00347 gtk_notebook_set_current_page ((GtkNotebook *) MacroTables. 00348 MacroNotebook, 00349 book_page_number); 00350 00351 } 00352 }
Grafo de chamadas desta função:
Here is the caller graph for this function:
int vapiGtkMacroTableGetSelected | ( | ) |
Definido na linha 403 do ficheiro vapiGtkMacrosTables.c.
Referências vapiGtkMacroTablesGetTable() e vapiGtkTableGetSelectedRow().
Referenciado por vapiGtkMacroDeleteItem(), vapiGtkMacroInsertItem(), vapiGtkMacroItemMoveDown(), vapiGtkMacroItemMoveToBottom(), vapiGtkMacroItemMoveToTop(), vapiGtkMacroItemMoveUp(), vapiGtkMacroSelectNext() e vapiGtkMacroUpdateItemOptions().
00404 { 00405 int selectedRow; 00406 GtkWidget *tempTable; 00407 00408 tempTable = vapiGtkMacroTablesGetTable (-1); 00409 00410 selectedRow = vapiGtkTableGetSelectedRow (tempTable); 00411 gtk_widget_grab_focus (tempTable); 00412 return selectedRow; 00413 }
Grafo de chamadas desta função:
Here is the caller graph for this function:
GtkTreeStore* vapiGtkMacroTableModel | ( | vMacroHeader * | MacroHeader, | |
const char * | macroTag | |||
) |
Definido na linha 226 do ficheiro vapiGtkMacrosTables.c.
Referências _vChar::ch, _vOptions::chars, _vMacroHeader::Macro, MacroList, _vMacroHeader::MacroName, MacroTables, _vEffect::name, _vMacroItem::Operation, _vMacroItem::Options, v_bypass_get(), v_debug, v_stopby_get(), vapiGtkMacroTableAux(), vapiMacroCountElements(), vapiMacroListMacroExist() e vapiMacroSelectItem().
Referenciado por vapiGtkMacroTable() e vapiGtkMacroTableAux().
00227 { 00228 00229 int i, total, second_macro; 00230 char *newID; 00231 vMacroItem *item; 00232 GtkTreeIter iter; 00233 GtkTreeStore *treeStore; 00234 /* 00235 * Iniciar conteudo da Tabela Macro. 00236 */ 00237 if (macroTag == NULL) 00238 { 00239 treeStore = 00240 gtk_tree_store_new (4, G_TYPE_INT, G_TYPE_BOOLEAN, 00241 G_TYPE_BOOLEAN, G_TYPE_STRING); 00242 } 00243 else 00244 { 00245 treeStore = 00246 gtk_tree_store_new (4, G_TYPE_STRING, G_TYPE_BOOLEAN, 00247 G_TYPE_BOOLEAN, G_TYPE_STRING); 00248 } 00249 00250 if (MacroHeader == NULL) 00251 { 00252 goto set_store; 00253 } 00254 00255 00256 total = vapiMacroCountElements (MacroHeader->Macro); 00257 for (i = 0; i < total; i++) 00258 { 00259 item = vapiMacroSelectItem (MacroHeader->Macro, i); 00260 /* 00261 * Adicionar Nova linha na tabela. 00262 */ 00263 gtk_tree_store_append (treeStore, &iter, NULL); 00264 if (macroTag != NULL) 00265 { 00266 newID = g_strdup_printf ("%s.%d", macroTag, i); 00267 gtk_tree_store_set (treeStore, &iter, 0, newID, 1, 00268 v_stopby_get (macroTag, i), 2, 00269 v_bypass_get (macroTag, i), 3, 00270 item->Operation->name, -1); 00271 g_free (newID); 00272 } 00273 else 00274 { 00275 gtk_tree_store_set (treeStore, &iter, 0, i, 1, 00276 v_stopby_get (macroTag, i), 2, 00277 v_bypass_get (macroTag, i), 3, 00278 item->Operation->name, -1); 00279 } 00280 v_debug ("Nome da Macro %s", item->Operation->name); 00281 if (!strcmp (item->Operation->name, "Executar Tarefa") 00282 && strcmp (item->Options->chars[0].ch, 00283 MacroHeader->MacroName)) 00284 { 00285 second_macro = 00286 vapiMacroListMacroExist (MacroTables. 00287 MacroList, 00288 item->Options-> 00289 chars[0].ch, 0); 00290 v_debug ("numero da segunda macro %d", second_macro); 00291 if (second_macro >= 0) 00292 { 00293 vapiGtkMacroTableAux (second_macro, macroTag, 00294 i); 00295 } 00296 } 00297 } 00298 set_store: 00299 return treeStore; 00300 }
Grafo de chamadas desta função:
Here is the caller graph for this function:
static int vapiGtkMacroTablesAddTable | ( | GtkWidget * | table, | |
GtkWidget * | label | |||
) | [static] |
Definido na linha 765 do ficheiro vapiGtkMacrosTables.c.
Referências MacroTables, MacroTablesSelect e vapiGtkMacroSelectItem().
Referenciado por vapiGtkMacroTableAux().
00766 { 00767 int book_page; 00768 00769 #ifdef USE_SCROLLED_WINDOWS 00770 GtkWidget *scrolledWindow; 00771 00772 scrolledWindow = gtk_scrolled_window_new (NULL, NULL); 00773 gtk_scrolled_window_set_policy ((GtkScrolledWindow *) scrolledWindow, 00774 GTK_POLICY_AUTOMATIC, 00775 GTK_POLICY_AUTOMATIC); 00776 gtk_scrolled_window_add_with_viewport ((GtkScrolledWindow *) 00777 scrolledWindow, table); 00778 00779 book_page = gtk_notebook_append_page ((GtkNotebook *) MacroTables. 00780 MacroNotebook, scrolledWindow, 00781 label); 00782 00783 gtk_widget_show_all (scrolledWindow); 00784 #else 00785 book_page = gtk_notebook_append_page ((GtkNotebook *) MacroTables. 00786 MacroNotebook, table, label); 00787 gtk_widget_show_all (table); 00788 00789 #endif 00790 gtk_widget_show (label); 00791 g_signal_connect (G_OBJECT (table), 00792 "row_activated", 00793 G_CALLBACK (vapiGtkMacroSelectItem), 00794 MacroTablesSelect); 00795 return book_page; 00796 }
Grafo de chamadas desta função:
Here is the caller graph for this function:
void vapiGtkMacroTablesApplyUntil | ( | const char * | macroTag | ) |
Definido na linha 516 do ficheiro vapiGtkMacrosTables.c.
Referências _vChar::ch, _vOptions::chars, _vMacroTables::Images, _vMacroTagDecode::Indexes, _vMacroHeader::Macro, _vMacroTables::MacroList, MacroList, MacroTables, _vMacroResult::macroTag, _vMacroTagDecode::NumberOfIndexes, _vMacroItem::Options, _vMacroHeader::PreviousResult, SelectedMacroGlobal, v_printf(), vapiApplyMacroUntil(), vapiGtkTablesMacroTagDecoder(), vapiMacroListMacroExist(), vapiMacroListSelectItem(), vapiMacroSelectItem(), vMacroTagDecodeFree() e vResultReset().
Referenciado por vapiGtkMacroApplyAllMacros().
00517 { 00518 vMacroTagDecode *MacroTagDecode; 00519 vMacroHeader *MacroHeader, *PreviousMacroHeader; 00520 vMacroItem *item; 00521 int index, macro_number, i; 00522 /* 00523 * MacroTag tem o formato: MacroDeOrigem:OperaçãoEmqueAMacroÉexecutada" 00524 * macro de origem é sempre 0. 00525 */ 00526 00527 MacroTagDecode = vapiGtkTablesMacroTagDecoder (macroTag); 00528 00529 /* 00530 * Primeiro: Aplica-se a MacroBase até à operação indice-1. 00531 */ 00532 MacroHeader = 00533 vapiMacroListSelectItem (MacroTables.MacroList, 00534 SelectedMacroGlobal); 00535 i = 1; 00536 index = MacroTagDecode->Indexes[i]; 00537 vResultReset (MacroHeader->PreviousResult); 00538 00539 MacroHeader->PreviousResult->macroTag = v_printf ("0"); 00540 vapiApplyMacroUntil (MacroHeader, MacroTables.Images, (index - 1)); 00541 00542 if (i == MacroTagDecode->NumberOfIndexes - 1) 00543 { 00544 vMacroTagDecodeFree (MacroTagDecode); 00545 return; 00546 } 00547 for (; i < MacroTagDecode->NumberOfIndexes; i++) 00548 { 00549 item = vapiMacroSelectItem (MacroHeader->Macro, index); 00550 macro_number = 00551 vapiMacroListMacroExist (MacroTables.MacroList, 00552 item->Options->chars[0].ch, 00553 0); 00554 if (macro_number >= 0) 00555 { 00556 PreviousMacroHeader = MacroHeader; 00557 MacroHeader = 00558 vapiMacroListSelectItem (MacroTables. 00559 MacroList, 00560 macro_number); 00561 index = MacroTagDecode->Indexes[i]; 00562 } 00563 else 00564 { 00565 index = MacroTagDecode->Indexes[++i]; 00566 continue; 00567 } 00568 vResultReset (MacroHeader->PreviousResult); 00569 MacroHeader->PreviousResult->macroTag = 00570 v_printf ("%s", 00571 PreviousMacroHeader->PreviousResult-> 00572 macroTag); 00573 vapiApplyMacroUntil (MacroHeader, MacroTables.Images, 00574 (index - 1)); 00575 } 00576 vMacroTagDecodeFree (MacroTagDecode); 00577 }
Grafo de chamadas desta função:
Here is the caller graph for this function:
vBoolean vapiGtkMacroTableSelectRow | ( | int | row | ) |
Definido na linha 453 do ficheiro vapiGtkMacrosTables.c.
Referências vapiGtkMacroTablesGetTable() e vapiGtkTableSelectRow().
Referenciado por vapiGtkMacroItemMoveDown(), vapiGtkMacroItemMoveToBottom(), vapiGtkMacroItemMoveToTop(), vapiGtkMacroItemMoveUp() e vapiGtkMacroSelectNext().
00454 { 00455 GtkWidget *child; 00456 00457 child = vapiGtkMacroTablesGetTable (-1); 00458 return (vapiGtkTableSelectRow (child, row)); 00459 }
Grafo de chamadas desta função:
Here is the caller graph for this function:
static const char * vapiGtkMacroTablesGetMacroTag | ( | int | notebook_page | ) | [static] |
Definido na linha 743 do ficheiro vapiGtkMacrosTables.c.
Referências MacroTables.
Referenciado por vapiGtkMacroApplyAllMacros(), vapiGtkMacroGetMacroTag() e vapiGtkMacrosTableSetSelectedMacro().
00744 { 00745 GtkWidget *child; 00746 const char *macroTag; 00747 if (notebook_page < 0) 00748 { 00749 notebook_page = 00750 gtk_notebook_get_current_page ((GtkNotebook *) 00751 MacroTables. 00752 MacroNotebook); 00753 } 00754 00755 child = gtk_notebook_get_nth_page ((GtkNotebook *) MacroTables. 00756 MacroNotebook, notebook_page); 00757 macroTag = 00758 gtk_notebook_get_tab_label_text ((GtkNotebook *) MacroTables. 00759 MacroNotebook, child); 00760 00761 return macroTag; 00762 }
Here is the caller graph for this function:
GtkWidget* vapiGtkMacroTablesGetTable | ( | int | notebook_page | ) |
Definido na linha 706 do ficheiro vapiGtkMacrosTables.c.
Referências _vMacroTables::MacroNotebook e MacroTables.
Referenciado por vapiGtkMacroTableGetSelected() e vapiGtkMacroTableSelectRow().
00707 { 00708 GtkWidget *table; 00709 GtkWidget *NotebookChild; 00710 00711 if (notebook_page < 0) 00712 { 00713 notebook_page = 00714 gtk_notebook_get_current_page ((GtkNotebook *) 00715 MacroTables. 00716 MacroNotebook); 00717 } 00718 #ifndef USE_SCROLLED_WINDOWS 00719 if (notebook_page == 0) 00720 { 00721 #endif 00722 NotebookChild = 00723 gtk_notebook_get_nth_page ((GtkNotebook *) 00724 MacroTables.MacroNotebook, 00725 notebook_page); 00726 00727 table = gtk_bin_get_child ((GtkBin *) NotebookChild); 00728 #ifndef USE_SCROLLED_WINDOWS 00729 } 00730 else 00731 { 00732 00733 table = gtk_notebook_get_nth_page ((GtkNotebook *) 00734 MacroTables.MacroNotebook, 00735 notebook_page); 00736 } 00737 #endif 00738 00739 return table; 00740 }
Here is the caller graph for this function:
static void vapiGtkMacroTagDecodeAddIndex | ( | vMacroTagDecode * | MacroTagDecode, | |
int | newIndex | |||
) | [static] |
Definido na linha 638 do ficheiro vapiGtkMacrosTables.c.
Referências _vMacroTagDecode::Indexes e _vMacroTagDecode::NumberOfIndexes.
Referenciado por vapiGtkTablesMacroTagDecoder().
00639 { 00640 if (MacroTagDecode->NumberOfIndexes == 0) 00641 { 00642 MacroTagDecode->Indexes = malloc (sizeof (int)); 00643 ++MacroTagDecode->NumberOfIndexes; 00644 } 00645 else 00646 { 00647 MacroTagDecode->Indexes = 00648 realloc (MacroTagDecode->Indexes, 00649 ++MacroTagDecode->NumberOfIndexes * 00650 sizeof (int)); 00651 } 00652 MacroTagDecode->Indexes[MacroTagDecode->NumberOfIndexes - 1] = 00653 newIndex; 00654 }
Here is the caller graph for this function:
vMacroTagDecode * vapiGtkTablesMacroTagDecoder | ( | const char * | macroTag | ) |
Definido na linha 580 do ficheiro vapiGtkMacrosTables.c.
Referências _vMacroTagDecode::Indexes, _vMacroTagDecode::MacroName, _vMacroTagDecode::NumberOfIndexes, v_debug, v_printf() e vapiGtkMacroTagDecodeAddIndex().
Referenciado por main(), vapiGtkMacroGetMacroTag(), vapiGtkMacrosTableSetSelectedMacro() e vapiGtkMacroTablesApplyUntil().
00581 { 00582 char CharPtr, *indexString, *indexString2; 00583 vMacroTagDecode *MacroTagDecode = malloc (sizeof (vMacroTagDecode)); 00584 int newIndex, len, j; 00585 /* 00586 * Init MacroTagDecode. 00587 */ 00588 MacroTagDecode->NumberOfIndexes = 0; 00589 00590 len = strlen (macroTag); 00591 indexString = v_printf (""); 00592 printf ("original %s\n", macroTag); 00593 for (j = 0; j < len; j++) 00594 { 00595 CharPtr = macroTag[j]; 00596 printf ("char seleccionado %c\n", CharPtr); 00597 if (CharPtr == ':' || CharPtr == '.') 00598 { 00599 /* 00600 * chegou a 2 pontos ':'. 00601 */ 00602 newIndex = atoi (indexString); 00603 vapiGtkMacroTagDecodeAddIndex (MacroTagDecode, 00604 newIndex); 00605 v_debug ("10"); 00606 v_debug ("numero %d string %s\n", 00607 MacroTagDecode->Indexes[MacroTagDecode-> 00608 NumberOfIndexes - 1], 00609 indexString); 00610 free (indexString); 00611 indexString = v_printf (""); 00612 continue; 00613 } 00614 if (CharPtr == ' ') 00615 { 00616 newIndex = atoi (indexString); 00617 vapiGtkMacroTagDecodeAddIndex (MacroTagDecode, 00618 newIndex); 00619 v_debug ("numero %d string %s\n", 00620 MacroTagDecode->Indexes[MacroTagDecode-> 00621 NumberOfIndexes - 1], 00622 indexString); 00623 free (indexString); 00624 indexString = strchr (macroTag, ' '); 00625 v_debug ("nome da macro :%s", indexString); 00626 MacroTagDecode->MacroName = 00627 v_printf ("%s", ++indexString); 00628 return MacroTagDecode; 00629 } 00630 indexString2 = indexString; 00631 indexString = v_printf ("%s%c", indexString2, CharPtr); 00632 free (indexString2); 00633 } 00634 return MacroTagDecode; 00635 }
Grafo de chamadas desta função:
Here is the caller graph for this function:
static void vMacroTagDecodeFree | ( | vMacroTagDecode * | vFree | ) | [static] |
Definido na linha 656 do ficheiro vapiGtkMacrosTables.c.
Referências _vMacroTagDecode::Indexes e _vMacroTagDecode::MacroName.
Referenciado por vapiGtkMacrosTableSetSelectedMacro() e vapiGtkMacroTablesApplyUntil().
Here is the caller graph for this function:
struct _vMacroTables MacroTables [static] |
Use the operations tables inside scrolled windows.
Referenciado por vapiGtkCbMacroStart(), vapiGtkMacroApplyAllMacros(), vapiGtkMacroGetMacroTag(), vapiGtkMacrosTablesClean(), vapiGtkMacrosTablesCleanToDefault(), vapiGtkMacrosTableSetSelectedMacro(), vapiGtkMacrosTablesInit(), vapiGtkMacroTable(), vapiGtkMacroTableAux(), vapiGtkMacroTableModel(), vapiGtkMacroTablesAddTable(), vapiGtkMacroTablesApplyUntil(), vapiGtkMacroTablesGetMacroTag() e vapiGtkMacroTablesGetTable().
Definido na linha 38 do ficheiro vapiGtkMacrosTables.c.
Referenciado por vapiGtkMacroSelectItem(), vapiGtkMacrosTablesInit() e vapiGtkMacroTablesAddTable().