diff options
author | ribet | 2007-05-14 15:03:56 +0000 |
---|---|---|
committer | ribet | 2007-05-14 15:03:56 +0000 |
commit | fcc47ce35b08fa62999c1aa1230dacec446031e9 (patch) | |
tree | 3eea297e1bbdecee65f0d3d76fcd0d5d6a670ab6 | |
parent | 95ba2d44fffe340619c5fdf5624790ac64442d80 (diff) | |
download | mtc-fcc47ce35b08fa62999c1aa1230dacec446031e9.zip mtc-fcc47ce35b08fa62999c1aa1230dacec446031e9.tar.gz mtc-fcc47ce35b08fa62999c1aa1230dacec446031e9.tar.bz2 mtc-fcc47ce35b08fa62999c1aa1230dacec446031e9.tar.xz |
Documentation de MGroup
-rwxr-xr-x | doc/exemple_groupe.pl | 36 | ||||
-rw-r--r-- | doc/user_manual.txt | 23 | ||||
-rw-r--r-- | src/MTools/GUI/MGroup.pm | 2 |
3 files changed, 59 insertions, 2 deletions
diff --git a/doc/exemple_groupe.pl b/doc/exemple_groupe.pl new file mode 100755 index 0000000..8b70a05 --- /dev/null +++ b/doc/exemple_groupe.pl @@ -0,0 +1,36 @@ +#!/usr/bin/perl +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU GPL General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, +# or refer to http://www.gnu.org/copyleft/gpl.html +# + +BEGIN { + unshift @INC, ".", "../src"; +} + +use Math::Trig; +use MTools; +use MTools::GUI::MRect; +use MTools::GUI::MGroup; + +new MTools (800, 600, "Exemple de groupe"); + +my $group = new MTools::GUI::MGroup (1); +my $contour = new MTools::GUI::MRect ($group, 400, 300, 200, 10); +my $surface = new MTools::GUI::MRect ($group, 400, 400, 200, 20, + -filled => 1, -fillcolor => red); +clone($group); +$group->rotate(pi/4, 400, 300); + +mrun; diff --git a/doc/user_manual.txt b/doc/user_manual.txt index e5a3d29..92dbedd 100644 --- a/doc/user_manual.txt +++ b/doc/user_manual.txt @@ -184,6 +184,27 @@ my $contour = new MTools::GUI::MRect (1, 400, 300, 200, 10); my $surface = new MTools::GUI::MRect (1, 400, 400, 200, 20, -filled => 1, -fillcolor => red); mrun; +_________ +MGroup.pm : cet objet permet de regrouper d'autres objets, qui peuvent aussi +être des groupes. Le groupe est vu et manipulé comme un objet unique. +La création nécessite les arguments suivants : + - parent : père de l'objet. + - %options : table de hash passée en paramètre de la création de l'objet + zinc groupe + +Exemple d'utilisation : +use Math::Trig; +use MTools; +use MTools::GUI::MRect; +use MTools::GUI::MGroup; +new MTools (800, 600, "Exemple de groupe"); +my $group = new MTools::GUI::MGroup (1); +my $contour = new MTools::GUI::MRect ($group, 400, 300, 200, 10); +my $surface = new MTools::GUI::MRect ($group, 400, 400, 200, 20, + -filled => 1, -fillcolor => red); +clone($group); +$group->rotate(pi/4, 400, 300); +mrun; ________ MClip.pm : l'objet permettant de faire du clipping. Le clipping est une technique qui consiste à réaliser une fenêtre de visualisation. En pratique, @@ -301,6 +322,6 @@ MAntiRecouvrementGroup.pm : 2.7 Les inclassables -MGroup, ptkdb, MObjet, MTimer, MState, MSwitch, MIvy, WacomAdapter +ptkdb, MObjet, MTimer, MState, MSwitch, MIvy, WacomAdapter 2.8 L'utilisation de TkZinc diff --git a/src/MTools/GUI/MGroup.pm b/src/MTools/GUI/MGroup.pm index c08aaa8..ca48fe1 100644 --- a/src/MTools/GUI/MGroup.pm +++ b/src/MTools/GUI/MGroup.pm @@ -16,7 +16,7 @@ package MTools::GUI::MGroup; # ################################################################## -# L'objet MTools::GUI::MGroup encapsule la cr?ation d'un objet group zinc en toute rigueur il aurait d? ?tre plac? dans MTools::GUI +# L'objet MTools::GUI::MGroup encapsule la création d'un objet group zinc use strict; |