moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / doc / kig / index.docbook
blob41b11d7f4bce279b8e22adc3e3c0015ee9307503
1 <?xml version="1.0" ?>
2 <!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
3 <!ENTITY kseg "<application>KSeg</application>">
4 <!ENTITY cabri "<application>Cabri</application>">
5 <!ENTITY drgeo "<application>Dr.Geo</application>">
6 <!ENTITY package "kdeedu">
7 <!ENTITY kappname "&kig;">
8 <!ENTITY % addindex "IGNORE">
9 <!ENTITY % English "INCLUDE">
10 <!-- change language only here -->
14 <book lang="&language;">
16 <bookinfo>
17 <title>The &kig; Handbook</title>
19 <authorgroup>
20 <author>
21 <firstname>Dominique</firstname> <surname>Devriese</surname>
22 <affiliation>
23 <address><email>devriese@kde.org</email></address>
24 </affiliation>
25 </author>
26 <!-- TRANS:ROLES_OF_TRANSLATORS -->
27 </authorgroup>
30 <copyright>
31 <year>2002</year><year>2003</year><year>2004</year> <holder>Dominique Devriese</holder>
32 </copyright>
34 <legalnotice>&FDLNotice;</legalnotice>
36 <date>2004-06-29</date> <releaseinfo>0.9.0</releaseinfo>
38 <abstract>
39 <para>
40 &kig; is a &kde; application for Interactive Geometry.
41 </para>
42 </abstract>
44 <keywordset>
45 <keyword>KDE</keyword> <keyword>KDE-Edu</keyword>
46 <keyword>Kig</keyword> <keyword>Interactive Geometry</keyword>
47 <keyword>KGeo</keyword> <keyword>Cabri</keyword>
48 <keyword>Dr.Geo</keyword> <keyword>KSeg</keyword>
49 </keywordset>
50 </bookinfo>
52 <chapter id="introduction">
53 <title>Introduction</title>
55 <para>
56 &kig; is an application for Interactive Geometry. It's intended
57 to serve two purposes:
58 </para>
60 <itemizedlist>
61 <listitem><para> Allow students to interactively explore
62 mathematical figures and concepts using the computer.
63 </para></listitem>
65 <listitem><para> Serve as a <acronym>WYSIWYG</acronym> tool for
66 drawing mathematical figures and including them in other
67 documents.</para></listitem>
68 </itemizedlist>
70 <para>
71 You can report problems in &kig; using the internal bug
72 reporting tool
73 (<menuchoice><guimenu>Help</guimenu><guimenuitem>Report
74 Bug...</guimenuitem></menuchoice>), or just contact me at
75 <email>devriese@kde.org</email>.
76 </para>
77 <para>
78 Since &kig; supports macros and the construction of locuses, it allows for some
79 rather advanced macros to be defined. If you have created an
80 interesting macro, which you think might be useful for other
81 people, please mail it to me at
82 <email>devriese@kde.org</email>, so I can include it in the
83 distribution (if you do this, it will be licensed under the
84 terms of &kig;'s license, the <ulink
85 url="http://www.gnu.org/licenses/licenses.html#GPL">GPL</ulink>,
86 so that other people can freely use and adapt it).
87 </para>
88 </chapter>
90 <chapter id="using-kig-basic">
91 <title>Basic usage</title>
92 <section id="constructing-objects">
93 <title>Constructing Objects</title>
94 <section id="constructing-points">
95 <title>Constructing points</title>
96 <para>
97 You can construct points in several ways:</para>
98 <itemizedlist>
99 <listitem>
100 <para>
101 Select <menuchoice><guimenu>Objects</guimenu>
102 <guisubmenu>Points</guisubmenu>
103 <guimenuitem>Point</guimenuitem></menuchoice> from the
104 menubar or
105 press the appropriate button in the toolbar. You can
106 then construct a point by clicking at the desired
107 position in the window.</para> <note><para>Actually, this
108 works the same way for constructing other objects as
109 well: click on the desired menubar entry or toolbar
110 button and select the necessary items to construct
111 the object.</para></note>
112 </listitem>
113 <listitem>
114 <para>
115 Since you often need to construct points, simply
116 clicking somewhere in the screen with the &MMB; will
117 construct a point for you, without going to a menu or
118 button.
119 </para>
120 </listitem>
121 <listitem>
122 <para>
123 You can construct points while you are building other
124 objects in the background, optionally selecting them
125 for the object you are building. For more on this,
126 see <xref linkend="constructing-other-objects" />.
127 </para>
128 </listitem>
129 </itemizedlist>
131 <screenshot>
132 <screeninfo>A point has been constructed</screeninfo>
133 <mediaobject>
134 <imageobject>
135 <imagedata fileref="constructed_a_point.png"
136 format="PNG"/>
137 </imageobject>
138 <textobject>
139 <phrase>A point has been constructed</phrase>
140 </textobject>
141 </mediaobject>
142 </screenshot>
143 </section>
145 <section id="constructing-other-objects">
146 <title>Constructing Other Objects</title>
147 <para>
148 Constructing objects other than points is usually done by
149 selecting the appropriate entry in the
150 <guimenu>Objects</guimenu> menu, or by clicking on one of
151 the toolbar buttons.
152 </para>
153 <screenshot>
154 <screeninfo>Constructing a circle</screeninfo>
155 <mediaobject>
156 <imageobject>
157 <imagedata fileref="constructing_a_circle.png"
158 format="PNG"/>
159 </imageobject>
160 <textobject>
161 <phrase>Constructing a circle</phrase>
162 </textobject>
163 </mediaobject>
164 </screenshot>
165 <para>
166 This will start the construction of the chosen object type.
167 All of these types require arguments. For example, if you
168 selected to construct a circle by center and point, you will need to give
169 two points: one for the center, and one for the point on
170 the circle.
171 </para>
172 <para>
173 These arguments are objects too, which can also be selected, simply by clicking on them.
174 When you move the cursor over an argument you want to use to construct an object,
175 a preliminary image will be shown of
176 the object, so you 'll know what it will look like. For objects that require
177 points as arguments, you can place a new point at the
178 current cursor position and select it by clicking the
179 &LMB;.
180 </para>
181 <para>
182 You can always cancel the construction of the new object by
183 pressing the &Esc; button or by clicking
184 on the <guiicon>Stop</guiicon> button (red octagon with an
185 <quote>X</quote>) on the toolbar.
186 </para>
187 <screenshot>
188 <screeninfo>Constructing a circle.</screeninfo>
189 <mediaobject>
190 <imageobject>
191 <imagedata fileref="constructing_a_circle_2.png"
192 format="PNG"/>
193 </imageobject>
194 <textobject>
195 <phrase>Constructing a circle</phrase>
196 </textobject>
197 </mediaobject>
198 </screenshot>
199 </section>
200 </section>
202 <section id="selecting-objects">
203 <title>Selecting Objects</title>
204 <para>
205 Selecting objects can be done in two ways:
206 </para>
207 <itemizedlist>
208 <listitem>
209 <para>
210 Simply clicking on an object causes that object to be
211 selected, clearing the current selection. If you
212 want to select multiple objects simultaneously, hold down the &Ctrl; key while
213 clicking on an object.
214 </para>
215 </listitem>
216 <listitem>
217 <para>
218 By clicking and dragging on an empty spot on the screen,
219 you can select all objects within the rectangle that is
220 created. This action will clear the current selection. As
221 in the previous case, holding down the &Ctrl; key allows you
222 to keep the current selection.
223 </para>
224 </listitem>
225 </itemizedlist>
227 <screenshot>
228 <screeninfo>Selecting objects</screeninfo>
229 <mediaobject>
230 <imageobject>
231 <imagedata fileref="selecting_objects.png" format="PNG"/>
232 </imageobject>
233 <textobject>
234 <phrase>Selecting objects</phrase>
235 </textobject>
236 </mediaobject>
237 </screenshot>
238 </section>
240 <section id="moving-objects">
241 <title>Moving Objects</title>
242 <para>
243 To move objects, you must first <link
244 linkend="selecting-objects">select</link> them.
245 </para>
246 <para>
247 When the objects you want to move are selected, you can start
248 moving them by &LMB; clicking and
249 dragging any one of them. When you are done, simply release
250 the &LMB;.
251 </para>
252 <note><para>For some types of objects (especially when defined by complicated
253 locuses), moving them can be slow on old hardware. This
254 is unfortunate, but inevitable, given the calculations involved.
255 </para></note> <note><para>If you
256 &RMB; click one of the selected
257 objects, and choose
258 <guimenuitem>Move</guimenuitem>,
259 moving the mouse will move the object. When the object is
260 moved to the desired position, another
261 &LMB; click will stop the
262 moving of the object. </para></note>
263 </section>
264 <section id="deleting-objects">
265 <title>Deleting objects</title>
266 <para>
267 Deleting objects is done by first <link
268 linkend="selecting-objects">selecting</link> them, and next
269 doing either of these:
270 <itemizedlist>
271 <listitem>
272 <para>
273 Press the <keycap>Delete</keycap> key.
274 </para>
275 </listitem>
276 <listitem>
277 <para>
278 Press the <guiicon>delete</guiicon> button on the toolbar.
279 </para>
280 </listitem>
281 <listitem>
282 <para>
283 <mousebutton>Right</mousebutton>-click on one of the
284 objects, and select
285 <guimenuitem>Delete</guimenuitem>
286 in the <link linkend="objects-context-menus">context
287 menu</link> that appears.
289 </para>
290 </listitem>
291 </itemizedlist>
292 </para>
293 </section>
294 <section id="showing-hiding-objects">
295 <title>Showing and hiding objects</title>
296 <para>
297 In &kig;, objects can be hidden. This is done by selecting
298 the objects, &RMB; clicking one of
299 them, and selecting
300 <guimenuitem>Hide</guimenuitem> in
301 the <link linkend="objects-context-menus">context menu</link>
302 that appears.
303 </para>
304 <para>
305 To unhide the objects, use the
306 <menuchoice><guimenu>Edit</guimenu><guimenuitem>Unhide
307 all</guimenuitem></menuchoice>. This will unhide all
308 currently hidden objects.
309 </para>
310 </section>
311 <section id="undo-redo">
312 <title>Undo/Redo</title>
313 <para>
314 In &kig;, you can undo almost any change you make in the
315 document. Just use the
316 <guiicon>undo</guiicon>/<guiicon>redo</guiicon> buttons on the
317 toolbar, or the appropriate shortcuts.
318 </para>
319 </section>
320 <section id="full-screen-mode">
321 <title>Full Screen Mode</title>
322 <para>
323 &kig; also has a Full Screen mode. To use it, click the
324 appropriate button on the toolbar, or select
325 <menuchoice><guimenu>Settings</guimenu><guimenuitem>Full
326 Screen Mode</guimenuitem></menuchoice>.
327 </para>
328 <para>
329 To leave Full Screen mode,
330 &RMB; click the screen at a place
331 where there is no object present, and select
332 <guimenuitem>Toggle Full Screen Mode</guimenuitem>, or press the
333 &Esc; key.
334 </para>
335 </section>
336 </chapter>
338 <chapter id="kig-object-types">
339 <title>&kig; Object Types</title>
340 <para>
341 &kig; supports a rather large number of object types. Please
342 note that not all of the available object types are shown in the
343 toolbars: there are some objects that you can only
344 construct via the <guimenu>Objects</guimenu> menu in the menu
345 bar. Of course, as
346 with all &kde; applications, the contents of the toolbars are
347 configurable. Try out the
348 <menuchoice><guimenu>Settings</guimenu><guimenuitem>Configure
349 Toolbars...</guimenuitem></menuchoice> option if you want to do
350 this.
351 </para>
352 </chapter>
354 <chapter id="using-advanced">
355 <title>Advanced Usage</title>
356 <section id="objects-context-menus">
357 <title>Context Menus</title>
358 <para>
359 &kig; has context menus for its objects. Try
360 &RMB; clicking on an object in order to see
361 a context menu appear. There are many options: for
362 constructing other objects, setting colours, and even hiding,
363 moving or deleting objects. Some objects have options of
364 their own (&eg; you can redefine certain points to be
365 constrained to a line if they previously weren't, &etc;).
366 These options should be very straightforward to understand.
367 </para>
368 </section>
369 <section id="document-context-menus">
370 <title>Document context menus</title>
371 <para>
372 <mousebutton>Right</mousebutton>-clicking on the document (&ie; not on an object) will
373 present a popup that you can use to start constructing a new
374 object, change the coordinate system used, show hidden
375 objects, and even zoom in and zoom out of the document.
376 </para>
377 </section>
378 <section id="defining-macros">
379 <title>Defining Macros</title>
380 <para>
381 One of the more advanced features in &kig; is its support for
382 macros. This allows you to define new types of objects from
383 other ones which are defined already.
384 </para>
385 <para>
386 For example: Suppose you want to make a macro for constructing
387 a circle from three points on it. You would input three points,
388 then construct some perpendiculars and midpoints
389 until you find the center. Now you can use the existing
390 <quote>Construct a circle by center and point</quote> command
391 (using one of the three points as the point for this command). The
392 following image should make this a bit more clear:
393 </para>
394 <screenshot>
395 <screeninfo>Test running macros</screeninfo>
396 <mediaobject>
397 <imageobject>
398 <imagedata fileref="test_run_macro.png" format="PNG"/>
399 </imageobject>
400 <textobject>
401 <phrase>Test running macros</phrase>
402 </textobject>
403 </mediaobject>
404 </screenshot>
406 <para>
407 Next comes defining the macro. Select <guimenuitem>New
408 macro</guimenuitem> from the <guimenu>Type</guimenu> menu, or
409 click on the button on the toolbar. A wizard will appear and
410 ask you to select the given objects. In our example, these
411 are the three points. Select the three points (click on them
412 to select, click again to unselect) and click the
413 <guibutton>Next</guibutton> button to continue. Finally,
414 select the last objects (only the circle in our example).
415 </para>
417 <screenshot>
418 <screeninfo>The macro wizard</screeninfo>
419 <mediaobject>
420 <imageobject>
421 <imagedata fileref="macro_wizard.png" format="PNG"/>
422 </imageobject>
423 <textobject>
424 <phrase>The macro wizard</phrase>
425 </textobject>
426 </mediaobject>
427 </screenshot>
429 <para> After the previous steps are completed, click the
430 <guibutton>Next</guibutton> button to continue. Enter a name
431 and optionally a description for your new type, and click the
432 <guibutton>Finish</guibutton> button. Your macro type is now
433 finished.
434 </para>
436 <para>
437 To use the new macro type, click its button on the toolbar or
438 use the <guimenu>Objects</guimenu> menu. Constructing a macro
439 object is just like constructing any other object.
440 </para>
441 <screenshot>
442 <screeninfo>Using your new type</screeninfo>
443 <mediaobject>
444 <imageobject>
445 <imagedata fileref="macros_at_work.png" format="PNG"/>
446 </imageobject>
447 <textobject>
448 <phrase>Using your new type</phrase>
449 </textobject>
450 </mediaobject>
451 </screenshot>
452 </section>
453 <section id="working-with-types">
454 <title>Working with types</title>
455 <para>
456 As you saw in the previous chapter, &kig; allows you to create
457 your own objects. &kig; also makes sure that once you have
458 created an object, it is saved on exit and loaded on startup.
459 You do not have to manually save or load macro definitions.
460 However, &kig; does allow you to do more with the macros. If
461 you select <menuchoice><guimenu>Types</guimenu><guimenuitem>Manage
462 Types...</guimenuitem></menuchoice> from the menu, you will see
463 a dialog where you can edit your types. It allows you to modify
464 the existant types, delete types that are no longer used, export
465 them to a file, or even load them from another file.
466 </para>
467 <screenshot>
468 <screeninfo>Edit Types Dialog</screeninfo>
469 <mediaobject>
470 <imageobject>
471 <imagedata fileref="edit_types_dialog.png" format="PNG"/>
472 </imageobject>
473 <textobject>
474 <phrase>The Edit Types Dialog</phrase>
475 </textobject>
476 </mediaobject>
477 </screenshot>
478 </section>
479 <section id="text-labels">
480 <title>Text labels</title>
481 <para>
482 &kig; allows you to add text labels to a construction. This
483 is very useful for adding names, explanations or other text
484 to constructions. &kig; can also display variable information
485 about objects (also known as <quote>properties</quote>).
486 </para>
487 <para>
488 To start constructing a text label, simply press the
489 <guibutton>Text Label</guibutton> button in the &kig; toolbar or
490 select <menuchoice><guimenu>Objects</guimenu><guisubmenu>Other
491 </guisubmenu><guimenuitem>Text label</guimenuitem>
492 </menuchoice> in the menubar.
493 </para>
494 <para>
495 Next, you have to choose a location for the text label. You
496 can either just select a random location on the screen, or
497 choose to <quote>attach</quote> the label to an object.
498 </para>
499 <screenshot>
500 <screeninfo>Attaching a label to a circle...</screeninfo>
501 <mediaobject>
502 <imageobject>
503 <imagedata fileref="text_label_attaching.png" format="PNG"/>
504 </imageobject>
505 <textobject>
506 <phrase>Attaching a label to a circle...</phrase>
507 </textobject>
508 </mediaobject>
509 </screenshot>
510 <para>
511 After you have selected where to put the label, the text label dialog appears. Here, you can type in
512 the text that you want in the new label, and click
513 <guibutton>Finish</guibutton>. You should now see the label in your document.
514 </para>
515 <screenshot>
516 <screeninfo>The Text Label Dialog</screeninfo>
517 <mediaobject>
518 <imageobject>
519 <imagedata fileref="text_label_wizard.png" format="PNG"/>
520 </imageobject>
521 <textobject>
522 <phrase>The Text Label Dialog</phrase>
523 </textobject>
524 </mediaobject>
525 </screenshot>
526 <para>
527 The previous example was a simple one, and limited to just
528 text. However, there is also support for showing variable
529 information about objects in a label (&eg; you can construct a
530 label with the text <quote>This segment is %1 units
531 long.</quote> where <token>%1</token> would be dynamically
532 replaced with the length of a specific segment).
533 </para>
534 <para>
535 To do this, enter a text with a number of placeholders (
536 <token>%1</token>, <token>%2</token> &etc;) in it.
537 Then, press the <guibutton>Next</guibutton> button to
538 continue. If you want to change the text or variables later,
539 you can go back using the <guibutton>Back</guibutton> button.
540 </para>
541 <para>
542 The wizard now shows the text you entered with all
543 placeholders replaced by something like <guilabel>argument
544 1</guilabel>. Selecting the property connected to a certain argument is
545 done by first clicking on the argument in question. Then click
546 on the object that you need and that has this property, and
547 then select the property itself in the popup
548 menu that appears. For instance, in the example above, you
549 would click <guilabel>argument 1</guilabel>, click on the
550 correct segment in the main &kig; window, and select the
551 property <guilabel>Length</guilabel>. Afterwards, you can
552 fill in the rest of the variable parts, or select another
553 property for one of the variable parts if you wish to change
554 it. When you are ready, click the
555 <guibutton>Finish</guibutton> button to complete the
556 construction of the text label.
557 </para>
558 <screenshot>
559 <screeninfo>Selecting a property for a variable
560 part</screeninfo>
561 <mediaobject>
562 <imageobject>
563 <imagedata
564 fileref="text_label_wizard__select_property.png"
565 format="PNG"/>
566 </imageobject>
567 <textobject>
568 <phrase>Selecting a property for a variable part</phrase>
569 </textobject>
570 </mediaobject>
571 </screenshot>
572 </section>
573 <section id="locuses">
574 <title>Locuses</title>
575 <para>
576 &kig; supports the use of locuses. A locus is mathematically defined as
577 the set of all points or lines that satisfy or are
578 determined by specific conditions; as in <quote>the locus of points
579 equidistant from a given point is a circle</quote>.
580 Let's look at an example of how to use locuses in &kig;:
581 </para>
582 <para>
583 Consider the following geometrical construction: We draw a
584 circle, and a point that can move only along its circumference (construct
585 this point by positioning the cursor on a circle, and clicking
586 the &MMB;. If you then try to move the resulting point,
587 you'll see that you cannot move it off the circle). Then, we
588 draw a segment from that point to the center of the circle,
589 and the midpoint of that segment.
590 </para>
591 <screenshot>
592 <screeninfo>A simple construction using a locus</screeninfo>
593 <mediaobject>
594 <imageobject>
595 <imagedata
596 fileref="simple_locus_construction.png"
597 format="PNG"/>
598 </imageobject>
599 <textobject>
600 <phrase>A simple construction using a locus</phrase>
601 </textobject>
602 </mediaobject>
603 </screenshot>
604 <para>
605 Now if you move the point that is constrained to the circle,
606 you'll see that the second point moves along with it. If you
607 were to hold a pen at the second point, and move the
608 first point around the entire circle, a new circle, half the
609 size of the other would be drawn. The path that the second point
610 travels while the first one moves around the circle is its locus.
611 </para>
612 <para>
613 Actually constructing the locus of a point is very easy. Click
614 the <guiicon>locus</guiicon> button in the toolbar, or select
615 <menuchoice><guimenu>Objects</guimenu>
616 <guisubmenu>Other</guisubmenu>
617 <guimenuitem>Locus</guimenuitem>
618 </menuchoice>
619 from the menubar. Then select the constrained point as the
620 moving point (the text <guilabel>Moving Point</guilabel> will
621 appear as you move the mouse over it), and the other as the
622 dependent point. The locus of the dependent point will then be drawn.
623 </para>
624 </section>
625 </chapter>
627 <chapter id="scripting">
628 <title>Scripting</title>
629 <para>
630 &kig; allows you to create custom types in the Python
631 scripting language. This is a very advanced feature, and I know
632 of only one other Interactive Geometry program that has a similar
633 functionality (the <acronym>GNOME</acronym> program &drgeo;).
634 </para>
635 <para>
636 Python Scripting in &kig; basically allows you to create your
637 own objects from certain parent objects. For
638 example, if you are a math teacher, and you have some fancy way
639 of calculating an interesting point on a conic, then instead of
640 messing with complex constructions and macros, you could just
641 write down in Python code how the point is to be calculated and
642 then &kig; will show it for you.
643 </para>
644 <para>
645 Suppose you were not aware of the &kig; builtin type
646 <quote>Mid Point</quote>,
647 and you wanted to show the midpoint of two given points. You
648 would then click on the <guibutton>Python Script</guibutton>
649 button in the toolbar, or select <menuchoice>
650 <guimenu>Objects</guimenu> <guisubmenu>Other</guisubmenu>
651 <guimenuitem>Python Script</guimenuitem> </menuchoice> from the
652 menubar. You are then presented with a wizard that allows you
653 to proceed.
654 </para>
655 <screenshot>
656 <screeninfo>The Script Object Wizard</screeninfo>
657 <mediaobject>
658 <imageobject>
659 <imagedata fileref="script_wizard.png" format="PNG"/>
660 </imageobject>
661 <textobject>
662 <phrase>The Script Object Wizard</phrase>
663 </textobject>
664 </mediaobject>
665 </screenshot>
666 <para>
667 The first thing you have to do is select the arguments for the
668 script object. In our example, this means the two points of
669 which we want to show the midpoint. Select them in the &kig;
670 main window, and click <guibutton>Next</guibutton> to proceed.
671 </para>
672 <para>
673 Now you are presented with a text edit box where you can enter
674 the code for you script object. Template code and some comments
675 are already in place. It is important to make sure that your
676 code is valid Python code. People familiar with Python will
677 notice that we are actually defining a Python function called
678 <function>calc</function>. It is therefore necessary to adhere
679 to the Python rules for defining functions. For example, every
680 line of the function should start with a <keysym>Tab</keysym>.
681 The first line not starting with a <keysym>tab</keysym> ends the
682 definition of the function.
683 </para>
684 <para>
685 The Python function that we want to define is called
686 <function>calc</function>, and in our case it accepts two arguments.
687 These are the objects you have selected as arguments in the
688 previous screen. You need as many arguments as you have
689 selected there. They are called <parameter>arg1</parameter> and
690 <parameter>arg2</parameter>, but you can change their names to
691 something more meaningful if you want.
692 </para>
693 <para>
694 In the function, you can do all sorts of calculations that you
695 deem necessary, using the two arguments if needed. You should
696 return the object you want to define. In our case, this is a
697 <classname>Point</classname> object. The two arguments are also
698 <classname>Point</classname> objects, and we
699 can use the <function>Point.coordinate()</function> function to
700 define the coordinates of the two given points.
701 </para>
702 <para>
703 The calculation necessary in our example is very simple, we
704 simply add the two sets of coordinates, and divide the new set
705 by two. We then construct a new point using the result.
706 The Python code needed is:</para>
708 <programlisting>
709 def calc( a, b ):
710 m = ( a.coordinate() + b.coordinate() ) / 2;
711 return Point( m )
712 </programlisting>
714 <screenshot>
715 <screeninfo>Entering the code</screeninfo>
716 <mediaobject>
717 <imageobject>
718 <imagedata fileref="script_wizard_entering_code.png" format="PNG"/>
719 </imageobject>
720 <textobject>
721 <phrase>Entering the code for the midpoint in the Script Object wizard.</phrase>
722 </textobject>
723 </mediaobject>
724 </screenshot>
725 <para>
726 If you now click the <guibutton>Finish</guibutton> button,
727 the new object will appear in the &kig; document. If you move
728 one of the points, the newly created point will move along
729 with it. Much more powerful objects can be built in this way:
730 you are encouraged to try it out.
731 </para>
732 <screenshot>
733 <screeninfo>Constructed a Script Object</screeninfo>
734 <mediaobject>
735 <imageobject>
736 <imagedata fileref="constructed_script_object.png" format="PNG" />
737 </imageobject>
738 <textobject>
739 <phrase>
740 The newly constructed Script Object.
741 </phrase>
742 </textobject>
743 </mediaobject>
744 </screenshot>
745 <para>
746 All objects in &kig; can be used in the Python code. As we have
747 seen above, points are of the <classname>Point</classname> class, and you can use &eg;
748 the <function>Point.coordinate()</function> method. You can
749 also return all kinds of objects, not just a <classname>Point</classname>.
750 Many more classes and methods are available in the &kig; Python code,
751 and a more complete reference is provided <ulink
752 url="http://edu.kde.org/kig/manual/scripting-api/index.html">on
753 the &kig; website</ulink>.
754 </para>
755 </chapter>
757 <chapter id="kig-features">
758 <title>&kig; Features</title>
760 <itemizedlist>
761 <listitem>
762 <para>
763 &kig; is an open source application. This means that you
764 are free to use and modify it any way you like it.
765 Distributing &kig; is subject to some restrictions,
766 basically that everyone should have the same rights to use
767 &kig;, including your modifications, as you and me.
768 </para>
769 <para>
770 Free software programs are developed in a very open
771 spirit, and its developers are usually very responsive to
772 user feedback. Therefore, if you have any questions,
773 complaints, or whatever about &kig;, please let the author
774 know at <email>devriese@kde.org</email>.
775 </para>
776 </listitem>
777 <listitem>
778 <para>
779 &kig; is a KPart application, which means that you can
780 embed it into other &kde; software. If you open a <literal
781 role="extension">.kig</literal> file in &konqueror;, it
782 can be opened directly in the &konqueror; screen without
783 the need to start an external application.
784 </para>
785 </listitem>
786 <listitem>
787 <para>
788 Working with &kig; should be very straightforward.
789 Constructing objects is easy and interactive, with
790 preliminary results being shown, &etc;. Moving, selecting
791 and building all work as one would expect them to. Undo
792 support should also be very intuitive.
793 </para>
794 </listitem>
795 <listitem>
796 <para>
797 &kig; supports macros to be defined in a straightforward
798 manner. These objects are presented to the user like
799 normal objects. They are saved on exit and loaded on
800 startup, so that they aren't lost on exit. You can
801 manage these objects in the <guilabel>Manage Types</guilabel>
802 dialog (see <xref linkend="working-with-types" />). You can export them
803 to files, import them from files, edit and delete them.
804 </para>
805 </listitem>
806 <listitem>
807 <para>
808 &kig; saves its data in a clear &XML; format.
809 </para>
810 </listitem>
811 <listitem>
812 <para>
813 &kig; supports the construction of locuses.
814 </para>
815 </listitem>
816 <listitem>
817 <para>
818 &kig; allows you to export a &kig; file to some interesting
819 formats, like images, <application>XFig</application> and
820 <application>LaTeX</application> files, and <acronym>SVG</acronym>
821 vectorial images. This is rather useful, because not all programs
822 support the &kig; file format yet.
823 </para>
824 </listitem>
825 <listitem>
826 <para>
827 &kig; has a very flexible transformation system.
828 </para>
829 </listitem>
830 <listitem>
831 <para>
832 &kig; aims to be compatible with its competitors. This is
833 why it supports the &kgeo; file format, the &kseg; file
834 format and partially the &drgeo; and &cabri; formats; morover, support
835 for other formats is planned.
836 </para>
837 </listitem>
838 </itemizedlist>
839 </chapter>
842 <chapter id="faq">
843 <title>Questions and Answers</title>
845 &reporting.bugs; &updating.documentation; <para></para>
846 </chapter>
848 <chapter id="credits">
849 <title>Credits and License</title>
851 <para>
852 &kig;
853 </para>
854 <para>
855 &kig; copyright 2002-2004 Dominique Devriese
856 <email>devriese@kde.org</email>
857 </para>
859 <para>
860 Documentation copyright 2002-2004 Dominique
861 Devriese. <email>devriese@kde.org</email>
862 </para>
864 <para>
865 Reviewed by &Philip.Rodrigues; &Philip.Rodrigues.mail;.</para>
866 <!-- TRANS:CREDIT_FOR_TRANSLATORS --> &underFDL; &underGPL;
867 </chapter>
869 <appendix id="installation">
870 <title>Installation</title>
872 <sect1 id="getting-kig">
873 <title>How to obtain &kig;</title>
875 &install.intro.documentation;
877 </sect1>
879 <sect1 id="compilation">
880 <title>Compilation and Installation</title>
881 &install.compile.documentation;
882 </sect1>
884 </appendix>
886 <appendix id="contributing">
887 <title>Contribute</title>
888 <section id="kig-is-free">
889 <title>Free Software</title>
890 <para>
891 &kig; is <ulink
892 url="http://www.gnu.org/philosophy/philosophy.html#AboutFreeSoftware">
893 Free Software</ulink>. This means that its source code is
894 freely available on the Internet, and everyone can use it,
895 read it, modify it, and distribute it. I work on it as a
896 hobby project, and I have already learned a lot about
897 programming, C++, &kde;/&Qt;, math, software collaboration and open
898 source projects in the process.
899 </para>
900 </section>
901 <section id="contribute-to-kig">
902 <title>Contribute</title>
903 <para>
904 In this chapter I want to point out to you (the user) the
905 rights that &kig;'s license gives you. As with all free
906 software, you are allowed (and encouraged) to fix problems
907 you encounter while using it, to add features you miss, to
908 distribute your modified program, and to send these
909 modifications to me at <email>devriese@kde.org</email>, so
910 that I can include them in the next version for others to
911 enjoy. Please note I personally have no financial interest in this
912 project whatsoever.
913 </para>
914 <para>
915 If you are uncertain of your rights to use this software, or
916 other people's right to use any modifications you make to this
917 program &etc;, please read the license. You can find it in the
918 <filename>COPYING</filename> file in the &kig; source tree or
919 the <guilabel>license</guilabel> tab in the <guilabel>About Kig</guilabel> dialog.
920 </para>
921 </section>
922 <section id="howto-contribute">
923 <title>How to contribute ?</title>
924 <para>
925 Any contributions are welcome. If you don't like the icons,
926 or think that the manual needs updating, or if you have this really
927 cool macro that you want to share with the world, do not
928 hesitate to send it to me. Please note that your
929 contributions will be distributed under the terms of the &GNU;
930 <acronym>GPL</acronym>; you can find the terms of this license in the
931 <filename>COPYING</filename> file in the &kig; source tree,
932 and in the <link linkend="credits">Credits and
933 Licenses</link> chapter in this manual.
934 </para>
935 </section>
936 </appendix>
938 &documentation.index;
939 </book>
940 <!--
941 Local Variables:
942 mode: xml
943 End: