2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
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.
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, see <https://www.gnu.org/licenses/>.
15 #ifndef GNUMERIC_TOOL_DIALOGS_H
16 #define GNUMERIC_TOOL_DIALOGS_H
20 #include <widgets/gnm-expr-entry.h>
22 typedef struct _scenario_state scenario_state_t
;
24 typedef void (*state_destroy_t
) (GnmGenericToolState
*state
);
26 struct _GenericToolState
{
29 GnmExprEntry
*input_entry
;
30 GnmExprEntry
*input_entry_2
;
33 GtkWidget
*cancel_button
;
34 GtkWidget
*apply_button
;
35 GtkWidget
*help_button
;
36 char const *help_link
;
41 GtkWidget
*warning_dialog
;
43 state_destroy_t state_destroy
;
46 void tool_load_selection (GnmGenericToolState
*state
, gboolean allow_multiple
);
47 void error_in_entry (GnmGenericToolState
*state
, GtkWidget
*entry
, char const *err_str
);
48 gboolean
dialog_tool_init (GnmGenericToolState
*state
,
51 char const *help_file
,
53 char const *dialog_name
,
54 char const *error_str
,
56 GCallback ok_function
,
57 GCallback close_function
,
58 GCallback sensitivity_cb
,
59 GnmExprEntryFlags flags
);
61 GtkWidget
*tool_setup_update (GnmGenericToolState
* state
,