*/ var $dflt = array( 'name' => '', // Name der Konstruktionsdatei 'width' => 551, 'height' => 359, 'demo' => '',#true', // Selbstablaufende Demo (siehe unten) 'edit' => '',#false', Damit werden auch eingebettete Stile edierbar 'style' => '', // Applet-Stil ("plain", "full", "3D", "nonvisual", "icons", "breaks") 'editdigits' => '', //Nachkommastellen in Dialogen 'displaydigits' => '', // Nachkommastellen in Größenanzeigen 'angledigits' => '', // Nachkommastellen bei Winkeln 'movefixname' => 'false', // Zeige Namen von fixen Objekten 'grid' => '', // Gitterstil ("none","coordinates","normal") 'font' => '', // Kann "bold" und "large" enthalten 'color' => '255 255 255', // Setzt die Hintergrundfarbe für das Applet in der Form "255,255,255" oder "#FFFFFF". 'colorbackground' => '', // Setzt die Hintergrundfarbe für Dialoge etc. 'colorselect' => '', // Farbe für selektierte Objekte 'colortarget' => '', // Farbe für Zielobjekte // 'colornochecktarget' => '', 'tools' => '', // Enthält die Strings für die Werkzeuge (s.u.) 'options' => '', // Enthält Strings für die Optionen (s.u.) 'job' => '', //another "file" Name der Aufgabendatei // 'track' => '', 'smallicons' => '', // Kleine Icons verwenden. 'language' => 'de', // Spracheinstellung ("de","en", etc.) 'color1' => '', 'color2' => '', // Setzt die Farben für die Objekte 'arrowsize' => '', // Setzt die Größe der Pfeile 'intersection' => '', // Frägt vor Schnitten 'pointon' => '', // Frägt vor Punkten auf Objekten 'choice' => '', // Stellt den Wahldialog an 'showhidden' => '', // Versteckte Objekte werden angezeigt 'movename' => '', // Zeige Namen bei Bewegungen an 'minpointsize' => '', // Minimale Punktgröße 'minfontsize' => '', // Minimale Zeichengröße 'interactive' => '', // Verhindere Benutzereingaben, wenn "false" 'snap' => '', // "left" schnappt mit der linken Maustaste ein. 'nomousezoom' => '', // Verhindert verschieben oder Zoomen mit der Maus. 'nopopupmenu' => '', // Verhindert die Popupmenus. 'jumptostart' => '', // Springt zum Anfang, bzw. zum ersten Haltepunkt 'noconfirmation' => '', // Zeigt keine Bestätigung nach dem Lösen der Aufgabe 'restrictedmove' => '', // Erlaubt nur Bewegungen, bei denen keine Punkte ungültig werden. das funktioniert wie beim automatischen Ortslinienwerkzeug, 'shadow' => '', // Schaltet den Schatten an oder aus ("true" oder "false") 'shadowcolor' => '', // Farbe für den Hintergrund, auf den der Schatten geworfen wird. ); /** * return some info */ function getInfo(){ return array( 'author' => 'jaloma', 'email' => 'jaloma.ac@googlemail.com', 'date' => '05/11/2008', 'name' => 'ZirkelUndLineal Plugin', 'desc' => 'Include ZirkelUndLineal-Files to your Wiki with . See http://www.geogebra.org/source/program/applet/geogebra_applet_param.html', 'url' => 'http://jaloma.ac.googlepages.com/plugin:ZirkelUndLineal' ); } /** * Plugin Type */ function getType(){ return 'substition'; } function getSort(){ return 316; } function connectTo($mode) { $this->Lexer->addSpecialPattern("",$mode,'plugin_zul_zirkelundlineal'); } function matchLength() { return strlen("matchLength(),-2)); $gmap = $this->_extract_params($match); return $gmap; } /** * extract parameters for the gmsdisplay from the parameter string * * @param string $str_params string of key="value" pairs * @return array associative array of parameters key=>value */ function _extract_params($str_params) { $param = array(); preg_match_all('/(\w*)="(.*?)"/us',$str_params,$param,PREG_SET_ORDER); if (sizeof($param) == 0) { preg_match_all("/(\w*)='(.*?)'/us",$str_params,$param,PREG_SET_ORDER); } // parse match for instructions, break into key value pairs $gmap = $this->dflt; foreach($param as $kvpair) { list($match,$key,$val) = $kvpair; if (isset($gmap[$key])) $gmap[$key] = $val; } return $gmap; } /** * Create output */ function render($mode, &$renderer, $data) { if($mode == 'xhtml'){ $renderer->doc .= $this->_contact($data); return true; } return false; } function getCode() { return "rene.zirkel.ZirkelApplet.class"; } function getArchive() { return "zirkel.jar"; } function _contact($data){ global $conf; $file = $data['name']; $hasfile = $file != null && $file != ''; $file = $conf['savedir'] . '/media/' . str_replace( ":", "/", $file ); // echo $file.'
'; $width = $data['width']; $height = $data['height']; $style = $data['style']; $editdigits = $data['editdigits']; $displaydigits = $data['displaydigits']; $angledigits = $data['angledigits']; $movefixname = $data['movefixname']; $grid = $data['grid']; $font = $data['font']; $color = $data['color']; $colorbackground = $data['colorbackground']; $colorselect = $data['colorselect']; $colortarget = $data['colortarget']; $colornochecktarget = $data['colornochecktarget']; $language = $data['language']; $tools = $data['tools']; $options = $data['options']; $job = $data['job']; $track = $data['track']; $smallicons = $data['smallicons']; $demo = $data['demo']; $edit = $data['edit']; $color1 = $data['color1']; $color2 = $data['color2']; $arrowsize = $data['arrowsize']; $intersection = $data['intersection']; $pointon = $data['pointon']; $choice = $data['choice']; $showhidden = $data['showhidden']; $movename = $data['movename']; $minpointsize = $data['minpointsize']; $minfontsize = $data['minfontsize']; $interactive = $data['interactive']; $snap = $data['snap']; $nomousezoom = $data['nomousezoom']; $nopopupmenu = $data['nopopupmenu']; $jumptostart = $data['jumptostart']; $noconfirmation = $data['noconfirmation']; $restrictedmove = $data['restrictedmove']; $shadow = $data['shadow']; $shadowcolor = $data['shadowcolor']; $txt = ""; $archive = $this->getConf('jarbase').'/'.$this->getArchive(); $txt .= ''; if ($hasfile != '') { $txt .= ''; } if ($style != '') { $txt .= ''; } if ($editdigits != '') { $txt .= ''; } if ($displaydigits != '') { $txt .= ''; } if ($angledigits != '') { $txt .= ''; } if ($movefixname != '') { $txt .= ''; } if ($grid != '') { $txt .= ''; } if ($font != '') { $txt .= ''; } if ($color != '') { $txt .= ''; } if ($demo != '') { $txt .= ''; } if ($edit != '') { $txt .= ''; } if ($colorbackground != '') { $txt .= ''; } if ($colorselect != '') { $txt .= ''; } if ($colortarget != '') { $txt .= ''; } if ($colornochecktarget != '') { $txt .= ''; } if ($tools != '') { $txt .= ''; } if ($options != '') { $txt .= ''; } if ($job != '') { $txt .= ''; } if ($track != '') { $txt .= ''; } if ($smallicons != '') { $txt .= ''; } if ($language != '') { $txt .= ''; } if ($color1 != '') { $txt .= ''; } if ($color2 != '') { $txt .= ''; } if ($arrowsize != '') { $txt .= ''; } if ($intersection != '') { $txt .= ''; } if ($pointon != '') { $txt .= ''; } if ($choice != '') { $txt .= ''; } if ($showhidden != '') { $txt .= ''; } if ($movename != '') { $txt .= ''; } if ($minpointsize != '') { $txt .= ''; } if ($minfontsize != '') { $txt .= ''; } if ($interactive != '') { $txt .= ''; } if ($snap != '') { $txt .= ''; } if ($nomousezoom != '') { $txt .= ''; } if ($nopopupmenu != '') { $txt .= ''; } if ($jumptostart != '') { $txt .= ''; } if ($noconfirmation != '') { $txt .= ''; } if ($restrictedmove != '') { $txt .= ''; } if ($shadow != '') { $txt .= ''; } if ($shadowcolor != '') { $txt .= ''; } $txt .= 'Please install Java 1.4.2 (or later) to use this page.'. ''; $txt .= '
'; if ($this->getConf('showHelpUrl')) { // $txt .= 'Online-Hilfe —'; } if ($this->getConf('showDownloadUrl') && $hasfile) { $txt .= ' Download —'; } $user = $_SERVER['REMOTE_USER']; $txt .= ' Erstellt mit © ZirkelUndLineal durch '.$user; return $txt; } }//class