1 /*
2  *  $Id: io-motif.h,v 1.17 2000/08/10 21:02:50 danny Exp $
3  *
4  *  This file is part of GNU Oleo, a free spreadsheet.
5  *
6  *  Copyright � 1998-2000 Free Software Foundation, Inc.
7  *  Written by Danny Backx <danny@gnu.org>.
8  *
9  *  This program is free software; you can redistribute it and/or modify
10  *  it under the terms of the GNU General Public License as published by
11  *  the Free Software Foundation; either version 2 of the License, or
12  *  (at your option) any later version.
13  *
14  *  This program is distributed in the hope that it will be useful,
15  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  *  GNU General Public License for more details.
18  *
19  *  You should have received a copy of the GNU General Public License
20  *  along with this program; if not, write to the Free Software
21  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22  */
23 
24 #ifndef	_IO_MOTIF_H_
25 #define	_IO_MOTIF_H_
26 
27 #include "config.h"
28 #include "global.h"
29 #include <Xm/Xm.h>
30 #include <X11/Intrinsic.h>
31 
32 extern void versionCB(Widget, XtPointer, XtPointer);
33 extern void QuitCB(Widget, XtPointer, XtPointer);
34 extern void motif_init(int *argc, char **argv);
35 extern void ResetColumnWidths(void);
36 extern void MotifUpdateWidth(int, int);
37 extern void motif_build_gui(void);
38 extern void motif_main_loop(void);
39 extern void MotifSetWindowName(const char *);
40 extern void MessageAppend(Boolean beep, char *fmt, ...);
41 extern void MotifGlobalInitialize(void);
42 
43 extern void MotifButton(int, int, char *, char *);
44 
45 struct MotifGlobalType {
46 	XtAppContext app_c;
47 	Widget	toplevel_w, SplashShell_w, plot_w;
48 	Widget	mw_w, mat_w, mb_w, filemenu_w, editmenu_w, stylemenu_w,
49 		optionsmenu_w, helpmenu_w, graphmenu_w, dbmenu_w, testmenu_w;
50 	Widget  msgtext_w, statustf_w, formulatf_w;
51 	Widget	pfsd_w, fsd_w, hd_w, html_w, gs_w;
52 	Widget	FormatD_w, MySQLDialog_w, PrintDialog_w;
53 	Widget	DefaultFileDialog_w, DefaultFileShell_w, ConfigureGraphNotebook_w;
54 	Widget	XYxAutoToggle_w, XYxMinText_w, XYxMaxText_w, XYyAutoToggle_w,
55 		XYyMinText_w, XYyMaxText_w, lineToOffscreen_w;
56 	Widget	UserPref_w, ActiveRangeSelectionWidget_w, pufsd_w;
57 	Widget	configureGraph_w, copyDialog_w, optionsDialog_w, executeCommandDialog_w;
58 	Widget	configureGraphInside_w;
59 	struct rng	selection_range;
60 	int	PuPlotter;
61 	PuFunction ThisPuFunction;
62 	char	**rowlabels, **columnlabels;
63 	short	*columnwidths;
64 	int	*columnmaxlengths;
65 	Pixmap  oleo_icon_pm;
66 	char	*early_msg_text;
67 	char	input_buf[1024];
68 	int	input_buf_allocated, chars_buffered;
69 	char	fileformat[10], pattern[13];
70 	int	fmt, havea0;
71 	Boolean	**selectedcells, newcall, needrecalculate;
72 	Widget	XLogToggle, xticklblmenu, xticklbloption, xtickfmt;
73 	Widget	YLogToggle, yticklblmenu, yticklbloption, ytickfmt;
74 	int	xtick, ytick;
75 	Widget	ticktype_w[2][10];	/* Safe, don't include sciplot.h */
76 	Widget	ZoomScale;
77 };
78 
79 #define	app			Global->MotifGlobal->app_c
80 
81 #define	UserPref		Global->MotifGlobal->UserPref_w
82 #define	toplevel		Global->MotifGlobal->toplevel_w
83 #define	SplashShell		Global->MotifGlobal->SplashShell_w
84 #define	plot		Global->MotifGlobal->plot_w
85 #define	mw		Global->MotifGlobal->mw_w
86 #define	mat		Global->MotifGlobal->mat_w
87 #define	mb		Global->MotifGlobal->mb_w
88 #define	filemenu		Global->MotifGlobal->filemenu_w
89 #define	editmenu		Global->MotifGlobal->editmenu_w
90 #define	stylemenu		Global->MotifGlobal->stylemenu_w
91 #define	optionsmenu		Global->MotifGlobal->optionsmenu_w
92 #define	helpmenu		Global->MotifGlobal->helpmenu_w
93 #define	graphmenu		Global->MotifGlobal->graphmenu_w
94 #define	dbmenu		Global->MotifGlobal->dbmenu_w
95 #define	testmenu		Global->MotifGlobal->testmenu_w
96 #define	msgtext		Global->MotifGlobal->msgtext_w
97 #define	statustf		Global->MotifGlobal->statustf_w
98 #define	formulatf		Global->MotifGlobal->formulatf_w
99 #define	fsd		Global->MotifGlobal->fsd_w
100 #define	pfsd		Global->MotifGlobal->pfsd_w
101 #define	hd		Global->MotifGlobal->hd_w
102 #define	Html		Global->MotifGlobal->html_w
103 #define	gs		Global->MotifGlobal->gs_w
104 #define	FormatD		Global->MotifGlobal->FormatD_w
105 #define	MySQLDialog		Global->MotifGlobal->MySQLDialog_w
106 #define	PrintDialog		Global->MotifGlobal->PrintDialog_w
107 #define	DefaultFileDialog		Global->MotifGlobal->DefaultFileDialog_w
108 #define	DefaultFileShell		Global->MotifGlobal->DefaultFileShell_w
109 #define	ConfigureGraphNotebook		Global->MotifGlobal->ConfigureGraphNotebook_w
110 #define	XYxAutoToggle		Global->MotifGlobal->XYxAutoToggle_w
111 #define	XYxMinText		Global->MotifGlobal->XYxMinText_w
112 #define	XYxMaxText		Global->MotifGlobal->XYxMaxText_w
113 #define	XYyAutoToggle		Global->MotifGlobal->XYyAutoToggle_w
114 #define	XYyMinText		Global->MotifGlobal->XYyMinText_w
115 #define	XYyMaxText		Global->MotifGlobal->XYyMaxText_w
116 #define	lineToOffscreen		Global->MotifGlobal->lineToOffscreen_w
117 #define	ActiveRangeSelectionWidget		Global->MotifGlobal->ActiveRangeSelectionWidget_w
118 #define	selection_range		Global->MotifGlobal->selection_range
119 #define	pufsd			Global->MotifGlobal->pufsd_w
120 #define	PuPlotter		Global->MotifGlobal->PuPlotter
121 #define	ThisPuFunction		Global->MotifGlobal->ThisPuFunction
122 #define	rowlabels		Global->MotifGlobal->rowlabels
123 #define	columnlabels		Global->MotifGlobal->columnlabels
124 #define	columnwidths		Global->MotifGlobal->columnwidths
125 #define	columnmaxlengths		Global->MotifGlobal->columnmaxlengths
126 
127 #define	configureGraph		Global->MotifGlobal->configureGraph_w
128 #define	copyDialog		Global->MotifGlobal->copyDialog_w
129 #define	optionsDialog		Global->MotifGlobal->optionsDialog_w
130 #define	ConfigureGraphInside	Global->MotifGlobal->configureGraphInside_w
131 
132 #define	ExecuteCommandDialog		Global->MotifGlobal->executeCommandDialog_w
133 
134 #endif
135