A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 {
31 void
32 cell_data_function_col_1 (GtkTreeViewColumn *col, GtkCellRenderer *renderer,
33  GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data);
38 void
39 cell_data_function_col_0 (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model,
40  GtkTreeIter *iter, gpointer user_data);
44 void
45 cell_edited_callback (GtkCellRendererText *cell, gchar *path_string,
46  gchar *new_text, gpointer user_data);
51 int
52 get_col_number_from_tree_view_column (GtkTreeViewColumn *col);
57 gboolean
58 cell_tooltip_callback (GtkWidget *widget, gint x, gint y, gboolean keyboard_tip,
59  GtkTooltip *tooltip, gpointer user_data);
64 GtkWidget *
65 create_view (GtkTreeStore *model);
70 void
71 save_clicked (GtkButton *button, gpointer user_data);
75 void
76 load_clicked (GtkButton *button, gpointer user_data);
80 void
81 exit_clicked_callback (GtkButton *button, gpointer user_data);
85 gboolean
86 delete_event_callback (GtkWidget *widget, GdkEvent *event, gpointer user_data);
90 gboolean
91 clean_model_callback (GtkTreeModel *model, GtkTreePath *path,
92  GtkTreeIter *iter, gpointer data);
93 /************************** display functions used by default configurator **********************/
98 void
99 cell_data_function_col_1_config_default (GtkTreeViewColumn *col, GtkCellRenderer *renderer,
100  GtkTreeModel *model, GtkTreeIter *iter,
101  gpointer user_data);
105 void
106 cell_data_function_col_0_config_default (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model,
107  GtkTreeIter *iter, gpointer user_data);
112 void
113 save_clicked_default (GtkButton *button, gpointer user_data);
117 void
118 load_clicked_default (GtkButton *button, gpointer user_data);
124 void
125 cell_edited_callback_config_default (GtkCellRendererText *cell, gchar *path_string,
126  gchar *new_text, gpointer user_data);
133 gboolean
134 cell_tooltip_callback_config_default (GtkWidget *widget, gint x, gint y,
135  gboolean keyboard_tip, GtkTooltip *tooltip, gpointer user_data);
140 GtkWidget *
141 create_view_config_default (GtkTreeStore *model);
145 gboolean
146 clean_model_callback_config_default (GtkTreeModel *model, GtkTreePath *path,
147  GtkTreeIter *iter, gpointer data);
148 } //end namespace ns3
149 
150 #endif
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...
int get_col_number_from_tree_view_column(GtkTreeViewColumn *col)
This function gets the column number 0 or 1 from the mouse click.
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.
uint8_t data[writeSize]
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 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...
void load_clicked(GtkButton *button, gpointer user_data)
If the user presses the button load, it will load the config file into memory.
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.
GtkWidget * create_view_config_default(GtkTreeStore *model)
This is the main view opening the widget, getting tooltips and drawing the tree of attributes...
GtkWidget * create_view(GtkTreeStore *model)
This is the main view opening the widget, getting tooltips and drawing the tree of attributes...
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 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 load_clicked_default(GtkButton *button, gpointer user_data)
If the user presses the button load, it will load the config file into memory.
void exit_clicked_callback(GtkButton *button, gpointer user_data)
Exit the window when exit button is pressed.
gboolean clean_model_callback(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
Delete the tree model contents.
gboolean clean_model_callback_config_default(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
Delete the tree model contents.
void save_clicked_default(GtkButton *button, gpointer user_data)
This is the action done when the user presses on the save button.
gboolean delete_event_callback(GtkWidget *widget, GdkEvent *event, gpointer user_data)
Exit the application.
void save_clicked(GtkButton *button, gpointer user_data)
This is the action done when the user presses on the save button.