1 /********************************************************************
2 This file is part of the abs 0.907 distribution.  abs is a spreadsheet
3 with graphical user interface.
4 
5 Copyright (C) 1998-2001  Andr� Bertin (Andre.Bertin@ping.be)
6 
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version if in the same spirit as version 2.
11 
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 Concact: abs@pi.be
22          http://home.pi.be/bertin/abs.shtml
23 
24 *********************************************************************/
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 #ifndef MAINWIN_H
52 #define MAINWIN_H
53 
54 #include "commandline.h"
55 #include "menubar.h"
56 #include "buttonbar.h"
57 #include "formatbar.h"
58 #include "myscroll.h"
59 #include "param.h"
60 
61 typedef struct
62   {
63     Widget toplevel;
64     Widget baseform;
65     Widget menubar;
66     Menubar *menubar_obj;
67     Widget buttonbar;
68     Buttonbar *buttonbar_obj;
69     int buttonbar_ismanaged;
70     Widget formatbar;
71     Formatbar *formatbar_obj;
72     int formatbar_ismanaged;
73     Widget commandline;
74     Commandline *commandline_obj;
75     Widget wbform;
76 
77     Widget corner;
78     Widget linindex;
79     Widget colindex;
80     Widget draw;
81     Myscroll *scrollv;
82     Myscroll *scrollh;
83     Widget sheetselform;
84     Widget popup;
85     Widget abv_editor;
86     Widget sheetbottom;
87     Widget selectsheet[20];
88     Widget sheetbtn;
89     Widget first, previous, next, last;
90     Widget cell;
91 
92     Display *dpy;
93     int screen;
94     Window draw_window;
95 
96     Pixmap DrawAreaPixmap;
97     Pixmap LinPixmap;
98     Pixmap ColPixmap;
99     Pixmap CornerPixmap;
100 
101     int height;
102     int width;
103   }
104 Mainwin;
105 
106 extern Mainwin *ActiveMainwin;
107 extern Mainwin *newmainwin (Widget top);
108 extern int mainwin_popup_abv ();
109 extern int mainwin_popdown_abv ();
110 extern void setscrollv (double v);
111 extern void setscrollh (double v);
112 extern int popupcell (int x, int y, int w, int h);
113 extern int popdowncell ();
114 extern int LetextLooseFocus ();
115 extern int LetextGetFocus ();
116 extern int mainwin_inform (char *str);
117 
118 extern Display *mainwin_drawdpy ();
119 
120 extern void
121   event_KeyPressed (Widget widget, XtPointer pointer, XEvent * event, Boolean * ctd);
122 extern void
123   event_KeyReleased (Widget widget, XtPointer pointer, XEvent * event, Boolean * ctd);
124 
125 extern void buttonbar_onoff ();
126 extern void formatbar_onoff ();
127 #endif
128