Difference between revisions of "Reference:GeoGebra App Parameters"

From GeoGebra Manual
Jump to: navigation, search
Line 19: Line 19:
 
The following parameters may be used within the applet tag.
 
The following parameters may be used within the applet tag.
 
{| class="pretty"
 
{| class="pretty"
!width="20%"|Name  
+
!width="15%"|Name  
!width="30%"|Value
+
!width="15%"|GeoGebraWeb
!width="50%"|Description
+
!width="15%"|Value
 +
!width="55%"|Description
 
!Since
 
!Since
 
|-
 
|-
 
|filename
 
|filename
 +
|
 
|e.g. <code>file.ggb</code>
 
|e.g. <code>file.ggb</code>
 
|Path to the construction file.
 
|Path to the construction file.
 
|2.5
 
|2.5
 +
|-
 +
|ggbBase64
 +
|data-param-ggbbase64
 +
|
 +
|Base64-encoded string of a .ggb file
 +
|3.2
 
|-
 
|-
 
|type
 
|type
 +
|
 
|<code>button</code>
 
|<code>button</code>
 
|If you use this parameter the applet will only show a button to open the GeoGebra application frame.<br><b>Deprecated from GeoGebra 4</b>
 
|If you use this parameter the applet will only show a button to open the GeoGebra application frame.<br><b>Deprecated from GeoGebra 4</b>
Line 35: Line 44:
 
|-
 
|-
 
|framePossible
 
|framePossible
 +
|
 
|<code>true</code> or <code>false</code>
 
|<code>true</code> or <code>false</code>
 
|States if a double click on the drawing pad should open the GeoGebra application frame. This parameter is ignored if the type was set to "button". Default: true<br><b>Deprecated from GeoGebra 4</b>
 
|States if a double click on the drawing pad should open the GeoGebra application frame. This parameter is ignored if the type was set to "button". Default: true<br><b>Deprecated from GeoGebra 4</b>
Line 40: Line 50:
 
|-
 
|-
 
|bgcolor
 
|bgcolor
 +
|
 
|e.g. <code>#FFFFFF</code> for white
 
|e.g. <code>#FFFFFF</code> for white
 
|Background color (as hex rgb string) of the applet. This parameter is only used if type "button" was set. Default: white
 
|Background color (as hex rgb string) of the applet. This parameter is only used if type "button" was set. Default: white
Line 45: Line 56:
 
|-
 
|-
 
|borderColor
 
|borderColor
 +
|
 
|e.g. <code>#FFFFFF</code> for white
 
|e.g. <code>#FFFFFF</code> for white
 
|Color of the border line drawn around the applet panel&nbsp;(as hex rgb string). Default: gray
 
|Color of the border line drawn around the applet panel&nbsp;(as hex rgb string). Default: gray
Line 50: Line 62:
 
|-
 
|-
 
|enableChooserPopups
 
|enableChooserPopups
 +
|
 
|<code>true</code> or <code>false</code>
 
|<code>true</code> or <code>false</code>
 
|Controls whether a popup menu is shown or not when you click on multiple objects. Default: true<br><b>Deprecated from GeoGebra 4</b>
 
|Controls whether a popup menu is shown or not when you click on multiple objects. Default: true<br><b>Deprecated from GeoGebra 4</b>
Line 55: Line 68:
 
|-
 
|-
 
|enableRightClick
 
|enableRightClick
 +
|
 
|<code>true</code> or <code>false</code>
 
|<code>true</code> or <code>false</code>
 
|States whether right clicks should be handled by the applet. Setting this parameter&nbsp;to "false" disables context menus, properties dialogs and right-click-zooming. Default: true.  NB also enables/disables some keyboard shortcuts eg {{KeyCode|Delete}} and {{KeyCode|Ctrl+R}} (recompute all objects)
 
|States whether right clicks should be handled by the applet. Setting this parameter&nbsp;to "false" disables context menus, properties dialogs and right-click-zooming. Default: true.  NB also enables/disables some keyboard shortcuts eg {{KeyCode|Delete}} and {{KeyCode|Ctrl+R}} (recompute all objects)
Line 60: Line 74:
 
|-
 
|-
 
|enableLabelDrags
 
|enableLabelDrags
 +
|data-param-enableLabelDrags
 
|<code>true</code> or <code>false</code>
 
|<code>true</code> or <code>false</code>
 
|States whether labels can be dragged. Default: true
 
|States whether labels can be dragged. Default: true
Line 65: Line 80:
 
|-
 
|-
 
|allowRescaling
 
|allowRescaling
 +
|
 
|<code>true</code> or <code>false</code>
 
|<code>true</code> or <code>false</code>
 
|Determines whether the applet will attempt to rescale the Graphics View when the applet is loaded or the size is changed (eg Zooming in the browser). Disabled if the Spreadsheet or Algebra View are showing. Default: false
 
|Determines whether the applet will attempt to rescale the Graphics View when the applet is loaded or the size is changed (eg Zooming in the browser). Disabled if the Spreadsheet or Algebra View are showing. Default: false
Line 70: Line 86:
 
|-
 
|-
 
|enableShiftDragZoom
 
|enableShiftDragZoom
 +
|data-param-enableShiftDragZoom
 
|<code>true</code> or <code>false</code>
 
|<code>true</code> or <code>false</code>
 
|States whether the drawing pad should be moveable using Shift + mouse drag (or. Ctrl +&nbsp;mouse drag) or zoomable using Shift + mouse wheel (or Ctrl + mouse wheel). Setting this parameter to "false" disables moving and zooming of the drawing pad. Default: true
 
|States whether the drawing pad should be moveable using Shift + mouse drag (or. Ctrl +&nbsp;mouse drag) or zoomable using Shift + mouse wheel (or Ctrl + mouse wheel). Setting this parameter to "false" disables moving and zooming of the drawing pad. Default: true
Line 75: Line 92:
 
|-
 
|-
 
|errorDialogsActive
 
|errorDialogsActive
 +
|
 
|<code>true</code> or <code>false</code>
 
|<code>true</code> or <code>false</code>
 
|States whether error dialogs will be shown if an invalid input is entered (using the Input Bar or JavaScript) Default: true
 
|States whether error dialogs will be shown if an invalid input is entered (using the Input Bar or JavaScript) Default: true
Line 80: Line 98:
 
|-
 
|-
 
|showMenuBar
 
|showMenuBar
 +
|data-param-showMenuBar
 
|<code>true</code> or <code>false</code>
 
|<code>true</code> or <code>false</code>
 
|States whether the menubar of GeoGebra should be shown in the applet. Default: false
 
|States whether the menubar of GeoGebra should be shown in the applet. Default: false
Line 85: Line 104:
 
|-
 
|-
 
|showToolBar
 
|showToolBar
 +
|data-param-showToolBar
 
|<code>true</code> or <code>false</code>
 
|<code>true</code> or <code>false</code>
 
|States whether the toolbar with the construction mode buttons should be shown in the applet. Default: false
 
|States whether the toolbar with the construction mode buttons should be shown in the applet. Default: false
Line 90: Line 110:
 
|-
 
|-
 
|maxIconSize
 
|maxIconSize
 +
|
 
|16 to 32
 
|16 to 32
 
|Maximum size of icons used in the toolbar in pixels. Default: 32
 
|Maximum size of icons used in the toolbar in pixels. Default: 32
Line 95: Line 116:
 
|-
 
|-
 
|showToolBarHelp
 
|showToolBarHelp
 +
|
 
|<code>true</code> or <code>false</code>
 
|<code>true</code> or <code>false</code>
 
|States whether the toolbar help text right to the toolbar buttons should be shown in the applet
 
|States whether the toolbar help text right to the toolbar buttons should be shown in the applet
Line 100: Line 122:
 
|-
 
|-
 
|customToolBar
 
|customToolBar
 +
|data-param-customToolBar
 
|e.g. <code>0  1 2  3 , 4  5 6 7</code>
 
|e.g. <code>0  1 2  3 , 4  5 6 7</code>
 
|Sets the toolbar according to a custom toolbar string where the int values are [[Reference:Toolbar|Toolbar Mode Values]], <code>,</code> adds a separator within a menu, <code>|</code> starts a new menu and <code><nowiki>||</nowiki></code> adds a separator in the toolbar before starting a new menu. Custom tools are numbered 1001, 1002, etc in GeoGebra 3.2 and 100 001, 100 002, etc from GeoGebra 4.
 
|Sets the toolbar according to a custom toolbar string where the int values are [[Reference:Toolbar|Toolbar Mode Values]], <code>,</code> adds a separator within a menu, <code>|</code> starts a new menu and <code><nowiki>||</nowiki></code> adds a separator in the toolbar before starting a new menu. Custom tools are numbered 1001, 1002, etc in GeoGebra 3.2 and 100 001, 100 002, etc from GeoGebra 4.
Line 105: Line 128:
 
|-
 
|-
 
|showAlgebraInput
 
|showAlgebraInput
 +
|data-param-showAlgebraInput
 
|<code>true</code> or <code>false</code>
 
|<code>true</code> or <code>false</code>
 
|States whether the algebra input line (with input field, greek letters and command list) should be shown in the applet. Default: false
 
|States whether the algebra input line (with input field, greek letters and command list) should be shown in the applet. Default: false
Line 110: Line 134:
 
|-
 
|-
 
|showResetIcon
 
|showResetIcon
 +
|data-param-showResetIcon
 
|<code>true</code> or <code>false</code>
 
|<code>true</code> or <code>false</code>
 
|States whether a small icon (GeoGebra ellipse) should be shown in the upper right corner of the applet. Clicking on this icon resets the applet (i.e. it reloads the file given in the filename parameter). Default: false
 
|States whether a small icon (GeoGebra ellipse) should be shown in the upper right corner of the applet. Clicking on this icon resets the applet (i.e. it reloads the file given in the filename parameter). Default: false
Line 115: Line 140:
 
|-
 
|-
 
|language
 
|language
 +
|data-param-language
 
|[[w:List_of_ISO_639-1_codes|iso language string]]
 
|[[w:List_of_ISO_639-1_codes|iso language string]]
 
  en ... English
 
  en ... English
Line 127: Line 153:
 
|-
 
|-
 
|country
 
|country
 +
|data-param-country
 
|iso country string, e.g. <code>AT</code> for Austria
 
|iso country string, e.g. <code>AT</code> for Austria
 
|This parameter only makes sense if you use it together with the language parameter.
 
|This parameter only makes sense if you use it together with the language parameter.
Line 132: Line 159:
 
|-
 
|-
 
|ggbOnInitParam
 
|ggbOnInitParam
 +
|data-param-ggbOnInitParam
 
|eg <code>applet2</code>
 
|eg <code>applet2</code>
 
|This parameter allows you to specify the argument passed to the JavaScript function ggbOnInit(), which is called once the applet is fully initialised. This is useful when you have multiple applets on a page - see http://www.geogebra.org/source/program/applet/geogebra_applet_java2java.htm (will have no effect in earlier versions)
 
|This parameter allows you to specify the argument passed to the JavaScript function ggbOnInit(), which is called once the applet is fully initialised. This is useful when you have multiple applets on a page - see http://www.geogebra.org/source/program/applet/geogebra_applet_java2java.htm (will have no effect in earlier versions)
Line 137: Line 165:
 
|-
 
|-
 
|java_arguments
 
|java_arguments
 +
|
 
|eg <code>-Xmx256m</code>
 
|eg <code>-Xmx256m</code>
 
|This parameter allows you to specify more memory (in megabytes) for the GeoGebra applet. <b>Works only in Java 6 update 10 or later</b> (will have no effect in earlier versions)
 
|This parameter allows you to specify more memory (in megabytes) for the GeoGebra applet. <b>Works only in Java 6 update 10 or later</b> (will have no effect in earlier versions)
Line 142: Line 171:
 
|-
 
|-
 
|allowStyleBar
 
|allowStyleBar
 +
|
 
|<code>true</code> or <code>false</code>
 
|<code>true</code> or <code>false</code>
 
|Default: false<br>Determines whether the Style Bar can be shown (or will be shown if just Graphics View 1 is showing)
 
|Default: false<br>Determines whether the Style Bar can be shown (or will be shown if just Graphics View 1 is showing)
Line 147: Line 177:
 
|-
 
|-
 
|useBrowserForJS
 
|useBrowserForJS
 +
|
 
|<code>true</code> or <code>false</code>
 
|<code>true</code> or <code>false</code>
 
|Default: true<br>Determines whether Rhino (built into GeoGebra) or the browser will be used to run JavaScript.
 
|Default: true<br>Determines whether Rhino (built into GeoGebra) or the browser will be used to run JavaScript.

Revision as of 13:10, 20 February 2012

To include a GeoGebra Applet into an HTML page you could use "Export dynamic worksheet as webpage" in File Menu. However, for more advanced users, it is also possible to include the applet tag by hand.

Applet tag

You can use the following lines to include a GeoGebra construction in your html page. The construction file (e.g. "circle.ggb") have to be placed in the directory of your html page.

<applet code="geogebra.GeoGebraApplet"  archive="geogebra.jar" 
  codebase="http://jars.geogebra.org/webstart/" 
  width="500" height="300">
      <param name="filename" value="circle.ggb" />
      <param name="framePossible" value="false" />
Please  install Java 1.5 (or later) from www.java.com to use this page.
</applet>

Instead of filename parameter you may use ggbBase64 paramter with your file encoded in Base64. To obtain this code, just press Ctrl + Shift + M -- the whole applet tag with this code will appear in your clipboard.

Codebase

Codebase defines the location of GeoGebra jar files. You can set it to following values

  • http://jars.geogebra.org/webstart/4.0/unsigned/ – unsigned version of GeoGebra will be used. This version does not have access to user's hardware (options like Undo, Redo, Save and Print are disabled), but user doesn't have to confirm that he is aware of security risks
  • http://jars.geogebra.org/webstart/4.0 – use this if you need Undo, Redo, Save or Print options
  • local path, e.g. ./ – might be useful if you want your worksheet to be accessible without connection to geogebra.org. You will need to download all jar files from one of the aforementioned URLs to the local path (in case the codebase is ./, place the jar files in the same folder as the worksheet).

Applet parameters

The following parameters may be used within the applet tag.

Name GeoGebraWeb Value Description Since
filename e.g. file.ggb Path to the construction file. 2.5
ggbBase64 data-param-ggbbase64 Base64-encoded string of a .ggb file 3.2
type button If you use this parameter the applet will only show a button to open the GeoGebra application frame.
Deprecated from GeoGebra 4
2.5 - 3.2
framePossible true or false States if a double click on the drawing pad should open the GeoGebra application frame. This parameter is ignored if the type was set to "button". Default: true
Deprecated from GeoGebra 4
2.5 - 3.2
bgcolor e.g. #FFFFFF for white Background color (as hex rgb string) of the applet. This parameter is only used if type "button" was set. Default: white 2.5
borderColor e.g. #FFFFFF for white Color of the border line drawn around the applet panel (as hex rgb string). Default: gray 3.0
enableChooserPopups true or false Controls whether a popup menu is shown or not when you click on multiple objects. Default: true
Deprecated from GeoGebra 4
3.2
enableRightClick true or false States whether right clicks should be handled by the applet. Setting this parameter to "false" disables context menus, properties dialogs and right-click-zooming. Default: true. NB also enables/disables some keyboard shortcuts eg Delete and Ctrl + R (recompute all objects) 3.0
enableLabelDrags data-param-enableLabelDrags true or false States whether labels can be dragged. Default: true 3.2
allowRescaling true or false Determines whether the applet will attempt to rescale the Graphics View when the applet is loaded or the size is changed (eg Zooming in the browser). Disabled if the Spreadsheet or Algebra View are showing. Default: false 3.2
enableShiftDragZoom data-param-enableShiftDragZoom true or false States whether the drawing pad should be moveable using Shift + mouse drag (or. Ctrl + mouse drag) or zoomable using Shift + mouse wheel (or Ctrl + mouse wheel). Setting this parameter to "false" disables moving and zooming of the drawing pad. Default: true 3.0
errorDialogsActive true or false States whether error dialogs will be shown if an invalid input is entered (using the Input Bar or JavaScript) Default: true 3.2
showMenuBar data-param-showMenuBar true or false States whether the menubar of GeoGebra should be shown in the applet. Default: false 2.5
showToolBar data-param-showToolBar true or false States whether the toolbar with the construction mode buttons should be shown in the applet. Default: false 2.5
maxIconSize 16 to 32 Maximum size of icons used in the toolbar in pixels. Default: 32 3.2
showToolBarHelp true or false States whether the toolbar help text right to the toolbar buttons should be shown in the applet 3.0
customToolBar data-param-customToolBar e.g. 0 1 2 3 , 4 5 6 7 Sets the toolbar according to a custom toolbar string where the int values are Toolbar Mode Values, , adds a separator within a menu, | starts a new menu and || adds a separator in the toolbar before starting a new menu. Custom tools are numbered 1001, 1002, etc in GeoGebra 3.2 and 100 001, 100 002, etc from GeoGebra 4. 2.5
showAlgebraInput data-param-showAlgebraInput true or false States whether the algebra input line (with input field, greek letters and command list) should be shown in the applet. Default: false 2.5
showResetIcon data-param-showResetIcon true or false States whether a small icon (GeoGebra ellipse) should be shown in the upper right corner of the applet. Clicking on this icon resets the applet (i.e. it reloads the file given in the filename parameter). Default: false 2.5
language data-param-language iso language string
en ... English
fr ... French
it ... Italian
de ... German
es ... Spanish
pt ... Portuguese
zh ... Chinese
GeoGebra tries to set your local language automatically (if it is available among the supported languages, of course). The default language for unsupported languages is English. If you want to specify a certain language manually, please use this parameter. 2.5
country data-param-country iso country string, e.g. AT for Austria This parameter only makes sense if you use it together with the language parameter. 2.5
ggbOnInitParam data-param-ggbOnInitParam eg applet2 This parameter allows you to specify the argument passed to the JavaScript function ggbOnInit(), which is called once the applet is fully initialised. This is useful when you have multiple applets on a page - see http://www.geogebra.org/source/program/applet/geogebra_applet_java2java.htm (will have no effect in earlier versions) 3.2
java_arguments eg -Xmx256m This parameter allows you to specify more memory (in megabytes) for the GeoGebra applet. Works only in Java 6 update 10 or later (will have no effect in earlier versions) 3.2
allowStyleBar true or false Default: false
Determines whether the Style Bar can be shown (or will be shown if just Graphics View 1 is showing)
4.0
useBrowserForJS true or false Default: true
Determines whether Rhino (built into GeoGebra) or the browser will be used to run JavaScript.
4.0

Examples

Example: The following lines are an example for a "button" applet that only consists of a button to open GeoGebra's window. The background of the applet (i.e. the area around the button) is set to white (#FFFFFF).

<applet code="geogebra.GeoGebraApplet"
   archive="geogebra.jar" 
   width=200 height=40>
<param name="filename" value="circle.ggb" />
<param name="type" value="button" />
<param name="bgcolor" value="#FFFFFF" />
Please <a href="http://java.sun.com/getjava">install Java
1.4</a> (or later) to use this page.
</applet>

es:Referencia:Parámetros Applet it:Riferimenti:Parametri applet fr:Référence:Paramètres Appliquette

© 2024 International GeoGebra Institute