From 3abc97daefb12ce2141883b2e40c8d50e925efe8 Mon Sep 17 00:00:00 2001 From: ribet Date: Mon, 27 Aug 2007 08:24:58 +0000 Subject: Il ne faut pas supprimer le copyright ni ajouter des fautes... --- src/MTools.pm | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) (limited to 'src/MTools.pm') diff --git a/src/MTools.pm b/src/MTools.pm index e5fe52f..30698d2 100644 --- a/src/MTools.pm +++ b/src/MTools.pm @@ -1,4 +1,20 @@ package MTools; +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU LGPL Libray 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 Library General Public License for more details. +# +# You should have received a copy of the GNU Library 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/lgpl.html +# +################################################################## # MTools exporte des fonctions destinees principalement a : # - activer des fonctions propres a la librairie mtools @@ -7,7 +23,7 @@ package MTools; # Ainsi, d'une maniere generale, toutes fonctions exportees s'appliquent aussi bien a des objets # zinc qu'a des objets mtools. L'unique restriction est dans la methode d'appel : # - obligatoirement : fct ($obj, @parametres) pour un objet zinc -# - indefiremment $obj -> fct (@parametres). +# - indiferemment $obj -> fct (@parametres). # L'avantage de la premiere methode est qu'elle s'applique aussi bien a un objet zinc qu'a un objet MTools. # L'inconvenient est que l'on perd la possibilite de profiter de l'heritage et de la redefinition eventuelle de la fonction. # @@ -39,10 +55,10 @@ package MTools; # toutes les propriete prennent la valeur de property_1. # - executer : executer (callback); permet d'executer une callback du type predefini ci-dessus dans la section # "Les callbacks dans MTools" -# - binding : $obj -> binding ('evenement', callback) permet d'ecouter un evenement MTOOLS ou Tk survenant sur un objet. binding peut aussi etre redefini pour ecouter -# de nouvelle source d'evenement (par exemple MIvy ou WacomAdapter) +# - binding : $obj -> binding ('evenement', callback) permet d'ecouter un evenement MTOOLS ou Tk survenant sur un objet. +# binding peut aussi etre redefini pour ecouter de nouvelles sources d'evenements (par exemple MIvy ou WacomAdapter) # - unbinding : $obj -> unbinding ('evenement', callback) arrete l'ecoute d'un evenement -# - minstanciate : minstanciate ('definition', $parent) permet de retourner un objet MTools ? partir de la spec 'definition' +# - minstanciate : minstanciate ('definition', $parent) permet de retourner un objet MTools à partir de la spec 'definition' # si 'definition' est un path svg, minstanciate instancie le svg et retourne un objet MTools encapsulant le contenu # si 'definition' est un objet zinc, minstanciate retourne un objet MTools encapsulant l'objet zinc # si 'definition' est deja un objet MTools, minstanciate retourne l'objet lui-meme. @@ -108,13 +124,13 @@ sub new { $mw -> title($title); $mw->geometry ($geometry) if (defined $geometry); - $self -> {zinc} = $zinc = $mw -> Zinc ( - -width => $width, - -height => $height, - -borderwidth => 0, - -backcolor => 'white', - -render => 1, - ) -> pack (qw/-expand yes -fill both/); + $self -> {zinc} = $zinc = $mw -> Zinc ( + -width => $width, + -height => $height, + -borderwidth => 0, + -backcolor => 'white', + -render => 1, + ) -> pack (qw/-expand yes -fill both/); } else { @@ -123,7 +139,7 @@ sub new { $self -> {window} = $zinc->toplevel ; } - # Path for AUTOGEN : format the path + # Path for AUTOGEN: format the path if(defined $PathForAutogen){ $PathForAutogen =~ s/^\///g ; $PathForAutogen = "$PathForAutogen/" if not $PathForAutogen =~ /\/$/; -- cgit v1.1