Statistics
| Revision:

root / tmp / org.txm.statsengine.r.core.win32 / res / win32 / include / ga.h @ 2486

History | View | Annotate | Download (8 kB)

1 2486 sjacqu01
/*
2 2486 sjacqu01
 *
3 2486 sjacqu01
 *  R : A Computer Language for Statistical Data Analysis
4 2486 sjacqu01
 *  file ga.h
5 2486 sjacqu01
 *  Copyright (C) 1998--1999  Guido Masarotto
6 2486 sjacqu01
 *  Copyright (C) 2004--2008   The R Foundation
7 2486 sjacqu01
 *
8 2486 sjacqu01
 *  This program is free software; you can redistribute it and/or modify
9 2486 sjacqu01
 *  it under the terms of the GNU General Public License as published by
10 2486 sjacqu01
 *  the Free Software Foundation; either version 2 of the License, or
11 2486 sjacqu01
 *  (at your option) any later version.
12 2486 sjacqu01
 *
13 2486 sjacqu01
 *  This program is distributed in the hope that it will be useful,
14 2486 sjacqu01
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15 2486 sjacqu01
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 2486 sjacqu01
 *  GNU General Public License for more details.
17 2486 sjacqu01
 *
18 2486 sjacqu01
 *  You should have received a copy of the GNU General Public License
19 2486 sjacqu01
 *  along with this program; if not, a copy is available at
20 2486 sjacqu01
 *  http://www.r-project.org/Licenses/
21 2486 sjacqu01
 */
22 2486 sjacqu01
23 2486 sjacqu01
/*
24 2486 sjacqu01
   New declarations.
25 2486 sjacqu01
*/
26 2486 sjacqu01
27 2486 sjacqu01
#ifndef __GA__VERSION
28 2486 sjacqu01
#define __GA__VERSION 2.45(1)
29 2486 sjacqu01
#include "graphapp.h"
30 2486 sjacqu01
31 2486 sjacqu01
/* renamed functions */
32 2486 sjacqu01
void        gamainloop(void);
33 2486 sjacqu01
void        gabeep(void);
34 2486 sjacqu01
35 2486 sjacqu01
#define DblClick        0x0010/* added for buttons.c*/
36 2486 sjacqu01
37 2486 sjacqu01
38 2486 sjacqu01
/* windows.c */
39 2486 sjacqu01
#define Border        0x10100000L
40 2486 sjacqu01
void        app_cleanup(void);
41 2486 sjacqu01
int        ismdi(void);
42 2486 sjacqu01
int        isUnicodeWindow(control c);
43 2486 sjacqu01
int        isiconic(window w);
44 2486 sjacqu01
rect        screen_coords(control c);
45 2486 sjacqu01
46 2486 sjacqu01
/* gmenus.c */
47 2486 sjacqu01
typedef struct {
48 2486 sjacqu01
    char *nm;
49 2486 sjacqu01
    menufn fn;
50 2486 sjacqu01
    int key;
51 2486 sjacqu01
    menuitem m;
52 2486 sjacqu01
} MenuItem;
53 2486 sjacqu01
54 2486 sjacqu01
#define STARTMENU {"#STARTMENU", 0, 0}
55 2486 sjacqu01
#define ENDMENU {"#ENDMENU", 0, 0}
56 2486 sjacqu01
#define STARTSUBMENU {"#STARTSUBMENU", 0, 0}
57 2486 sjacqu01
#define ENDSUBMENU {"#ENDSUBMENU", 0, 0}
58 2486 sjacqu01
#define MDIMENU {"#MDIMENU", 0, 0}
59 2486 sjacqu01
#define LASTMENUITEM {0, 0, 0}
60 2486 sjacqu01
menu        newmdimenu(void);
61 2486 sjacqu01
typedef menu popup;
62 2486 sjacqu01
popup        newpopup(actionfn fn);
63 2486 sjacqu01
menubar gmenubar(actionfn fn, MenuItem []);
64 2486 sjacqu01
popup        gpopup(actionfn fn, MenuItem []);
65 2486 sjacqu01
void        gchangepopup(window w, popup p);
66 2486 sjacqu01
/* next is limited to current window... */
67 2486 sjacqu01
void        gchangemenubar(menubar mb);
68 2486 sjacqu01
69 2486 sjacqu01
70 2486 sjacqu01
/* tooltips.c */
71 2486 sjacqu01
int        addtooltip(control c, const char *tp);
72 2486 sjacqu01
73 2486 sjacqu01
/* status.c */
74 2486 sjacqu01
int        addstatusbar(void);
75 2486 sjacqu01
int        delstatusbar(void);
76 2486 sjacqu01
void        setstatus(const char *text);
77 2486 sjacqu01
78 2486 sjacqu01
/* dialogs.c */
79 2486 sjacqu01
void        setuserfilter(const char *);
80 2486 sjacqu01
void    askchangedir(void);
81 2486 sjacqu01
char *        askcdstring(const char *question, const char *default_string);
82 2486 sjacqu01
char *        askfilesavewithdir(const char *title, const char *default_name,
83 2486 sjacqu01
                           const char *dir);
84 2486 sjacqu01
char *  askfilenames(const char *title, const char *default_name, int multi,
85 2486 sjacqu01
                     const char *filters, int filterindex, char *strbuf,
86 2486 sjacqu01
                     int bufsize, const char *dir);
87 2486 sjacqu01
int     countFilenames(const char *strbuf); /* Note that first name is path when there are multiple names */
88 2486 sjacqu01
89 2486 sjacqu01
void        setuserfilterW(const wchar_t *);
90 2486 sjacqu01
wchar_t *askfilenameW(const char *title, const char *default_name);
91 2486 sjacqu01
wchar_t *askfilenamesW(const wchar_t *title, const wchar_t *default_name,
92 2486 sjacqu01
                       int multi,
93 2486 sjacqu01
                       const wchar_t *filters, int filterindex,
94 2486 sjacqu01
                       const wchar_t *dir);
95 2486 sjacqu01
wchar_t *askfilesaveW(const char *title, const char *default_name);
96 2486 sjacqu01
97 2486 sjacqu01
98 2486 sjacqu01
99 2486 sjacqu01
/*  rgb.c */
100 2486 sjacqu01
rgb     nametorgb(const char *colourname);
101 2486 sjacqu01
const char *  rgbtoname(rgb in);
102 2486 sjacqu01
int     rgbtonum(rgb in);
103 2486 sjacqu01
rgb     myGetSysColor(int);
104 2486 sjacqu01
rgb        dialog_bg(void);
105 2486 sjacqu01
106 2486 sjacqu01
107 2486 sjacqu01
/* clipboard.c */
108 2486 sjacqu01
void    copytoclipboard(drawing src);
109 2486 sjacqu01
int     copystringtoclipboard(const char *str);
110 2486 sjacqu01
int     getstringfromclipboard(char * str, int n);
111 2486 sjacqu01
int     clipboardhastext(void);
112 2486 sjacqu01
113 2486 sjacqu01
/* gimage.c */
114 2486 sjacqu01
image  bitmaptoimage(bitmap bm);
115 2486 sjacqu01
116 2486 sjacqu01
/* printer.c  */
117 2486 sjacqu01
typedef objptr printer;
118 2486 sjacqu01
printer newprinter(double w,  double h, const char *name);
119 2486 sjacqu01
void    nextpage(printer p);
120 2486 sjacqu01
121 2486 sjacqu01
/* metafile.c */
122 2486 sjacqu01
typedef objptr metafile;
123 2486 sjacqu01
metafile newmetafile(const char *name, double width, double height);
124 2486 sjacqu01
125 2486 sjacqu01
126 2486 sjacqu01
/* thread safe and extended  drawing functions (gdraw.c) */
127 2486 sjacqu01
#define lSolid 0
128 2486 sjacqu01
#define lDash  (5 | (4<<4))
129 2486 sjacqu01
#define lShortDash  (3 | (4<<4))
130 2486 sjacqu01
#define lLongDash  (8 | (4<<4))
131 2486 sjacqu01
#define lDot   (1 | (4<<4))
132 2486 sjacqu01
#define lDashDot (5 | (4<<4) | (1<<8) | (4<<12))
133 2486 sjacqu01
#define lShortDashDot (3 | (4<<4) | (1<<8) | (4<<12))
134 2486 sjacqu01
#define lLongDashDot (8 | (4<<4) | (1<<8) | (4<<12))
135 2486 sjacqu01
#define lDashDotDot    (5 | (4<<4) | (1<<8) | (3<<12) | (1<<16) | (4<< 20))
136 2486 sjacqu01
#define lShortDashDotDot    (3 | (4<<4) | (1<<8) | (3<<12) | (1<<16) | (4<< 20))
137 2486 sjacqu01
#define lLongDashDotDot    (8 | (4<<4) | (1<<8) | (3<<12) | (1<<16) | (4<< 20))
138 2486 sjacqu01
139 2486 sjacqu01
rect  ggetcliprect(drawing d);
140 2486 sjacqu01
void  gsetcliprect(drawing d, rect r);
141 2486 sjacqu01
void  gbitblt(bitmap db, bitmap sb, point p, rect r);
142 2486 sjacqu01
void  gscroll(drawing d, point dp, rect r);
143 2486 sjacqu01
void  ginvert(drawing d, rect r);
144 2486 sjacqu01
rgb   ggetpixel(drawing d, point p);
145 2486 sjacqu01
void  gsetpixel(drawing d, point p, rgb c);
146 2486 sjacqu01
void  gdrawline(drawing d, int width, int style, rgb c, point p1, point p2,
147 2486 sjacqu01
                int fast, int lend, int ljoin, float lmitre);
148 2486 sjacqu01
void  gdrawrect(drawing d, int width, int style, rgb c, rect r, int fast,
149 2486 sjacqu01
                int lend, int ljoin, float lmitre);
150 2486 sjacqu01
void  gfillrect(drawing d, rgb fill, rect r);
151 2486 sjacqu01
void  gcopy(drawing d, drawing d2, rect r);
152 2486 sjacqu01
void  gcopyalpha(drawing d, drawing d2, rect r, int alpha);
153 2486 sjacqu01
void  gcopyalpha2(drawing d, image src, rect r);
154 2486 sjacqu01
void  gdrawellipse(drawing d, int width, rgb border, rect r, int fast,
155 2486 sjacqu01
                   int lend, int ljoin, float lmitre);
156 2486 sjacqu01
void  gfillellipse(drawing d, rgb fill, rect r);
157 2486 sjacqu01
void  gdrawpolyline(drawing d, int width, int style, rgb c,
158 2486 sjacqu01
                    point *p, int n, int closepath, int fast,
159 2486 sjacqu01
                    int lend, int ljoin, float lmitre);
160 2486 sjacqu01
#define gdrawpolygon(d,w,s,c,p,n,f,e,j,m) gdrawpolyline(d,w,s,c,p,n,1,f,e,j,m)
161 2486 sjacqu01
void  gsetpolyfillmode(drawing d, int oddeven);
162 2486 sjacqu01
void  gfillpolygon(drawing d, rgb fill, point *p, int n);
163 2486 sjacqu01
void  gfillpolypolygon(drawing d, rgb fill, point *p, int npoly, int *nper);
164 2486 sjacqu01
void  gdrawimage(drawing d, image img, rect dr, rect sr);
165 2486 sjacqu01
void  gmaskimage(drawing d, image img, rect dr, rect sr, image mask);
166 2486 sjacqu01
int   gdrawstr(drawing d, font f, rgb c, point p, const char *s);
167 2486 sjacqu01
void  gdrawstr1(drawing d, font f, rgb c, point p, const char *s, double hadj);
168 2486 sjacqu01
rect  gstrrect(drawing d, font f, const char *s);
169 2486 sjacqu01
point gstrsize(drawing d, font f, const char *s);
170 2486 sjacqu01
int   gstrwidth(drawing d ,font f, const char *s);
171 2486 sjacqu01
void  gcharmetric(drawing d, font f, int c, int *ascent, int *descent,
172 2486 sjacqu01
                  int *width);
173 2486 sjacqu01
font  gnewfont(drawing d, const char *face, int style, int size,
174 2486 sjacqu01
               double rot, int usePoints);
175 2486 sjacqu01
font  gnewfont2(drawing d, const char *face, int style, int size,
176 2486 sjacqu01
                double rot, int usePoints, int quality);
177 2486 sjacqu01
int   ghasfixedwidth(font f);
178 2486 sjacqu01
field newfield_no_border(const char *text, rect r);
179 2486 sjacqu01
180 2486 sjacqu01
int gdrawwcs(drawing d, font f, rgb c, point p, const wchar_t *s);
181 2486 sjacqu01
int gwcswidth(drawing d, font f, const wchar_t *s);
182 2486 sjacqu01
183 2486 sjacqu01
void gwcharmetric(drawing d, font f, int c, int *ascent, int *descent,
184 2486 sjacqu01
                  int *width);
185 2486 sjacqu01
void gwdrawstr1(drawing d, font f, rgb c, point p, const wchar_t *s, int cnt,
186 2486 sjacqu01
                double hadj);
187 2486 sjacqu01
int   gstrwidth1(drawing d ,font f, const char *s, int enc);
188 2486 sjacqu01
189 2486 sjacqu01
/* pixels */
190 2486 sjacqu01
int   devicewidth(drawing dev);
191 2486 sjacqu01
int   deviceheight(drawing dev);
192 2486 sjacqu01
/* mm */
193 2486 sjacqu01
int   devicewidthmm(drawing dev);
194 2486 sjacqu01
int   deviceheightmm(drawing dev);
195 2486 sjacqu01
/* pixels per inch */
196 2486 sjacqu01
int   devicepixelsx(drawing dev);
197 2486 sjacqu01
int   devicepixelsy(drawing dev);
198 2486 sjacqu01
199 2486 sjacqu01
int        isTopmost(window w);
200 2486 sjacqu01
void        BringToTop(window w, int stay); /* stay=0 for regular, 1 for topmost, 2 for toggle */
201 2486 sjacqu01
void *        getHandle(window w);
202 2486 sjacqu01
void         GA_msgWindow(window c, int type);
203 2486 sjacqu01
204 2486 sjacqu01
205 2486 sjacqu01
/* gbuttons.c */
206 2486 sjacqu01
/* horizontal, vertical and control scrollbar */
207 2486 sjacqu01
#define HWINSB 0
208 2486 sjacqu01
#define VWINSB 1
209 2486 sjacqu01
#define CONTROLSB 2
210 2486 sjacqu01
void        gchangescrollbar(scrollbar sb, int which, int where, int max,
211 2486 sjacqu01
                         int pagesize, int disablenoscroll);
212 2486 sjacqu01
void        gsetcursor(drawing d, cursor c);
213 2486 sjacqu01
control newtoolbar(int height);
214 2486 sjacqu01
button  newtoolbutton(image img, rect r, actionfn fn);
215 2486 sjacqu01
void        scrolltext(textbox c, int lines);
216 2486 sjacqu01
int        ggetkeystate(void);
217 2486 sjacqu01
218 2486 sjacqu01
void        scrollcaret(textbox c, int lines);
219 2486 sjacqu01
void    gsetmodified(textbox c, int modified);
220 2486 sjacqu01
int     ggetmodified(textbox c);
221 2486 sjacqu01
int getlinelength(textbox c);
222 2486 sjacqu01
void getcurrentline(textbox c, char *line, int length);
223 2486 sjacqu01
void getseltext(textbox c, char *text);
224 2486 sjacqu01
void setlimittext(textbox t, long limit);
225 2486 sjacqu01
long getlimittext(textbox t);
226 2486 sjacqu01
void checklimittext(textbox t, long n);
227 2486 sjacqu01
long getpastelength(void);
228 2486 sjacqu01
void textselectionex(control obj, long *start, long *end);
229 2486 sjacqu01
void selecttextex(control obj, long start, long end);
230 2486 sjacqu01
231 2486 sjacqu01
void finddialog(textbox t);
232 2486 sjacqu01
void replacedialog(textbox t);
233 2486 sjacqu01
int modeless_active(void);
234 2486 sjacqu01
235 2486 sjacqu01
236 2486 sjacqu01
/* menus.c */
237 2486 sjacqu01
void        remove_menu_item(menuitem obj);
238 2486 sjacqu01
239 2486 sjacqu01
/* events.c */
240 2486 sjacqu01
void toolbar_show(void);
241 2486 sjacqu01
void toolbar_hide(void);
242 2486 sjacqu01
243 2486 sjacqu01
#endif /* __GA__VERSION */