1 /* GNUPLOT - wxt_term.h */
2 
3 /*[
4  * Copyright 2005,2006   Timothee Lecomte
5  *
6  * Permission to use, copy, and distribute this software and its
7  * documentation for any purpose with or without fee is hereby granted,
8  * provided that the above copyright notice appear in all copies and
9  * that both that copyright notice and this permission notice appear
10  * in supporting documentation.
11  *
12  * Permission to modify the software is granted, but not the right to
13  * distribute the complete modified source code.  Modifications are to
14  * be distributed as patches to the released version.  Permission to
15  * distribute binaries produced by compiling modified sources is granted,
16  * provided you
17  *   1. distribute the corresponding source modifications from the
18  *    released version in the form of a patch file along with the binaries,
19  *   2. add special version identification to distinguish your version
20  *    in addition to the base release version number,
21  *   3. provide your name and address as the primary contact for the
22  *    support of your modified version, and
23  *   4. retain our contact information in regard to use of the base
24  *    software.
25  * Permission to distribute the released version of the source code along
26  * with corresponding source modifications in the form of a patch file is
27  * granted with same provisions 2 through 4 for binary distributions.
28  *
29  * This software is provided "as is" without express or implied warranty
30  * to the extent permitted by applicable law.
31  *
32  *
33  * Alternatively, the contents of this file may be used under the terms of the
34  * GNU General Public License Version 2 or later (the "GPL"), in which case the
35  * provisions of GPL are applicable instead of those above. If you wish to allow
36  * use of your version of this file only under the terms of the GPL and not
37  * to allow others to use your version of this file under the above gnuplot
38  * license, indicate your decision by deleting the provisions above and replace
39  * them with the notice and other provisions required by the GPL. If you do not
40  * delete the provisions above, a recipient may use your version of this file
41  * under either the GPL or the gnuplot license.
42 ]*/
43 
44 /* ------------------------------------------------------
45  * Here you will find the declarations of the C++ functions
46  * used in wxt.trm and defined in wxt_gui.cpp,
47  * where the wxWidgets terminal is mainly implemented.
48  * ------------------------------------------------------*/
49 
50 #ifndef GNUPLOT_WXT_TERM_H
51 # define GNUPLOT_WXT_TERM_H
52 
53 #ifdef __cplusplus
54 extern "C" {
55 #endif /*__cplusplus*/
56 
57 void wxt_init(void);
58 void wxt_graphics(void);
59 void wxt_text(void);
60 void wxt_linetype(int linetype);
61 void wxt_move(unsigned int x, unsigned int y);
62 void wxt_vector(unsigned int x, unsigned int y);
63 void wxt_put_text(unsigned int x, unsigned int y, const char *str);
64 void wxt_reset(void);
65 int wxt_justify_text(enum JUSTIFY mode);
66 void wxt_point(unsigned int x, unsigned int y, int pointstyle);
67 void wxt_linewidth(double linewidth);
68 int wxt_text_angle(int ang);
69 void wxt_fillbox(int style, unsigned int x1, unsigned int y1, unsigned int width, unsigned int height);
70 int wxt_set_font(const char *font);
71 void wxt_pointsize(double ptsize);
72 void wxt_image(unsigned int M, unsigned int N, coordval * image, gpiPoint * corner, t_imagecolor color_mode);
73 
74 # ifdef USE_MOUSE
75 int wxt_waitforinput(int);
76 void wxt_put_tmptext(int, const char str[]);
77 void wxt_set_ruler(int x, int y);
78 void wxt_set_cursor(int, int, int);
79 void wxt_set_clipboard(const char s[]);
80 # endif /*USE_MOUSE*/
81 int wxt_make_palette(t_sm_palette *palette);
82 void wxt_set_color(t_colorspec *colorspec);
83 void wxt_filled_polygon(int n, gpiPoint * corners);
84 
85 void wxt_enhanced_flush(void);
86 void wxt_enhanced_writec(int c);
87 void wxt_enhanced_open(char* fontname, double fontsize, double base, TBOOLEAN widthflag, TBOOLEAN showflag, int overprint);
88 
89 void wxt_layer(t_termlayer layer);
90 void wxt_hypertext(int type, const char *text);
91 
92 void wxt_boxed_text(unsigned int x, unsigned int y, int option);
93 
94 void wxt_modify_plots(unsigned int, int);
95 
96 void wxt_dashtype(int type, t_dashtype *custom_dash_pattern);
97 
98 void wxt_raise_terminal_window(int);
99 void wxt_raise_terminal_group(void);
100 void wxt_lower_terminal_window(int);
101 void wxt_lower_terminal_group(void);
102 void wxt_close_terminal_window(int number);
103 void wxt_update_title(int number);
104 void wxt_update_size(int number);
105 void wxt_update_position(int number);
106 TBOOLEAN wxt_active_window_opened(void);
107 TBOOLEAN wxt_window_opened(void);
108 void wxt_screen_dump(void);
109 
110 /* state variables shared between wxt.trm and wxt_gui.cpp */
111 extern int wxt_window_number;
112 extern TBOOLEAN wxt_enhanced_enabled;
113 extern double wxt_dashlength;
114 extern double wxt_lw;
115 extern int wxt_background;
116 extern rgb_color wxt_rgb_background;
117 extern int wxt_persist;
118 extern int wxt_raise;
119 extern int wxt_ctrl;
120 extern int wxt_toggle;
121 extern int wxt_redraw;
122 extern char *wxt_set_fontname;
123 extern int wxt_set_fontsize;
124 extern double wxt_set_fontscale;
125 extern t_linecap wxt_linecap;
126 extern char wxt_title[MAX_ID_LEN + 1];
127 extern int wxt_width;
128 extern int wxt_height;
129 extern int wxt_posx;
130 extern int wxt_posy;
131 
132 extern int wxt_axis_mask;
133 typedef struct wxt_axis_state_t {
134 	double min;
135 	double term_lower;
136 	double term_scale;
137 	double logbase;
138 } wxt_axis_state_t;
139 extern wxt_axis_state_t wxt_axis_state[4];
140 
141 
142 #ifdef __cplusplus
143 }
144 #endif /*__cplusplus*/
145 
146 #endif /* gnuplot_wxt_term_h */
147