25 #include "pips_config.h"
32 #include <sys/resource.h>
42 #define min(a,b) ((a) < (b) ? (a) : (b))
46 #define PIPS_DOCUMENTATION_URL "http://www.cri.ensmp.fr/pips"
67 gtk_label_set_text(GTK_LABEL(
lines[i]),
"");
81 GtkWidget *close_button;
88 vbox = gtk_vbox_new(FALSE, 0);
94 lines[i] = gtk_label_new(NULL);
95 gtk_box_pack_start(GTK_BOX(vbox),
lines[i], FALSE, FALSE, 0);
96 gtk_widget_show(
lines[i]);
102 close_button = gtk_button_new_with_label(
"CLOSE");
103 gtk_box_pack_start(GTK_BOX(vbox), close_button, FALSE, FALSE, 15);
104 gtk_widget_show(close_button);
106 gtk_container_add(GTK_CONTAINER(
help_frame), vbox);
108 gtk_signal_connect(GTK_OBJECT(close_button),
"clicked", GTK_SIGNAL_FUNC(
122 static char *
menu_data[] = {
"A few introductory words...",
"Introduction",
123 "A few words about \"Workspace\"...",
"Workspace",
124 "A few words about \"Module\"...",
"Module",
125 "A few words about \"Directory\"...",
"Directory",
126 "A few words about \"View\"...",
"View",
127 "A few words about \"Transform/Edit\"...",
"Transform/Edit",
128 "A few words about \"Compile\"...",
"Compile",
129 "A few words about \"Options\"...",
"Options",
130 "A few words about \"Log\"...",
"Log" };
134 GtkWidget *help_menu, *help_menu_item;
135 help_menu = gtk_menu_new();
136 help_menu_item = gtk_menu_item_new_with_label(
"Help");
137 gtk_menu_item_set_submenu(GTK_MENU_ITEM(help_menu_item), help_menu);
139 GtkWidget * menu_item;
140 for (i = 0; i < 9; i++) {
141 menu_item = gtk_menu_item_new_with_label(
menu_data[i * 2]);
142 g_signal_connect(G_OBJECT(menu_item),
"activate", G_CALLBACK(
144 gtk_menu_append(GTK_MENU(help_menu), menu_item);
147 gtk_menu_append(GTK_MENU(help_menu), gtk_separator_menu_item_new());
149 menu_item = gtk_menu_item_new_with_label(
150 "The PIPS documentation on Internet with Firefox...");
151 g_signal_connect(G_OBJECT(menu_item),
"activate", G_CALLBACK(
153 gtk_menu_append(GTK_MENU(help_menu), menu_item);
155 gtk_widget_show(help_menu_item);
156 gtk_widget_show_all(help_menu);
size_t gen_array_nitems(const gen_array_t a)
void gen_array_full_free(gen_array_t a)
gen_array_t gen_array_make(size_t size)
declarations...
void * gen_array_item(const gen_array_t a, size_t i)
void gen_array_free(gen_array_t a)
GtkWidget * main_window_menu_bar
void create_help_window()
#define PIPS_DOCUMENTATION_URL
The URL of the PIPS documentation at the ï¿œcole des Mines de Paris:
static char * menu_data[]
void display_help(char *topic)
static void help_launch_pips_firefox(GtkWidget *widget, gpointer data)
static void close_help_notify(GtkWidget *widget, gpointer *data)
static GtkWidget * lines[HELP_LINES]
static gen_array_t help_list
GRRRRRRRR FC.
static void help_notify(GtkWidget *widget, gpointer data)
gint hide_window(GtkWidget *window, GdkEvent *ev __attribute__((unused)), gpointer data __attribute__((unused)))
void get_help_topic(string topic, gen_array_t array)
void safe_system(string)
system.c
struct _gen_array_chunk_t * gen_array_t