A Discrete-Event Network Simulator
API
display-functions.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License version 2 as
4  * published by the Free Software Foundation;
5  *
6  * This program is distributed in the hope that it will be useful,
7  * but WITHOUT ANY WARRANTY; without even the implied warranty of
8  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9  * GNU General Public License for more details.
10  *
11  * You should have received a copy of the GNU General Public License
12  * along with this program; if not, write to the Free Software
13  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
14  *
15  * Authors: Faker Moatamri <faker.moatamri@sophia.inria.fr>
16  * Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
17  */
18 #ifndef DISPLAY_FUNCTIONS_H
19 #define DISPLAY_FUNCTIONS_H
20 
21 #include "model-node-creator.h"
22 #include "model-typeid-creator.h"
23 
24 #include <gtk/gtk.h>
25 
26 namespace ns3
27 {
38 void cell_data_function_col_1(GtkTreeViewColumn* col,
39  GtkCellRenderer* renderer,
40  GtkTreeModel* model,
41  GtkTreeIter* iter,
42  gpointer user_data);
52 void cell_data_function_col_0(GtkTreeViewColumn* col,
53  GtkCellRenderer* renderer,
54  GtkTreeModel* model,
55  GtkTreeIter* iter,
56  gpointer user_data);
65 void cell_edited_callback(GtkCellRendererText* cell,
66  gchar* path_string,
67  gchar* new_text,
68  gpointer user_data);
75 int get_col_number_from_tree_view_column(GtkTreeViewColumn* col);
88 gboolean cell_tooltip_callback(GtkWidget* widget,
89  gint x,
90  gint y,
91  gboolean keyboard_tip,
92  GtkTooltip* tooltip,
93  gpointer user_data);
100 GtkWidget* create_view(GtkTreeStore* model);
106 void exit_clicked_callback(GtkButton* button, gpointer user_data);
114 gboolean delete_event_callback(GtkWidget* widget, GdkEvent* event, gpointer user_data);
123 gboolean clean_model_callback(GtkTreeModel* model,
124  GtkTreePath* path,
125  GtkTreeIter* iter,
126  gpointer data);
127 
128 // display functions used by default configurator
129 
140 void cell_data_function_col_1_config_default(GtkTreeViewColumn* col,
141  GtkCellRenderer* renderer,
142  GtkTreeModel* model,
143  GtkTreeIter* iter,
144  gpointer user_data);
153 void cell_data_function_col_0_config_default(GtkTreeViewColumn* col,
154  GtkCellRenderer* renderer,
155  GtkTreeModel* model,
156  GtkTreeIter* iter,
157  gpointer user_data);
165 void save_clicked_default(GtkButton* button, gpointer user_data);
173 void load_clicked_default(GtkButton* button, gpointer user_data);
181 void save_clicked_attribute(GtkButton* button, gpointer user_data);
188 void load_clicked_attribute(GtkButton* button, gpointer user_data);
199 void cell_edited_callback_config_default(GtkCellRendererText* cell,
200  gchar* path_string,
201  gchar* new_text,
202  gpointer user_data);
217 gboolean cell_tooltip_callback_config_default(GtkWidget* widget,
218  gint x,
219  gint y,
220  gboolean keyboard_tip,
221  GtkTooltip* tooltip,
222  gpointer user_data);
229 GtkWidget* create_view_config_default(GtkTreeStore* model);
238 gboolean clean_model_callback_config_default(GtkTreeModel* model,
239  GtkTreePath* path,
240  GtkTreeIter* iter,
241  gpointer data);
242 } // end namespace ns3
243 
244 #endif
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void cell_data_function_col_1_config_default(GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data)
This function writes data in the second column, this data is going to be editable if it is a NODE_ATT...
gboolean cell_tooltip_callback(GtkWidget *widget, gint x, gint y, gboolean keyboard_tip, GtkTooltip *tooltip, gpointer user_data)
This function displays the tooltip for an object, pointer, vector item or an attribute.
gboolean clean_model_callback(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
Delete the tree model contents.
void cell_data_function_col_0_config_default(GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data)
This function writes the attribute or typeid name in the column 0.
void cell_data_function_col_1(GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data)
This function includes the name of the attribute or the editable value in the second column.
void cell_edited_callback(GtkCellRendererText *cell, gchar *path_string, gchar *new_text, gpointer user_data)
This is the callback called when the value of an attribute is changed.
void save_clicked_attribute(GtkButton *button, gpointer user_data)
This is the action done when the user presses on the save button for the Attributes.
gboolean cell_tooltip_callback_config_default(GtkWidget *widget, gint x, gint y, gboolean keyboard_tip, GtkTooltip *tooltip, gpointer user_data)
This function is used to display a tooltip whenever the user puts the mouse over a type ID or an attr...
gboolean delete_event_callback(GtkWidget *widget, GdkEvent *event, gpointer user_data)
Exit the application.
void exit_clicked_callback(GtkButton *button, gpointer user_data)
Exit the window when exit button is pressed.
GtkWidget * create_view_config_default(GtkTreeStore *model)
This is the main view opening the widget, getting tooltips and drawing the tree of attributes.
gboolean clean_model_callback_config_default(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
Delete the tree model contents.
int get_col_number_from_tree_view_column(GtkTreeViewColumn *col)
This function gets the column number 0 or 1 from the mouse click.
GtkWidget * create_view(GtkTreeStore *model)
This is the main view opening the widget, getting tooltips and drawing the tree of attributes....
void cell_data_function_col_0(GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data)
This function includes the name of the object, pointer, vector or vector item in the first column.
void cell_edited_callback_config_default(GtkCellRendererText *cell, gchar *path_string, gchar *new_text, gpointer user_data)
This functions is called whenever there is a change in the value of an attribute If the input value i...
void save_clicked_default(GtkButton *button, gpointer user_data)
This is the action done when the user presses on the save button for the Default attributes.
void load_clicked_default(GtkButton *button, gpointer user_data)
If the user presses the button load, it will load the config file into memory for the Default attribu...
void load_clicked_attribute(GtkButton *button, gpointer user_data)
If the user presses the button load, it will load the config file into memory for the Attributes.
uint8_t data[writeSize]