1 /* 2 * gretl -- Gnu Regression, Econometrics and Time-series Library 3 * Copyright (C) 2001 Allin Cottrell and Riccardo "Jack" Lucchetti 4 * 5 * This program is free software: you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation, either version 3 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 17 * 18 */ 19 20 #ifndef WINSTACK_H_ 21 #define WINSTACK_H_ 22 23 void window_list_add (GtkWidget *w, int role); 24 25 void window_list_popup (GtkWidget *src, GdkEvent *event, 26 gpointer data); 27 28 void window_list_revise_label (GtkWidget *targ, 29 const char *label); 30 31 void plot_window_set_label (GtkWidget *w); 32 33 void vwin_record_toolbar_popup (windata_t *vwin, 34 GtkWidget *menu); 35 36 void vwin_free_toolbar_popups (windata_t *vwin); 37 38 gboolean window_list_exit_check (void); 39 40 windata_t *get_editor_for_file (const char *filename); 41 42 windata_t *get_viewer_for_file (const char *filename); 43 44 windata_t *get_browser_for_database (const char *filename); 45 46 windata_t *get_browser_for_gretl_database (const char *filename); 47 48 windata_t *get_browser_for_role (int role, const char *path); 49 50 windata_t *get_viewer_for_data (const gpointer data); 51 52 GtkWidget *get_window_for_data (const gpointer data); 53 54 GtkWidget *get_window_for_plot (void *session_plot); 55 56 GtkWidget *get_viewer_for_plot (const char *filename); 57 58 gboolean is_shell_for_plotfile (GtkWidget *w, 59 const char *fname); 60 61 gboolean package_being_edited (const char *pkgname, 62 GtkWidget **pw); 63 64 int get_script_output_number (void); 65 66 windata_t *get_unique_output_viewer (void); 67 68 void maybe_close_window_for_user_var (const gpointer data, 69 GretlObjType otype); 70 71 void close_session_windows (gretlopt opt); 72 73 void cascade_session_windows (void); 74 75 void vwin_add_winlist (windata_t *vwin); 76 77 void window_add_winlist (GtkWidget *window, GtkWidget *hbox); 78 79 windata_t *vwin_new (int role, gpointer data); 80 81 int highest_numbered_variable_in_winstack (void); 82 83 GList *windowed_model_list (void); 84 85 windata_t *gretl_viewer_new (int role, const gchar *title, 86 gpointer data); 87 88 windata_t * 89 gretl_viewer_new_with_parent (windata_t *parent, int role, 90 const gchar *title, 91 gpointer data); 92 93 windata_t *gretl_browser_new (int role, const gchar *title); 94 95 GtkWidget *vwin_toplevel (windata_t *vwin); 96 97 void vwin_pack_toolbar (windata_t *vwin); 98 99 void vwin_reinstate_toolbar (windata_t *vwin); 100 101 void gretl_viewer_present (windata_t *vwin); 102 103 void gretl_viewer_destroy (windata_t *vwin); 104 105 void gretl_viewer_set_title (windata_t *vwin, const char *title); 106 107 void preset_viewer_flag (windata_flags f); 108 109 void vwin_record_action (windata_t *vwin, GtkAction *action); 110 111 void vwin_action_set_sensitive (windata_t *vwin, 112 const char *name, 113 gboolean s); 114 115 #endif 116 117