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 SELECTOR_H 21 #define SELECTOR_H 22 23 #define robust_conf(c) (c != LOGIT && c != PROBIT && \ 24 c != OLOGIT && c != OPROBIT && \ 25 c != QUANTREG && c != INTREG && \ 26 c != MLOGIT && c != COUNTMOD && \ 27 c != DURATION && c != HECKIT && \ 28 c != BIPROBIT && c != REPROBIT && \ 29 c != TOBIT && c != MIDASREG) 30 31 typedef struct iterinfo_t iterinfo; 32 33 struct iterinfo_t { 34 int ci; 35 int maxiters; 36 double tol; 37 }; 38 39 typedef struct gui_midas_spec_ gui_midas_spec; 40 41 struct gui_midas_spec_ { 42 int nterms; 43 char listname[VNAMELEN]; 44 int leadvar; 45 int fratio; 46 int ptype; 47 int minlag; 48 int maxlag; 49 int nparm; 50 }; 51 52 void clear_selector (void); 53 54 selector *selection_dialog (int ci, const char *title, 55 void *data, int (*callback)()); 56 57 selector *simple_selection (int ci, const char *title, int (*callback)(), 58 GtkWidget *parent); 59 60 selector * 61 simple_selection_for_viewer (int ci, const char *title, int (*callback)(), 62 windata_t *vwin); 63 64 selector * 65 simple_selection_with_data (int ci, const char *title, int (*callback)(), 66 GtkWidget *parent, gpointer data); 67 68 void modelspec_dialog (int ci); 69 70 void selector_set_varnum (int v); 71 72 void selector_from_model (windata_t *vwin); 73 74 void data_export_selection_wrapper (int file_code); 75 76 void functions_selection_wrapper (GtkWidget *parent); 77 78 void add_remove_functions_dialog (char **pubnames, int npub, 79 char **privnames, int npriv, 80 void *p1, void *p2); 81 82 int selector_code (const selector *sr); 83 84 const char *selector_list (const selector *sr); 85 86 int selector_list_hasconst (const selector *sr); 87 88 gpointer selector_get_data (const selector *sr); 89 90 gpointer selector_get_extra_data (const selector *sr); 91 92 gpointer selector_get_regls_bundle (void); 93 94 gretlopt selector_get_opts (const selector *sr); 95 96 int selector_get_depvar_number (const selector *sr); 97 98 int selector_get_VAR_order (const selector *sr); 99 100 const char *selector_entry_text (const selector *sr); 101 102 int selector_error (const selector *sr); 103 104 void maybe_clear_selector (const int *dlist); 105 106 GtkWidget *selector_get_window (const selector *sr); 107 108 gchar *get_selector_storelist (void); 109 110 void set_selector_storelist (const char *s); 111 112 void selector_register_genr (int newvars, gpointer p); 113 114 void selector_register_hc_choice (void); 115 116 void selector_cleanup (void); 117 118 #endif /* SELECTOR_H */ 119