├── _config.yml ├── linotte-resources ├── src │ └── main │ │ ├── exemples │ │ ├── plus_d_exemples_ici │ │ │ ├── d_confirme │ │ │ │ ├── valeurs.liv │ │ │ │ ├── operateur ternaire.liv │ │ │ │ ├── gestion_erreurs.liv │ │ │ │ ├── acteur_local_sous_paragraphe.liv │ │ │ │ ├── decimaux.liv │ │ │ │ ├── doublure.liv │ │ │ │ ├── interrompre.liv │ │ │ │ ├── traitements_parallele.liv │ │ │ │ ├── drapeaux.liv │ │ │ │ ├── acteur_local.liv │ │ │ │ ├── jokers_en_folie.liv │ │ │ │ ├── casierdecasier.liv │ │ │ │ ├── conditions_drapeaux.liv │ │ │ │ ├── boucle_FOR.liv │ │ │ │ ├── doublures_en_entree.liv │ │ │ │ ├── clonage.liv │ │ │ │ ├── fonction_mathematiques.liv │ │ │ │ ├── divisons.liv │ │ │ │ ├── fibonacci_recursif.liv │ │ │ │ ├── lesmois.liv │ │ │ │ ├── methodes_fonctionnelles_texte.liv │ │ │ │ ├── calculatrice.liv │ │ │ │ ├── precision_arithmetique.liv │ │ │ │ ├── fibonacci.liv │ │ │ │ └── simplification_syntaxique.liv │ │ │ ├── j_expert │ │ │ │ ├── ogg.liv │ │ │ │ ├── unicode.liv │ │ │ │ ├── everything.png │ │ │ │ ├── bibliotheque2.liv │ │ │ │ ├── SleepSort.liv │ │ │ │ ├── en_test │ │ │ │ │ ├── ParagrapheDynamique.liv │ │ │ │ │ ├── sousparagraphe.liv │ │ │ │ │ ├── supprimer_acteur.liv │ │ │ │ │ ├── tiret_bas.liv │ │ │ │ │ └── 08_condition_3.liv │ │ │ │ ├── greffons │ │ │ │ │ ├── horodatage.liv │ │ │ │ │ ├── pipette.liv │ │ │ │ │ ├── tube_fichier_lecture.liv │ │ │ │ │ ├── qrcode.liv │ │ │ │ │ ├── majordome.liv │ │ │ │ │ ├── tube_fichier_ecriture.liv │ │ │ │ │ ├── tube_pile.liv │ │ │ │ │ ├── tube_repertoire.liv │ │ │ │ │ ├── FLux rss.liv │ │ │ │ │ ├── impression_toile.liv │ │ │ │ │ ├── liNotPad.liv │ │ │ │ │ ├── presse-papier.liv │ │ │ │ │ ├── adaptateur_dll.liv │ │ │ │ │ └── gpio.liv │ │ │ │ ├── Robot.liv │ │ │ │ ├── reseau │ │ │ │ │ ├── pont_client.liv │ │ │ │ │ ├── TCPCommun.liv │ │ │ │ │ └── pont_serveur.liv │ │ │ │ ├── bibliotheque.liv │ │ │ │ ├── Rss.liv │ │ │ │ ├── syracuse_recursif.liv │ │ │ │ ├── poeme2.liv │ │ │ │ ├── 99bottles.liv │ │ │ │ ├── chronometre.liv │ │ │ │ ├── acteurs_prototype.liv │ │ │ │ ├── vagues.liv │ │ │ │ ├── decomposition_facteurs_premiers.liv │ │ │ │ ├── fichiers │ │ │ │ │ ├── conduit_simple1.liv │ │ │ │ │ ├── conduit_ihm.liv │ │ │ │ │ ├── conduit_simple2.liv │ │ │ │ │ └── conduit_structure.liv │ │ │ │ ├── Ximage.liv │ │ │ │ ├── pluie_invisible.liv │ │ │ │ └── Clavier.liv │ │ │ ├── a_debutant │ │ │ │ ├── teatime.liv │ │ │ │ ├── pythagore.liv │ │ │ │ ├── capitale2.liv │ │ │ │ ├── capitale.liv │ │ │ │ ├── linotte.liv │ │ │ │ ├── trouvernombre.liv │ │ │ │ ├── poeme.liv │ │ │ │ ├── bienvenue.liv │ │ │ │ └── memoiredeschiffres.liv │ │ │ ├── f_jeux │ │ │ │ ├── bustout.jpg │ │ │ │ ├── pieces.png │ │ │ │ ├── pac-man │ │ │ │ │ ├── logo.png │ │ │ │ │ ├── mur_h.png │ │ │ │ │ ├── mur_v.png │ │ │ │ │ ├── pac1.png │ │ │ │ │ ├── pac2.png │ │ │ │ │ ├── pack.png │ │ │ │ │ ├── vide.png │ │ │ │ │ ├── diamant.png │ │ │ │ │ ├── mur_db.png │ │ │ │ │ ├── mur_dh.png │ │ │ │ │ ├── mur_gb.png │ │ │ │ │ ├── mur_gh.png │ │ │ │ │ ├── fantome1.png │ │ │ │ │ ├── fantome2.png │ │ │ │ │ ├── fantome3.png │ │ │ │ │ ├── fantome4.png │ │ │ │ │ ├── fantome5.png │ │ │ │ │ ├── fantome6.png │ │ │ │ │ └── fantome7.png │ │ │ │ ├── astronotte │ │ │ │ │ ├── obut.png │ │ │ │ │ ├── brick.gif │ │ │ │ │ ├── bullet.gif │ │ │ │ │ ├── etoile.gif │ │ │ │ │ ├── ligne.gif │ │ │ │ │ ├── monstre.png │ │ │ │ │ ├── planet.gif │ │ │ │ │ ├── power.png │ │ │ │ │ ├── space.png │ │ │ │ │ ├── space1.png │ │ │ │ │ ├── space2.png │ │ │ │ │ ├── asteroid.gif │ │ │ │ │ ├── bomberman.gif │ │ │ │ │ ├── chasseur.png │ │ │ │ │ ├── explosion.gif │ │ │ │ │ └── patternbig.png │ │ │ │ └── dictionnaire.txt │ │ │ ├── b_multimedia │ │ │ │ ├── sons │ │ │ │ │ └── bouchon.wav │ │ │ │ ├── images │ │ │ │ │ ├── dn_house2.png │ │ │ │ │ ├── tux_graduate.png │ │ │ │ │ ├── praxinoscope-0.png │ │ │ │ │ ├── praxinoscope-1.png │ │ │ │ │ ├── praxinoscope-10.png │ │ │ │ │ ├── praxinoscope-11.png │ │ │ │ │ ├── praxinoscope-2.png │ │ │ │ │ ├── praxinoscope-3.png │ │ │ │ │ ├── praxinoscope-4.png │ │ │ │ │ ├── praxinoscope-5.png │ │ │ │ │ ├── praxinoscope-6.png │ │ │ │ │ ├── praxinoscope-7.png │ │ │ │ │ ├── praxinoscope-8.png │ │ │ │ │ ├── praxinoscope-9.png │ │ │ │ │ └── copyright.txt │ │ │ │ ├── couleurs.liv │ │ │ │ ├── magie.liv │ │ │ │ ├── rotation.liv │ │ │ │ ├── collision.liv │ │ │ │ ├── horloge.liv │ │ │ │ ├── curseur.liv │ │ │ │ ├── pluie.liv │ │ │ │ ├── cercle.liv │ │ │ │ ├── polygone.liv │ │ │ │ ├── tableau_couleurs.liv │ │ │ │ ├── paint.liv │ │ │ │ ├── collision_drag_and_drop.liv │ │ │ │ ├── tux_marche.liv │ │ │ │ ├── collision_drag_and_drop_avec_annulation.liv │ │ │ │ ├── praxinoscope.liv │ │ │ │ ├── scribes.liv │ │ │ │ └── fleurs_des_champs_et_heritage2.liv │ │ │ ├── h_pedagogiques │ │ │ │ ├── fonctions.liv │ │ │ │ ├── factorielle.liv │ │ │ │ ├── hasard.liv │ │ │ │ ├── horloge_simple.liv │ │ │ │ ├── equation_premier_degree.liv │ │ │ │ ├── moyenne.liv │ │ │ │ ├── syracuse.liv │ │ │ │ ├── fleur.liv │ │ │ │ ├── robot.liv │ │ │ │ └── horloge_complexe.liv │ │ │ ├── e_interfaces_utilisateur │ │ │ │ ├── medias │ │ │ │ │ ├── blanc.png │ │ │ │ │ ├── logo.png │ │ │ │ │ ├── post.png │ │ │ │ │ ├── rouge.png │ │ │ │ │ ├── onglet.png │ │ │ │ │ ├── villette1.jpg │ │ │ │ │ ├── villette2.jpg │ │ │ │ │ ├── villette3.jpg │ │ │ │ │ ├── earthTexture.jpg │ │ │ │ │ ├── image-x-generic.png │ │ │ │ │ ├── internet-group-chat.png │ │ │ │ │ ├── internet-news-reader.png │ │ │ │ │ └── wikipedia_220px-Organic_mountain_grown_tea_leaf.jpg │ │ │ │ ├── scrolleur.liv │ │ │ │ ├── slider.liv │ │ │ │ ├── selecteur.liv │ │ │ │ ├── indicateur.liv │ │ │ │ ├── menu.liv │ │ │ │ ├── tournicoti.liv │ │ │ │ ├── xtoile.liv │ │ │ │ ├── liste.liv │ │ │ │ ├── test_qi.liv │ │ │ │ ├── barre.liv │ │ │ │ └── decorateur.liv │ │ │ ├── c_logo │ │ │ │ ├── formes.liv │ │ │ │ ├── maison.liv │ │ │ │ ├── fougere.liv │ │ │ │ └── flocon_van_koch_parallele.liv │ │ │ └── k_contributions │ │ │ │ ├── invader.liv │ │ │ │ ├── invader2.liv │ │ │ │ └── taptempo.liv │ │ ├── media │ │ │ ├── bullet.gif │ │ │ ├── space.png │ │ │ ├── bomberman.gif │ │ │ ├── dn_house2.png │ │ │ ├── tux_graduate.png │ │ │ └── copyright.txt │ │ ├── 07_condition_2.liv │ │ ├── 04_boucle_1.liv │ │ ├── 11_capitale_france.liv │ │ ├── 10_les_fonctions_recursives.liv │ │ ├── 03_demander.liv │ │ ├── 02_les_variables.liv │ │ ├── 06_condition_1.liv │ │ ├── 01_bonjour.liv │ │ ├── 15_rotation.liv │ │ ├── 12_trouver_un_nombre.liv │ │ ├── 08_condition_3.liv │ │ ├── 05_boucle_2.liv │ │ ├── 09_mathematiques.liv │ │ ├── 10_les_fonctions.liv │ │ ├── 13_memoiredeschiffres.liv │ │ ├── 19_pour_enfants_robonotte.liv │ │ ├── 16_asteroid.liv │ │ └── 18_test_QI.liv │ │ ├── resources │ │ ├── mime.txt │ │ ├── linotte.ico │ │ ├── linotte.png │ │ ├── linotte_hd.icns │ │ ├── linotte_hd.png │ │ ├── linotte_new.ico │ │ ├── linotte_new.png │ │ ├── linotte_run.png │ │ ├── linotte-tray.png │ │ ├── linotte_toile.png │ │ ├── splashlinotte.png │ │ ├── splashlinotte_dracula.png │ │ └── themes │ │ │ └── Extra-Elementary.zip │ │ ├── assets │ │ ├── Linotte2.png │ │ ├── Tablette.exe │ │ ├── splashlinotte.pdn │ │ ├── LinotteFarvardin.gif │ │ ├── linotte_installateur.ico │ │ ├── splashlinotte_play_store.pdn │ │ └── splashlinotte_play_store.png │ │ └── filters │ │ └── version.properties └── pom.xml ├── linotte-lanceur └── src │ ├── main │ └── basic │ │ └── Tablette.bat │ └── test │ ├── java │ └── org │ │ └── linotte │ │ ├── greffon │ │ ├── Boulier.java │ │ └── Majordome.java │ │ └── alize │ │ └── TestsErreurs.java │ └── resources │ └── livres │ └── tests_avec_erreurs.properties ├── linotte-dist └── src │ ├── snap │ └── gui │ │ ├── linotte.png │ │ └── linotte.desktop │ └── chocolatey │ ├── TODO │ └── linotte │ └── tools │ └── chocolateyInstall.ps1 ├── linotte-moteur └── src │ └── main │ └── java │ └── org │ └── linotte │ ├── moteur │ ├── xml │ │ ├── alize │ │ │ ├── test │ │ │ │ ├── TestIn.java │ │ │ │ ├── TestOut.java │ │ │ │ ├── Test.java │ │ │ │ └── Tests.java │ │ │ ├── kernel │ │ │ │ ├── i │ │ │ │ │ ├── ActionTest.java │ │ │ │ │ ├── ActionDispatcher.java │ │ │ │ │ ├── IProduitCartesien.java │ │ │ │ │ ├── ParserHandler.java │ │ │ │ │ └── ActionDynamic.java │ │ │ │ ├── ContextHelper.java │ │ │ │ └── processus │ │ │ │ │ └── ProcessusSimple.java │ │ │ └── parseur │ │ │ │ └── a │ │ │ │ └── Lexer.java │ │ ├── analyse │ │ │ ├── package-info.java │ │ │ ├── multilangage │ │ │ │ ├── TypeSyntaxe.java │ │ │ │ └── MathematiqueOperation.java │ │ │ └── CloneException.java │ │ ├── appels │ │ │ ├── Appel.java │ │ │ ├── Condition.java │ │ │ ├── Ring.java │ │ │ └── TantQue.java │ │ ├── operation │ │ │ ├── i │ │ │ │ └── OperationSimple.java │ │ │ └── simple │ │ │ │ └── Soustration.java │ │ ├── Version.java │ │ └── actions │ │ │ ├── TestUnitaireAction.java │ │ │ └── ImportationAction.java │ ├── outils │ │ ├── CouleurImage.java │ │ ├── ArrayIterator.java │ │ └── RuntimeConsole.java │ └── entites │ │ ├── ecouteurs │ │ └── GreffonValeurListenerImpl.java │ │ └── Monolithe.java │ ├── frame │ ├── cahier │ │ └── timbre │ │ │ ├── ui │ │ │ ├── i │ │ │ │ ├── PlancheUI.java │ │ │ │ ├── ActeurUI.java │ │ │ │ ├── BoutonUI.java │ │ │ │ ├── DebutUI.java │ │ │ │ ├── TextuelUI.java │ │ │ │ ├── CommentaireUI.java │ │ │ │ ├── BlocFinUI.java │ │ │ │ ├── FonctionUI.java │ │ │ │ ├── TantQueUI.java │ │ │ │ ├── ConditionUI.java │ │ │ │ ├── VerbeUI.java │ │ │ │ ├── PourUI.java │ │ │ │ ├── TimbreUI.java │ │ │ │ ├── UI.java │ │ │ │ └── ThemeUI.java │ │ │ └── theme │ │ │ │ └── simple │ │ │ │ ├── boite │ │ │ │ └── Boite.java │ │ │ │ └── Abaque.java │ │ │ └── entite │ │ │ ├── i │ │ │ ├── Statique.java │ │ │ ├── NonAttachable.java │ │ │ ├── NonDeplacable.java │ │ │ ├── NonSupprimable.java │ │ │ ├── PasSauvegarder.java │ │ │ ├── Deposable.java │ │ │ └── Cloneur.java │ │ │ ├── e │ │ │ ├── Role.java │ │ │ ├── ZoneActive.java │ │ │ └── Parfum.java │ │ │ ├── BlocDebut.java │ │ │ ├── PorteurFonction.java │ │ │ └── Textuel.java │ ├── atelier │ │ ├── JMenuItemID.java │ │ ├── AbaqueAtelier.java │ │ ├── CopyL.java │ │ ├── CutL.java │ │ ├── PasteL.java │ │ ├── OuvrirLivreAction.java │ │ ├── ShowParEditorKit.java │ │ ├── UndoAction.java │ │ ├── RedoAction.java │ │ └── ShowParLabelView.java │ ├── gui │ │ └── PopupListener.java │ ├── listener │ │ └── Listener.java │ └── coloration │ │ └── StyleMathematiques.java │ └── greffons │ ├── api │ ├── FabriqueGreffon.java │ └── AKMethod.java │ ├── java │ └── interne │ │ └── a │ │ ├── MethodeInterne.java │ │ └── MethodeInterneDirecte.java │ └── externe │ └── Graphique.java ├── linotte-alize ├── src │ └── main │ │ └── java │ │ └── org │ │ └── alize │ │ ├── security │ │ └── Habilitation.java │ │ └── http │ │ └── i │ │ └── FichierTraitement.java └── pom.xml ├── linotte-greffons └── src │ └── main │ └── java │ └── org │ └── linotte │ └── greffons │ └── impl │ ├── swing │ ├── layout │ │ └── GestionnairePlacement.java │ ├── GroupeBoutonRadio.java │ └── JListX.java │ ├── ZipServerSocket.java │ ├── Majordome.java │ ├── Article.java │ ├── ImprimeurToile.java │ ├── ZipSocket.java │ ├── Horodatage.java │ ├── Police.java │ └── GreffonRobot.java └── .gitignore /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-modernist -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/d_confirme/valeurs.liv: -------------------------------------------------------------------------------- 1 | affiche "Pi : " + pi & "e : " + euler ! 2 | -------------------------------------------------------------------------------- /linotte-lanceur/src/main/basic/Tablette.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | chcp 1252 >NUL 3 | title lecture 4 | java -jar Atelier.jar -a %1 5 | -------------------------------------------------------------------------------- /linotte-dist/src/snap/gui/linotte.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-dist/src/snap/gui/linotte.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/ogg.liv: -------------------------------------------------------------------------------- 1 | principale : 2 | joue "https://lasonotheque.org/UPLOAD/ogg/0100.ogg" 3 | -------------------------------------------------------------------------------- /linotte-resources/src/main/resources/mime.txt: -------------------------------------------------------------------------------- 1 | extension=liv 2 | mime-type=text/linotte 3 | icon=linotte_new.ico 4 | description=Programme Linotte -------------------------------------------------------------------------------- /linotte-resources/src/main/assets/Linotte2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/assets/Linotte2.png -------------------------------------------------------------------------------- /linotte-resources/src/main/assets/Tablette.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/assets/Tablette.exe -------------------------------------------------------------------------------- /linotte-resources/src/main/resources/linotte.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/resources/linotte.ico -------------------------------------------------------------------------------- /linotte-resources/src/main/resources/linotte.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/resources/linotte.png -------------------------------------------------------------------------------- /linotte-resources/src/main/assets/splashlinotte.pdn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/assets/splashlinotte.pdn -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/media/bullet.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/media/bullet.gif -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/media/space.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/media/space.png -------------------------------------------------------------------------------- /linotte-resources/src/main/resources/linotte_hd.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/resources/linotte_hd.icns -------------------------------------------------------------------------------- /linotte-resources/src/main/resources/linotte_hd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/resources/linotte_hd.png -------------------------------------------------------------------------------- /linotte-resources/src/main/resources/linotte_new.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/resources/linotte_new.ico -------------------------------------------------------------------------------- /linotte-resources/src/main/resources/linotte_new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/resources/linotte_new.png -------------------------------------------------------------------------------- /linotte-resources/src/main/resources/linotte_run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/resources/linotte_run.png -------------------------------------------------------------------------------- /linotte-resources/src/main/assets/LinotteFarvardin.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/assets/LinotteFarvardin.gif -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/media/bomberman.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/media/bomberman.gif -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/media/dn_house2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/media/dn_house2.png -------------------------------------------------------------------------------- /linotte-resources/src/main/resources/linotte-tray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/resources/linotte-tray.png -------------------------------------------------------------------------------- /linotte-resources/src/main/resources/linotte_toile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/resources/linotte_toile.png -------------------------------------------------------------------------------- /linotte-resources/src/main/resources/splashlinotte.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/resources/splashlinotte.png -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/xml/alize/test/TestIn.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.xml.alize.test; 2 | 3 | public class TestIn extends Test { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/xml/alize/test/TestOut.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.xml.alize.test; 2 | 3 | public class TestOut extends Test { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /linotte-resources/src/main/assets/linotte_installateur.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/assets/linotte_installateur.ico -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/media/tux_graduate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/media/tux_graduate.png -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/ui/i/PlancheUI.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.ui.i; 2 | 3 | public interface PlancheUI { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/xml/alize/kernel/i/ActionTest.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.xml.alize.kernel.i; 2 | 3 | public interface ActionTest { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /linotte-resources/src/main/assets/splashlinotte_play_store.pdn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/assets/splashlinotte_play_store.pdn -------------------------------------------------------------------------------- /linotte-resources/src/main/assets/splashlinotte_play_store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/assets/splashlinotte_play_store.png -------------------------------------------------------------------------------- /linotte-resources/src/main/resources/splashlinotte_dracula.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/resources/splashlinotte_dracula.png -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/entite/i/Statique.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.entite.i; 2 | 3 | public interface Statique { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/ui/i/ActeurUI.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.ui.i; 2 | 3 | public interface ActeurUI extends UI { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/ui/i/BoutonUI.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.ui.i; 2 | 3 | public interface BoutonUI extends UI { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/ui/i/DebutUI.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.ui.i; 2 | 3 | public interface DebutUI extends UI { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /linotte-resources/src/main/resources/themes/Extra-Elementary.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/resources/themes/Extra-Elementary.zip -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/ui/i/TextuelUI.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.ui.i; 2 | 3 | public interface TextuelUI extends UI { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/entite/i/NonAttachable.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.entite.i; 2 | 3 | public interface NonAttachable { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/entite/i/NonDeplacable.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.entite.i; 2 | 3 | public interface NonDeplacable { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/entite/i/NonSupprimable.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.entite.i; 2 | 3 | public interface NonSupprimable { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/entite/i/PasSauvegarder.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.entite.i; 2 | 3 | public interface PasSauvegarder { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/ui/i/CommentaireUI.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.ui.i; 2 | 3 | public interface CommentaireUI extends UI { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/xml/alize/kernel/i/ActionDispatcher.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.xml.alize.kernel.i; 2 | 3 | public interface ActionDispatcher { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/unicode.liv: -------------------------------------------------------------------------------- 1 | principale : 2 | phrase est un texte valant µ"0022" + "Voici mon texte !" + µ"0022" 3 | phrase ! 4 | µ"06A5" ! 5 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/entite/i/Deposable.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.entite.i; 2 | 3 | public interface Deposable extends Cloneur { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/a_debutant/teatime.liv: -------------------------------------------------------------------------------- 1 | /*Petit timer pour infuser parfaitement son thé*/ 2 | attends 180 secondes 3 | "Votre thé est à votre goût, Sir !" ! 4 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/d_confirme/operateur ternaire.liv: -------------------------------------------------------------------------------- 1 | a est un drapeau valant vrai 2 | b est un drapeau valant faux 3 | Affiche ter (a,2,3) 4 | Affiche ter (b,2,3) 5 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/outils/CouleurImage.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.outils; 2 | 3 | public enum CouleurImage { 4 | NORMAL, DISABLED, PRESSED, ACTIF, LIRE 5 | 6 | } 7 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/bustout.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/bustout.jpg -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pieces.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pieces.png -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/entite/e/Role.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.entite.e; 2 | 3 | public enum Role { 4 | 5 | TEXTE, NOMBRE, FORMULE, CRAYON 6 | 7 | } 8 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/a_debutant/pythagore.liv: -------------------------------------------------------------------------------- 1 | AB est un nombre 2 | BC est un nombre 3 | 4 | AB ? 5 | BC ? 6 | affiche "Le carré de l'hypoténuse prend : " + (carré AB + carré BC) -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/ui/i/BlocFinUI.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.ui.i; 2 | 3 | public interface BlocFinUI extends UI { 4 | 5 | void cache(); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/logo.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/mur_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/mur_h.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/mur_v.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/mur_v.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/pac1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/pac1.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/pac2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/pac2.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/pack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/pack.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/vide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/vide.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/everything.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/everything.png -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/greffons/api/FabriqueGreffon.java: -------------------------------------------------------------------------------- 1 | package org.linotte.greffons.api; 2 | 3 | public interface FabriqueGreffon { 4 | 5 | Greffon produire(String id, String classe); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/obut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/obut.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/diamant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/diamant.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/mur_db.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/mur_db.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/mur_dh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/mur_dh.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/mur_gb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/mur_gb.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/mur_gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/mur_gh.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/sons/bouchon.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/sons/bouchon.wav -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/brick.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/brick.gif -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/bullet.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/bullet.gif -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/etoile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/etoile.gif -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/ligne.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/ligne.gif -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/monstre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/monstre.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/planet.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/planet.gif -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/power.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/power.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/space.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/space.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/space1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/space1.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/space2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/space2.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/fantome1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/fantome1.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/fantome2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/fantome2.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/fantome3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/fantome3.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/fantome4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/fantome4.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/fantome5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/fantome5.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/fantome6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/fantome6.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/fantome7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/pac-man/fantome7.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/asteroid.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/asteroid.gif -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/bomberman.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/bomberman.gif -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/chasseur.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/chasseur.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/explosion.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/explosion.gif -------------------------------------------------------------------------------- /linotte-dist/src/chocolatey/TODO: -------------------------------------------------------------------------------- 1 | * pour construire : 2 | cpack 3 | 4 | * pour tester : il faut être dans le répertoire du fichier linotte.2.6.1.nupkg 5 | choco install linotte -fidv -s . 6 | 7 | * pour supprimer : 8 | cuninst linotte -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/dn_house2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/dn_house2.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/patternbig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/astronotte/patternbig.png -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/xml/alize/test/Test.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.xml.alize.test; 2 | 3 | public abstract class Test { 4 | 5 | public int numero; 6 | 7 | public String valeur; 8 | 9 | } 10 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/tux_graduate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/tux_graduate.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/praxinoscope-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/praxinoscope-0.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/praxinoscope-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/praxinoscope-1.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/praxinoscope-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/praxinoscope-10.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/praxinoscope-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/praxinoscope-11.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/praxinoscope-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/praxinoscope-2.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/praxinoscope-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/praxinoscope-3.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/praxinoscope-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/praxinoscope-4.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/praxinoscope-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/praxinoscope-5.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/praxinoscope-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/praxinoscope-6.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/praxinoscope-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/praxinoscope-7.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/praxinoscope-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/praxinoscope-8.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/praxinoscope-9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/praxinoscope-9.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/h_pedagogiques/fonctions.liv: -------------------------------------------------------------------------------- 1 | /*f(x)=x/(x-3)*/ 2 | f : x 3 | si x = 3 4 | provoque 20001, "Impossible de calculer la fonction avec la valeur " + x 5 | ferme 6 | sinon retourne x/(x-3 ) -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/medias/blanc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/medias/blanc.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/medias/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/medias/logo.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/medias/post.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/medias/post.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/medias/rouge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/medias/rouge.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/d_confirme/gestion_erreurs.liv: -------------------------------------------------------------------------------- 1 | essaie 2 | 1/0 ! 3 | "ça marche !" ! 4 | ferme 5 | sinon 6 | "Numéro de l'erreur : " + numéro_erreur ! 7 | "Message de l'erreur : " + message_erreur ! 8 | ferme 9 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/medias/onglet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/medias/onglet.png -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/xml/analyse/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Toutes les classes de ce package sont à déplacer dans le package alizé après une nouvelle conception. 3 | * 4 | */ 5 | package org.linotte.moteur.xml.analyse; 6 | 7 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/a_debutant/capitale2.liv: -------------------------------------------------------------------------------- 1 | capitale est un texte 2 | 3 | tant que capitale != "Paris" 4 | affiche "Quelle est la capitale de la France ?" 5 | demande capitale 6 | ferme 7 | affiche "Bravo, tu es trop fort !" -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/d_confirme/acteur_local_sous_paragraphe.liv: -------------------------------------------------------------------------------- 1 | casier est un casier de nombres 2 | 3 | pour chaque 10 4 | b est un nombre valant 15 5 | mélange b 6 | ajoute b dans casier 7 | ferme 8 | affiche casier 9 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/medias/villette1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/medias/villette1.jpg -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/medias/villette2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/medias/villette2.jpg -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/medias/villette3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/medias/villette3.jpg -------------------------------------------------------------------------------- /linotte-dist/src/snap/gui/linotte.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Encoding=UTF-8 4 | Name=linotte 5 | Comment=Linotte est le langage de programmation entièrement en français. 6 | Exec=linotte 7 | Icon=${SNAP}/meta/gui/linotte.png 8 | Terminal=false -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/07_condition_2.liv: -------------------------------------------------------------------------------- 1 | // Utilisons le mot "sinon" 2 | // Forme simple : 3 | si (2 * 2) != (2 * 2) affiche "Tu as faux !" 4 | sinon affiche "J'avais raison !" 5 | 6 | /* 7 | Cliquez sur le bouton LIRE pour exécuter ce programme 8 | */ -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/medias/earthTexture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/medias/earthTexture.jpg -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/d_confirme/decimaux.liv: -------------------------------------------------------------------------------- 1 | a est un nombre valant 1.4 2 | b est un nombre valant 1.7 3 | efface tableau 4 | affiche arrondi a 5 | affiche arrondi b 6 | affiche entier b 7 | affiche décimal a 8 | affiche décimal b 9 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/medias/image-x-generic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/medias/image-x-generic.png -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/entite/i/Cloneur.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.entite.i; 2 | 3 | public interface Cloneur { 4 | 5 | Cloneur clonerPourCreation(); 6 | 7 | Cloneur clonerPourDuplication(); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/d_confirme/doublure.liv: -------------------------------------------------------------------------------- 1 | parcours affichage avec "Nicolas" , 1976 2 | parcours affichage avec "Bruno" , 1977 3 | 4 | affichage : 5 | *nom est un texte 6 | *an est un nombre 7 | affiche "{nom} est né en {an}" 8 | reviens 9 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/medias/internet-group-chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/medias/internet-group-chat.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/medias/internet-news-reader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/medias/internet-news-reader.png -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/bibliotheque2.liv: -------------------------------------------------------------------------------- 1 | principale : 2 | Affiche "Lancez bibliotheque.liv !" 3 | termine 4 | 5 | bonjour : 6 | *Prénom est un texte 7 | affiche "Bonjour à toi ${prénom}, tu es maintenant dans ${livre}" 8 | reviens 9 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/04_boucle_1.liv: -------------------------------------------------------------------------------- 1 | boucle est un nombre // Création de la variable boucle 2 | affiche "Je sais compter jusqu'à dix !" 3 | pour boucle de 1 à 10 affiche boucle 4 | affiche "voilà !" 5 | /* 6 | Cliquez sur le bouton LIRE pour exécuter ce programme 7 | */ -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/media/copyright.txt: -------------------------------------------------------------------------------- 1 | Images : 2 | 3 | Merci à Bruno Condoin (http://www.gcompris.net/) pour l'autorisation d'utiliser ces images : 4 | 5 | dn_house2.png est copyright Ponchaut Olivier sous GPL. 6 | tux_graduate.png est copyright Franck Doucet sous GPL. -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/xml/appels/Appel.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.xml.appels; 2 | 3 | public interface Appel { 4 | 5 | enum APPEL { 6 | BOUCLE, CONDITION, CALQUEPARAGRAPHE, FONCTION, RING, SOUSPARAGRAPHE 7 | } 8 | 9 | APPEL getType(); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/d_confirme/interrompre.liv: -------------------------------------------------------------------------------- 1 | pour 40 2 | affiche "{joker+1} kilomètres à pied, ça use, ça use !" 3 | si joker > 3 4 | affiche "Ça use les souliers ..." 5 | interromps 6 | ferme 7 | ferme 8 | affiche "... et je suis bien trop fatigué !" 9 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/ui/theme/simple/boite/Boite.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.ui.theme.simple.boite; 2 | 3 | import java.awt.*; 4 | 5 | public abstract class Boite { 6 | 7 | public abstract void calculer(Graphics2D g2d); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/SleepSort.liv: -------------------------------------------------------------------------------- 1 | principale : 2 | pour chaque {7, 1, 3, 2, 5, 6, 4, 0, 3}, appelle sleep avec joker 3 | observe sleep 4 | 5 | sleep : 6 | * élément est un nombre 7 | attends élément secondes 8 | affiche élément 9 | reviens 10 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/11_capitale_france.liv: -------------------------------------------------------------------------------- 1 | capitale est un texte 2 | tant que capitale != "Paris" 3 | affiche "Quelle est la capitale de la France ?" 4 | demande capitale 5 | ferme 6 | affiche "Bravo, tu es trop fort !" 7 | 8 | /* 9 | Pour arrêter ce programme, appuyez sur le bouton STOP 10 | */ -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/d_confirme/traitements_parallele.liv: -------------------------------------------------------------------------------- 1 | appelle traitement 2 | affiche "On attend 3 secondes" 3 | attends 3 secondes 4 | affiche "Fin des 3 secondes" 5 | 6 | traitement : 7 | attends 1 seconde 8 | affiche "....moi, je ne veux pas attendre !" 9 | reviens 10 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/h_pedagogiques/factorielle.liv: -------------------------------------------------------------------------------- 1 | principale : 2 | a est un nombre 3 | i est un nombre 4 | résultat est un nombre valant 1 5 | /*précision arithmétique infinie*/ 6 | ~ précision 0 7 | a ? 8 | pour i de a à 1, résultat prend résultat * i 9 | résultat ! 10 | -------------------------------------------------------------------------------- /linotte-alize/src/main/java/org/alize/security/Habilitation.java: -------------------------------------------------------------------------------- 1 | package org.alize.security; 2 | 3 | public enum Habilitation { 4 | 5 | MEMORY_FULL_ACCESS, COOKIES_ACCESS, STACK_MEMORY_MANAGEMENT, TOILE_INVISIBLE, 6 | /** 7 | * Pour bloquer des fonctionnalités à Essayer Linotte 8 | */ 9 | LITTLE_BIRD 10 | 11 | } -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/xml/alize/kernel/i/IProduitCartesien.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.xml.alize.kernel.i; 2 | 3 | /** 4 | * Autorise l'action à utiliser le produit cartésien : 5 | * affiche A & B & C 6 | * @author CPC 7 | * 8 | */ 9 | public interface IProduitCartesien { 10 | } 11 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/d_confirme/drapeaux.liv: -------------------------------------------------------------------------------- 1 | code : 2 | porte est un drapeau valant vrai 3 | tant que porte 4 | Affiche "porte prend " + porte 5 | Porte prend faux 6 | ferme 7 | affiche "porte prend " + porte 8 | si porte affiche "vrai" 9 | sinon si non(porte) affiche "faux" 10 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/medias/wikipedia_220px-Organic_mountain_grown_tea_leaf.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cpc6128/LangageLinotte/HEAD/linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/medias/wikipedia_220px-Organic_mountain_grown_tea_leaf.jpg -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/en_test/ParagrapheDynamique.liv: -------------------------------------------------------------------------------- 1 | principal : 2 | direction <- "var" 3 | var <- "ici" 4 | Affiche <> 5 | appelle <> 6 | attends 1 seconde 7 | 8 | Direction : 9 | "Faux "! 10 | Reviens 11 | 12 | Ici : 13 | "Cool "! 14 | Reviens 15 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/en_test/sousparagraphe.liv: -------------------------------------------------------------------------------- 1 | principale : 2 | pour 40 3 | affiche "{joker+1} kilomètres à pied, ça use, ça use !" 4 | si joker > 3 5 | affiche "Ça use les souliers ..." 6 | interromps 7 | § 8 | § 9 | affiche "... et je suis bien trop fatigué !" 10 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/xml/operation/i/OperationSimple.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.xml.operation.i; 2 | 3 | import java.math.MathContext; 4 | 5 | public interface OperationSimple { 6 | 7 | Object action(Object total, Object valeur_transformee, MathContext context) throws Exception; 8 | 9 | } 10 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/d_confirme/acteur_local.liv: -------------------------------------------------------------------------------- 1 | total est un nombre valant 2 2 | liste est un casier de nombre 3 | 4 | pour chaque total parcours suite 5 | pour chaque liste affiche joker 6 | 7 | suite : 8 | numéro est un nombre 9 | demande numéro 10 | ajoute numéro dans Liste 11 | reviens 12 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/en_test/supprimer_acteur.liv: -------------------------------------------------------------------------------- 1 | principal : 2 | cercle est un cercle, x prend 100, y prend 100, plein prend faux, rayon prend 1, taille prend 2 3 | projette cercle 4 | attends 3 secondes 5 | Annihile cercle 6 | Essaie affiche cercle 7 | Sinon affiche "cercle n'existe pas !" -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/greffons/horodatage.liv: -------------------------------------------------------------------------------- 1 | Horodatage : 2 | montre est un horodatage 3 | tant que vrai 4 | attends .1 seconde 5 | efface tableau 6 | montre.maintenant() 7 | affiche montre.heure() + ":" + montre.minute() + ":" + montre.seconde() + ":" + montre.milliseconde() 8 | ferme 9 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/d_confirme/jokers_en_folie.liv: -------------------------------------------------------------------------------- 1 | /* 2 | joker récupère la valeur de la boucle courant. 3 | mais on peut également utiliser joker', joker'' et joker''' 4 | qui vont récupérer les boucles parentes successives ! 5 | */ 6 | 7 | pour "Linotte" 8 | pour 5 affiche (joker+1) * joker' 9 | ferme 10 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/d_confirme/casierdecasier.liv: -------------------------------------------------------------------------------- 1 | /*Utilisation des casiers anonymes*/ 2 | tab1 est un casier de textes valant "X" , "D" , "G" 3 | lettre est un casier de casiers valant tab1, {"B" , "E" , "H"}, {"C" , "F" , "I"} 4 | 5 | lettre { 0 , 0 } prend "A" 6 | pour chaque {0, 1, 2} affiche lettre { joker , 0 } 7 | -------------------------------------------------------------------------------- /linotte-resources/src/main/filters/version.properties: -------------------------------------------------------------------------------- 1 | VERSION_RELEASE=\u03C0 2 | #${project.version} 3 | BUILD_DATE=${timestamp} 4 | URL_HOME=http://langagelinotte.free.fr/ 5 | AUTEUR=Moun\u00E8s Ronan (http://codevallee.fr) 6 | DATE=2005-2022 7 | BETA=false 8 | LICENCE=Logiciel disponible sous les termes de la licence publique g\u00E9n\u00E9rale GNU GPL V3+. -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/en_test/tiret_bas.liv: -------------------------------------------------------------------------------- 1 | principale : 2 | _ Bonjour ! 3 | _ Le tiret bas permet d'afficher du texte simplement 4 | _ et sans que celui-ci soit interprété. 5 | _ voici un exemple : 6 | _ version 7 | affiche version 8 | _ Vous n'avez pas oublié l'autre forme ? 9 | version ! 10 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/entite/e/ZoneActive.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.entite.e; 2 | 3 | public enum ZoneActive { 4 | 5 | TIMBRE, PARAMETRE_1, PARAMETRE_2, PARAMETRES_FONCTION, CONDITION_SUIVANT, CONDITION_SUIVANT_SECONDAIRE, POUR_ACTEUR, POUR_INDEX_DEBUT, POUR_INDEX_FIN, DELEGUEE, CONDITION_FORMULE 6 | 7 | } 8 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/10_les_fonctions_recursives.liv: -------------------------------------------------------------------------------- 1 | // fibo(n) étant la première fonction du programme, Linotte va demander la valeur de n à l'utilisateur 2 | // Le verbe "retourner" est utilisé lors de la sortie du programme, la valeur "retournée" est affichée dans le tableau 3 | fibo : n 4 | si n < 2 retourne n 5 | sinon retourne fibo(n-1) + fibo(n-2) -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/d_confirme/conditions_drapeaux.liv: -------------------------------------------------------------------------------- 1 | efface tableau 2 | affiche 1 sup 2 3 | affiche 1 égal 1 4 | affiche 2 inf 1 5 | affiche 2 diff 1 6 | affiche 1 > 2 7 | affiche 1 == 1 8 | affiche 2 < 1 9 | affiche 2 != 1 10 | affiche 2 <= 1 11 | affiche 2 >= 1 12 | si (5 sup 2) et (1 inf 2) affiche "c'est vrai !" 13 | -------------------------------------------------------------------------------- /linotte-alize/src/main/java/org/alize/http/i/FichierTraitement.java: -------------------------------------------------------------------------------- 1 | package org.alize.http.i; 2 | 3 | import java.io.File; 4 | import java.io.InputStream; 5 | 6 | public interface FichierTraitement { 7 | 8 | String getAbsolutePath(); 9 | 10 | Long lastModified(); 11 | 12 | File getFile(); 13 | 14 | InputStream getInputStream() throws Exception; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/a_debutant/capitale.liv: -------------------------------------------------------------------------------- 1 | code : 2 | capitale est un texte 3 | questionne capitale sur "Quelle est la capitale de la France ?" 4 | si capitale = "Paris" va vers réponse bonne 5 | affiche "Faux ! tu peux recommencer !" 6 | va vers code 7 | 8 | réponse bonne : 9 | affiche "Bravo, tu es trop fort !" 10 | termine -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/h_pedagogiques/hasard.liv: -------------------------------------------------------------------------------- 1 | lancer deux dés : 2 | n est un nombre 3 | c est un nombre 4 | k est un nombre 5 | dé1 est un nombre 6 | dé2 est un nombre 7 | demande n 8 | pour k de 1 à n 9 | dé1 prend hasard(6) + 1 10 | dé2 prend hasard(6) + 1 11 | si (dé1+ dé2) = 7 incrémente c 12 | ferme 13 | affiche c/n 14 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/ui/i/FonctionUI.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.ui.i; 2 | 3 | import org.linotte.frame.cahier.timbre.entite.Acteur; 4 | import org.linotte.frame.cahier.timbre.entite.e.ZoneActive; 5 | 6 | public interface FonctionUI extends UI { 7 | 8 | ZoneActive accepteZoneParametres(Acteur acteur); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /linotte-lanceur/src/test/java/org/linotte/greffon/Boulier.java: -------------------------------------------------------------------------------- 1 | package org.linotte.greffon; 2 | 3 | import org.linotte.greffons.externe.Greffon; 4 | 5 | import java.math.BigDecimal; 6 | 7 | public class Boulier extends Greffon { 8 | 9 | @Slot() 10 | public BigDecimal addition(BigDecimal nombre1, BigDecimal nombre2) { 11 | return nombre1.add(nombre2); 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/03_demander.liv: -------------------------------------------------------------------------------- 1 | prénom est un texte // Création d'une variable sans valeur initiale. 2 | // Il faut préciser si elle stockera un texte ou un nombre 3 | affiche "Quel est ton prénom ?" 4 | demande prénom // On demande à l'utilisateur la valeur de la variable 'prénom' 5 | affiche "Bravo " + prénom + ", tu viens de lire ton troisième programme Linotte !" -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/ui/i/TantQueUI.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.ui.i; 2 | 3 | import org.linotte.frame.cahier.timbre.entite.i.Deposable; 4 | 5 | public interface TantQueUI extends UI { 6 | 7 | boolean accepteZoneFormule(Deposable timbreGraphique); 8 | 9 | boolean finGlisseDeposeFormule(Deposable timbreGlisse); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/d_confirme/boucle_FOR.liv: -------------------------------------------------------------------------------- 1 | n est un nombre 2 | b est un nombre valant 1 3 | "Boucle FOR simple :" ! 4 | Pour n de 1 à 20 affiche n 5 | "Boucle FOR avec un pas simple" ! 6 | Pour n de 1 à 20 suivant n + 2 affiche n 7 | "Boucle FOR avec un pas variable" ! 8 | Pour n de 1 à 20 suivant n + b 9 | affiche n 10 | b prend b + 1 11 | Ferme 12 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/Robot.liv: -------------------------------------------------------------------------------- 1 | principale : 2 | robot est un robot 3 | i est un nombre 4 | Pour i de 0 à 20 5 | robot.bougesouris(300+(20*i), 400) 6 | Ferme 7 | Pour i de 0 à 20 8 | robot.bougesouris(700-(20*i), 400+(20*i)) 9 | Ferme 10 | Pour i de 0 à 20 11 | robot.bougesouris(300+(20*i), 800) 12 | Ferme 13 | robot.sourisclic() 14 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/greffons/api/AKMethod.java: -------------------------------------------------------------------------------- 1 | package org.linotte.greffons.api; 2 | 3 | import org.linotte.greffons.externe.Greffon; 4 | import org.linotte.greffons.externe.Greffon.ObjetLinotte; 5 | 6 | public interface AKMethod { 7 | 8 | ObjetLinotte appeler(Greffon greffon, ObjetLinotte... parametres) throws Exception; 9 | 10 | String parametres(); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/xml/analyse/multilangage/TypeSyntaxe.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.xml.analyse.multilangage; 2 | 3 | /** 4 | * 5 | * Type 1 : affiche sin 5 6 | * Type 2 : affiche 3 puisse 4 7 | * Type 3 : position de texte 8 | * 9 | * @author Ronan MOUNES 10 | * 11 | */ 12 | public enum TypeSyntaxe { 13 | 14 | TYPE_1, TYPE_2, TYPE_3 15 | 16 | } 17 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/images/copyright.txt: -------------------------------------------------------------------------------- 1 | Images : 2 | 3 | Merci à Bruno Condoin (http://www.gcompris.net/) pour l'autorisation d'utiliser ces images : 4 | 5 | dn_house2.png est copyright Ponchaut Olivier sous GPL. 6 | tux_graduate.png est copyright Franck Doucet sous GPL. 7 | 8 | SVGs : 9 | 10 | duke.svg http://en.wikipedia.org/wiki/Image:Duke.svg -------------------------------------------------------------------------------- /linotte-greffons/src/main/java/org/linotte/greffons/impl/swing/layout/GestionnairePlacement.java: -------------------------------------------------------------------------------- 1 | package org.linotte.greffons.impl.swing.layout; 2 | 3 | import org.linotte.greffons.impl.swing.ComposantSwing; 4 | 5 | import java.awt.*; 6 | 7 | public interface GestionnairePlacement { 8 | 9 | LayoutManager retourneGestionnairePlacement(); 10 | 11 | void fairePere(ComposantSwing formulaire); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/atelier/JMenuItemID.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.atelier; 2 | 3 | import javax.swing.*; 4 | 5 | public class JMenuItemID extends JMenuItem { 6 | String id; 7 | 8 | public JMenuItemID(String texte, String pid) { 9 | super(texte); 10 | id = pid; 11 | } 12 | 13 | public String getID() { 14 | return id; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/xml/alize/kernel/i/ParserHandler.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.xml.alize.kernel.i; 2 | 3 | import org.linotte.moteur.xml.alize.ParserEnvironnement; 4 | import org.linotte.moteur.xml.alize.kernel.processus.Processus; 5 | 6 | public interface ParserHandler { 7 | 8 | void postAnalyse(Processus process, ParserEnvironnement context) throws Exception; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/greffons/pipette.liv: -------------------------------------------------------------------------------- 1 | Pipette : 2 | p est une pipette 3 | t est une toile, couleur prend "rose balais" 4 | x valant 100 5 | y valant 100 6 | projette t 7 | attends 1 seconde // Que la toile soit initialiée 8 | affiche p.retournerouge(x,y) 9 | affiche p.retournevert(x,y) 10 | affiche p.retournebleu(x,y) 11 | affiche p.retournecouleur(x,y) 12 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/02_les_variables.liv: -------------------------------------------------------------------------------- 1 | prénom prend "Clément" // Création d'une variable 2 | affiche "Bravo " + prénom + ", tu viens de lire ton deuxième programme Linotte !" 3 | prénom prend "Jade" // On affecte une nouvelle valeur à notre variable. 4 | affiche "Bravo " + prénom + ", tu viens de lire ton deuxième programme Linotte !" 5 | 6 | /* 7 | Cliquez sur le bouton LIRE pour exécuter ce programme 8 | */ -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/reseau/pont_client.liv: -------------------------------------------------------------------------------- 1 | connexion : 2 | connexion est un pont, adresse prend "localhost" 3 | message est un texte valant "Bonjour !" 4 | Ouvre connexion avec "" depuis "" 5 | état de connexion ! 6 | Charge message dans connexion 7 | Décharge message depuis connexion 8 | "Voici la réponse du serveur :" ! 9 | Affiche message 10 | Ferme connexion 11 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/xml/analyse/CloneException.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.xml.analyse; 2 | 3 | import org.linotte.moteur.xml.alize.parseur.a.Noeud; 4 | 5 | public class CloneException extends Exception { 6 | 7 | private static final long serialVersionUID = 1L; 8 | 9 | public Noeud clone; 10 | 11 | public CloneException(Noeud clone) { 12 | this.clone = clone; 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/d_confirme/doublures_en_entree.liv: -------------------------------------------------------------------------------- 1 | /* Linotte 2.3 2 | Les doublures en entrée d'un livre (dans la première fonction du livre) déclenchent une fenêtre 3 | (ou pop-up) qui demande à l'utilisateur de saisir les valeurs 4 | (comme le ferait le verbe Demander). 5 | */ 6 | addition : 7 | *a est un nombre 8 | *b est un nombre 9 | affiche "le résultat est " + (a + b) 10 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/greffons/tube_fichier_lecture.liv: -------------------------------------------------------------------------------- 1 | prototype 2 | Nom est un texte 3 | Prénom est un texte 4 | type contact contient nom, prénom 5 | 6 | principale : 7 | connecteur est un fichier 8 | c est un casier de contact 9 | ouvre connecteur avec "lecture" depuis "c:/temp/test_tube.txt" 10 | décharge c depuis connecteur 11 | ferme connecteur 12 | affiche c 13 | -------------------------------------------------------------------------------- /linotte-lanceur/src/test/resources/livres/tests_avec_erreurs.properties: -------------------------------------------------------------------------------- 1 | FONCTION_PARAMETRE=\ 2 | démonstration :\n\ 3 | affiche somme(1,2,3)\n\ 4 | somme : a, b\n\ 5 | retourne a + b 6 | 7 | FONCTION2_PARAMETRE=\ 8 | démonstration :\n\ 9 | affiche somme(3)\n\ 10 | somme : a, b\n\ 11 | retourne a + b 12 | 13 | FONCTION3_PARAMETRE=\ 14 | démonstration :\n\ 15 | parcours somme\n\ 16 | somme : a, b\n\ 17 | retourne a + b -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/h_pedagogiques/horloge_simple.liv: -------------------------------------------------------------------------------- 1 | // Notice : http://programmons.forumofficiel.fr/t1098-l-horloge-decouvrir-la-programmation 2 | principale : 3 | comtoise est une horloge, x vaut 50, y vaut 50, rayon vaut 100 4 | projette comtoise 5 | tant que vrai 6 | comtoise.heure(heure) 7 | comtoise.minute(minute) 8 | comtoise.seconde(seconde) 9 | attends 1 seconde 10 | ferme 11 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/greffons/qrcode.liv: -------------------------------------------------------------------------------- 1 | /* 2 | Procédure pour installer le greffon QRCode : http://programmons.forumofficiel.fr/t1178-generer-un-code-qr-qrcode 3 | */ 4 | 5 | principale : 6 | fond est une toile, couleur prend "blanc", hauteur prend 200, largeur prend 200 7 | code est un qrcode, x prend 0, y prend 0, taille vaut 200, texte prend "http://langagelinotte.free.fr/" 8 | projette code 9 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/06_condition_1.liv: -------------------------------------------------------------------------------- 1 | // Forme simple : 2 | si (2 * 2) = (2 + 2) affiche "j'ai raison !" 3 | si (3 * 3) > (3 + 3) affiche "j'ai encore raison !" 4 | 5 | /* 6 | Le langage propose les conditions suivantes : 7 | ? = ? 8 | ? != ? 9 | ? > ? 10 | ? < ? 11 | ? >= ? 12 | ? <= ? 13 | ? est (vrai/faux) 14 | */ 15 | 16 | /* 17 | Cliquez sur le bouton LIRE pour exécuter ce programme 18 | */ -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/d_confirme/clonage.liv: -------------------------------------------------------------------------------- 1 | nombre est un nombre 2 | liste est un casier de nombres 3 | liste avec clone est un casier de nombres 4 | pour chaque 3 5 | nombre prend nombre + 1 6 | ajoute clone(nombre) dans liste avec clone 7 | ajoute nombre dans liste 8 | ferme 9 | affiche "Liste avec les clones :" 10 | affiche liste avec clone 11 | affiche "Liste sans les clones :" 12 | affiche liste 13 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/bibliotheque.liv: -------------------------------------------------------------------------------- 1 | bibliothèque 2 | livre1 référence bibliotheque2.liv 3 | 4 | principale : 5 | message est un texte valant "Nous sommes dans le livre : " 6 | nom est un texte 7 | Concatène message, livre dans message 8 | Affiche message 9 | Affiche "Quel est ton nom ?" 10 | Demande nom 11 | Parcours bonjour de livre1 avec nom 12 | Affiche "Nous sommes de retour !" 13 | -------------------------------------------------------------------------------- /linotte-lanceur/src/test/java/org/linotte/greffon/Majordome.java: -------------------------------------------------------------------------------- 1 | package org.linotte.greffon; 2 | 3 | import org.linotte.greffons.externe.Greffon; 4 | 5 | public class Majordome extends Greffon { 6 | 7 | @Slot(nom = "présentation") 8 | public String presentation(String prenom) { 9 | String serviteur = getAttributeAsString("serviteur"); 10 | return "Bonsoir, mon cher " + prenom + ", je suis votre serviteur " + serviteur; 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/reseau/TCPCommun.liv: -------------------------------------------------------------------------------- 1 | espèces 2 | nom est un texte 3 | message est un texte 4 | horodatage est un texte 5 | commande est un texte 6 | espèce packet contient nom, message, commande, horodatage 7 | 8 | principale : 9 | affiche "rien à faire..." 10 | 11 | horodater : 12 | * message est un packet 13 | horodatage@message prend heure + "h " + minute + "m le {jour}/{mois}" 14 | reviens 15 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/d_confirme/fonction_mathematiques.liv: -------------------------------------------------------------------------------- 1 | tests 2 | < "Quelles sont les valeurs des nombres A et B :" 3 | > 3 4 | > 4 5 | < "Le résultat est 7" 6 | 7 | code : 8 | a est un nombre 9 | b est un nombre 10 | "Quelles sont les valeurs des nombres A et B :" ! 11 | a & b ? 12 | "Le résultat est " + addition( a, b ) ! 13 | 14 | addition : 15 | *v1 est un nombre 16 | *v2 est un nombre 17 | retourne v1 + v2 18 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/couleurs.liv: -------------------------------------------------------------------------------- 1 | tableau est un rectangle, x prend 250, y prend 250, largeur prend 100, hauteur prend 50, taille prend 30 2 | couleur est un graffiti, x prend 235, y prend 375, taille prend 5 3 | mur est une toile, couleur prend "blanc" 4 | 5 | efface toile 6 | projette tableau 7 | projette couleur 8 | pour chaque couleurs 9 | couleur@tableau prend joker 10 | texte@couleur prend joker 11 | attends 0.3 seconde 12 | ferme -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/01_bonjour.liv: -------------------------------------------------------------------------------- 1 | affiche "Bravo Arthur, tu viens de lire ton premier programme Linotte !" 2 | 3 | // Je suis un commentaire ! Je suis ignoré par l'interpréteur Linotte ! 4 | 5 | /* 6 | Et moi, je suis un commentaire sur plusieurs ... 7 | ... lignes. Pratique pour expliquer le programme ? 8 | */ 9 | 10 | /* 11 | Cliquez sur le bouton LIRE pour exécuter ce programme 12 | Puis, continuez à découvrir le langage en suivant le tutoriel à gauche de l'Atelier ⟵ 13 | */ -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/h_pedagogiques/equation_premier_degree.liv: -------------------------------------------------------------------------------- 1 | résolution : 2 | x est un nombre 3 | a est un nombre 4 | b est un nombre 5 | Questionne a sur "Quelle est la valeur de a ?" 6 | Questionne b sur "Quelle est la valeur de b ?" 7 | Si a == 0 8 | Si b == 0 9 | Affiche "R est la solution" 10 | Ferme 11 | Sinon 12 | Affiche "Je ne sais que dire !" 13 | Ferme 14 | Ferme 15 | Sinon 16 | x prend b / a 17 | Affiche x 18 | Ferme 19 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/reseau/pont_serveur.liv: -------------------------------------------------------------------------------- 1 | connexion : 2 | connexion est un pont 3 | réponse est un texte 4 | Affiche "Lancement du serveur, on va attendre une connexion" 5 | ouvre connexion avec "" depuis "" 6 | Affiche "Connexion ok avec un client" 7 | Décharge réponse depuis connexion 8 | Affiche "Voici le message du client :" 9 | Affiche réponse 10 | état de connexion ! 11 | Charge "ça marche !" dans connexion 12 | Ferme connexion 13 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/ui/i/ConditionUI.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.ui.i; 2 | 3 | import org.linotte.frame.cahier.timbre.entite.Timbre; 4 | import org.linotte.frame.cahier.timbre.entite.i.Deposable; 5 | 6 | public interface ConditionUI extends UI { 7 | 8 | boolean accepteSecondaire(Timbre moi); 9 | 10 | boolean accepteZoneFormule(Deposable timbreGraphique); 11 | 12 | boolean finGlisseDeposeFormule(Deposable timbreGlisse); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /linotte-greffons/src/main/java/org/linotte/greffons/impl/ZipServerSocket.java: -------------------------------------------------------------------------------- 1 | package org.linotte.greffons.impl; 2 | 3 | import java.io.IOException; 4 | import java.net.ServerSocket; 5 | import java.net.Socket; 6 | 7 | public class ZipServerSocket extends ServerSocket { 8 | public ZipServerSocket(int port) throws IOException { 9 | super(port); 10 | } 11 | 12 | public Socket accept() throws IOException { 13 | Socket socket = new ZipSocket(); 14 | implAccept(socket); 15 | return socket; 16 | } 17 | } -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/15_rotation.liv: -------------------------------------------------------------------------------- 1 | c est un graffiti, x prend 130, y prend 223, texte prend "J'ai mal à la tête !", couleur prend "vert pomme", taille prend 30 2 | d est un graphique, image prend "media/tux_graduate.png", x prend 230, y prend 322, transparence prend 90, taille prend 20 3 | e est une toile, couleur prend "bleu", image prend "media/dn_house2.png" 4 | 5 | code : 6 | tant que vrai 7 | tourne à gauche c de 1 8 | tourne à droite d de 1 9 | attends 10 millisecondes 10 | ferme -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/d_confirme/divisons.liv: -------------------------------------------------------------------------------- 1 | n1 est un nombre 2 | n2 est un nombre 3 | n3 est un nombre 4 | 5 | parcours divise avec 10, 2, n1 6 | affiche n1 7 | parcours divise avec 45, 5, n2 8 | affiche n2 9 | parcours divise avec 13, 0, n3 10 | affiche n3 11 | 12 | divise : 13 | *a est un nombre 14 | *b est un nombre 15 | *c est un nombre 16 | si b = 0 17 | provoque 20000, "Impossible de diviser ${a} par zéro ! " 18 | ferme 19 | sinon c prend a / b 20 | reviens 21 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/ui/i/VerbeUI.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.ui.i; 2 | 3 | import org.linotte.frame.cahier.timbre.entite.e.ZoneActive; 4 | import org.linotte.frame.cahier.timbre.entite.i.Deposable; 5 | 6 | public interface VerbeUI extends UI { 7 | 8 | ZoneActive accepteZoneParametres(Deposable moi); 9 | 10 | boolean finGlisseDeposeParametre1Delegue(Deposable timbreGlisse); 11 | 12 | boolean finGlisseDeposeParametre2Delegue(Deposable timbreGlisse); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/a_debutant/linotte.liv: -------------------------------------------------------------------------------- 1 | valeur est un nombre 2 | 3 | code : 4 | affiche "En quelle année fut inventé le langage Linotte ?" 5 | demande valeur 6 | Va vers vérification 7 | 8 | vérification : 9 | réponse est un nombre valant 2005 10 | si valeur = réponse va vers réponse bonne 11 | sinon si valeur > réponse affiche "Non non... c'est avant !" 12 | sinon affiche "Il est plus jeune ! " 13 | va vers code 14 | 15 | réponse bonne : 16 | affiche "Bravo, tu es trés fort ! " 17 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/h_pedagogiques/moyenne.liv: -------------------------------------------------------------------------------- 1 | /*Calculer la moyenne d'une liste de nombres*/ 2 | globale 3 | valeur est un nombre 4 | 5 | boucle : 6 | max est un nombre 7 | n est un nombre 8 | questionne max sur "Combien de nombres voulez-vous entrer ?" 9 | pour n de 1 à max parcours demander avec n 10 | valeur / max ! 11 | 12 | demander : 13 | *numéro est un nombre 14 | val est un nombre 15 | questionne val sur "Nombre n°" + numéro 16 | valeur prend valeur + val 17 | reviens 18 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/greffons/majordome.liv: -------------------------------------------------------------------------------- 1 | // Le code de ce greffon, écrit en langage Java, est localisé dans le répertoire "greffons" de l'Atelier. 2 | // C'est le fichier https://github.com/cpc6128/LangageLinotte/blob/master/linotte-greffons/src/main/java/org/linotte/greffons/impl/Majordome.java 3 | // Les méthodes fonctionnelles utilisables depuis le langage Linotte doivent être annotées par @Slot 4 | 5 | démonstration : 6 | messager est un majordome 7 | affiche messager.présentation("Jules") -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/greffons/tube_fichier_ecriture.liv: -------------------------------------------------------------------------------- 1 | principale : 2 | Connecteur est un fichier 3 | Prénom est un texte valant "Ronan" 4 | Prénom2 est un texte valant "Magali" 5 | Nom est un texte valant "Dupond" 6 | Nom2 est un texte valant "Durand" 7 | ouvre connecteur avec "écrasement" depuis "c:/temp/test_tube.txt" 8 | charge prénom dans connecteur 9 | charge nom dans connecteur 10 | charge prénom2 dans connecteur 11 | charge nom2 dans connecteur 12 | ferme connecteur 13 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/xml/analyse/multilangage/MathematiqueOperation.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.xml.analyse.multilangage; 2 | 3 | import org.linotte.frame.coloration.StyleItem; 4 | import org.linotte.moteur.xml.operation.i.Operation; 5 | 6 | public interface MathematiqueOperation { 7 | 8 | String getTexte(); 9 | 10 | Class getOperation(); 11 | 12 | StyleItem.STYLE getStyle(); 13 | 14 | TypeSyntaxe getTypeSyntaxe(); 15 | 16 | MathematiqueOperation[] operations(); 17 | 18 | } -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/d_confirme/fibonacci_recursif.liv: -------------------------------------------------------------------------------- 1 | tests 2 | < "Entrez un nombre :" 3 | > 20 4 | < 6765 5 | 6 | code : 7 | n est un nombre 8 | "Entrez un nombre :" ! 9 | n ? 10 | parcours fibo avec n 11 | n ! 12 | 13 | fibo : 14 | * n est un nombre 15 | traitement est un nombre valant n - 1 16 | traitement2 est un nombre valant n - 2 17 | si n < 2 reviens 18 | parcours fibo avec traitement 19 | parcours fibo avec traitement2 20 | n prend traitement + traitement2 21 | reviens 22 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/greffons/tube_pile.liv: -------------------------------------------------------------------------------- 1 | /*http://fr.wikipedia.org/wiki/Pile_(informatique)*/ 2 | globale 3 | data est un pile 4 | 5 | principale : 6 | charge "pile !" dans data 7 | charge "une" dans data 8 | charge "dans" dans data 9 | charge "suis" dans data 10 | charge "je" dans data 11 | charge "Bonjour," dans data 12 | va vers suite 13 | 14 | suite : 15 | texte est un texte valant "rien" 16 | tant que texte != "" 17 | décharge texte depuis data 18 | texte ! 19 | ferme 20 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/12_trouver_un_nombre.liv: -------------------------------------------------------------------------------- 1 | secret prend hasard(500) 2 | boucle prend 0 3 | réponse prend 0 4 | affiche "Tu dois trouver un nombre entre 0 et 500." 5 | tant que réponse != secret 6 | boucle prend boucle + 1 7 | affiche "Propose un nombre" 8 | demande réponse 9 | si réponse > secret 10 | "Ce nombre est trop grand !" ! 11 | ferme 12 | sinon si réponse < secret 13 | "Ce nombre est trop petit !" ! 14 | ferme 15 | ferme 16 | affiche "Félicitation, c'était " + secret + " et tu as réussi en " + boucle + " coups !" -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/Rss.liv: -------------------------------------------------------------------------------- 1 | principale : 2 | flux_commentaires est un rss 3 | flux_commentaires.chargerarticles("http://rss.lemonde.fr/c/205/f/3050/index.rss") 4 | tant que flux_commentaires.articlesuivant() 5 | Efface tableau 6 | "Titre : {flux_commentaires.titre()}" ! 7 | "Date : {flux_commentaires.date()}" ! 8 | "Description : {flux_commentaires.description()}" ! 9 | "Lien : {flux_commentaires.lien()}" ! 10 | "Image : {flux_commentaires.image()}" ! 11 | attends 4 secondes 12 | ferme 13 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/greffons/tube_repertoire.liv: -------------------------------------------------------------------------------- 1 | globale 2 | dictionnaire est un répertoire 3 | 4 | principale : 5 | âge est un nombre valant 15 6 | Charge "Bertrand dupont" dans dictionnaire avec "utilisateur1" 7 | Charge âge dans dictionnaire avec "utilisateur1_age" 8 | Va vers suite 9 | 10 | suite : 11 | nb est un nombre 12 | texte est un texte 13 | Décharge nb depuis dictionnaire avec "utilisateur1_age" 14 | nb ! 15 | Décharge texte depuis dictionnaire avec "utilisateur1" 16 | texte ! 17 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/syracuse_recursif.liv: -------------------------------------------------------------------------------- 1 | /*Auteur : $imon*/ 2 | principale : 3 | n est un nombre 4 | demande n 5 | n prend abs( arrondi( n )) //pour s'assurer qu'il s'agit bien d'un entier positif 6 | parcours syracuse avec n 7 | affiche "la durée du vol est " + n 8 | termine 9 | 10 | syracuse : 11 | *x est un nombre 12 | si (arrondi(x / 2)) = (x / 2), x prend x / 2 13 | sinon x prend 3 * x + 1 14 | si x > 1, parcours syracuse avec x 15 | sinon x prend 0 16 | x prend x + 1 17 | reviens 18 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/greffons/FLux rss.liv: -------------------------------------------------------------------------------- 1 | code : 2 | flux_commentaires est un rss 3 | flux_commentaires.chargerarticles("http://programmons.forumofficiel.fr/feed/") 4 | tant que flux_commentaires.articlesuivant() 5 | efface tableau 6 | "Titre : ${flux_commentaires.titre()}" ! 7 | "Date : ${flux_commentaires.date()}" ! 8 | "Description : ${flux_commentaires.description()}" ! 9 | "Lien : ${flux_commentaires.lien()}" ! 10 | attends 3 secondes 11 | "************************************" ! 12 | ferme 13 | -------------------------------------------------------------------------------- /linotte-alize/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | langagelinotte 7 | fr.codevallee 8 | 3.14 9 | 10 | 4.0.0 11 | 12 | linotte-alize 13 | 14 | 15 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/h_pedagogiques/syracuse.liv: -------------------------------------------------------------------------------- 1 | /*La suite de Syracuse est définie ainsi : 2 | - on part d'un entier ; 3 | - s'il est pair, on le divise par 2 ; sinon, on le multiplie par 3 et on ajoute 1 ; 4 | - on recommence la même opération sur l'entier obtenu, et ainsi de suite ; la suite s'arrête si on arrive à 1.*/ 5 | syracuse : 6 | durée est un nombre 7 | e est un nombre 8 | demande e 9 | tant que e != 1 10 | durée prend durée + 1 11 | si (e mod 2) = 0, e prend e / 2 12 | sinon e prend e * 3 + 1 13 | ferme 14 | affiche durée 15 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/poeme2.liv: -------------------------------------------------------------------------------- 1 | dame souris trotte : 2 | affiche "Dame souris trotte, 3 | Noire dans le gris du soir, 4 | Dame souris trotte, 5 | Grise dans le noir. 6 | On sonne la cloche : 7 | Dormez, les bons prisonniers, 8 | On sonne la cloche : 9 | Faut que vous dormiez. 10 | Un nuage passe, 11 | Il fait noir comme dans un four, 12 | Un nuage passe. 13 | Tiens le petit jour. 14 | Dame souris trotte, 15 | Rose dans les rayons bleus, 16 | Dame souris trotte, 17 | Debout, paresseux. 18 | Dame souris de Paul Verlaine. " 19 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/ui/i/PourUI.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.ui.i; 2 | 3 | import org.linotte.frame.cahier.timbre.entite.e.ZoneActive; 4 | import org.linotte.frame.cahier.timbre.entite.i.Deposable; 5 | 6 | public interface PourUI extends UI { 7 | 8 | ZoneActive accepteZoneParametres(Deposable timbreGraphique); 9 | 10 | boolean finGlisseDeposeActeur(Deposable timbreGlisse); 11 | 12 | boolean finGlisseDeposeIndexDebut(Deposable timbreGlisse); 13 | 14 | boolean finGlisseDeposeIndexFin(Deposable timbreGlisse); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /linotte-resources/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | langagelinotte 7 | fr.codevallee 8 | 3.14 9 | 10 | 4.0.0 11 | 12 | linotte-resources 13 | 14 | 15 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/magie.liv: -------------------------------------------------------------------------------- 1 | rond est un cercle, couleur prend "rose", plein prend vrai, ... 2 | rayon prend 30, x prend 289, y prend 290 3 | groupe est un casier de cercle 4 | 5 | efface toile 6 | projette rond 7 | // #acteur est un synonyme de la fonction clone(acteur) 8 | ajoute #rond & #rond & #rond dans groupe 9 | de 1 à 100 10 | déplace groupe{0} vers le haut de 1 11 | déplace groupe{1} vers le bas de 1 12 | déplace groupe{2} vers la droite de 1 13 | déplace rond vers la gauche de 1 14 | attends 20 millisecondes 15 | ferme -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/08_condition_3.liv: -------------------------------------------------------------------------------- 1 | // Forme avec un bloc 2 | si (1 * 1) < (1 + 1) 3 | affiche "j'ai dit :" 4 | attends 1000 millisecondes 5 | affiche "j'ai toujours raison !" 6 | ferme 7 | // On peut également utiliser "sinon" avec un bloc 8 | 9 | si (1 * 1) != (1 * 1) 10 | affiche "j'ai dit :" 11 | attends 500 millisecondes 12 | affiche "tu as tort !" 13 | ferme 14 | sinon 15 | affiche "j'ai dit :" 16 | attends 500 millisecondes 17 | affiche "j'ai toujours raison !" 18 | ferme 19 | 20 | 21 | /* 22 | Cliquez sur le bouton LIRE pour exécuter ce programme 23 | */ -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/rotation.liv: -------------------------------------------------------------------------------- 1 | c est un graffiti, x prend 130, y prend 223, texte prend "J'ai mal à la tête !", couleur prend "vert pomme", taille prend 30 2 | d est un graphique, image prend "images/tux_graduate.png", x prend 230, y prend 322, transparence prend 90, taille prend 20 3 | e est une toile, couleur prend "bleu", image prend "images/dn_house2.png" 4 | 5 | efface toile 6 | projette c 7 | projette d 8 | projette e 9 | tant que vrai 10 | tourne à gauche c de 1 11 | tourne à droite d de 1 12 | attends 0.01 seconde 13 | ferme 14 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/99bottles.liv: -------------------------------------------------------------------------------- 1 | /*http://99-bottles-of-beer.net*/ 2 | 99 bouteilles : 3 | de 99 à 1 4 | affiche "{bouteille(joker,1)}, {bouteille(joker,0)}." 5 | affiche "En prendre une, la faire passer, {bouteille(joker-1,1)}." & "" 6 | ferme 7 | affiche "{bouteille(0,1)}, {bouteille(0,0)}." 8 | affiche "Allez au magasin et achetez encore {bouteille(99,1)}." 9 | 10 | bouteille : n, suffix 11 | retourne ter(n=0,"il n'y a plus de bouteille",ter(n=1,"1 bouteille","{n} bouteilles")) + 12 | " de bière" + ter(suffix=1," sur le mur","") -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/collision.liv: -------------------------------------------------------------------------------- 1 | centre est un cercle, x prend 311, y prend 285, couleur prend "rouge", plein prend vrai, rayon prend 50 2 | boule est un rectangle, largeur prend 40, hauteur prend 20, couleur prend "noir", plein prend vrai 3 | salle est une toile, couleur prend "blanc" 4 | 5 | efface toile 6 | projette salle & centre & boule 7 | tant que vrai 8 | temporise 9 | vide touches 10 | déplace boule vers sourisx et sourisy 11 | si boule.collision(centre), couleur@centre prend "jaune" 12 | sinon couleur@centre prend "rouge" 13 | ferme -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/outils/ArrayIterator.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.outils; 2 | 3 | import java.util.Iterator; 4 | 5 | public class ArrayIterator

implements Iterator

{ 6 | 7 | private P[] tab; 8 | 9 | private int pos = 0, size; 10 | 11 | public ArrayIterator(P[] p) { 12 | tab = p; 13 | size = tab.length; 14 | } 15 | 16 | @Override 17 | public boolean hasNext() { 18 | return pos < size; 19 | } 20 | 21 | @Override 22 | public P next() { 23 | return tab[pos++]; 24 | } 25 | 26 | @Override 27 | public void remove() { 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/05_boucle_2.liv: -------------------------------------------------------------------------------- 1 | boucle est un nombre // Création de la variable boucle 2 | affiche "Je sais compter jusqu'à dix et doucement !" 3 | pour boucle de 1 à 10 4 | affiche boucle 5 | attends 200 millisecondes 6 | ferme 7 | affiche "voilà !" 8 | 9 | // Depuis la version 3.14 du langage Linotte , on peut utiliser cette forme : 10 | liste est un casier de texte valant "janvier", "février", "mars", "avril", "juin" 11 | valeur est un texte 12 | pour chaque valeur de liste 13 | affiche valeur 14 | ferme 15 | /* 16 | Cliquez sur le bouton LIRE pour exécuter ce programme 17 | */ -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/c_logo/formes.liv: -------------------------------------------------------------------------------- 1 | tortue est un crayon, couleur prend "bleu", x prend 400, y prend 100, taille prend 1 2 | tortue2 est un crayon, couleur prend "rouge", x prend 300, y prend 200, taille prend 1 3 | efface toile 4 | projette tortue 5 | projette tortue2 6 | /*Carré 7 | av 200 td 90 av 200 td 90 av 200 td 90 av 200 td 90*/ 8 | pour chaque 4 9 | avance tortue de 200 10 | tourne à droite tortue de 90 11 | ferme 12 | /*Hexagone 13 | repete 6[av 80 td 60]*/ 14 | pour chaque 6 15 | avance tortue2 de 80 16 | tourne à droite tortue2 de 60 17 | ferme 18 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/en_test/08_condition_3.liv: -------------------------------------------------------------------------------- 1 | code : 2 | // Forme avec un bloc 3 | si (1 * 1) < (1 + 1) 4 | affiche "j'ai dit :" 5 | attends 1000 millisecondes 6 | affiche "j'ai toujours raison !" 7 | ferme 8 | 9 | // On peut également utiliser "sinon" avec un bloc 10 | 11 | si (1 * 1) != (1 * 1) 12 | affiche "j'ai dit :" 13 | attends 500 millisecondes 14 | affiche "tu as tort !" 15 | sinon 16 | si 1==1 affiche "j'ai toujours raison !" 17 | ferme 18 | 19 | 20 | /* 21 | Cliquez sur le bouton LIRE pour exécuter ce programme 22 | */ -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea/ 2 | /target/ 3 | /langagelinotte.iml 4 | /linotte-greffons/linotte-greffons.iml 5 | /linotte-resources/resources.iml 6 | /linotte-lanceur/target/ 7 | /linotte-moteur/target/ 8 | /linotte-greffons/target/ 9 | /linotte-alize/target/ 10 | /linotte-accessibilite/linotte-accessibilite.iml 11 | /linotte-alize/linotte-alize.iml 12 | /linotte-dist/target/ 13 | /linotte-dist/linotte-dist.iml 14 | /linotte-ext/target/ 15 | /linotte-ext/linotte-ext.iml 16 | /linotte-lanceur/linotte-lanceur.iml 17 | /linotte-moteur/linotte-moteur.iml 18 | /linotte-resources/target/ 19 | /linotte-resources/linotte-resources.iml -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/a_debutant/trouvernombre.liv: -------------------------------------------------------------------------------- 1 | secret est un nombre valant hasard(500) 2 | boucle est un nombre valant 0 3 | réponse est un nombre valant 0 4 | 5 | affiche "Tu dois trouver un nombre entre 0 et 500." 6 | tant que réponse != secret 7 | boucle prend boucle + 1 8 | affiche "Propose un nombre" 9 | demande réponse 10 | si réponse > secret 11 | "Ce nombre est trop grand !" ! 12 | ferme 13 | sinon si réponse < secret 14 | "Ce nombre est trop petit !" ! 15 | ferme 16 | ferme 17 | affiche "Félicitation, c'était ${secret} et tu as réussi en ${boucle} coups !" -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/k_contributions/invader.liv: -------------------------------------------------------------------------------- 1 | // Concours SiteDuZero : http://fr.openclassrooms.com/forum/sujet/atelier-fond-anime-space-invaders?page=2#message-84276241 2 | b: 3 | x&y<-hasard 500 4 | b::rectangle,largeur=8,hauteur=8,plein=vrai,couleur=couleurs{x/2} 5 | pour {2,4,8,9,10,11,12,15,17,19,22,24,26,28,29,30,31,32,33,34,35,37,39,41} 6 | x@b=x+joker mod 7*9 7 | y@(#b)=y+entier(joker/7)*9 8 | ferme 9 | couleur@b=0 10 | x@b=x+18 11 | y@(#b)=y+(2+x mod 2)*9 12 | x@b=x+36 13 | y@b=y+(2+y mod 2)*9 14 | attends 1 seconde 15 | efface toile 16 | va vers b 17 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/chronometre.liv: -------------------------------------------------------------------------------- 1 | globale 2 | _seconde & _minute & _heure est un nombre 3 | 4 | principale : 5 | affiche "Ne pas exécuter directement ce livre !" 6 | 7 | start : 8 | _seconde prend seconde 9 | _minute prend minute 10 | _heure prend heure 11 | reviens 12 | 13 | stop : 14 | *temps est un texte 15 | tmp_seconde est un nombre valant seconde 16 | tmp_minute est un nombre valant minute 17 | tmp_heure est un nombre valant heure 18 | temps prend tmp_heure * 3600 + tmp_minute * 60 + tmp_seconde - (_heure * 3600 + _minute * 60 + _seconde) 19 | reviens 20 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/acteurs_prototype.liv: -------------------------------------------------------------------------------- 1 | /* 2 | Linotte 2.1.1 3 | Démonstration des possibilités du langage qui ne seront pas documentées 4 | */ 5 | i est un nombre valant 1 6 | t est un texte valant "C'est sec" 7 | c est un casier de nombre valant 1, 2, 3 8 | attache addition à i 9 | attache inverse à t 10 | attache inverse à c 11 | affiche i.addition(2).addition(3) 12 | affiche clone(i).addition(5) 13 | affiche i 14 | t.inverse() 15 | affiche t 16 | c.inverse() 17 | affiche c 18 | 19 | addition : n 20 | moi prend n + moi 21 | retourne moi 22 | 23 | inverse : 24 | inverse moi 25 | retourne moi 26 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/ui/i/TimbreUI.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.ui.i; 2 | 3 | import org.linotte.frame.cahier.timbre.entite.Timbre; 4 | 5 | import java.awt.*; 6 | 7 | public interface TimbreUI extends UI { 8 | 9 | Shape forme(); 10 | 11 | /** 12 | * Est-ce que ce compostant peut être attaché au composant timbreGraphiqueCible 13 | * @param timbreGraphique cible a attacher 14 | * @return 15 | */ 16 | boolean accepteZoneTimbre(Timbre timbreGraphiqueCible); 17 | 18 | Shape ancreArriere(); 19 | 20 | Shape ancreAvant(); 21 | 22 | void repositionnerTousLesTimbres(); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/entite/BlocDebut.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.entite; 2 | 3 | import org.linotte.frame.cahier.timbre.entite.i.NonDeplacable; 4 | import org.linotte.frame.cahier.timbre.ui.i.PlancheUI; 5 | 6 | public abstract class BlocDebut extends Timbre implements NonDeplacable { 7 | 8 | public BlocFin blocfin; 9 | 10 | public BlocDebut(PlancheUI planche) { 11 | super(planche); 12 | } 13 | 14 | // Bean 15 | public BlocDebut() { 16 | } 17 | 18 | public void clonerPourDuplication(BlocDebut clone) { 19 | super.clonerPourDuplication(clone); 20 | clone.blocfin = blocfin; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/xml/appels/Condition.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.xml.appels; 2 | 3 | public class Condition implements Appel { 4 | 5 | public static enum ETAT_CONDITION { 6 | EN_COURS, FAUX, VRAI, TERMINE 7 | }; 8 | 9 | private ETAT_CONDITION etat = ETAT_CONDITION.EN_COURS; 10 | 11 | public void setEtat(ETAT_CONDITION etat) { 12 | this.etat = etat; 13 | } 14 | 15 | public ETAT_CONDITION getEtat() { 16 | return etat; 17 | } 18 | 19 | @Override 20 | public String toString() { 21 | return "Condition"; 22 | } 23 | 24 | @Override 25 | public APPEL getType() { 26 | return APPEL.CONDITION; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/d_confirme/lesmois.liv: -------------------------------------------------------------------------------- 1 | tableau est un casier de texte valant "janvier", "février" , "mars", "avril", "mai", "juin", "juillet" ,"août", "septembre", "octobre", "novembre", "décembre" 2 | message est un texte 3 | concatène "En ", tableau {0}, ", le temps est vraiment froid !" dans message 4 | message ! 5 | concatène "En ", tableau {racine 16}, ", tu peux sortir manger dehors." dans message 6 | message ! 7 | concatène "En ", tableau {5+2*2}, ", les feuilles commencent à tomber." dans message 8 | message ! 9 | concatène "En ", tableau {carré 3 + 2}, ", c'est long d'attendre le 24 au soir ..." dans message 10 | message ! 11 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/horloge.liv: -------------------------------------------------------------------------------- 1 | horloge est un graffiti, x prend 5, y prend 20, texte prend "L'horloge digitale", couleur prend "rose" 2 | toile est une toile, couleur prend "noir", hauteur prend 30 , largeur prend 270, x prend 50, y prend 50, audessus prend vrai, bordure prend faux 3 | 4 | copie ecranh dans x @ toile 5 | copie ecranv dans y @ toile 6 | soustrais 300 dans x @ toile 7 | soustrais 80 dans y @ toile 8 | efface toile 9 | projette toile 10 | projette horloge 11 | attends 1 seconde 12 | tant que vrai 13 | texte@horloge prend "Il est ${heure} heures, ${minute} minutes et ${seconde} secondes" 14 | attends 1 seconde 15 | ferme -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/d_confirme/methodes_fonctionnelles_texte.liv: -------------------------------------------------------------------------------- 1 | /* 2 | Cet exemple présente les méthodes fonctionnelles accessible depuis un acteur TEXTE 3 | Nouveauté Linotte 2.6.2 4 | */ 5 | 6 | chaine est un texte valant "bonjour la TERRE et les terriens !" 7 | affiche chaine.inverser() 8 | affiche chaine.minuscule() 9 | affiche chaine.majuscule() 10 | affiche chaine.minuscule().remplacer("terr", "lun").majuscule() 11 | affiche chaine.taille() 12 | affiche chaine.position(0,"terr") 13 | affiche chaine.position(0,"lun") 14 | affiche chaine.position(13,"terr") 15 | affiche chaine.extraire(0,7) 16 | affiche chaine.capitaliser() 17 | affiche chaine.mélanger() 18 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/xml/appels/Ring.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.xml.appels; 2 | 3 | import org.linotte.moteur.xml.alize.kernel.processus.Processus; 4 | 5 | public class Ring implements Appel { 6 | 7 | private Processus processus; 8 | 9 | public Ring(Processus pprocessus) { 10 | processus = pprocessus; 11 | } 12 | 13 | public void setProcessus(Processus processus) { 14 | this.processus = processus; 15 | } 16 | 17 | public Processus getProcessus() { 18 | return processus; 19 | } 20 | 21 | @Override 22 | public String toString() { 23 | return "CodeProtege"; 24 | } 25 | 26 | @Override 27 | public APPEL getType() { 28 | return APPEL.RING; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/a_debutant/poeme.liv: -------------------------------------------------------------------------------- 1 | // Exemple inspiré du manuel utilisateur de l'Amstrad CPC 6128 (page 32) 2 | efface tableau 3 | affiche dame("") 4 | affiche "Noire dans le gris du soir," 5 | affiche dame("") 6 | affiche "Grise dans le noir. 7 | " 8 | affiche nuage(",") 9 | affiche "Il fait noir comme dans un four," 10 | affiche nuage(".") 11 | affiche "Tiens le petit jour. 12 | " 13 | affiche dame(",") 14 | affiche "Rose dans les rayons bleus," 15 | affiche dame(" :") 16 | affiche "Debout, paresseux. 17 | 18 | Paul Verlaine." 19 | 20 | dame : suffix 21 | retourne "Dame souris trotte" + suffix 22 | 23 | nuage : suffix 24 | retourne "Un nuage passe" + suffix 25 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/d_confirme/calculatrice.liv: -------------------------------------------------------------------------------- 1 | // Calculatrice automatique : 2 | // + - ajoute ou soustrait 1 3 | // * / multiplie ou divise par 2 4 | tests 5 | < "Le programme a calculé la valeur 1.5" 6 | 7 | code : 8 | programme valant "+", "+", "*", "-", "/" 9 | accumulateur valant 0 10 | pour chaque programme parcours machine avec accumulateur, joker 11 | affiche "Le programme a calculé la valeur {accumulateur}" 12 | 13 | machine : sortie, commande 14 | si commande = "+" incrémente sortie 15 | sinon si commande = "-" décrémente sortie 16 | sinon si commande = "*", sortie prend sortie * 2 17 | sinon si commande = "/", sortie prend sortie / 2 18 | reviens 19 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/xml/alize/kernel/i/ActionDynamic.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.xml.alize.kernel.i; 2 | 3 | import org.alize.kernel.AKProcessus; 4 | import org.linotte.moteur.xml.alize.kernel.Action; 5 | import org.linotte.moteur.xml.alize.kernel.Job; 6 | import org.linotte.moteur.xml.analyse.ItemXML; 7 | 8 | public abstract class ActionDynamic extends Action { 9 | 10 | @Override 11 | public final ETAT analyse(String param, Job runtime, ItemXML[] valeurs, String[] annotations) throws Exception { 12 | return null; 13 | } 14 | 15 | public abstract AKProcessus analyseDynamic(String param, Job runtime, ItemXML[] valeurs, String[] annotations) throws Exception; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/d_confirme/precision_arithmetique.liv: -------------------------------------------------------------------------------- 1 | /*Le tilde 'précision' permet de modifier la précision arithmétique de l'Atelier Linotte 2 | Attention, la valeur de la précision impacte énormement les performances de l'Atelier Linotte*/ 3 | 4 | 5 | Efface tableau 6 | "Précision par défaut :" ! 7 | affiche pi * 2 8 | "Précision à 2 nombres : " ! 9 | ~précision 2 10 | affiche pi * 2 11 | "Précision à 5 nombres : " ! 12 | ~précision 5 13 | affiche pi * 2 14 | "Précision à 40 nombres : " ! 15 | ~précision 40 16 | affiche pi * 2 17 | "Précision infinie : " ! 18 | ~précision 0 19 | affiche pi * 2 20 | "Retour à la valeur par défaut :" ! 21 | ~précision 34 22 | affiche pi * 2 23 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/curseur.liv: -------------------------------------------------------------------------------- 1 | pos est un graffiti, x prend 167, y prend 161, taille prend 5 2 | l1 est un ligne, x1 prend 2, x2 prend 585, y1 prend 0, y2 prend 0 3 | l2 est un ligne, x1 prend 0, x2 prend 0, y1 prend 0, y2 prend 600 4 | 5 | projette pos 6 | projette l1 7 | projette l2 8 | tant que vrai 9 | temporise 10 | vide touche 11 | texte @ pos prend sourisx + ", " + sourisy 12 | y1 @ l1 prend sourisy 13 | y2 @ l1 prend sourisy 14 | x1 @ l2 prend sourisx 15 | x2 @ l2 prend sourisx 16 | couleur @ l1 prend sourisy mod 250 + " " + sourisx mod 250 + " " + sourisx mod 250 17 | couleur @ l2 prend sourisx mod 250 + " " + sourisy mod 250 + " " + sourisy mod 250 18 | ferme -------------------------------------------------------------------------------- /linotte-greffons/src/main/java/org/linotte/greffons/impl/Majordome.java: -------------------------------------------------------------------------------- 1 | package org.linotte.greffons.impl; 2 | 3 | import org.linotte.greffons.externe.Greffon; 4 | 5 | /** 6 | * Exemple d'utilisation du greffon 7 | *

8 | * principale : 9 | * messager est un majordome, serviteur vaut "Ronan" 10 | * début 11 | * affiche messager.présentation("Jules") 12 | *

13 | * Et on obtient à l'affichage : 14 | * "Bonjour, mon cher Jules, je suis votre serviteur Ronan" 15 | */ 16 | 17 | public class Majordome extends Greffon { 18 | 19 | @Slot(nom = "présentation") 20 | public String presentation(String prenom) { 21 | return "Bonsoir, mon cher " + prenom + ", je suis votre serviteur !"; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/scrolleur.liv: -------------------------------------------------------------------------------- 1 | globale 2 | form est un formulaire, titre prend "J'ai mal à la tête !", largeur prend 300, hauteur prend 300 3 | d est un graphique, image prend "../../media/tux_graduate.png", x prend 100, y prend 100, taille prend 20 4 | xtoile est un xtoile, x prend 0, y prend 0 5 | toile est une toile, couleur prend "noir",hauteur prend 300 , largeur prend 400 6 | scrolleur est un scrolleur, largeur prend 200, hauteur prend 200, x prend 10, y prend 10 7 | 8 | principale : 9 | ajoute scrolleur dans form 10 | ajoute xtoile dans scrolleur 11 | efface toile 12 | projette d 13 | tant que vrai 14 | tourne à droite d de 1 15 | attends 0.01 seconde 16 | ferme -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/atelier/AbaqueAtelier.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.atelier; 2 | 3 | import javax.swing.SwingConstants; 4 | 5 | public class AbaqueAtelier { 6 | 7 | public static AbaqueAtelier theme = new AbaqueAtelier(); 8 | 9 | public int buttonTextHorizontale = SwingConstants.BOTTOM; 10 | public int buttonTextVerticale = SwingConstants.CENTER; 11 | public int taille_split_tableau = 300; 12 | public int icone_taille = 32; 13 | public boolean petitmenu = false; 14 | 15 | public void setPetitMenu() { 16 | 17 | buttonTextHorizontale = SwingConstants.TOP; 18 | buttonTextVerticale = SwingConstants.RIGHT; 19 | taille_split_tableau = 200; 20 | icone_taille = 16; 21 | petitmenu = true; 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/atelier/CopyL.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.atelier; 2 | 3 | import javax.swing.*; 4 | import java.awt.datatransfer.StringSelection; 5 | import java.awt.event.ActionEvent; 6 | 7 | public class CopyL extends AbstractAction { 8 | private final AtelierFrame atelier; 9 | 10 | public CopyL(AtelierFrame atelier) { 11 | this.atelier = atelier; 12 | } 13 | 14 | public void actionPerformed(ActionEvent e) { 15 | String selection = atelier.getCahierCourant().getSelectedText(); 16 | if (selection == null) 17 | return; 18 | StringSelection clipString = new StringSelection(selection); 19 | atelier.clipbd.setContents(clipString, clipString); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/xml/alize/test/Tests.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.xml.alize.test; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Iterator; 5 | import java.util.List; 6 | 7 | public class Tests implements Iterator { 8 | 9 | private List tests = new ArrayList(); 10 | private int position = 0; 11 | 12 | @Override 13 | public boolean hasNext() { 14 | return position < tests.size(); 15 | } 16 | 17 | @Override 18 | public Test next() { 19 | Test test = tests.get(position); 20 | position++; 21 | return test; 22 | } 23 | 24 | @Override 25 | public void remove() { 26 | } 27 | 28 | public void add(Test test) { 29 | tests.add(test); 30 | test.numero = tests.size(); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/gui/PopupListener.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.gui; 2 | 3 | import javax.swing.*; 4 | import java.awt.event.MouseAdapter; 5 | import java.awt.event.MouseEvent; 6 | 7 | // pour le tableau 8 | public class PopupListener extends MouseAdapter { 9 | JPopupMenu popup; 10 | 11 | public PopupListener(JPopupMenu popupMenu) { 12 | popup = popupMenu; 13 | } 14 | 15 | @Override 16 | public void mousePressed(MouseEvent e) { 17 | maybeShowPopup(e); 18 | } 19 | 20 | @Override 21 | public void mouseReleased(MouseEvent e) { 22 | maybeShowPopup(e); 23 | } 24 | 25 | private void maybeShowPopup(MouseEvent e) { 26 | if (e.isPopupTrigger()) { 27 | popup.show(e.getComponent(), e.getX(), e.getY()); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/xml/appels/TantQue.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.xml.appels; 2 | 3 | import org.linotte.moteur.xml.actions.ConditionAction; 4 | import org.linotte.moteur.xml.alize.kernel.Job; 5 | import org.linotte.moteur.xml.alize.kernel.processus.Processus; 6 | import org.linotte.moteur.xml.analyse.ItemXML; 7 | 8 | public class TantQue extends Boucle { 9 | 10 | private String param; 11 | private ItemXML[] valeurs; 12 | 13 | public TantQue(Processus courant, String pparam, ItemXML[] pvaleurs) { 14 | super(courant, null); 15 | param = pparam; 16 | valeurs = pvaleurs; 17 | } 18 | 19 | @Override 20 | public boolean suiteBoucle(Job job) throws Exception { 21 | return ConditionAction.analyseCondition(param, job, valeurs); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/xml/alize/parseur/a/Lexer.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.xml.alize.parseur.a; 2 | 3 | import org.linotte.moteur.exception.FinException; 4 | 5 | public interface Lexer { 6 | 7 | String motSuivant() throws FinException; 8 | 9 | String resteLigne() throws FinException; 10 | 11 | String getMot(); 12 | 13 | int getPosition(); 14 | 15 | void setPosition(int pos) throws FinException; 16 | 17 | boolean isFinDeLigne(); 18 | 19 | int getLastPosition(); 20 | 21 | void retour(); 22 | 23 | void setFaireExeptionFinDeLigne(boolean faireExeptionFinDeLigne); 24 | 25 | String subString(int start, int end); 26 | 27 | int getLigneCourante(); 28 | 29 | int getPositionAvantCommentaire(); 30 | 31 | boolean isFaireExeptionFinDeLigne(); 32 | 33 | } -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/slider.liv: -------------------------------------------------------------------------------- 1 | globale 2 | form est un formulaire, titre prend "Le Slider", largeur prend 300, hauteur prend 260 3 | slider est un slider, x prend 20, y prend 20, minimum prend -20, maximum prend 200, valeur prend 20 4 | toile est une toile, couleur prend "blanc" 5 | tux est un graphique, image prend "../../media/tux_graduate.png", x prend 50, y prend 50, transparence prend 90, taille prend 20 6 | 7 | formulaire : 8 | Projette toile 9 | Projette tux 10 | Ajoute slider dans form 11 | Fais réagir slider à "clic souris" pour changer le zoom 12 | Tant que vrai 13 | temporise 14 | vide touches 15 | Ferme 16 | 17 | changer le zoom : 18 | *slider est un slider 19 | taille @ tux prend valeur @ slider 20 | Reviens -------------------------------------------------------------------------------- /linotte-greffons/src/main/java/org/linotte/greffons/impl/Article.java: -------------------------------------------------------------------------------- 1 | package org.linotte.greffons.impl; 2 | 3 | public class Article { 4 | 5 | private String titre, date, description, lien, image; 6 | 7 | public Article(String titre, String date, String description, String lien, String image) { 8 | this.titre = titre; 9 | this.date = date; 10 | this.description = description; 11 | this.lien = lien; 12 | this.image = image; 13 | } 14 | 15 | public String getTitre() { 16 | return titre; 17 | } 18 | 19 | public String getDate() { 20 | return date; 21 | } 22 | 23 | public String getDescription() { 24 | return description; 25 | } 26 | 27 | public String getLien() { 28 | return lien; 29 | } 30 | 31 | public String getImage() { 32 | return image; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/ui/i/UI.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.ui.i; 2 | 3 | public interface UI { 4 | 5 | /** 6 | * Pré traitement ou affichage du timbre avant la méthode dessine(Planche UI) 7 | * @param planche 8 | */ 9 | void pre_dessine(PlancheUI planche); 10 | 11 | /** 12 | * Dessine le timbre sur la planche 13 | * @param pui 14 | */ 15 | void dessine(PlancheUI pui); 16 | 17 | /** 18 | * @param x 19 | * @param y 20 | */ 21 | boolean clique(int x, int y); 22 | 23 | /** 24 | * Est-ce que le composant contient les coordonnées de la souris de l'utilisateur 25 | * @param x 26 | * @param y 27 | * @return 28 | */ 29 | boolean contient(int x, int y); 30 | 31 | void positionnerProchainTimbre(); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/09_mathematiques.liv: -------------------------------------------------------------------------------- 1 | affiche carré 4 2 | affiche 2 puiss 4 3 | affiche vrai ou faux 4 | affiche (2 puiss 23 + 5 * 6 - 1) / 3 5 | 6 | 7 | /*Les fonctions disponibles sont : 8 | 9 | Carré d'un nombre : carré x 10 | Cosinus : cos x 11 | Sinus : sin x 12 | Fonction exponentielle : exp x 13 | Logarithme décimal: log x 14 | Logarithme naturel: logn x 15 | Valeur absolue : abs x 16 | Racine carrée : racine x 17 | Arrondi : arrondi x 18 | Cube d'un nombre : cube x 19 | Puissance : x puiss n 20 | Modulo : x mod n 21 | Et logique : x et n 22 | Ou logique : x ou n 23 | Xou logique : x xou n 24 | Tangente : tan x 25 | Arc cosinus : acos x 26 | Arc sin : asin x 27 | Arc tangente : atan x 28 | Hasard : hasard x 29 | */ -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/atelier/CutL.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.atelier; 2 | 3 | import javax.swing.*; 4 | import java.awt.datatransfer.StringSelection; 5 | import java.awt.event.ActionEvent; 6 | 7 | public class CutL extends AbstractAction { 8 | private final AtelierFrame atelier; 9 | 10 | public CutL(AtelierFrame atelier) { 11 | this.atelier = atelier; 12 | } 13 | 14 | public void actionPerformed(ActionEvent e) { 15 | String selection = atelier.getCahierCourant().getSelectedText(); 16 | if (selection == null) 17 | return; 18 | StringSelection clipString = new StringSelection(selection); 19 | atelier.clipbd.setContents(clipString, clipString); 20 | atelier.getCahierCourant().replaceSelection(""); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/greffons/impression_toile.liv: -------------------------------------------------------------------------------- 1 | code : 2 | texte est un parchemin, x prend 10, y prend 200, taille prend 10, texte prend "Hello, 3 | on peut maintenant imprimer 4 | la toile sur l'imprimante ! 5 | Sympa ?" 6 | cercle est un cercle, taille prend 1, couleur prend "rouge", x prend 200, y prend 200, rayon prend 200 7 | i est un nombre valant 0 8 | efface toile 9 | projette texte & cercle 10 | pour i de 30 à 200 suivant i + 10, parcours création carré avec i 11 | va vers imprimer 12 | 13 | création carré : 14 | t est un rectangle 15 | *i est un nombre 16 | largeur@t & hauteur@t prend 20 17 | x@t & y@t prend 50 + i 18 | projette t 19 | reviens 20 | 21 | imprimer : 22 | imprimeur est un imprimeur 23 | affiche imprimeur.imprimertoile() 24 | Termine 25 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/greffons/java/interne/a/MethodeInterne.java: -------------------------------------------------------------------------------- 1 | package org.linotte.greffons.java.interne.a; 2 | 3 | import org.linotte.greffons.externe.Greffon; 4 | import org.linotte.greffons.java.JavaMethod; 5 | import org.linotte.moteur.entites.Acteur; 6 | import org.linotte.moteur.exception.Constantes; 7 | import org.linotte.moteur.exception.ErreurException; 8 | 9 | public abstract class MethodeInterne extends JavaMethod { 10 | 11 | public MethodeInterne() { 12 | super(null); 13 | } 14 | 15 | public Greffon.ObjetLinotte appeler(Acteur moi, Greffon greffon, Greffon.ObjetLinotte... parametres) throws Exception { 16 | throw new ErreurException(Constantes.ERREUR_GREFFON); 17 | } 18 | 19 | @Override 20 | public String parametres() { 21 | return ""; 22 | } 23 | 24 | public abstract String nom(); 25 | 26 | } -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/atelier/PasteL.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.atelier; 2 | 3 | import javax.swing.*; 4 | import java.awt.datatransfer.DataFlavor; 5 | import java.awt.datatransfer.Transferable; 6 | import java.awt.event.ActionEvent; 7 | 8 | public class PasteL extends AbstractAction { 9 | private final AtelierFrame atelier; 10 | 11 | public PasteL(AtelierFrame atelier) { 12 | this.atelier = atelier; 13 | } 14 | 15 | public void actionPerformed(ActionEvent e) { 16 | Transferable clipData = atelier.clipbd.getContents(atelier); 17 | try { 18 | String clipString = (String) clipData.getTransferData(DataFlavor.stringFlavor); 19 | atelier.getCahierCourant().replaceSelection(clipString); 20 | } catch (Exception ex) { 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/ui/i/ThemeUI.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.ui.i; 2 | 3 | import org.linotte.frame.cahier.timbre.entite.*; 4 | 5 | public interface ThemeUI { 6 | 7 | ActeurUI getActeurUI(Acteur acteur); 8 | 9 | TextuelUI getTextuelUI(Textuel acteur); 10 | 11 | TimbreUI getTimbreUI(Timbre acteur); 12 | 13 | VerbeUI getTimbreVerbeUI(Verbe verbe); 14 | 15 | DebutUI getVerbeUI(Debut debut); 16 | 17 | ConditionUI getConditionUI(Condition condition); 18 | 19 | BoutonUI getBoutonUI(Bouton bouton); 20 | 21 | BlocFinUI getBlocFinUI(BlocFin blocfin); 22 | 23 | TantQueUI getTantQueUI(TantQue tantque); 24 | 25 | PourUI getPourUI(Pour pour); 26 | 27 | CommentaireUI getCommentaireUI(Commentaire commentaire); 28 | 29 | FonctionUI getFonctionUI(Fonction fonction); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/vagues.liv: -------------------------------------------------------------------------------- 1 | /*Imaginez aussi le bruit de la mer....*/ 2 | globale 3 | mer est une toile, couleur prend "bleu outremer" 4 | 5 | principale : 6 | x & y est un nombre 7 | projette mer 8 | efface toile 9 | tant que vrai 10 | attends 0.01 secondes 11 | si (x != sourisx) ou (y != sourisy) 12 | x prend sourisx 13 | y prend sourisy 14 | appelle vague avec clone x, clone y 15 | ferme 16 | ferme 17 | 18 | vague : x, y 19 | vague est un cercle, x prend x, y prend y, plein prend faux, rayon prend 1, taille prend 2, couleur prend "bleu marine" 20 | projette vague 21 | pour chaque 50 22 | rayon@vague prend joker 23 | transparence@vague prend 100 - joker * 2 24 | attends 40 millisecondes 25 | ferme 26 | efface vague 27 | annihile vague // pour libérer la mémoire 28 | reviens 29 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/atelier/OuvrirLivreAction.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.atelier; 2 | 3 | import javax.swing.*; 4 | import java.awt.event.ActionEvent; 5 | import java.io.File; 6 | 7 | public class OuvrirLivreAction extends AbstractAction { 8 | 9 | private final Atelier atelier; 10 | public File info; 11 | 12 | public OuvrirLivreAction(Atelier atelier, File info) { 13 | super(info.getName()); 14 | this.atelier = atelier; 15 | this.info = info; 16 | } 17 | 18 | @Override 19 | public void actionPerformed(ActionEvent e) { 20 | try { 21 | synchronized (atelier.listHistorique) { 22 | atelier.listHistorique.remove(this); 23 | } 24 | atelier.ouvrirLivre(info); 25 | } catch (Exception e1) { 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/selecteur.liv: -------------------------------------------------------------------------------- 1 | globale 2 | form est un formulaire, titre prend "Le sélecteur", largeur prend 200, hauteur prend 100 3 | s1 est un sélecteur, valeurs prend "sinople|rose balais|bleu cyan", x prend 20, y prend 50 4 | l1 est un étiquette, texte prend "Choisissez la couleur :", x prend 20, y prend 20 5 | toile est une toile, couleur prend "blanc" 6 | 7 | formulaire : 8 | Projette toile 9 | Ajoute s1 & l1 dans form 10 | Fais réagir s1 à "clic souris" pour changer la couleur 11 | Fais réagir form à "clic souris" pour fermer la fenêtre 12 | Tant que vrai 13 | temporise 14 | vide touches 15 | Ferme 16 | 17 | changer la couleur : 18 | *s est un sélecteur 19 | Couleur @ toile prend valeur @ s 20 | Reviens 21 | 22 | fermer la fenêtre : 23 | *f est un formulaire 24 | Termine 25 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/indicateur.liv: -------------------------------------------------------------------------------- 1 | form est un formulaire, titre prend "L'indicateur", largeur prend 300, hauteur prend 260 2 | indicateurh est un indicateur, x prend 20, y prend 20, valeur prend 0, largeur prend 200, hauteur prend 20 3 | indicateurv est un indicateur, x prend 70, y prend 50, valeur prend 0, largeur prend 20, hauteur prend 200, orientation prend "vertical" 4 | indicateur est un indicateur, x prend 20, y prend 20, valeur prend 0, largeur prend 200, hauteur prend 20 5 | 6 | Ajoute indicateurh & indicateurv dans form 7 | Appelle boucle 8 | Tant que vrai 9 | Temporise 10 | Ferme 11 | 12 | Boucle : 13 | valeur est un nombre 14 | Pour valeur de 0 à 100 15 | Attends 200 millisecondes 16 | valeur @ indicateurh prend valeur 17 | valeur @ indicateurv prend 100 - valeur 18 | Ferme 19 | Termine 20 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/menu.liv: -------------------------------------------------------------------------------- 1 | form est un formulaire, titre prend "Menu du jour...", largeur prend 400, hauteur prend 260 2 | m1 est un menu, texte prend "Outils" 3 | b1 est un menubouton, texte prend "Blanc" 4 | sm1 est un sousmenu, texte prend "Démarrer" 5 | l1 est un étiquette, texte prend "", x prend 30, y prend 100 6 | 7 | /*On ajoute les menus principaux*/ 8 | Ajoute m1 & l1 & b1 dans form 9 | /*On ajoute les sous-menus*/ 10 | Ajoute sm1 dans m1 11 | Fais réagir sm1 à "clic souris" pour message 12 | Fais réagir b1 à "clic souris" pour messagebouton 13 | tant que vrai 14 | temporise 15 | ferme 16 | 17 | message : 18 | *m est un sousmenu 19 | texte @ l1 prend "Le sous-menu fonctionne !" 20 | Reviens 21 | 22 | Messagebouton : 23 | *m est un menubouton 24 | texte @ l1 prend "Le bouton fonctionne !" 25 | Reviens 26 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/pluie.liv: -------------------------------------------------------------------------------- 1 | /*Imaginez entendre le bruit de la pluie....*/ 2 | x est un nombre 3 | y est un nombre 4 | mer est une toile, couleur prend "bleu de minuit" 5 | 6 | projette mer 7 | efface toile 8 | tant que vrai 9 | attends 0.01 secondes 10 | x prend hasard(ecranv) 11 | y prend hasard(ecranh) 12 | appelle vague avec x, y 13 | attends 0.15 secondes 14 | appelle vague avec x, y 15 | ferme 16 | 17 | vague : 18 | *x est un nombre 19 | *y est un nombre 20 | vague est un cercle, x prend x, y prend y, plein prend faux, rayon prend 1, taille prend 2, couleur prend "vert d'eau" 21 | projette vague 22 | pour chaque 50 23 | rayon@vague prend joker 24 | taille@vague prend 1 + joker / 2 25 | transparence@vague prend 100 - joker * 2 26 | attends 10 millisecondes 27 | ferme 28 | efface vague 29 | annihile vague 30 | reviens -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/cercle.liv: -------------------------------------------------------------------------------- 1 | /*Auteur : $imon 2 | http://langagelinotte.free.fr/punbb/viewtopic.php?id=293*/ 3 | 4 | NOIR_1 est un crayon, couleur prend "noir", x prend 100, y prend 200, taille prend 1, angle prend 0, pointe prend vrai, posé prend vrai 5 | NOIR_2 est un crayon, couleur prend "noir", x prend 100, y prend 200, taille prend 1, angle prend 0, pointe prend vrai, posé prend vrai 6 | fond est une toile, couleur prend "vert d'eau", hauteur prend 400, largeur prend 400 7 | new_x & new_y est un nombre 8 | efface toile 9 | projette fond 10 | projette NOIR_1 11 | projette NOIR_2 12 | pour chaque 201 13 | new_x prend 100 + joker 14 | new_y prend racine ( ( 10000 - carré ( new_x - 200 ))) + 200 15 | déplace NOIR_1 vers new_x et new_y 16 | déplace NOIR_2 vers new_x et ( 400 - new_y ) 17 | attends 20 millisecondes 18 | ferme 19 | termine 20 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/k_contributions/invader2.liv: -------------------------------------------------------------------------------- 1 | // Concours SiteDuZero : http://fr.openclassrooms.com/forum/sujet/atelier-fond-anime-space-invaders?page=2#message-84276241 2 | space invaders : 3 | bloc est un rectangle, largeur prend 10, hauteur prend 10, plein prend vrai 4 | x & y est un nombre 5 | tant que vrai 6 | x & y prend hasard(500) 7 | couleur@bloc = couleurs{hasard(x/2)} 8 | pour chaque {2,4,8,9,10,11,12,15,17,19,22,24,26,28,29,30,31,32,33,34,35,37,39,41} 9 | x@bloc = x + joker mod 7*11 10 | y@bloc = y + entier(joker/7)*11 11 | projette clone(bloc) 12 | ferme 13 | couleur@bloc = "noir" 14 | x@bloc = x + 2 * 11 15 | y@bloc = y + (2 + x mod 2) * 11 16 | projette clone(bloc) 17 | x@bloc = x + 4 * 11 18 | y@bloc = y + (2 + y mod 2) * 11 19 | projette clone(bloc) 20 | attends 1 seconde 21 | efface toile 22 | ferme 23 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/entites/ecouteurs/GreffonValeurListenerImpl.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.entites.ecouteurs; 2 | 3 | import org.linotte.greffons.externe.Greffon.GreffonValeurListener; 4 | import org.linotte.moteur.entites.Prototype; 5 | import org.linotte.moteur.exception.ErreurException; 6 | 7 | public class GreffonValeurListenerImpl implements GreffonValeurListener { 8 | 9 | private Prototype miroir = null; 10 | 11 | public GreffonValeurListenerImpl(Prototype a) { 12 | miroir = a; 13 | } 14 | 15 | public void setValeur(String clef, Object valeur) { 16 | try { 17 | // Patch pour alléger la gestion des valeurs avec les greffons : 18 | // http://langagelinotte.free.fr/forum/showthread.php?tid=1002 19 | miroir.retourneAttribut(clef).setValeurSimple(valeur); 20 | } catch (ErreurException e) { 21 | e.printStackTrace(); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/d_confirme/fibonacci.liv: -------------------------------------------------------------------------------- 1 | /* 2 | La section 'tests' permet de simuler l'interaction d'un utilisateur sur le livre. 3 | Le symbole '<' va vérifier que le test reçoit bien l'affichage souhaité par le verbe 'afficher'. 4 | Le symbole '>' répond au verbe 'demander' par la valeur indiquée. 5 | Il est intéressant, avant l'écriture d'un algorithme, de prévoir la réponse souhaitée. 6 | */ 7 | tests 8 | // On attend une chaîne quelconque 9 | < "Nombre à calculer ?" 10 | // On répond à la question par la valeur 60 11 | > 60 12 | // On attend le résultat suivant 13 | < "Le résultat est : 1548008755920" 14 | 15 | code : 16 | A est un nombre valant 1 17 | B & C & boucle est un nombre valant 0 18 | "Nombre à calculer ?" ! 19 | boucle ? 20 | de 2 à boucle 21 | C prend A + B 22 | B prend A 23 | A prend C 24 | ferme 25 | "Le résultat est : {A}" ! 26 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/decomposition_facteurs_premiers.liv: -------------------------------------------------------------------------------- 1 | Algorithme : 2 | n est un nombre 3 | diviseur est un nombre 4 | nbfacteurs est un nombre valant 0 5 | a est un nombre 6 | puissance est un nombre 7 | resultat est un texte 8 | flag premier est un drapeau valant faux 9 | demande n 10 | a prend n 11 | resultat prend n + " = " 12 | pour diviseur de 2 à entier (n/2) 13 | puissance prend 0 14 | tant que a mod diviseur == 0 15 | /*a est premier*/ 16 | flag premier prend vrai 17 | puissance prend puissance + 1 18 | a prend a / diviseur 19 | ferme 20 | si flag premier 21 | nbfacteurs prend nbfacteurs + 1 22 | si nbfacteurs > 1, resultat prend resultat + " * " 23 | resultat prend resultat + diviseur + "^" + puissance 24 | puissance prend 1 25 | flag premier prend faux 26 | ferme 27 | ferme 28 | affiche resultat 29 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/xml/alize/kernel/ContextHelper.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.xml.alize.kernel; 2 | 3 | import org.alize.kernel.AKRuntimeContextI; 4 | import org.alize.security.Habilitation; 5 | import org.linotte.moteur.xml.Linotte; 6 | 7 | import java.io.File; 8 | import java.util.List; 9 | 10 | public class ContextHelper { 11 | 12 | public static void populate(AKRuntimeContextI pcontext, Linotte linotte, File cheminReference, List habilitations) { 13 | RuntimeContext context = (RuntimeContext) pcontext; 14 | context.setLinotte(linotte); 15 | context.setLibrairie(linotte.getLibrairie().cloneMoi()); 16 | context.setIhm(linotte.getIhm()); 17 | context.setReference(cheminReference); 18 | if (habilitations != null) { 19 | for (Habilitation habilitation : habilitations) { 20 | context.addHabilitation(habilitation); 21 | } 22 | } 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /linotte-dist/src/chocolatey/linotte/tools/chocolateyInstall.ps1: -------------------------------------------------------------------------------- 1 | 2 | $ErrorActionPreference = 'Stop'; # stop on all errors 3 | 4 | $binRoot = $(Split-Path -parent $MyInvocation.MyCommand.Definition) 5 | $toolsDir = Join-Path $binRoot "linotte" 6 | $exeDir = Join-Path $toolsDir "Linotte.exe" 7 | 8 | $packageName= 'linotte' 9 | $url = 'https://github.com/cpc6128/LangageLinotte/releases/download/v3.14/Linotte_3.14-2022-09-22-20-02.zip' 10 | 11 | $packageArgs = @{ 12 | packageName = $packageName 13 | unzipLocation = $toolsDir 14 | url = $url 15 | checksum = '1E5A8E56B883815548FDA2AE35964EBAC608C7615A3C5B931AD0EBDAE736BF1B' 16 | checksumType = 'sha256' 17 | } 18 | 19 | Install-ChocolateyZipPackage @packageArgs 20 | 21 | Install-ChocolateyShortcut -shortcutFilePath (Join-Path $env:ALLUSERSPROFILE "Microsoft\Windows\Start Menu\Atelier Linotte.lnk") -TargetPath (Join-Path $toolsDir "Linotte.exe") ` 22 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/fichiers/conduit_simple1.liv: -------------------------------------------------------------------------------- 1 | /* 2 | Exemple simple pour écrire et lire du texte dans un fichier ! 3 | Plus d'informations ici : http://langagelinotte.free.fr/wiki/index.php?title=Conduit 4 | */ 5 | globale 6 | container est un conduit 7 | // Attention, le répertoire "c:/temp" doit exister !! 8 | localisation est un texte valant "c:/temp/linotte_conduit1.txt" // Sous Windows 9 | // localisation est un texte valant "/tmp/linotte_conduit1.txt" // Sous Linux 10 | 11 | principale : 12 | efface tableau 13 | parcours écriture 14 | parcours lecture 15 | 16 | écriture : 17 | container.enregistrer(localisation) 18 | container.écrire("je veux écrire du texte dans un fichier !") 19 | container.fermer() 20 | reviens 21 | 22 | lecture : 23 | container.ouvrir(localisation) 24 | affiche container.lire() // Lecture du fichier en entier 25 | container.fermer() 26 | reviens 27 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/ui/theme/simple/Abaque.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.ui.theme.simple; 2 | 3 | public class Abaque { 4 | 5 | public final static boolean DEBUG = false; 6 | 7 | final public static int CONDITION_HAUTEUR_LIEN = 10; 8 | 9 | final public static int CONDITION_HAUTEUR_LIEN_SECONDAIRE = 20; 10 | 11 | public final static int LARGEUR_TIMBRE = 90; 12 | 13 | public final static int LARGEUR_PARAMETRE_BOITE = 40; 14 | 15 | public final static int HAUTEUR_TIMBRE = 60; 16 | 17 | public final static int ANGLE_TIMBRE = 10; 18 | 19 | public final static int ATTACHE_AVANT_TIMBRE = 15; 20 | 21 | public final static int ESPACEMENT_TIMBRE = 15; 22 | 23 | public final static int decalageParametre = 35; 24 | 25 | public final static int POUR_DISTANCE_ACTEURS = 60; 26 | 27 | public final static int FONT_SIZE = 12; 28 | 29 | public final static String FONT = "Arial"; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/polygone.liv: -------------------------------------------------------------------------------- 1 | vaisseau est un polygone, couleur prend "rouge", plein prend vrai, x prend 100, y prend 100, dx1 prend 10 ,dy1 prend 30, dx2 prend 0 ,dy2 prend 20, dx3 prend -10 ,dy3 prend 30 2 | flotte est un casier de polygone valant vaisseau, #vaisseau, #vaisseau 3 | t est un nombre 4 | 5 | efface toile 6 | pour chaque flotte 7 | t prend t + 20 8 | projette joker 9 | déplace joker de t et t 10 | angle@joker prend 360 11 | mélange angle@joker 12 | ferme 13 | tant que vrai 14 | pour chaque flotte 15 | tourne à gauche joker de 1 16 | parcours test avec joker 17 | ferme 18 | attends 10 millisecondes 19 | ferme 20 | 21 | test : 22 | *v est un polygone 23 | test est un nombre 24 | pour chaque flotte 25 | si v != joker 26 | si v.collision(joker), test prend 1 27 | ferme 28 | ferme 29 | si test == 1, couleur@v prend "jaune" 30 | sinon couleur@v prend "rouge" 31 | reviens -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/tableau_couleurs.liv: -------------------------------------------------------------------------------- 1 | r est un nombre 2 | v est un nombre 3 | taille est un nombre 4 | MAX est un nombre valant 50 5 | p est un point, taille prend 1, taille prend 10 6 | points est un casier de point 7 | temp est un texte 8 | 9 | Efface toile 10 | Projette p 11 | De 0 à MAX 12 | r prend joker 13 | De 0 à MAX 14 | v prend joker 15 | Parcours afficher avec #p 16 | Ferme 17 | Ferme 18 | Mesure points dans taille 19 | taille prend taille - 1 20 | De 0 à taille 21 | temp prend couleur @ (points{joker}) 22 | couleur @ (points{joker}) prend couleur @ (points{taille - joker}) 23 | couleur @ (points{taille - joker}) prend temp 24 | Attends 2 millisecondes 25 | Ferme 26 | Termine 27 | 28 | afficher : 29 | *p est un point 30 | ajoute p dans points 31 | x @ p prend (r * 10) + 30 32 | y @ p prend (v * 10) + 30 33 | couleur @ p prend (r*5) + " " + (v*5) + " " + (255-(v*5)) 34 | Reviens 35 | -------------------------------------------------------------------------------- /linotte-lanceur/src/test/java/org/linotte/alize/TestsErreurs.java: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | package org.linotte.alize; 5 | 6 | import org.junit.Test; 7 | 8 | import java.util.ResourceBundle; 9 | 10 | /** 11 | * @author CPC 12 | * 13 | */ 14 | public class TestsErreurs extends AbstractSimpleAffichageTest { 15 | 16 | public TestsErreurs() { 17 | super(ResourceBundle.getBundle("livres.tests_avec_erreurs",new UTF8Control())); 18 | } 19 | 20 | enum LIVRE { 21 | FONCTION_PARAMETRE, FONCTION2_PARAMETRE, FONCTION3_PARAMETRE 22 | } 23 | 24 | @Test 25 | public void fonctionParametres() throws Exception { 26 | executerLivreAvecEreur(LIVRE.FONCTION_PARAMETRE); 27 | } 28 | 29 | @Test 30 | public void fonction2Parametres() throws Exception { 31 | executerLivreAvecEreur(LIVRE.FONCTION2_PARAMETRE); 32 | } 33 | 34 | @Test 35 | public void fonction3Parametres() throws Exception { 36 | executerLivreAvecEreur(LIVRE.FONCTION3_PARAMETRE); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/10_les_fonctions.liv: -------------------------------------------------------------------------------- 1 | prénom prend "Nicolas" 2 | âge prend 32 3 | affiche présentation (âge, prénom, 0) 4 | prénom prend "Alice" 5 | âge prend 19 6 | affiche présentation (âge, prénom, 1) 7 | 8 | présentation : âge, prénom, genre // On ajoute les paramètres à suite du nom de la fonction 9 | information est un texte 10 | information prend "Bonjour, " + prénom + ", tu es " 11 | si genre = 0, information prend information + "le bienvenu." 12 | sinon information prend information + "la bienvenue." 13 | si âge <= 20 14 | information prend information + " Tu es bien jeune avec tes " + âge + " années !" 15 | information prend information + " Mais, tu iras loin dans la programmation !" 16 | ferme 17 | sinon 18 | information prend information + " Tu fais bien plus jeune que tes " + âge + " années !" 19 | information prend information + " Avec Linotte, la programmation ne sera plus un secret pour toi !" 20 | ferme 21 | retourne information -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/xml/Version.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.xml; 2 | 3 | import java.util.ResourceBundle; 4 | 5 | public class Version { 6 | 7 | private static ResourceBundle bundle; 8 | 9 | static { 10 | bundle = ResourceBundle.getBundle("version"); 11 | } 12 | 13 | private final static String VERSION_RELEASE = bundle.getString("VERSION_RELEASE"); 14 | private final static String URL_HOME = bundle.getString("URL_HOME"); 15 | private final static boolean BETA = Boolean.parseBoolean(bundle.getString("BETA")); 16 | public final static String AUTEUR = bundle.getString("AUTEUR"); 17 | public final static String LICENCE = bundle.getString("LICENCE"); 18 | public final static String DATE = bundle.getString("DATE"); 19 | 20 | public static String getVersion() { 21 | return VERSION_RELEASE; 22 | } 23 | 24 | public static String getURL() { 25 | return URL_HOME; 26 | } 27 | 28 | public static boolean isBeta() { 29 | return BETA; 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/paint.liv: -------------------------------------------------------------------------------- 1 | ciel est une toile, couleur prend "blanc" 2 | c1 est un crayon, couleur prend "bleu", x prend 100, y prend 100, taille prend 2, ... 3 | pointe prend faux, posé prend faux 4 | information est un parchemin, texte prend "Voici le premier Paint écrit en Linotte ! 5 | Utilisez le bouton gauche de la souris pour activer ou désactiver le crayon.", x prend 100, ... 6 | y prend 100, largeur prend 500, taille prend 5 7 | 8 | principale : 9 | efface toile 10 | projette ciel 11 | projette c1 12 | projette information 13 | tant que touche != "clique", temporise 14 | efface information 15 | tant que vrai 16 | déplace c1 vers sourisx et sourisy 17 | temporise 18 | si touche == "clique" 19 | si (posé de c1) == vrai 20 | posé de c1 prend faux 21 | pointe de c1 prend faux 22 | ferme 23 | sinon 24 | posé de c1 prend vrai 25 | pointe de c1 prend vrai 26 | ferme 27 | ferme 28 | ferme 29 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/greffons/liNotPad.liv: -------------------------------------------------------------------------------- 1 | globale 2 | form est un formulaire, titre prend "La boite à texte", largeur prend 400, hauteur prend 260 3 | boite est un boite,x prend 30, y prend 30, largeur prend 200, hauteur prend 100 4 | b1 est un menubouton, texte prend "Afficher le texte dans le tableau" 5 | l1 est un étiquette, texte prend "", x prend 30, y prend 200 6 | b2 est un menubouton, texte prend "Ouvrir un fichier" 7 | c est un conduit 8 | 9 | principale : 10 | Ajoute boite & b1 & b2 & l1 dans form 11 | Fais réagir b1 à "clic souris" pour valeur 12 | Fais réagir b2 à "clic souris" pour ouvrir 13 | tant que 1 != 2 14 | temporise 15 | vide touches 16 | ferme 17 | 18 | valeur : 19 | *b est un menubouton 20 | texte@boite ! 21 | Reviens 22 | 23 | ouvrir : 24 | *b est un menubouton 25 | retour est un drapeau 26 | retour prend c.sélectionneretouvrir() 27 | si retour 28 | texte@boite prend c.lire() 29 | ferme 30 | Reviens 31 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/fichiers/conduit_ihm.liv: -------------------------------------------------------------------------------- 1 | globale 2 | form est un formulaire, titre prend "La boite à texte", largeur prend 400, hauteur prend 260 3 | boite est un boite,x prend 30, y prend 30, largeur prend 200, hauteur prend 100 4 | b1 est un menubouton, texte prend "Afficher le texte dans le tableau" 5 | l1 est un étiquette, texte prend "", x prend 30, y prend 200 6 | b2 est un menubouton, texte prend "Ouvrir un fichier" 7 | container est un conduit 8 | 9 | principal : 10 | Ajoute boite & b1 & b2 & l1 dans form 11 | Fais réagir b1 à "clic souris" pour valeur 12 | Fais réagir b2 à "clic souris" pour ouvrir 13 | tant que 1 != 2 14 | temporise 15 | ferme 16 | 17 | valeur : 18 | *b est un menubouton 19 | texte@boite ! 20 | Reviens 21 | 22 | Ouvrir : 23 | *b est un menubouton 24 | retour est un drapeau 25 | retour prend container.sélectionneretouvrir() 26 | si retour 27 | texte@boite prend container.lire() 28 | ferme 29 | Reviens 30 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/tournicoti.liv: -------------------------------------------------------------------------------- 1 | globale 2 | form est un formulaire, titre prend "J'ai mal à la tête !", largeur prend 400, hauteur prend 260 3 | b1 est un bouton, texte prend "A gauche", x prend 30, y prend 60 4 | b2 est un bouton, texte prend "A droite", x prend 130, y prend 60 5 | l1 est un étiquette, texte prend "Dans quel sens veux-tu que Tux tourne ?", x prend 30, y prend 30 6 | d est un graphique, image prend "../../media/tux_graduate.png", x prend 100, y prend 100, taille prend 20 7 | sens est un nombre 8 | 9 | principale : 10 | ajoute b1 & b2 & l1 dans form 11 | efface toile 12 | projette d 13 | Fais réagir b1 à "clic souris" pour à droite 14 | Fais réagir b2 à "clic souris" pour à gauche 15 | tant que vrai 16 | tourne à droite d de sens 17 | attends 0.01 seconde 18 | ferme 19 | 20 | à droite : 21 | *b est un bouton 22 | sens prend -1 23 | Reviens 24 | 25 | à gauche : 26 | *b est un bouton 27 | sens prend 1 28 | Reviens -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/Ximage.liv: -------------------------------------------------------------------------------- 1 | Bombernotte : /*V0.0*/ 2 | fond est une toile, couleur prend "186 254 202" 3 | map est un image, image prend "everything.png" // <- image qui contient tous les sprites 4 | sprites est un casier de image // Tableau qui contenir nos prites à afficher 5 | position est un nombre 6 | efface toile 7 | projette map 8 | pour 8 // On découpe les 8 sprites 9 | dx de map prend 8 10 | dy de map prend 10 + 32 * joker 11 | hauteur de map prend 23 12 | largeur de map prend 18 13 | // On positionne le sprite aléatoirement sur la toile 14 | y de map prend hasard(400) + 20 15 | x de map prend hasard(400) + 20 16 | ajoute clone(map) dans sprites // on le clone afin de l'ajouter à la liste des sprites. 17 | ferme 18 | tant que vrai // On boucle sur les 17 positions possibles : 19 | pour position de 8 à 392 suivant position + 24 20 | pour chaque sprites, dx de joker prend position 21 | attends 200 millisecondes 22 | ferme 23 | ferme 24 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/greffons/java/interne/a/MethodeInterneDirecte.java: -------------------------------------------------------------------------------- 1 | package org.linotte.greffons.java.interne.a; 2 | 3 | import org.linotte.greffons.externe.Greffon; 4 | import org.linotte.greffons.externe.Greffon.ObjetLinotte; 5 | import org.linotte.moteur.entites.Acteur; 6 | import org.linotte.moteur.exception.Constantes; 7 | import org.linotte.moteur.exception.ErreurException; 8 | 9 | /** 10 | * Cette classe permet de ne pas passer par l'API des greffons. 11 | * 12 | * @author ronan.mounes@gmail.com 13 | */ 14 | public abstract class MethodeInterneDirecte extends MethodeInterne { 15 | 16 | public MethodeInterneDirecte() { 17 | super(); 18 | } 19 | 20 | @Override 21 | public final ObjetLinotte appeler(Greffon greffon, final ObjetLinotte... parametres) throws Exception { 22 | throw new ErreurException(Constantes.ERREUR_GREFFON); 23 | } 24 | 25 | public abstract Acteur appeler(Acteur moi, Greffon greffon, final Acteur... parametres) throws Exception; 26 | 27 | } -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/a_debutant/bienvenue.liv: -------------------------------------------------------------------------------- 1 | /* 2 | Cliquez sur le bouton LIRE pour exécuter ce programme très simple 3 | */ 4 | // Les variables doivent être déclarées avant le mot clé "début" : 5 | prénom est un texte 6 | âge & boucle est un nombre 7 | 8 | affiche "Bonjour ! Quel est ton prénom ?" 9 | demande prénom 10 | affiche "Bravo " + prénom + ", tu viens de lire ton premier livre Linotte !" 11 | // exemple d'utilisation d'une condition : 12 | affiche "Quel âge as-tu ?" 13 | demande âge 14 | si âge <= 18 15 | affiche "Tu es bien jeune avec tes " + âge + " années !" 16 | affiche "Mais, tu iras loin dans la programmation !" 17 | ferme 18 | sinon 19 | affiche "Tu fais bien plus jeune que tes " + âge + " années !" 20 | affiche "Avec Linotte, la programmation ne sera plus un secret pour toi !" 21 | ferme 22 | attends 2 secondes 23 | // exemple d'une boucle : 24 | affiche "En tout cas, moi, je sais compter jusqu'à dix !" 25 | pour boucle de 1 à 10 affiche boucle 26 | affiche "à bientôt !" -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/c_logo/maison.liv: -------------------------------------------------------------------------------- 1 | ciel est une toile, couleur prend "blanc", pointeur prend "main" 2 | c1 est un crayon, couleur prend "brique", x prend 295, y prend 225, taille prend 2, pointe prend vrai, posé prend vrai 3 | 4 | efface toile 5 | projette ciel 6 | projette c1 7 | déplace c1 vers la gauche de 50 8 | attends 1 seconde 9 | déplace c1 vers le bas de 50 10 | attends 1 seconde 11 | déplace c1 vers la droite de 50 12 | attends 1 seconde 13 | déplace c1 vers le haut de 50 14 | attends 1 seconde 15 | couleur @ c1 prend "ardoise" 16 | taille @ c1 prend 3 17 | déplace c1 de -25 et -25 18 | attends 1 seconde 19 | déplace c1 de -25 et 25 20 | attends 1 seconde 21 | posé @ c1 prend faux 22 | déplace c1 de 20 et 50 23 | attends 1 seconde 24 | couleur @ c1 prend "noir" 25 | taille @ c1 prend 1 26 | posé @ c1 prend vrai 27 | déplace c1 de 0 et -20 28 | attends 1 seconde 29 | déplace c1 de 10 et 0 30 | attends 1 seconde 31 | déplace c1 de 0 et 20 32 | attends 1 seconde 33 | pointe @ c1 prend faux -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/pluie_invisible.liv: -------------------------------------------------------------------------------- 1 | code : 2 | x est un nombre 3 | y est un nombre 4 | mer est une toile, couleur prend "bleu de minuit", bordure prend faux , audessus prend vrai, x prend 0, y prend 0, largeur prend ecranh, hauteur prend ecranv 5 | tweak est un tweak 6 | projette mer 7 | efface toile 8 | évoque tweak.toileinvisible() 9 | tant que vrai 10 | attends 0.01 secondes 11 | x prend hasard(ecranv) 12 | y prend hasard(ecranh) 13 | appelle vague avec x, y 14 | attends 0.15 secondes 15 | appelle vague avec x, y 16 | ferme 17 | 18 | vague : 19 | *x est un nombre 20 | *y est un nombre 21 | vague est un cercle, x prend x, y prend y, plein prend faux, rayon prend 1, taille prend 2, couleur prend "vert d'eau" 22 | projette vague 23 | pour chaque 50 24 | rayon@vague prend joker 25 | taille@vague prend 1 + joker / 2 26 | transparence@vague prend 100 - joker * 2 27 | attends 10 millisecondes 28 | ferme 29 | efface vague 30 | annihile vague 31 | reviens 32 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/h_pedagogiques/fleur.liv: -------------------------------------------------------------------------------- 1 | /** 2 | * Source : http://proglab.fr/demo/ 3 | * SPHERE 4 | * http://hakim.se/experiments/html5/sphere/ 5 | */ 6 | /** 7 | * Draws a particle sphere/spiral on canvas. 8 | * 9 | * @author Hakim El Hattab | http://hakim.se 10 | */ 11 | globale 12 | fond est une toile, couleur prend "noir", largeur prend 500, hauteur prend 500 13 | tortue est un crayon, pointe prend faux, couleur prend "papier bulle", taille prend 2 14 | 15 | Animation : 16 | time est un nombre valant 0 17 | i & r est un nombre valant 0 18 | pi_ est un nombre valant 3.14159265359 19 | ~ angle radian 20 | efface toile 21 | tant que vrai 22 | efface tortue 23 | projette tortue 24 | time prend time + 0.2 25 | // The number of particles to generate 26 | pour i de 500 à 0 27 | // The magic 28 | r prend 0.8*cos((time+i)*(.05+sin(time*0.00002)/PI_*.2))/PI_ 29 | pique tortue à 500*(sin(i)*r+.5) et 500*(cos(i)*r+.5) 30 | ferme 31 | attends 5 millisecondes 32 | ferme 33 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/collision_drag_and_drop.liv: -------------------------------------------------------------------------------- 1 | Centre est un cercle, x prend 311, y prend 285, couleur prend "rouge", plein prend vrai, rayon prend 50 2 | Palet est un rectangle, largeur prend 40, hauteur prend 20, couleur prend "noir", plein prend vrai 3 | Salle est une toile, couleur prend "blanc" 4 | 5 | Efface toile 6 | Projette salle & centre & palet 7 | Fais réagir palet & centre à "glisser-déposer" pour changement 8 | Fais réagir palet à "début glisser-déposer" pour début changement palet 9 | Fais réagir centre à "début glisser-déposer" pour début changement centre 10 | Tant que vrai 11 | /*boucle infinie*/ 12 | Temporise 13 | Vide touches 14 | Ferme 15 | 16 | changement : 17 | Si palet.collision(centre), couleur@centre prend "jaune" 18 | Sinon couleur@centre prend "rouge" 19 | couleur@palet prend "noir" 20 | Reviens 21 | 22 | Début Changement Palet : 23 | couleur@palet prend "vert" 24 | Reviens 25 | 26 | Début Changement Centre : 27 | couleur@centre prend "vert" 28 | Reviens -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/f_jeux/dictionnaire.txt: -------------------------------------------------------------------------------- 1 | gouvernement 2 | expression 3 | conscience 4 | connaissance 5 | appartement 6 | intelligence 7 | souffrance 8 | changement 9 | conversation 10 | impression 11 | circonstance 12 | personnage 13 | discussion 14 | commencement 15 | professeur 16 | homme 17 | mari 18 | femme 19 | jour 20 | mer 21 | temps 22 | main 23 | chose 24 | vie 25 | yeux 26 | heure 27 | monde 28 | enfant 29 | fois 30 | moment 31 | fille 32 | coeur 33 | terre 34 | dieu 35 | monsieur 36 | voix 37 | maison 38 | coup 39 | air 40 | mot 41 | nuit 42 | eau 43 | ami 44 | porte 45 | amour 46 | pied 47 | gens 48 | nom 49 | pays 50 | ciel 51 | regard 52 | mort 53 | esprit 54 | ville 55 | rue 56 | soir 57 | chambre 58 | pas 59 | soleil 60 | roi 61 | corps 62 | bras 63 | place 64 | parti 65 | visage 66 | bruit 67 | lettre 68 | franc 69 | fond 70 | force 71 | effet 72 | milieu 73 | saint 74 | travail 75 | mois 76 | fils 77 | raison 78 | point 79 | personne 80 | peuple 81 | fait 82 | parole 83 | guerre 84 | affaire 85 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/tux_marche.liv: -------------------------------------------------------------------------------- 1 | tux est un graphique, image prend "images/tux_graduate.png", x prend 150, y prend 300 2 | ciel est une toile, couleur prend "rose", image prend "images/dn_house2.png" 3 | aide est un graffiti, texte prend "Tu peux déplacer Tux avec les flèches !", couleur prend "rouge", x prend 10, y prend 50, taille prend 10 4 | efface toile 5 | projette ciel 6 | projette tux 7 | projette aide 8 | tant que vrai 9 | action est un texte 10 | action prend touche 11 | si action = "gauche", déplace tux vers la gauche de 5 12 | si action = "droite", déplace tux vers la droite de 5 13 | si action = "haut", déplace tux vers le haut de 5 14 | si action = "bas", déplace tux vers le bas de 5 15 | si action = "clique", déplace tux vers sourisx et sourisy 16 | /*On lui fixe des limites !*/ 17 | si (x @ tux) > 470 , x @ tux prend 470 18 | si (y @ tux) > 430 , y @ tux prend 430 19 | si (x @ tux) < 5 , x @ tux prend 5 20 | si (y @ tux) < 290 , y @ tux prend 290 21 | temporise 22 | ferme 23 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/greffons/presse-papier.liv: -------------------------------------------------------------------------------- 1 | démonstration : 2 | presse est un pressepapier 3 | information est un texte valant "Texte copié depuis le langage Linotte !" 4 | entrée est un texte 5 | début 6 | affiche "Vous avez dans votre presse-papier le texte suivant : " + presse.coller() 7 | affiche "Je vais maintenant modifier le presse-papier !" 8 | presse.copier(information) 9 | affiche "Vérifiez votre presse-papier maintenant !" 10 | demande entrée 11 | affiche "je vais maintenant copier du HTML dans le presse-papier" 12 | presse.copierhtml("Bonjour, vous utilisez la version " + version + " de l'Atelier Linotte") 13 | affiche "Vérifiez dans un éditeur plus évolué (Word ou Open)!" 14 | demande entrée 15 | affiche "Maintenant, je vais stocker la toile dans le presse-papier (la toile doit contenir un dessin !)" 16 | presse.copiertoile() 17 | affiche "Vérifiez votre presse-papier maintenant avec un logiciel manipulant les images (Gimp par exemple)!" 18 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/a_debutant/memoiredeschiffres.liv: -------------------------------------------------------------------------------- 1 | score est un nombre valant 0 2 | nombre1 est un nombre 3 | nombre2 est un nombre 4 | nombre3 est un nombre 5 | réponse1 est un nombre 6 | réponse2 est un nombre 7 | réponse3 est un nombre 8 | 9 | code : 10 | "Je vais afficher 3 nombres et tu vas devoir les retrouver !" ! 11 | "Voici les nombres : " ! 12 | nombre1 prend hasard (500) 13 | nombre2 prend hasard (500) 14 | nombre3 prend hasard (500) 15 | nombre1 ! 16 | nombre2 ! 17 | nombre3 ! 18 | "Je vais attendre 5 secondes" ! 19 | attends 5 secondes 20 | efface tableau 21 | "Premier nombre ?" ! 22 | réponse1 ? 23 | réponse2 ? 24 | réponse3 ? 25 | si réponse1 != nombre1 va vers réponse fausse 26 | si réponse2 != nombre2 va vers réponse fausse 27 | si réponse3 != nombre3 va vers réponse fausse 28 | score prend score + 1 29 | "Bravo !" ! 30 | va vers code 31 | 32 | réponse fausse : 33 | "La réponse est fausse. Le jeu se termine, ton score est de ${score}" ! 34 | "Je pense que tu peux mieux faire..." ! 35 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/Clavier.liv: -------------------------------------------------------------------------------- 1 | globale 2 | centre est un cercle, x prend 311, y prend 285, couleur prend "rouge", plein prend vrai, rayon prend 50 3 | 4 | Principale : 5 | clavier est un clavier 6 | efface toile 7 | projette centre 8 | clavier.commencer() 9 | clavier.enregistremolettehaut("analyse haut") 10 | clavier.enregistremolettebas("analyse bas") 11 | tant que vrai 12 | attends 100 millisecondes 13 | parcours afficher avec clavier.touches() 14 | ferme 15 | 16 | Afficher : 17 | *liste est un casier de nombre 18 | msg est un texte 19 | efface tableau 20 | si liste.taille() != 0 21 | pour chaque liste 22 | ajoute joker + ";" dans msg 23 | ferme 24 | affiche msg 25 | ferme 26 | reviens 27 | 28 | Analyse haut : 29 | déplace centre vers le haut de 1 30 | rayon@centre prend rayon@centre + 1 31 | affiche "vers le haut !" 32 | reviens 33 | 34 | Analyse bas : 35 | déplace centre vers le bas de 1 36 | rayon@centre prend rayon@centre - 1 37 | affiche "vers le bas !" 38 | reviens 39 | -------------------------------------------------------------------------------- /linotte-greffons/src/main/java/org/linotte/greffons/impl/ImprimeurToile.java: -------------------------------------------------------------------------------- 1 | package org.linotte.greffons.impl; 2 | 3 | import org.linotte.frame.latoile.JPanelLaToile; 4 | 5 | import java.awt.*; 6 | import java.awt.print.PageFormat; 7 | import java.awt.print.Printable; 8 | import java.awt.print.PrinterException; 9 | 10 | /** 11 | * http://download.oracle.com/javase/tutorial/2d/printing/printable.html 12 | * http://manu.kegtux.org/Java/Tutoriels/AWT/Impression.html 13 | * 14 | * @author Ronan Mounès 15 | * 16 | */ 17 | public class ImprimeurToile implements Printable { 18 | 19 | private JPanelLaToile panel; 20 | 21 | public ImprimeurToile(JPanelLaToile panel) { 22 | this.panel = panel; 23 | } 24 | 25 | public int print(Graphics g, PageFormat pf, int page) throws PrinterException { 26 | 27 | if (page > 0) { 28 | return NO_SUCH_PAGE; 29 | } 30 | Graphics2D g2d = (Graphics2D) g; 31 | g2d.translate(pf.getImageableX(), pf.getImageableY()); 32 | 33 | panel.setChangement(); 34 | panel.paint(g2d); 35 | 36 | return PAGE_EXISTS; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /linotte-greffons/src/main/java/org/linotte/greffons/impl/ZipSocket.java: -------------------------------------------------------------------------------- 1 | package org.linotte.greffons.impl; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | import java.io.OutputStream; 6 | import java.net.Socket; 7 | 8 | class ZipSocket extends Socket { 9 | 10 | private CompressedBlockInputStream in; 11 | private CompressedBlockOutputStream out; 12 | 13 | public ZipSocket() { 14 | super(); 15 | } 16 | 17 | public ZipSocket(String host, int port) throws IOException { 18 | super(host, port); 19 | } 20 | 21 | public InputStream getInputStream() throws IOException { 22 | if (in == null) { 23 | in = new CompressedBlockInputStream(super.getInputStream()); 24 | } 25 | return in; 26 | } 27 | 28 | public OutputStream getOutputStream() throws IOException { 29 | if (out == null) { 30 | out = new CompressedBlockOutputStream(super.getOutputStream(), 1024); 31 | } 32 | return out; 33 | } 34 | 35 | public synchronized void close() throws IOException { 36 | OutputStream o = getOutputStream(); 37 | o.flush(); 38 | super.close(); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/greffons/externe/Graphique.java: -------------------------------------------------------------------------------- 1 | package org.linotte.greffons.externe; 2 | 3 | import java.awt.*; 4 | 5 | /** 6 | * Ce greffon permet de créer un objet affichable sur la toile de Linotte 7 | * 8 | * @author Ronan Mounès 9 | * 10 | */ 11 | public abstract class Graphique extends Greffon { 12 | 13 | /** 14 | * Affiche de l'objet dans la toile 15 | * 16 | * @param g2 Graphics2D de la toile 17 | * @param espece contenant les données du l'objet à afficher 18 | * @throws GreffonException 19 | */ 20 | 21 | public abstract void projette(Graphics2D g2) throws GreffonException; 22 | 23 | /** 24 | * Shape pour la gestion de la collision 25 | * Peut être null (donc, pas de gestion de collision) 26 | * 27 | * @return 28 | */ 29 | public abstract Shape getShape(); 30 | 31 | /** 32 | * n'est plus utilisée 33 | * @param espece 34 | * @param p1 35 | * @param p2 36 | * @param p3 37 | * @throws GreffonException 38 | */ 39 | @Deprecated 40 | public void modifier(String p1, String p2, String p3) throws GreffonException { 41 | 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/entite/PorteurFonction.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.entite; 2 | 3 | import org.linotte.frame.cahier.timbre.entite.i.Cloneur; 4 | import org.linotte.frame.cahier.timbre.entite.i.Deposable; 5 | 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | public class PorteurFonction implements Deposable { 10 | 11 | public Fonction fonction; 12 | 13 | public List parametres; 14 | 15 | @Override 16 | public Cloneur clonerPourDuplication() { 17 | PorteurFonction clone = new PorteurFonction(); 18 | clone.fonction = fonction; 19 | clone.parametres = new ArrayList<>(); 20 | clone.parametres.addAll(parametres); 21 | return clone; 22 | } 23 | 24 | @Override 25 | public Cloneur clonerPourCreation() { 26 | return null; 27 | } 28 | 29 | /** 30 | * On supprime les paramètres en plus 31 | * @return 32 | */ 33 | public boolean verifierFonction() { 34 | if (fonction.parametres.size() < parametres.size()) { 35 | parametres.subList(0, parametres.size() - 1); 36 | return false; 37 | } 38 | return true; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /linotte-greffons/src/main/java/org/linotte/greffons/impl/Horodatage.java: -------------------------------------------------------------------------------- 1 | package org.linotte.greffons.impl; 2 | 3 | import org.linotte.greffons.externe.Greffon; 4 | 5 | import java.util.Calendar; 6 | 7 | public class Horodatage extends Greffon { 8 | 9 | private Calendar temps = Calendar.getInstance(); 10 | 11 | @Slot 12 | public long maintenant() throws GreffonException { 13 | temps = Calendar.getInstance(); 14 | return temps.getTimeInMillis(); 15 | } 16 | 17 | @Slot(nom = "année") 18 | public int annee() { 19 | return temps.get(Calendar.YEAR); 20 | } 21 | 22 | @Slot 23 | public int mois() { 24 | return temps.get(Calendar.MONTH) + 1; 25 | } 26 | 27 | @Slot 28 | public int jour() { 29 | return temps.get(Calendar.DAY_OF_MONTH); 30 | } 31 | 32 | @Slot 33 | public int heure() { 34 | return temps.get(Calendar.HOUR_OF_DAY); 35 | } 36 | 37 | @Slot 38 | public int minute() { 39 | return temps.get(Calendar.MINUTE); 40 | } 41 | 42 | @Slot 43 | public int seconde() { 44 | return temps.get(Calendar.SECOND); 45 | } 46 | 47 | @Slot 48 | public int milliseconde() { 49 | return temps.get(Calendar.MILLISECOND); 50 | } 51 | 52 | } -------------------------------------------------------------------------------- /linotte-greffons/src/main/java/org/linotte/greffons/impl/Police.java: -------------------------------------------------------------------------------- 1 | package org.linotte.greffons.impl; 2 | 3 | import org.linotte.greffons.externe.Greffon; 4 | 5 | import java.awt.*; 6 | import java.io.FileInputStream; 7 | import java.io.FileNotFoundException; 8 | import java.io.InputStream; 9 | 10 | public class Police extends Greffon { 11 | 12 | @Slot 13 | public boolean charger(String nom_police) throws GreffonException { 14 | RessourceManager ressourceManager = getRessourceManager(); 15 | 16 | if (ressourceManager != null) 17 | nom_police = ressourceManager.analyserChemin(nom_police); 18 | InputStream is = null; 19 | try { 20 | is = new FileInputStream(nom_police); 21 | } catch (FileNotFoundException e1) { 22 | throw new GreffonException("Impossible de trouver la police : " + nom_police); 23 | } 24 | 25 | try { 26 | Font font = Font.createFont(Font.TRUETYPE_FONT, is); 27 | GraphicsEnvironment.getLocalGraphicsEnvironment().registerFont(font); 28 | } catch (Exception e) { 29 | throw new GreffonException("Impossible de charger la police : " + nom_police + " / " + e.toString()); 30 | } 31 | return true; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/listener/Listener.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.listener; 2 | 3 | import org.linotte.greffons.externe.Greffon.ListenerGreffons; 4 | import org.linotte.moteur.entites.Acteur; 5 | import org.linotte.moteur.xml.actions.AppelerAction; 6 | import org.linotte.moteur.xml.alize.kernel.Job; 7 | import org.linotte.moteur.xml.alize.kernel.RuntimeContext; 8 | import org.linotte.moteur.xml.alize.kernel.processus.Processus; 9 | 10 | public class Listener implements ListenerGreffons { 11 | 12 | private Processus processus; 13 | 14 | private String paragraphe; 15 | 16 | private Job job; 17 | 18 | private AppelerAction appeler; 19 | 20 | private Acteur[] acteurs; 21 | 22 | public Listener(Acteur acteur, String pparagraphe, Processus pprocessus, Job pjob) { 23 | processus = pprocessus; 24 | job = pjob; 25 | paragraphe = pparagraphe; 26 | this.appeler = ((RuntimeContext) job.getRuntimeContext()).getLinotte().getRegistreDesEtats().getActionAppeler(); 27 | acteurs = new Acteur[] { acteur }; 28 | } 29 | 30 | public void execute() { 31 | appeler.execution(job, acteurs, paragraphe, processus); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/xml/alize/kernel/processus/ProcessusSimple.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.xml.alize.kernel.processus; 2 | 3 | import org.alize.kernel.AKJob; 4 | import org.alize.kernel.AKProcessus; 5 | import org.linotte.moteur.xml.alize.kernel.Action; 6 | import org.linotte.moteur.xml.alize.kernel.Action.ETAT; 7 | import org.linotte.moteur.xml.alize.kernel.Job; 8 | import org.linotte.moteur.xml.alize.kernel.Trace; 9 | 10 | /** 11 | * 12 | * Attention, un processus peut être partagé par plusieurs jobs 13 | * 14 | * @author ronan 15 | * 16 | */ 17 | public final class ProcessusSimple extends Processus { 18 | 19 | public ProcessusSimple(Action petat, String pparam, Object pvaleurs, String[] pannontations, int pligne) { 20 | super(petat, pparam, pvaleurs, pannontations, pligne, false); 21 | } 22 | 23 | @Override 24 | public AKProcessus execute(AKJob job) throws Exception { 25 | etat.analyse(param, (Job) job, valeurs, annotations); 26 | if (Trace.active) 27 | Trace.getInstance().debug(getPosition(), etat, (Job) job, valeurs, ETAT.PAS_DE_CHANGEMENT.toString()); 28 | return getNextProcess(); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/collision_drag_and_drop_avec_annulation.liv: -------------------------------------------------------------------------------- 1 | espèces 2 | copie_x & copie_y est un nombre 3 | espèce rectangledng hérite de rectangle et contient copie_x , copie_y 4 | globale 5 | centre est un cercle, x prend 311, y prend 285, couleur prend "rouge", plein prend vrai, rayon prend 50 6 | boule est un rectangledng, largeur prend 40, hauteur prend 20, couleur prend "noir", plein prend vrai 7 | fond est une toile, couleur prend "blanc" 8 | 9 | principale : 10 | /*Mémoriser la position initiale :*/ 11 | évoque boule.fixer() 12 | projette fond & centre & boule 13 | fais réagir boule à "glisser-déposer" pour changement 14 | /*Boucle infinie*/ 15 | Tant que vrai 16 | temporise 17 | vide touche 18 | Ferme 19 | 20 | changement : 21 | *moi est un rectangledng 22 | si moi.collision(centre), évoque moi.fixer() 23 | sinon évoque moi.rétablir() 24 | reviens 25 | 26 | fixer de rectangledng : 27 | copie_x@moi prend x@moi 28 | copie_y@moi prend y@moi 29 | retourne vrai 30 | 31 | rétablir de rectangledng : 32 | x@moi prend copie_x@moi 33 | y@moi prend copie_y@moi 34 | retourne vrai 35 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/xml/actions/TestUnitaireAction.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.xml.actions; 2 | 3 | import org.linotte.moteur.exception.ErreurException; 4 | import org.linotte.moteur.exception.StopException; 5 | import org.linotte.moteur.xml.alize.kernel.Action; 6 | import org.linotte.moteur.xml.alize.kernel.Job; 7 | import org.linotte.moteur.xml.alize.kernel.RuntimeContext; 8 | import org.linotte.moteur.xml.alize.test.TestIHM; 9 | import org.linotte.moteur.xml.analyse.ItemXML; 10 | 11 | public class TestUnitaireAction extends Action { 12 | 13 | @Override 14 | public ETAT analyse(String param, Job job, ItemXML[] valeurs, String[] annotations) throws ErreurException, StopException { 15 | RuntimeContext runtimeContext = (RuntimeContext) job.getRuntimeContext(); 16 | 17 | // Doit-on effectuer des tests unitaires ? 18 | if (runtimeContext.doTest && runtimeContext.tests.hasNext()) { 19 | runtimeContext.setIhm(new TestIHM(runtimeContext.tests, runtimeContext.getIhm())); 20 | } 21 | 22 | return ETAT.PAS_DE_CHANGEMENT; 23 | } 24 | 25 | @Override 26 | public String clef() { 27 | return "test unitaire"; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/greffons/adaptateur_dll.liv: -------------------------------------------------------------------------------- 1 | /* 2 | ATTENTION !! Cet exemple ne fonctionne plus avec les versions récentes de Windows :-( 3 | Exemple d'utilisateur du greffon Adaptateur 0.1 4 | Ce greffon permet d'appeler depuis le langage Linotte des fontions d'une DLL sous Windows 5 | */ 6 | principale : 7 | dll est un adaptateur 8 | types est un casier de textes valant "entier", "texte","texte", "entier" 9 | paramètres est un casier de textes valant "0", "Mon message !","Titre fenetre", "38" début 10 | // Chargement automatique du greffon : 11 | // ~greffon 1 adaptateur 0.1 "http://abaque.googlecode.com/files/Adaptateur.zgl" // Les paramètres de la méthode "appellerdll" du greffon Adaptateur sont : 12 | // - nom de la DLL (texte) 13 | // - nom de la fonction à appeler (texte) 14 | // - type du retour (texte) 15 | // - tableau des types des paramètres (casier de textes) 16 | // - tableau des paramètres (casier de textes) 17 | // 18 | // Les types possibles sont : texte, entier, décimal 19 | affiche "retour : " + dll.appelerdll("User32.dll", "MessageBoxA", "entier", types , paramètres) 20 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/c_logo/fougere.liv: -------------------------------------------------------------------------------- 1 | /*http://xlogo.tuxfamily.org/fr/html/examples-fr/fractales/fern.php*/ 2 | tortue est un crayon, couleur prend "vert mousse", x prend 580, y prend 400, taille prend 2, angle prend 180, pointe prend vrai 3 | terre est une toile, couleur prend "noir" 4 | 5 | efface toile 6 | projette terre 7 | projette tortue 8 | parcours fougère avec 700 9 | pointe @ tortue prend faux 10 | photographie dans "fougere" // stock sur le disque dur l'image de la toile au format PNG dans fougere.png 11 | 12 | fougère : taille 13 | si taille > 5 14 | couleur@tortue prend "215 " + entier(0.18 * (angle@tortue) +187) + " 88" 15 | avance tortue de taille / 20 16 | tourne à gauche tortue de 80 17 | parcours fougère avec taille * 0.3 18 | tourne à droite tortue de 82 19 | avance tortue de taille / 20 20 | tourne à droite tortue de 80 21 | parcours fougère avec taille * 0.3 22 | tourne à gauche tortue de 78 23 | parcours fougère avec taille * 0.9 24 | tourne à gauche tortue de 2 25 | recule tortue de taille / 20 26 | tourne à gauche tortue de 2 27 | recule tortue de taille / 20 28 | ferme 29 | reviens 30 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/xtoile.liv: -------------------------------------------------------------------------------- 1 | globale 2 | form est un formulaire, titre prend "J'ai mal à la tête !", largeur prend 800, hauteur prend 800 3 | b1 est un bouton, texte prend "A gauche", x prend 10, y prend 60 4 | b2 est un bouton, texte prend "A droite ", x prend 10, y prend 100 5 | l1 est un étiquette, texte prend "Dans quel sens veux-tu que Tux tourne ?", x prend 10, y prend 30 6 | d est un graphique, image prend "../b_multimedia/images/tux_graduate.png", x prend 100, y prend 100, taille prend 20 7 | xtoile est un xtoile, x prend 90, y prend 80 8 | sens est un nombre valant 0 9 | toile est une toile, couleur prend "noir",hauteur prend 300 , largeur prend 400 10 | 11 | principale : 12 | ajoute xtoile & b1 & b2 & l1 dans form 13 | efface toile 14 | projette d 15 | Fais réagir b1 à "clic souris" pour à droite 16 | Fais réagir b2 à "clic souris" pour à gauche 17 | tant que vrai 18 | tourne à droite d de sens 19 | attends 0.01 seconde 20 | ferme 21 | 22 | à droite : 23 | *b est un bouton 24 | sens prend -1 25 | Reviens 26 | 27 | à gauche : 28 | *b est un bouton 29 | sens prend 1 30 | Reviens -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/h_pedagogiques/robot.liv: -------------------------------------------------------------------------------- 1 | // Notice : http://programmons.forumofficiel.fr/t1097-robonotte-decouvrir-la-programmation 2 | Robonotte : 3 | robonotte est un robonotte, largeur vaut 5, longueur vaut 6 4 | // 1, c'est un mur 5 | // 3, c'est la clef 6 | // 4, c'est la porte 7 | plan est un casier de nombres valant 1,1,1,1,1,1, 8 | 1,0,0,0,0,4, 9 | 1,0,0,1,1,1, 10 | 1,0,0,0,3,1, 11 | 1,1,1,1,1,1 12 | projette robonotte 13 | // Construction du labyrinthe 14 | robonotte.affiche(plan) 15 | robonotte.poserobot(2,3) 16 | robonotte.bas() 17 | robonotte.bas() 18 | robonotte.droite() 19 | robonotte.droite() 20 | robonotte.droite() 21 | robonotte.prend() 22 | robonotte.haut() 23 | robonotte.gauche() 24 | robonotte.gauche() 25 | robonotte.haut() 26 | robonotte.droite() 27 | robonotte.haut() 28 | robonotte.droite() 29 | robonotte.droite() 30 | robonotte.droite() 31 | robonotte.ouvre() 32 | robonotte.quitte() 33 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/xml/actions/ImportationAction.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.xml.actions; 2 | 3 | import org.linotte.moteur.exception.ErreurException; 4 | import org.linotte.moteur.exception.StopException; 5 | import org.linotte.moteur.xml.alize.kernel.Action; 6 | import org.linotte.moteur.xml.alize.kernel.Job; 7 | import org.linotte.moteur.xml.alize.kernel.RuntimeContext; 8 | import org.linotte.moteur.xml.alize.kernel.i.ActionDispatcher; 9 | import org.linotte.moteur.xml.analyse.ItemXML; 10 | 11 | public class ImportationAction extends Action implements ActionDispatcher { 12 | 13 | @Override 14 | public ETAT analyse(String param, Job job, ItemXML[] valeurs, String[] annotations) throws ErreurException, StopException { 15 | /** 16 | * On s'arrête ici si un est dans un état ImportationProcess 17 | */ 18 | RuntimeContext runtimeContext = (RuntimeContext) job.getRuntimeContext(); 19 | if (runtimeContext.isImportationProcess()) { 20 | return ETAT.FIN_IMPORTATION; 21 | } else { 22 | return ETAT.PAS_DE_CHANGEMENT; 23 | } 24 | } 25 | 26 | @Override 27 | public String clef() { 28 | return "fin importation"; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/liste.liv: -------------------------------------------------------------------------------- 1 | form est un formulaire, titre prend "La liste", largeur prend 200, hauteur prend 200 2 | s1 est un liste, valeurs prend "", x prend 20, y prend 40 3 | l1 est un étiquette, texte prend "Choisissez la couleur :", x prend 20, y prend 5 4 | toile est une toile, couleur prend "blanc" 5 | 6 | position est un nombre 7 | Projette toile 8 | Ajoute l1 & s1 dans form 9 | Fais réagir s1 à "clic souris" pour changer la couleur 10 | Fais réagir form à "clic souris" pour fermer la fenêtre 11 | Pour chaque {"sinople","rose balais","bleu cyan","rouille","rouge ponceau"} 12 | /* 13 | évoque s1.ajoutervaleur(joker) 14 | évoque s1.infobulle(position,"Sélectionner la couleur " + µ"0022" + joker + µ"0022") 15 | */ 16 | évoque s1.ajoutervaleuretinfobulle(joker,"Sélectionner la couleur " + µ"0022" + joker + µ"0022") 17 | incrémente position 18 | Ferme 19 | Tant que vrai 20 | temporise 21 | vide touches 22 | Ferme 23 | Termine 24 | 25 | changer la couleur : 26 | *s est un liste 27 | Couleur @ toile prend valeur de s 28 | Reviens 29 | 30 | fermer la fenêtre : 31 | *f est un formulaire 32 | Termine 33 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/test_qi.liv: -------------------------------------------------------------------------------- 1 | globale 2 | form est un formulaire, titre prend "Première question", largeur prend 400, hauteur prend 260 3 | b1 est un bouton, texte prend "Blanc", x prend 30, y prend 60 4 | b2 est un bouton, texte prend "Noir", x prend 100, y prend 60 5 | l1 est un étiquette, texte prend "Quelle est la couleur du cheval blanc d'Henri 4 ?", x prend 30, y prend 30 6 | l2 est un étiquette, texte prend "", x prend 30, y prend 100 7 | 8 | formulaire : 9 | ajoute b1 & b2 & l1 & l2 dans form 10 | Fais réagir b2 à "clic souris" pour réponse fausse 11 | Fais réagir b1 à "souris entrante" pour bouger bouton 12 | Fais réagir b1 à "clic souris" pour bouger bouton 13 | Tant que vrai 14 | temporise 15 | vide touches 16 | Ferme 17 | 18 | Réponse fausse : 19 | *b est un bouton 20 | Texte @ l2 prend "Tu es bien trop mauvais pour continuer le test !" 21 | attends 3 secondes 22 | termine 23 | 24 | Bouger bouton : 25 | *b est un bouton 26 | posx est un nombre valant 320 27 | posy est un nombre valant 220 28 | mélange posx & posy 29 | x @ b1 prend posx + 30 30 | y @ b1 prend posy + 30 31 | Reviens 32 | -------------------------------------------------------------------------------- /linotte-greffons/src/main/java/org/linotte/greffons/impl/GreffonRobot.java: -------------------------------------------------------------------------------- 1 | package org.linotte.greffons.impl; 2 | 3 | import org.linotte.greffons.externe.Greffon; 4 | 5 | import java.awt.*; 6 | import java.awt.event.InputEvent; 7 | 8 | /** 9 | * http://www.fobec.com/CMS/java/sources/deplacer-curseur-ecran-avec-awt-robot_969.html 10 | * 11 | */ 12 | public class GreffonRobot extends Greffon { 13 | 14 | private Robot robot = null; 15 | 16 | public GreffonRobot() throws AWTException { 17 | robot = new Robot(); 18 | /** 19 | * Fixer le delai entre chaque mouvement à 500 ms 20 | */ 21 | robot.setAutoDelay(50); 22 | /** 23 | * Appeler OnIdle après le déplacement de la souris 24 | */ 25 | robot.setAutoWaitForIdle(false); 26 | } 27 | 28 | @Slot 29 | public boolean bougesouris(int x, int y) { 30 | if (robot != null) { 31 | robot.mouseMove(x, y); 32 | return true; 33 | } 34 | return false; 35 | } 36 | 37 | @Slot 38 | public boolean sourisclic() { 39 | if (robot != null) { 40 | robot.mousePress(InputEvent.BUTTON1_MASK); 41 | robot.mouseRelease(InputEvent.BUTTON1_MASK); 42 | return true; 43 | } 44 | return false; 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/entite/e/Parfum.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.entite.e; 2 | 3 | public enum Parfum { 4 | AFFICHER("Afficher", 1), DEMANDER("Demander", 1), VALOIR("Prendre", 2), // 5 | EFFACERTABLEAU("Effacer", 0), RETOURNER("Retourner", 1), UNDO, AIDE, CATEGORIE_BASE, // 6 | CATEGORIE_GRAPHIQUE, CATEGORIE_BOUCLE, // 7 | PARCOURIR("Parcourir", 1), // 8 | REVENIR("Revenir", 0), // 9 | DEPLACE_HAUT("Vers le haut", 2), // 10 | DEPLACE_BAS("Vers le bas", 2), // 11 | DEPLACE_DROITE("Vers la droite", 2), // 12 | DEPLACE_GAUCHE("Vers la gauche", 2), // 13 | DEPLACE_VERS("Vers le point", 3), // 14 | @Deprecated 15 | PROJETTE("Projeter", 1), // 16 | DEPLACE_AVANT("Vers l'avant", 2), // 17 | TOURNE_DROITE("Tourne à droite", 2), // 18 | TOURNE_GAUCHE("Tourne à gauche", 2), // 19 | LEVER_CRAYON("Lever crayon", 1), // 20 | BAISSER_CRAYON("Baisser crayon", 1),// 21 | ; 22 | 23 | public String titre; 24 | 25 | public int nb; 26 | 27 | Parfum() { 28 | // Ce n'est pas un verbe 29 | titre = null; 30 | nb = -1; 31 | } 32 | 33 | Parfum(String titre, int nb) { 34 | this.titre = titre; 35 | this.nb = nb; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/outils/RuntimeConsole.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.outils; 2 | 3 | import org.alize.kernel.AKRuntime; 4 | 5 | import java.util.List; 6 | 7 | public class RuntimeConsole { 8 | 9 | public static AKRuntime runtime; 10 | 11 | public static AKRuntime getRuntime() { 12 | return runtime; 13 | } 14 | 15 | public static int retourneLaLigne(List numeros, int position) { 16 | int ligne = 0; 17 | for (int entier : numeros) { 18 | ligne++; 19 | if (entier > position) 20 | break; 21 | } 22 | return ligne; 23 | } 24 | 25 | public static void clearScreen() { 26 | try { 27 | final String os = System.getProperty("os.name"); 28 | 29 | if (os.contains("Windows")) { 30 | //Runtime.getRuntime().exec("cls"); 31 | new ProcessBuilder("cmd", "/c", "cls").inheritIO().start().waitFor(); 32 | } else { 33 | Runtime.getRuntime().exec("clear"); 34 | } 35 | } catch (final Exception e) { 36 | e.printStackTrace(); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/13_memoiredeschiffres.liv: -------------------------------------------------------------------------------- 1 | score est un nombre valant 0 2 | nombre1 est un nombre 3 | nombre2 est un nombre 4 | nombre3 est un nombre 5 | réponse1 est un nombre 6 | réponse2 est un nombre 7 | réponse3 est un nombre 8 | continuer est un drapeau valant vrai 9 | tant que continuer 10 | affiche "Je vais afficher 3 nombres et tu vas devoir les retrouver !" 11 | affiche "Voici les nombres : " 12 | nombre1 prend hasard (100) 13 | nombre2 prend hasard (100) 14 | nombre3 prend hasard (100) 15 | affiche nombre1 16 | affiche nombre2 17 | affiche nombre3 18 | affiche "Je vais attendre 5 secondes" 19 | attends 5 secondes 20 | efface tableau 21 | affiche "Premier nombre ?" 22 | demande réponse1 23 | affiche "Deuxième nombre ?" 24 | demande réponse2 25 | affiche "Troisième nombre ?" 26 | demande réponse3 27 | si réponse1 != nombre1, continuer prend faux 28 | si réponse2 != nombre2, continuer prend faux 29 | si réponse3 != nombre3, continuer prend faux 30 | si continuer 31 | score prend score + 1 32 | "Bravo !" ! 33 | ferme 34 | ferme 35 | affiche "La réponse est fausse. Le jeu se termine, ton score est de " + score 36 | affiche "Je pense que tu peux mieux faire..." -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/greffons/gpio.liv: -------------------------------------------------------------------------------- 1 | // Procédure d'installation du greffon : http://programmons.forumofficiel.fr/t1168-manipulation-du-gpio-avec-linotte-a-tester 2 | 3 | globale 4 | gpio est un gpio // Communication entre Linotte et le GPIO du Raspberry PI. 5 | 6 | principale : 7 | essaie 8 | essaie parcours guirlande 9 | sinon 10 | affiche "oups, une erreur !" 11 | affiche "Numéro de l'erreur : " + numéro_erreur 12 | affiche "Message de l'erreur : " + message_erreur 13 | ferme 14 | affiche "on ferme l'interface de communication" 15 | gpio.arrêterinterface() 16 | 17 | guirlande : 18 | pin1 est un gpio, pin prend "1" 19 | pin2 est un gpio, pin prend "2" 20 | affiche "connexion aux pins" 21 | pin1.démarrer() 22 | pin2.démarrer() 23 | affiche "on allume les pins" 24 | pin1.allumer() 25 | pin2.allumer() 26 | attends 2 secondes 27 | affiche "on bascule l'état des pins" 28 | pin1.basculer() 29 | pin2.basculer() 30 | attends 2 secondes 31 | affiche "on allume les pins" 32 | pin1.allumer() 33 | pin2.allumer() 34 | attends 2 secondes 35 | affiche "on éteint les pins" 36 | pin1.éteindre() 37 | pin2.éteindre() 38 | reviens 39 | -------------------------------------------------------------------------------- /linotte-greffons/src/main/java/org/linotte/greffons/impl/swing/GroupeBoutonRadio.java: -------------------------------------------------------------------------------- 1 | package org.linotte.greffons.impl.swing; 2 | 3 | import org.linotte.greffons.externe.Composant; 4 | 5 | import javax.swing.*; 6 | 7 | /** 8 | * 9 | * @author R.M 10 | * 11 | */ 12 | public class GroupeBoutonRadio extends Composant { 13 | 14 | private ButtonGroup groupCheckBox; 15 | 16 | @Override 17 | public void initialisation() throws GreffonException { 18 | if (groupCheckBox != null) { 19 | return; 20 | } 21 | groupCheckBox = new ButtonGroup(); 22 | } 23 | 24 | @Override 25 | public void ajouterComposant(Composant pcomposant) throws GreffonException { 26 | ComposantSwing composant = (ComposantSwing) pcomposant; 27 | JRadioButton jRadioButton = (JRadioButton) composant.getJComponent(); 28 | if (!groupCheckBox.getElements().hasMoreElements()) { 29 | //jRadioButton.setSelected(true); 30 | } 31 | groupCheckBox.add(jRadioButton); 32 | } 33 | 34 | @Override 35 | public void destruction() throws GreffonException { 36 | if (groupCheckBox != null) { 37 | groupCheckBox = null; 38 | } 39 | } 40 | 41 | @Override 42 | public boolean enregistrerPourDestruction() { 43 | return true; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/19_pour_enfants_robonotte.liv: -------------------------------------------------------------------------------- 1 | /* 2 | Code source de ce greffon Robonotte destiné à faire découvrir la programmation aux jeunes débutants : 3 | https://github.com/cpc6128/LangageLinotte/blob/master/linotte-greffons/src/main/java/org/linotte/greffons/impl/Robonotte.java 4 | 5 | Pour lancer ce programme, utilisez le bouton "Lire au ralenti !" 6 | */ 7 | 8 | robonotte est un robonotte, largeur prend 5, longueur prend 6 9 | // Construction du labyrinthe ainsi : 10 | // 1, c'est un mur 11 | // 3, c'est la clef 12 | // 4, c'est la porte 13 | plan est un casier de nombres valant 1,1,1,1,1,1, 14 | 1,0,0,0,0,4, 15 | 1,0,0,1,1,1, 16 | 1,0,0,0,3,1, 17 | 1,1,1,1,1,1 18 | projette robonotte 19 | robonotte.affiche(plan) // Affichage du labyrinthe 20 | robonotte.poserobot(2,3) 21 | robonotte.bas() 22 | robonotte.bas() 23 | robonotte.droite() 24 | robonotte.droite() 25 | robonotte.droite() 26 | robonotte.prend() 27 | robonotte.haut() 28 | robonotte.gauche() 29 | robonotte.gauche() 30 | robonotte.haut() 31 | robonotte.droite() 32 | robonotte.haut() 33 | robonotte.droite() 34 | robonotte.droite() 35 | robonotte.droite() 36 | robonotte.ouvre() 37 | robonotte.quitte() -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/fichiers/conduit_simple2.liv: -------------------------------------------------------------------------------- 1 | /* 2 | Exemple simple pour écrire et lire du texte dans un fichier ! 3 | Plus d'informations ici : http://langagelinotte.free.fr/wiki/index.php?title=Conduit 4 | */ 5 | globale 6 | container est un conduit 7 | // Attention, le répertoire "c:/temp" doit exister !! 8 | localisation est un texte valant "c:/temp/linotte_conduit2.txt" // Sous Windows 9 | // localisation est un texte valant "/tmp/linotte_conduit2.txt" // Sous Linux 10 | 11 | principale : 12 | efface tableau 13 | parcours écriture 14 | parcours lecture 15 | 16 | écriture : 17 | caractère est un nombre valant 48 18 | container.enregistrer(localisation) 19 | container.écrire("écrivons du bla bla" + container.retourchariot() ) 20 | pour 100 21 | container.écrire(chr(caractère)) 22 | incrémente caractère 23 | ferme 24 | container.écrire("fin du bla bla !") 25 | container.fermer() 26 | reviens 27 | 28 | lecture : 29 | container.ouvrir(localisation) 30 | affiche container.lireligne() 31 | pour chaque 10 affiche container.nlire(10) // nlire(10) permet lire 10 caractères à la suite dans le fichier 32 | affiche container.lireligne() 33 | container.fermer() 34 | reviens 35 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/j_expert/fichiers/conduit_structure.liv: -------------------------------------------------------------------------------- 1 | /* 2 | Exemple pour écrire et lire un tableau dans un fichier ! 3 | Plus d'informations ici : http://langagelinotte.free.fr/wiki/index.php?title=Conduit 4 | */ 5 | globale 6 | container est un conduit 7 | // Attention, le répertoire "c:/temp" doit exister !! 8 | localisation est un texte valant "c:/temp/linotte_conduit3.txt" // Sous Windows 9 | // localisation est un texte valant "/tmp/linotte_conduit3.txt" // Sous Linux 10 | 11 | principale : 12 | efface tableau 13 | parcours écriture 14 | parcours lecture 15 | 16 | écriture : 17 | container.enregistrer(localisation) 18 | container.écrire("100,2.2,3,5.5,4,56,32,4546,3223,2") 19 | container.fermer() 20 | reviens 21 | 22 | lecture : 23 | éléments est un casier de nombres 24 | container.ouvrir(localisation) 25 | tant que container.nonvide() 26 | tampon est un nombre // Acteur utilisé pour convertir un texte en nombre 27 | convertis container.clire(",") en tampon // clire (",") va lire toutes les lettres dans le fichier jusqu'à 28 | // la première chaine de caractère "," 29 | ajoute tampon dans éléments 30 | ferme 31 | container.fermer() 32 | affiche éléments 33 | reviens 34 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/cahier/timbre/entite/Textuel.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.cahier.timbre.entite; 2 | 3 | import org.linotte.frame.cahier.timbre.ui.UsineATheme; 4 | import org.linotte.frame.cahier.timbre.ui.i.PlancheUI; 5 | import org.linotte.frame.cahier.timbre.ui.i.TextuelUI; 6 | 7 | /** 8 | * Timbre avec un texte 9 | * @author CPC 10 | * 11 | */ 12 | public abstract class Textuel extends Timbre { 13 | 14 | public String texte; 15 | 16 | public transient TextuelUI ui = UsineATheme.getTextuelUI(this); 17 | 18 | public Textuel(String text, PlancheUI planche) { 19 | super(planche); 20 | this.texte = text; 21 | } 22 | 23 | @Override 24 | public void pre_dessine() { 25 | ui.pre_dessine(planche); 26 | super.pre_dessine(); 27 | } 28 | 29 | @Override 30 | public void dessine() { 31 | super.dessine(); 32 | ui.dessine(planche); 33 | } 34 | 35 | @Override 36 | public boolean clique(int x, int y) { 37 | if (ui.clique(x, y)) 38 | return true; 39 | else 40 | return super.clique(x, y); 41 | } 42 | 43 | // Bean 44 | public Textuel() { 45 | 46 | } 47 | 48 | public void clonerPourDuplication(Textuel clone) { 49 | super.clonerPourDuplication(clone); 50 | clone.texte = texte; 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/16_asteroid.liv: -------------------------------------------------------------------------------- 1 | vaisseau est un graphique, image prend "media/space.png", x prend 133, y prend 500 2 | screen est une toile 3 | 4 | appelle mouvement // Mouvement du vaisseau pour suivre la souris 5 | appelle attaque // Pour lancer les attaques des monstres ! 6 | tant que vrai 7 | temporise 8 | si touche = "clique" appelle tirer avec x de vaisseau, y de vaisseau 9 | ferme 10 | 11 | mouvement : 12 | tant que vrai 13 | attends 5 millisecondes 14 | si (x de vaisseau) < sourisx déplace vaisseau vers la droite de 4 15 | si (x de vaisseau) > sourisx déplace vaisseau vers la gauche de 4 16 | ferme 17 | 18 | tirer : x, y 19 | bullet est un graphique, image prend "media/bullet.gif", x prend x+25, y prend y 20 | tant que (y de bullet) > -20 21 | y de bullet prend y de bullet - 5 22 | attends 10 milliseconde 23 | ferme 24 | efface bullet 25 | reviens 26 | 27 | attaque : 28 | tant que vrai 29 | attends 1000 millisecondes 30 | appelle monstre 31 | ferme 32 | 33 | monstre : 34 | monstre est un graphique, image prend "media/bomberman.gif", x prend hasard(500), y prend -50 35 | tant que (y de monstre) < 530 36 | y de monstre prend y de monstre + 8 37 | attends 20 milliseconde 38 | ferme 39 | efface monstre 40 | reviens -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/atelier/ShowParEditorKit.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.atelier; 2 | 3 | import javax.swing.text.*; 4 | 5 | /** 6 | * 7 | * http://java-sl.com/showpar.html 8 | * 9 | * 10 | */ 11 | @SuppressWarnings("serial") 12 | public class ShowParEditorKit extends StyledEditorKit { 13 | public ViewFactory getViewFactory() { 14 | return new ShowParEditorKit.StyledViewFactory(); 15 | } 16 | 17 | class StyledViewFactory implements ViewFactory { 18 | 19 | public View create(Element elem) { 20 | String kind = elem.getName(); 21 | if (kind != null) { 22 | if (kind.equals(AbstractDocument.ContentElementName)) { 23 | return new ShowParLabelView(elem); 24 | } else if (kind.equals(AbstractDocument.ParagraphElementName)) { 25 | return new ParagraphView(elem); 26 | } else if (kind.equals(AbstractDocument.SectionElementName)) { 27 | return new BoxView(elem, View.Y_AXIS); 28 | } else if (kind.equals(StyleConstants.ComponentElementName)) { 29 | return new ComponentView(elem); 30 | } else if (kind.equals(StyleConstants.IconElementName)) { 31 | return new IconView(elem); 32 | } 33 | } 34 | 35 | // default to text display 36 | return new LabelView(elem); 37 | } 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/praxinoscope.liv: -------------------------------------------------------------------------------- 1 | écran est un praxinoscope, x prend 200, y prend 190, ... 2 | image0 prend "images/praxinoscope-0.png", ... 3 | image1 prend "images/praxinoscope-1.png", ... 4 | image2 prend "images/praxinoscope-2.png", ... 5 | image3 prend "images/praxinoscope-3.png", ... 6 | image4 prend "images/praxinoscope-4.png", ... 7 | image5 prend "images/praxinoscope-5.png", ... 8 | image6 prend "images/praxinoscope-6.png", ... 9 | image7 prend "images/praxinoscope-7.png", ... 10 | image8 prend "images/praxinoscope-8.png", ... 11 | image9 prend "images/praxinoscope-9.png", ... 12 | image10 prend "images/praxinoscope-10.png", ... 13 | image11 prend "images/praxinoscope-11.png" 14 | 15 | fond est une toile, couleur prend "noir" 16 | texte est un graffiti, couleur prend "lapis-lazuli", x prend 250, y prend 510 17 | efface toile 18 | projette écran & fond & texte 19 | appelle minuteur 20 | /*boucle infinie*/ 21 | tant que vrai 22 | tourne à gauche écran de 1 23 | attends 0.1 seconde 24 | ferme 25 | 26 | minuteur : 27 | tant que vrai 28 | pour chaque 12 29 | trame@écran prend joker 30 | attends 0.1 secondes 31 | texte@texte prend "trame n°" + joker 32 | ferme 33 | ferme 34 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/k_contributions/taptempo.liv: -------------------------------------------------------------------------------- 1 | /* 2 | Version originale : http://linuxfr.org/users/mzf/journaux/un-tap-tempo-en-ligne-de-commande 3 | Comptatible à partir de Linotte 2.7.7 4 | */ 5 | principale : 6 | horloge est un horodatage // greffon permettant de récupérer le temps 7 | tempo valant 0 // équivaut à "tempo est un nombre valant 0" 8 | entrée valant "" // variable utilisée pour stocker les touches 9 | entrées est un casier de nombres // tableau qui contiendra les délais entre les tempos 10 | tant que vrai 11 | tempo prend horloge.maintenant() 12 | demande entrée 13 | si entrée = "q" 14 | affiche "Au revoir !" 15 | termine 16 | ferme 17 | sinon 18 | ajoute horloge.maintenant() - tempo dans entrées 19 | si entrées.taille() > 2 20 | affiche "Tempo : " + calculerbpm(entrées) + " bpm" 21 | ferme 22 | sinon affiche "Appuyer encore sur la touche entrée pour lancer le calcul du tempo…" 23 | ferme 24 | ferme 25 | 26 | calculerbpm : liste // paramètre liste, contient la liste des tempos 27 | retour valant 0 28 | si liste.taille() > 5 supprime liste{0} de liste // On supprime le premier élément 29 | pour liste, retour += joker // Somme des valeurs de la liste 30 | retourne arrondi(60000*liste.taille()/retour) -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/18_test_QI.liv: -------------------------------------------------------------------------------- 1 | form est un formulaire, titre prend "Première question", largeur prend 400, hauteur prend 260 2 | b1 est un bouton, texte prend "Blanc", x prend 30, y prend 60 3 | b2 est un bouton, texte prend "Noir", x prend 100, y prend 60 4 | l1 est un étiquette, texte prend "Quelle est la couleur du cheval blanc d'Henri 4 ?", x prend 30, y prend 30 5 | l2 est un étiquette, texte prend "", x prend 30, y prend 100 6 | 7 | ajoute b1 dans form // On ajoute les éléments graphiques 8 | ajoute b2 dans form // dans la fenêtre "form" 9 | ajoute l1 dans form 10 | ajoute l2 dans form 11 | fais réagir b2 à "clic souris" pour réponse fausse 12 | fais réagir b1 à "souris entrante" pour bouger bouton 13 | fais réagir b1 à "clic souris" pour bouger bouton 14 | fais réagir form à "clic souris" pour fermer fenêtre 15 | tant que vrai 16 | temporise 17 | vide touches 18 | ferme 19 | 20 | réponse fausse : bouton // Objet qui reçoit l'action. Ici un clic sur le bouton "Noir" 21 | texte de l2 prend "Tu es bien trop mauvais pour continuer le test !" 22 | reviens 23 | 24 | bouger bouton : bouton // Objet qui reçoit l'action 25 | x de bouton prend hasard(320) + 30 26 | y de bouton prend hasard(220) + 30 27 | reviens 28 | 29 | fermer fenêtre : form // Objet qui reçoit l'action 30 | termine -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/barre.liv: -------------------------------------------------------------------------------- 1 | form est un formulaire, titre prend "Démonstration barrée", largeur prend 400, hauteur prend 260 2 | m1 est un menu, texte prend "Outils" 3 | barre est un barre, x prend 1, y prend 10 4 | b1 est un bouton, texte prend "Rouge", icône prend "medias/rouge.png" 5 | b2 est un bouton, texte prend "Blanc", icône prend "medias/blanc.png" 6 | b3 est un bouton, texte prend "Logo", icône prend "medias/logo.png" 7 | sm1 est un sousmenu, texte prend "Démarrer" 8 | l1 est un étiquette, texte prend "", x prend 30, y prend 100 9 | 10 | Ajoute m1 & l1 & barre dans form 11 | Ajoute b1 dans barre 12 | évoque barre.séparateur() 13 | Ajoute b2 dans barre 14 | évoque barre.espace(100) 15 | Ajoute b3 dans barre 16 | Ajoute sm1 dans m1 17 | Fais réagir sm1 à "clic souris" pour message 18 | Fais réagir b1 & b2 & b3 à "clic souris" pour messagebouton 19 | Fais réagir form à "clic souris" pour fermer fenêtre 20 | tant que vrai 21 | temporise 22 | vide touches 23 | ferme 24 | 25 | message : 26 | *m est un sousmenu 27 | texte @ l1 prend "Le sous-menu fonctionne !" 28 | Reviens 29 | 30 | Messagebouton : 31 | *m est un bouton 32 | texte @ l1 prend "Le bouton ${texte@m} fonctionne !" 33 | Reviens 34 | 35 | Fermer fenêtre : 36 | Termine 37 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/atelier/UndoAction.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.atelier; 2 | 3 | import javax.swing.*; 4 | import javax.swing.undo.CannotUndoException; 5 | import java.awt.event.ActionEvent; 6 | 7 | public class UndoAction extends AbstractAction { 8 | private final AtelierFrame atelier; 9 | 10 | public UndoAction(AtelierFrame atelier) { 11 | super("Undo"); 12 | this.atelier = atelier; 13 | setEnabled(false); 14 | } 15 | 16 | public void actionPerformed(ActionEvent e) { 17 | try { 18 | atelier.getCahierCourant().setEditeurUpdate(true); 19 | atelier.getCahierCourant().getUndoManager().undo(); 20 | } catch (CannotUndoException ex) { 21 | ex.printStackTrace(); 22 | } 23 | updateUndoState(); 24 | atelier.redoAction.updateRedoState(); 25 | } 26 | 27 | public void updateUndoState() { 28 | if (atelier.getCahierCourant() != null && atelier.getCahierCourant().getUndoManager() != null && atelier.getCahierCourant().getUndoManager().canUndo()) { 29 | setEnabled(true); 30 | putValue(Action.NAME, "Annuler"); 31 | } else { 32 | setEnabled(false); 33 | putValue(Action.NAME, "Annuler"); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/scribes.liv: -------------------------------------------------------------------------------- 1 | Information est un graffiti, x prend 170, y prend 220, couleur prend "or", texte prend "Utilise la touche Entrée pour changer de scribe !" 2 | Message A est un graffiti, x prend 200, y prend 320, couleur prend "rouge", texte prend "A :" 3 | Réponse A est un scribe, x prend 230, y prend 320, couleur prend "noir", texte prend "", taille prend 4, taquet prend 20 4 | Message B est un graffiti, x prend 200, y prend 350, couleur prend "rouge", texte prend "B :" 5 | Réponse B est un scribe, x prend 230, y prend 350, couleur prend "noir", texte prend "", taille prend 4, taquet prend 20 6 | Message C est un graffiti, x prend 200, y prend 380, couleur prend "rouge", texte prend "C :" 7 | Réponse C est un scribe, x prend 230, y prend 380, couleur prend "noir", texte prend "", taille prend 4, angle prend 40, taquet prend 20 8 | Mur est une toile, couleur prend "gris" 9 | 10 | Efface toile 11 | Projette mur 12 | Projette information 13 | Projette message A 14 | Projette réponse A 15 | Projette message B 16 | Projette réponse B 17 | Projette message C 18 | Projette réponse C 19 | Va vers boucle 20 | 21 | boucle : 22 | Stimule réponse A 23 | Temporise 24 | Stimule réponse B 25 | Temporise 26 | Stimule réponse C 27 | Temporise 28 | Va vers boucle 29 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/atelier/RedoAction.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.atelier; 2 | 3 | import javax.swing.*; 4 | import javax.swing.undo.CannotRedoException; 5 | import java.awt.event.ActionEvent; 6 | 7 | public class RedoAction extends AbstractAction { 8 | private final AtelierFrame atelier; 9 | 10 | public RedoAction(AtelierFrame atelier) { 11 | super("Redo"); 12 | this.atelier = atelier; 13 | setEnabled(false); 14 | } 15 | 16 | public void actionPerformed(ActionEvent e) { 17 | try { 18 | atelier.getCahierCourant().setEditeurUpdate(true); 19 | atelier.getCahierCourant().getUndoManager().redo(); 20 | } catch (CannotRedoException ex) { 21 | ex.printStackTrace(); 22 | } 23 | updateRedoState(); 24 | atelier.undoAction.updateUndoState(); 25 | } 26 | 27 | public void updateRedoState() { 28 | if (atelier.getCahierCourant() != null && atelier.getCahierCourant().getUndoManager() != null && atelier.getCahierCourant().getUndoManager().canRedo()) { 29 | setEnabled(true); 30 | putValue(Action.NAME, "Rétablir"); 31 | } else { 32 | setEnabled(false); 33 | putValue(Action.NAME, "Rétablir"); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/coloration/StyleMathematiques.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.coloration; 2 | 3 | import org.linotte.moteur.xml.alize.parseur.ParserContext; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * Cette classe a été créée pour optimiser la coloration de l'Atelier 9 | * 10 | * @author CPC 11 | * 12 | */ 13 | public class StyleMathematiques { 14 | 15 | private String formule; 16 | private List list; 17 | private int debut_style; 18 | private ParserContext parserContext; 19 | private boolean prototype_attribut; 20 | 21 | public StyleMathematiques(String formule, List list, int debut_style, ParserContext parserContext, boolean prototype_attribut) { 22 | super(); 23 | this.formule = formule; 24 | this.list = list; 25 | this.debut_style = debut_style; 26 | this.parserContext = parserContext; 27 | this.prototype_attribut = prototype_attribut; 28 | } 29 | 30 | public String getFormule() { 31 | return formule; 32 | } 33 | 34 | public List getList() { 35 | return list; 36 | } 37 | 38 | public int getDebut_style() { 39 | return debut_style; 40 | } 41 | 42 | public ParserContext getParserContext() { 43 | return parserContext; 44 | } 45 | 46 | public boolean isPrototype_attribut() { 47 | return prototype_attribut; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/h_pedagogiques/horloge_complexe.liv: -------------------------------------------------------------------------------- 1 | // Notice : http://programmons.forumofficiel.fr/t1098-l-horloge-decouvrir-la-programmation 2 | principale : 3 | pièce est une toile, couleur vaut "vert bouteille" 4 | comtoise est une horloge, x vaut 200, y vaut 50, rayon vaut 80, position vaut 1 5 | coffre est un rectangle, couleur vaut "puce", plein vaut vrai, position vaut 0, 6 | x vaut 180, y vaut 15, hauteur vaut 500, largeur vaut 205 7 | balancier est un cercle, plein vaut vrai, x vaut 280, y vaut 400, position vaut 1, 8 | couleur vaut "platine", rayon vaut 20 9 | tige est une ligne, x1 vaut 280, y1 vaut 250, x2 vaut 280, y2 vaut 400, position vaut 1, 10 | couleur vaut "platine", taille vaut 5 11 | i est un nombre 12 | sens est un drapeau valant vrai 13 | projette comtoise 14 | projette coffre 15 | projette balancier 16 | projette tige 17 | tant que vrai 18 | comtoise.heure(heure) 19 | comtoise.minute(minute) 20 | comtoise.seconde(seconde) 21 | // Evolution du balancier 22 | pour i de 0 à 40 suivant i + 5 23 | si sens 24 | x de balancier vaut 260 + i 25 | x2 de tige vaut 260 + i 26 | ferme 27 | sinon 28 | x de balancier vaut 300 - i 29 | x2 de tige vaut 300 - i 30 | ferme 31 | attends 1/8 seconde 32 | ferme 33 | sens vaut non (sens) 34 | ferme -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/entites/Monolithe.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.entites; 2 | 3 | import java.awt.*; 4 | import java.awt.image.BufferedImage; 5 | 6 | public class Monolithe implements Comparable { 7 | 8 | private Shape shape; 9 | 10 | private Color color; 11 | 12 | private int position; 13 | 14 | private BufferedImage image; 15 | 16 | public Monolithe(Shape shape, Color color, int position, BufferedImage image) { 17 | super(); 18 | this.shape = shape; 19 | this.color = color; 20 | this.position = position; 21 | this.image = image; 22 | } 23 | 24 | public int getPosition() { 25 | return position; 26 | } 27 | 28 | public void setPosition(int position) { 29 | this.position = position; 30 | } 31 | 32 | public Shape getShape() { 33 | return shape; 34 | } 35 | 36 | public void setShape(Shape area) { 37 | this.shape = area; 38 | } 39 | 40 | public Color getColor() { 41 | return color; 42 | } 43 | 44 | public void setColor(Color color) { 45 | this.color = color; 46 | } 47 | 48 | public BufferedImage getImage() { 49 | return image; 50 | } 51 | 52 | public int compareTo(Monolithe o) { 53 | if (o.getPosition() == getPosition()) 54 | return 0; 55 | if (o.getPosition() < getPosition()) 56 | return 1; 57 | else 58 | return -1; 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/c_logo/flocon_van_koch_parallele.liv: -------------------------------------------------------------------------------- 1 | /*http://xlogo.tuxfamily.org/fr/examples-fr.html*/ 2 | c1 est un crayon, couleur prend "rouge", x prend 350, y prend 230, taille prend 4, angle prend 90 3 | c2 est un crayon, couleur prend "noir", x prend 350, y prend 230, taille prend 3, angle prend 90 4 | c3 est un crayon, couleur prend "vert", x prend 350, y prend 230, taille prend 1, angle prend 90 5 | 6 | efface toile 7 | appelle commencer avec c1, 6 8 | attends 0.2 seconde 9 | appelle commencer avec c2, 6 10 | attends 0.2 seconde 11 | appelle commencer avec c3, 6 12 | observe commencer 13 | 14 | commencer : tortue, pas 15 | projette tortue 16 | parcours flocon avec tortue, 200, pas 17 | reviens 18 | 19 | flocon : tortue, longueur, pas 20 | pour 3 21 | parcours ligne avec tortue, longueur, pas 22 | tourne à droite tortue de 120 23 | ferme 24 | reviens 25 | 26 | ligne : tortue, longueur, pas 27 | si pas = 0, avance tortue de longueur 28 | sinon 29 | parcours ligne avec tortue, longueur / 3, pas - 1 30 | tourne à gauche tortue de 60 31 | parcours ligne avec tortue, longueur / 3, pas - 1 32 | tourne à droite tortue de 120 33 | parcours ligne avec tortue, longueur / 3, pas - 1 34 | tourne à gauche tortue de 60 35 | parcours ligne avec tortue, longueur / 3, pas - 1 36 | ferme 37 | reviens 38 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/e_interfaces_utilisateur/decorateur.liv: -------------------------------------------------------------------------------- 1 | form est un formulaire, titre prend "Le décorateur", largeur prend 400, hauteur prend 260 2 | b1 est un bouton, texte prend "Metal", x prend 5, y prend 60 3 | b2 est un bouton, texte prend "Motif", x prend 70, y prend 60 4 | b3 est un bouton, texte prend "Nimbus", x prend 130, y prend 60 5 | b4 est un bouton, texte prend "Windows", x prend 210, y prend 60 6 | b5 est un bouton, texte prend "Gtk", x prend 300, y prend 60 7 | l1 est un étiquette, texte prend "Choisisez votre thème", x prend 5, y prend 30 8 | 9 | Ajoute l1 & b1 & b2 & b3 & b4 & b5 dans form 10 | Fais réagir b1 & b2 & b3 & b4 & b5 à "clic souris" pour changer le thème 11 | Tant que vrai 12 | temporise 13 | vide touches 14 | Ferme 15 | Termine 16 | 17 | Changer le thème : 18 | *b est un bouton 19 | Si (texte @ b) == "Metal", Explore "coloriser javax.swing.plaf.metal.MetalLookAndFeel" 20 | Sinon si (texte @ b) == "Motif", Explore "coloriser com.sun.java.swing.plaf.motif.MotifLookAndFeel" 21 | Sinon si (texte @ b) == "Nimbus", Explore "coloriser com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel" 22 | Sinon si (texte @ b) == "Windows", Explore "coloriser com.sun.java.swing.plaf.windows.WindowsLookAndFeel" 23 | Sinon si (texte @ b) == "Gtk", Explore "coloriser com.sun.java.swing.plaf.gtk.GTKLookAndFeel" 24 | reviens 25 | -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/b_multimedia/fleurs_des_champs_et_heritage2.liv: -------------------------------------------------------------------------------- 1 | espèces 2 | nom est un texte 3 | espèce fleur hérite de point et contient nom 4 | globale 5 | champs est une toile, couleur prend "jaune mimosa" 6 | fleurs est un casier de fleur 7 | message_fleur est un graffiti, x prend 114, y prend 539, couleur prend "noir", texte prend "Déplace la souris sur les fleurs !", position prend 1, taille prend 10 8 | pointeur est un point, couleur prend "blanc" 9 | 10 | décor : 11 | xx & yy est un nombre 12 | efface toile 13 | projette champs 14 | projette message_fleur 15 | pour chaque couleurs, parcours création avec joker 16 | projette pointeur 17 | va vers action 18 | 19 | création : 20 | *n est un texte 21 | fleur est un fleur 22 | yy est un nombre valant 600 23 | xx est un nombre valant 600 24 | mélange xx 25 | mélange yy 26 | déplace fleur vers xx et yy 27 | couleur @ fleur prend joker 28 | taille @ fleur prend 10 29 | nom @ fleur prend joker 30 | projette fleur 31 | ajoute fleur dans fleurs 32 | reviens 33 | 34 | action : 35 | position est un nombre valant 0 36 | /*boucle infinie*/ 37 | tant que vrai 38 | temporise 39 | vide touches 40 | déplace pointeur vers sourisx et sourisy 41 | pour chaque fleurs 42 | si pointeur.collision(joker), texte @ message_fleur prend nom @ joker 43 | ferme 44 | ferme -------------------------------------------------------------------------------- /linotte-greffons/src/main/java/org/linotte/greffons/impl/swing/JListX.java: -------------------------------------------------------------------------------- 1 | package org.linotte.greffons.impl.swing; 2 | 3 | import javax.swing.*; 4 | import java.awt.event.MouseEvent; 5 | import java.util.HashMap; 6 | import java.util.Vector; 7 | 8 | /** 9 | * 10 | * http://www.exampledepot.com/egs/javax.swing/list_ListTt.html 11 | * 12 | */ 13 | @SuppressWarnings("serial") 14 | public class JListX extends JList { 15 | 16 | private HashMap tooltips = new HashMap(); 17 | 18 | public JListX() { 19 | } 20 | 21 | @SuppressWarnings("unchecked") 22 | public JListX(ListModel dataModel) { 23 | super(dataModel); 24 | } 25 | 26 | @SuppressWarnings("unchecked") 27 | public JListX(Object[] listData) { 28 | super(listData); 29 | } 30 | 31 | @SuppressWarnings("unchecked") 32 | public JListX(Vector listData) { 33 | super(listData); 34 | } 35 | 36 | public void setToolTip(Integer pos, String value) { 37 | tooltips.put(pos, value); 38 | } 39 | 40 | // This method is called as the cursor moves within the list. 41 | public String getToolTipText(MouseEvent evt) { 42 | // Get item index 43 | int index = locationToIndex(evt.getPoint()); 44 | 45 | // Get item 46 | // Object item = getModel().getElementAt(index); 47 | String text = tooltips.get(index); 48 | 49 | // Return the tool tip text 50 | return text; 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/moteur/xml/operation/simple/Soustration.java: -------------------------------------------------------------------------------- 1 | package org.linotte.moteur.xml.operation.simple; 2 | 3 | import org.linotte.moteur.entites.Acteur; 4 | import org.linotte.moteur.entites.Casier; 5 | import org.linotte.moteur.entites.Prototype; 6 | import org.linotte.moteur.xml.analyse.Mathematiques; 7 | import org.linotte.moteur.xml.operation.i.OperationSimple; 8 | 9 | import java.math.BigDecimal; 10 | import java.math.MathContext; 11 | 12 | public class Soustration implements OperationSimple { 13 | 14 | @Override 15 | public Object action(Object total, Object valeur_transformee, MathContext context) throws Exception { 16 | if (total instanceof Acteur && !(total instanceof Prototype) && !(total instanceof Casier)) { 17 | total = ((Acteur) total).getValeur(); 18 | } 19 | if (valeur_transformee instanceof BigDecimal) { 20 | if (total instanceof BigDecimal) { 21 | BigDecimal n1 = ((BigDecimal) total); 22 | BigDecimal n2 = (BigDecimal) valeur_transformee; 23 | context = Mathematiques.ameliorerPrecision(context, n1, n2); 24 | return Mathematiques.stripTrailingZerosIfNecessary(n1.subtract(n2, context)); 25 | } else { 26 | throw new Exception("Impossible de soustraire un nombre à " + total); 27 | } 28 | } else { 29 | throw new Exception("Impossible de soustraire une chaine à " + valeur_transformee); 30 | } 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /linotte-resources/src/main/exemples/plus_d_exemples_ici/d_confirme/simplification_syntaxique.liv: -------------------------------------------------------------------------------- 1 | /* 2 | Présentation de quelques simplifications syntaxiques (Linotte 2.3). 3 | Linotte est capable de détecter automatiquement certains rôles. 4 | */ 5 | 6 | // Acteurs simples : 7 | f valant 123 // f est un nombre valant 123 8 | d valant "programmeur" // d est un texte valant "programmeur" 9 | 10 | // Casiers : 11 | notes2 est un casier valant 1,2 // notes2 est un casier de nombres valant 1, 2 12 | notes3 est un casier valant "a","b" // notes3 est un casier de textes valant "a", "b" 13 | notes est un casier valant {1,2},{3,4} // notes est un casier de casiers valant {1,2},{3,4} 14 | //notes5 est un casier // ERREUR ! Linotte ne peut detecter aucun rôle ! 15 | 16 | // Création des casiers encore plus simplement : 17 | h valant 1,2,3 // g est un casier de nombres valant 1, 2, 3 18 | g valant "Coucou", "Bonjour", "Hello" // g est un casier de textes valant "coucou", "bonjour", "hello" 19 | i valant {1,2},{3,4} // i est un casier de casiers valant {1,2},{3,4} 20 | j valant {"a","e"},{"c","e"} // j est un casier de casiers valant {"a","e"},{"c","e"} 21 | 22 | // On peut utiliser ${d} ou plus simplement {d} dans une texte pour afficher la valeur d'un acteur : 23 | affiche g{2} + ", {d} !" 24 | f += 12 // Evolution 2.7 25 | affiche f // Affiche 123 + 12 26 | f -= 6 // Evolution 2.7 27 | affiche f // Affiche 135 - 6 28 | -------------------------------------------------------------------------------- /linotte-moteur/src/main/java/org/linotte/frame/atelier/ShowParLabelView.java: -------------------------------------------------------------------------------- 1 | package org.linotte.frame.atelier; 2 | 3 | import javax.swing.text.Element; 4 | import javax.swing.text.LabelView; 5 | import java.awt.*; 6 | 7 | /** 8 | * http://java-sl.com/showpar.html 9 | * Cette classe permet d'afficher les erreurs soulignées 10 | */ 11 | 12 | public class ShowParLabelView extends LabelView { 13 | 14 | private static final float dash1[] = {3.0f}; 15 | private static final BasicStroke dashed = new BasicStroke(1.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 10.0f, dash1, 0.0f); 16 | 17 | public ShowParLabelView(Element elem) { 18 | super(elem); 19 | } 20 | 21 | public void paint(Graphics g, Shape a) { 22 | //Do whatever other painting here; 23 | Color c = (Color) getElement().getAttributes().getAttribute("Underline-Color"); 24 | if (c != null && !c.equals(Color.WHITE)) { 25 | int y = a.getBounds().y + (int) getGlyphPainter().getAscent(this) + 2; 26 | int x1 = a.getBounds().x; 27 | int x2 = a.getBounds().width + x1; 28 | 29 | Graphics2D g2 = ((Graphics2D) g); 30 | Stroke stroke_bak = g2.getStroke(); 31 | g2.setStroke(dashed); 32 | g.setColor(c); 33 | g.drawLine(x1, y, x2, y); 34 | g2.setStroke(stroke_bak); 35 | } 36 | super.paint(g, a); 37 | } 38 | } 39 | --------------------------------------------------------------------------------