author | Mitch Watrous <watrous@u.washington.edu> |
Thu, 24 Mar 2011 09:23:44 -0700 | |
changeset 6941 | 9d2c79c992d7 |
parent 5995 | src/contrib/display-functions.h@017e7a1cfa7c |
child 7168 | 7c724be8f9a6 |
permissions | -rw-r--r-- |
5992
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
2 |
/* |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
3 |
* This program is free software; you can redistribute it and/or modify |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
4 |
* it under the terms of the GNU General Public License version 2 as |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
5 |
* published by the Free Software Foundation; |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
6 |
* |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
7 |
* This program is distributed in the hope that it will be useful, |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
8 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
9 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
10 |
* GNU General Public License for more details. |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
11 |
* |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
12 |
* You should have received a copy of the GNU General Public License |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
13 |
* along with this program; if not, write to the Free Software |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
14 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
15 |
* |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
16 |
* Authors: Faker Moatamri <faker.moatamri@sophia.inria.fr> |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
17 |
* Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
18 |
*/ |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
19 |
#ifndef DISPLAY_FUNCTIONS_H |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
20 |
#define DISPLAY_FUNCTIONS_H |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
21 |
|
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
22 |
#include "model-node-creator.h" |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
23 |
#include "model-typeid-creator.h" |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
24 |
#include <gtk/gtk.h> |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
25 |
|
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
26 |
namespace ns3 { |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
27 |
/** |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
28 |
* This function includes the name of the attribute or the editable value |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
29 |
* in the second column |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
30 |
*/ |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
31 |
void |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
32 |
cell_data_function_col_1 (GtkTreeViewColumn *col, GtkCellRenderer *renderer, |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
33 |
GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data); |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
34 |
/** |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
35 |
* This function includes the name of the object, pointer, vector or vector item |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
36 |
* in the first column |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
37 |
*/ |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
38 |
void |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
39 |
cell_data_function_col_0 (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model, |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
40 |
GtkTreeIter *iter, gpointer user_data); |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
41 |
/** |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
42 |
* This is the callback called when the value of an attribute is changed |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
43 |
*/ |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
44 |
void |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
45 |
cell_edited_callback (GtkCellRendererText *cell, gchar *path_string, |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
46 |
gchar *new_text, gpointer user_data); |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
47 |
/** |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
48 |
* This function gets the column number 0 or 1 from the mouse |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
49 |
* click |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
50 |
*/ |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
51 |
int |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
52 |
get_col_number_from_tree_view_column (GtkTreeViewColumn *col); |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
53 |
/** |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
54 |
* This function displays the tooltip for an object, pointer, vector |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
55 |
* item or an attribute |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
56 |
*/ |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
57 |
gboolean |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
58 |
cell_tooltip_callback (GtkWidget *widget, gint x, gint y, gboolean keyboard_tip, |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
59 |
GtkTooltip *tooltip, gpointer user_data); |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
60 |
/** |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
61 |
* This is the main view opening the widget, getting tooltips and drawing the |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
62 |
* tree of attributes... |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
63 |
*/ |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
64 |
GtkWidget * |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
65 |
create_view (GtkTreeStore *model); |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
66 |
/** |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
67 |
* This is the action done when the user presses on the save button. |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
68 |
* It will save the config to a file. |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
69 |
*/ |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
70 |
void |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
71 |
save_clicked (GtkButton *button, gpointer user_data); |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
72 |
/** |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
73 |
* If the user presses the button load, it will load the config file into memory. |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
74 |
*/ |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
75 |
void |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
76 |
load_clicked (GtkButton *button, gpointer user_data); |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
77 |
/** |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
78 |
* Exit the window when exit button is pressed |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
79 |
*/ |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
80 |
void |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
81 |
exit_clicked_callback (GtkButton *button, gpointer user_data); |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
82 |
/** |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
83 |
* Exit the application |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
84 |
*/ |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
85 |
gboolean |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
86 |
delete_event_callback (GtkWidget *widget, GdkEvent *event, gpointer user_data); |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
87 |
/** |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
88 |
* Delete the tree model contents |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
89 |
*/ |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
90 |
gboolean |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
91 |
clean_model_callback (GtkTreeModel *model, GtkTreePath *path, |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
92 |
GtkTreeIter *iter, gpointer data); |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
93 |
/************************** display functions used by default configurator **********************/ |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
94 |
/** |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
95 |
* This function writes data in the second column, this data is going to be editable |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
96 |
* if it is a NODE_ATTRIBUTE |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
97 |
*/ |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
98 |
void |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
99 |
cell_data_function_col_1_config_default (GtkTreeViewColumn *col, GtkCellRenderer *renderer, |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
100 |
GtkTreeModel *model, GtkTreeIter *iter, |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
101 |
gpointer user_data); |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
102 |
/** |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
103 |
* This function writes the attribute or typeid name in the column 0 |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
104 |
*/ |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
105 |
void |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
106 |
cell_data_function_col_0_config_default (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model, |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
107 |
GtkTreeIter *iter, gpointer user_data); |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
108 |
/** |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
109 |
* This is the action done when the user presses on the save button. |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
110 |
* It will save the config to a file. |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
111 |
*/ |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
112 |
void |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
113 |
save_clicked_default (GtkButton *button, gpointer user_data); |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
114 |
/** |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
115 |
* If the user presses the button load, it will load the config file into memory. |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
116 |
*/ |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
117 |
void |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
118 |
load_clicked_default (GtkButton *button, gpointer user_data); |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
119 |
/** |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
120 |
* This functions is called whenever there is a change in the value of an attribute |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
121 |
* If the input value is ok, it will be updated in the default value and in the |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
122 |
* gui, otherwise, it won't be updated in both. |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
123 |
*/ |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
124 |
void |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
125 |
cell_edited_callback_config_default (GtkCellRendererText *cell, gchar *path_string, |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
126 |
gchar *new_text, gpointer user_data); |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
127 |
/** |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
128 |
* This function is used to display a tooltip whenever the user puts the mouse |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
129 |
* over a type ID or an attribute. It will give the type and the possible values of |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
130 |
* an attribute value and the type of the object for an attribute object or a |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
131 |
* typeID object |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
132 |
*/ |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
133 |
gboolean |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
134 |
cell_tooltip_callback_config_default (GtkWidget *widget, gint x, gint y, |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
135 |
gboolean keyboard_tip, GtkTooltip *tooltip, gpointer user_data); |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
136 |
/** |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
137 |
* This is the main view opening the widget, getting tooltips and drawing the |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
138 |
* tree of attributes |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
139 |
*/ |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
140 |
GtkWidget * |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
141 |
create_view_config_default (GtkTreeStore *model); |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
142 |
/** |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
143 |
* Delete the tree model contents |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
144 |
*/ |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
145 |
gboolean |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
146 |
clean_model_callback_config_default (GtkTreeModel *model, GtkTreePath *path, |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
147 |
GtkTreeIter *iter, gpointer data); |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
148 |
}//end namespace ns3 |
73ea01eb5674
Bug 184: add ConfigureDefaults to GtkConfigStore, refactor the code and coding style, add comments
Faker Moatamri <faker.moatamri@sophia.inria.fr>
parents:
diff
changeset
|
149 |
|
5995
017e7a1cfa7c
fix build, remove debugging code from tap example
Craig Dowell <craigdo@ee.washington.edu>
parents:
5992
diff
changeset
|
150 |
#endif |