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 GRETLTYPES_H 21 #define GRETLTYPES_H 22 23 #define GRETL_STOCK_TEX "gretl-tex" 24 #define GRETL_STOCK_MAIL "gretl-mail" 25 #define GRETL_STOCK_TS "gretl-tsplot" 26 #define GRETL_STOCK_BOX "gretl-boxplot" 27 #define GRETL_STOCK_PDF "gretl-pdf" 28 #define GRETL_STOCK_BOOK "gretl-book" 29 #define GRETL_STOCK_CALC "gretl-calc" 30 #define GRETL_STOCK_ICONS "gretl-icons" 31 #define GRETL_STOCK_MODEL "gretl-model" 32 #define GRETL_STOCK_CONSOLE "gretl-console" 33 #define GRETL_STOCK_SCATTER "gretl-scatter" 34 #define GRETL_STOCK_FUNC "gretl-func" 35 #define GRETL_STOCK_PIN "gretl-pin" 36 #define GRETL_STOCK_ALPHA "gretl-alpha" 37 #define GRETL_STOCK_EN "gretl-en" 38 #define GRETL_STOCK_SPLIT_H "gretl-split-h" 39 #define GRETL_STOCK_SPLIT_V "gretl-split-v" 40 #define GRETL_STOCK_JOIN_H "gretl-join-h" 41 #define GRETL_STOCK_JOIN_V "gretl-join-v" 42 #define GRETL_STOCK_WINLIST "gretl-winlist" 43 #define GRETL_STOCK_BUNDLE "gretl-bundle" 44 #define GRETL_STOCK_DB "gretl-db" 45 #define GRETL_STOCK_GRETL "gretl-gretl" 46 #define GRETL_STOCK_TABLE "gretl-table" 47 #define GRETL_STOCK_PAGE "gretl-page" 48 #define GRETL_STOCK_TOOLS "gretl-tools" 49 #define GRETL_STOCK_BIGGER "gretl-bigger" 50 #define GRETL_STOCK_SMALLER "gretl-smaller" 51 #define GRETL_STOCK_MENU "gretl-menu" 52 #define GRETL_STOCK_HMAP "gretl-hmap" 53 #define GRETL_STOCK_DBN "gretl-dbnomics" 54 #define GRETL_STOCK_FCAST "gretl-fcast" 55 #define GRETL_STOCK_CLOSE "gretl-close" 56 #define GRETL_STOCK_QUERY "gretl-query" 57 58 typedef enum { 59 VWIN_HELP_ACTIVE = 1 << 0, 60 VWIN_DELETE_FNAME = 1 << 1, 61 VWIN_STICKY = 1 << 2, 62 VWIN_CONTENT_CHANGED = 1 << 3, 63 VWIN_SESSION_GRAPH = 1 << 4, 64 VWIN_TABBED = 1 << 5, 65 VWIN_CB_PDF = 1 << 6, 66 VWIN_MULTI_SERIES = 1 << 7, 67 VWIN_NO_SAVE = 1 << 8, 68 VWIN_USE_FOOTER = 1 << 9, 69 WVIN_KEY_SIGNAL_SET = 1 << 10, 70 VWIN_SWALLOW = 1 << 11 71 } windata_flags; 72 73 typedef struct windata_t_ windata_t; 74 75 struct windata_t_ { 76 GtkWidget *main; /* top-level GTK window */ 77 GtkWidget *topmain; /* for use when embedded in tabs */ 78 GtkWidget *hpanes1; /* upper horizontally opposed panes */ 79 GtkWidget *hpanes2; /* lower horizontally opposed panes */ 80 GtkWidget *vbox; /* vbox within main */ 81 GtkWidget *text; /* text or sourceview object */ 82 GtkWidget *listbox; /* or: box containing tree or list */ 83 GtkWidget *mbar; /* menubar, or toolbar */ 84 GtkWidget *finder; /* search entry in top bar */ 85 GtkWidget *status; /* status label */ 86 GtkWidget *popup; /* popup menu */ 87 GtkUIManager *ui; /* UI definition */ 88 windata_t *gretl_parent; 89 windata_t **gretl_children; 90 gpointer data; 91 int active_var; 92 int role; 93 int n_model_tests; 94 int n_gretl_children; 95 windata_flags flags; 96 char fname[MAXLEN]; 97 GtkSourceBuffer *sbuf; 98 }; 99 100 typedef struct dialog_opts_ dialog_opts; 101 102 struct dialog_opts_ { 103 int n; 104 int type; 105 gretlopt *optp; 106 const gretlopt *vals; 107 const char **strs; 108 }; 109 110 typedef struct GretlToolItem_ GretlToolItem; 111 112 struct GretlToolItem_ { 113 const gchar *tip; 114 const gchar *icon; 115 GCallback func; 116 int flag; 117 }; 118 119 #define window_help_is_active(w) (w->flags & VWIN_HELP_ACTIVE) 120 #define set_window_help_active(w) (w->flags |= VWIN_HELP_ACTIVE) 121 #define unset_window_help_active(w) (w->flags &= ~VWIN_HELP_ACTIVE) 122 #define window_is_tab(w) (w->flags & VWIN_TABBED) 123 124 #define window_delete_filename(w) (w->flags & VWIN_DELETE_FNAME) 125 #define set_window_delete_filename(w) (w->flags |= VWIN_DELETE_FNAME) 126 127 #endif /* GRETLTYPES_H */ 128