1 |
|
/* |
2 |
|
AntiRight |
3 |
|
(c) 2003-2005 Jeffrey Bedard |
4 |
|
antiright@gmail.com |
5 |
|
|
6 |
|
This file is part of AntiRight. |
7 |
|
|
8 |
|
AntiRight is free software; you can redistribute it and/or modify |
9 |
|
it under the terms of the GNU General Public License as published by |
10 |
|
the Free Software Foundation; either version 2 of the License, or |
11 |
|
(at your option) any later version. |
12 |
|
|
13 |
|
AntiRight is distributed in the hope that it will be useful, |
14 |
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 |
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 |
|
GNU General Public License for more details. |
17 |
|
|
18 |
|
You should have received a copy of the GNU General Public License |
19 |
|
along with AntiRight; if not, write to the Free Software |
20 |
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
21 |
|
02110-1301 USA |
22 |
|
*/ |
23 |
|
|
24 |
#include "../../lib/library.h" |
#include "../../lib/library.h" |
25 |
#include "../bitmaps/handtoface.xpm" |
#include "../bitmaps/handtoface.xpm" |
26 |
|
|
132 |
antiright.graph.height); |
antiright.graph.height); |
133 |
antiright_draw_foreground(&buffer_drawing, 200, 200, 200); |
antiright_draw_foreground(&buffer_drawing, 200, 200, 200); |
134 |
fractal(); |
fractal(); |
135 |
XCopyArea(antiright.display, buffer, antiright.graph.drawing.window, |
XCopyArea(antiright.display, buffer, |
136 |
|
antiright.graph.drawing.window, |
137 |
antiright.graph.drawing.gc, 0, 0, 256,256, 0, 0); |
antiright.graph.drawing.gc, 0, 0, 256,256, 0, 0); |
138 |
XFlush(antiright.display); |
XFlush(antiright.display); |
139 |
|
|
161 |
threshhold=1; |
threshhold=1; |
162 |
|
|
163 |
antiright_initialize_application(&argc, argv, "AFract"); |
antiright_initialize_application(&argc, argv, "AFract"); |
164 |
antiright_set_pixmap_from_data(antiright.parent_widget, handtoface_xpm); |
antiright_set_pixmap_from_data(antiright.parent_widget, |
165 |
|
handtoface_xpm); |
166 |
|
|
167 |
ARCLARG; |
ARCLARG; |
168 |
form=antiright_form(antiright.parent_widget); |
form=antiright_form(antiright.parent_widget); |
177 |
XtRealizeWidget(antiright.parent_widget); |
XtRealizeWidget(antiright.parent_widget); |
178 |
antiright_form_positions(0, 80, 0, 80); |
antiright_form_positions(0, 80, 0, 80); |
179 |
antiright_create_graph(form); |
antiright_create_graph(form); |
180 |
XtRemoveAllCallbacks(antiright.graph.widget, XmNexposeCallback); |
XtRemoveAllCallbacks(antiright.graph.widget, |
181 |
/* XtAddCallback(antiright.graph.widget, */ |
XmNexposeCallback); |
182 |
/* XmNexposeCallback, */ |
|
|
/* expose_cb, */ |
|
|
/* NULL); */ |
|
183 |
ARCLARG; |
ARCLARG; |
184 |
antiright_form_positions(80, 90, 0, 100); |
antiright_form_positions(80, 90, 0, 100); |
185 |
iterate=antiright_button(form, "Iterate", iterate_cb, NULL); |
iterate=antiright_button(form, "Iterate", iterate_cb, NULL); |
193 |
antiright_label(form, "I:"); |
antiright_label(form, "I:"); |
194 |
ARCLARG; |
ARCLARG; |
195 |
antiright_form_positions(10, 20, 80, 100); |
antiright_form_positions(10, 20, 80, 100); |
196 |
i_field=XmCreateTextField(form, "Iterations", antiright.arguments, |
i_field=XmCreateTextField(form, "Iterations", |
197 |
antiright.arguments_int); |
antiright.arguments, |
198 |
|
antiright.arguments_int); |
199 |
XtAddCallback(i_field, XmNactivateCallback, i_mvcb, NULL); |
XtAddCallback(i_field, XmNactivateCallback, i_mvcb, NULL); |
200 |
XtManageChild(i_field); |
XtManageChild(i_field); |
201 |
|
|
204 |
antiright_label(form, "T:"); |
antiright_label(form, "T:"); |
205 |
ARCLARG; |
ARCLARG; |
206 |
antiright_form_positions(30, 40, 80, 100); |
antiright_form_positions(30, 40, 80, 100); |
207 |
t_field=XmCreateTextField(form, "Threshhold", antiright.arguments, |
t_field=XmCreateTextField(form, "Threshhold", |
208 |
antiright.arguments_int); |
antiright.arguments, |
209 |
|
antiright.arguments_int); |
210 |
XtAddCallback(t_field, XmNactivateCallback, t_mvcb, NULL); |
XtAddCallback(t_field, XmNactivateCallback, t_mvcb, NULL); |
211 |
XtManageChild(t_field); |
XtManageChild(t_field); |
212 |
|
|
231 |
XtManageChild(Q_field); |
XtManageChild(Q_field); |
232 |
|
|
233 |
|
|
234 |
buffer=XCreatePixmap(antiright.display, antiright.graph.drawing.window, |
buffer=XCreatePixmap(antiright.display, |
235 |
|
antiright.graph.drawing.window, |
236 |
256, 256, |
256, 256, |
237 |
DefaultDepth(antiright.display, antiright.screen)); |
DefaultDepth(antiright.display, |
238 |
|
antiright.screen)); |
239 |
buffer_gc=XCreateGC(antiright.display, buffer, 0, NULL); |
buffer_gc=XCreateGC(antiright.display, buffer, 0, NULL); |
240 |
antiright_drawing_initialize(antiright.graph.widget, &buffer_drawing); |
antiright_drawing_initialize(antiright.graph.widget, |
241 |
|
&buffer_drawing); |
242 |
buffer_drawing.window=buffer; |
buffer_drawing.window=buffer; |
243 |
buffer_drawing.gc=XCreateGC(antiright.display, buffer, 0, NULL); |
buffer_drawing.gc=XCreateGC(antiright.display, buffer, 0, NULL); |
244 |
iterate_cb(); |
iterate_cb(); |