A Discrete-Event Network Simulator
API
display-functions.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License version 2 as
5  * published by the Free Software Foundation;
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software
14  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15  *
16  * Authors: Faker Moatamri <faker.moatamri@sophia.inria.fr>
17  * Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
18  */
19 #ifndef DISPLAY_FUNCTIONS_H
20 #define DISPLAY_FUNCTIONS_H
21 
22 #include "model-node-creator.h"
23 #include "model-typeid-creator.h"
24 #include <gtk/gtk.h>
25 
26 namespace ns3 {
37 void
38 cell_data_function_col_1 (GtkTreeViewColumn *col, GtkCellRenderer *renderer,
39  GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data);
49 void
50 cell_data_function_col_0 (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model,
51  GtkTreeIter *iter, gpointer user_data);
60 void
61 cell_edited_callback (GtkCellRendererText *cell, gchar *path_string,
62  gchar *new_text, gpointer user_data);
69 int
70 get_col_number_from_tree_view_column (GtkTreeViewColumn *col);
83 gboolean
84 cell_tooltip_callback (GtkWidget *widget, gint x, gint y, gboolean keyboard_tip,
85  GtkTooltip *tooltip, gpointer user_data);
92 GtkWidget *
93 create_view (GtkTreeStore *model);
99 void
100 exit_clicked_callback (GtkButton *button, gpointer user_data);
108 gboolean
109 delete_event_callback (GtkWidget *widget, GdkEvent *event, gpointer user_data);
118 gboolean
119 clean_model_callback (GtkTreeModel *model, GtkTreePath *path,
120  GtkTreeIter *iter, gpointer data);
121 
122 
123 // display functions used by default configurator
124 
135 void
136 cell_data_function_col_1_config_default (GtkTreeViewColumn *col, GtkCellRenderer *renderer,
137  GtkTreeModel *model, GtkTreeIter *iter,
138  gpointer user_data);
147 void
148 cell_data_function_col_0_config_default (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model,
149  GtkTreeIter *iter, gpointer user_data);
157 void
158 save_clicked_default (GtkButton *button, gpointer user_data);
165 void
166 load_clicked_default (GtkButton *button, gpointer user_data);
174 void
175 save_clicked_attribute (GtkButton *button, gpointer user_data);
182 void
183 load_clicked_attribute (GtkButton *button, gpointer user_data);
194 void
195 cell_edited_callback_config_default (GtkCellRendererText *cell, gchar *path_string,
196  gchar *new_text, gpointer user_data);
211 gboolean
212 cell_tooltip_callback_config_default (GtkWidget *widget, gint x, gint y,
213  gboolean keyboard_tip, GtkTooltip *tooltip, gpointer user_data);
220 GtkWidget *
221 create_view_config_default (GtkTreeStore *model);
230 gboolean
231 clean_model_callback_config_default (GtkTreeModel *model, GtkTreePath *path,
232  GtkTreeIter *iter, gpointer data);
233 } //end namespace ns3
234 
235 #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.
list x
Random number samples.
uint8_t data[writeSize]