Difference between revisions of "SetPerspective Command"

From GeoGebra Manual
Jump to: navigation, search
(command syntax: changed [ ] into ( ))
Line 1: Line 1:
 
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|scripting}}
 
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|scripting}}
 
;SetPerspective( <Text> )
 
;SetPerspective( <Text> )
Changes the layout and visibility of Views. The text parameter describes the desired layout. The text should be a valid expression. Views are represented by variables (letters): the horizontal arrangement of Views is represented by the related letters juxtaposition, and their vertical arrangement by a division symbol <code><nowiki> /</nowiki></code>.
+
Changes the layout and visibility of ''Views''. The text parameter describes the desired layout. The text should be a valid expression. ''Views'' are represented by variables (letters): the horizontal arrangement of ''Views'' is represented by the related letters juxtaposition, and their vertical arrangement by a division symbol <code><nowiki> /</nowiki></code>.
 +
To open or close individual ''Views'', add the symbols <code><nowiki>+</nowiki></code> or <code><nowiki>-</nowiki></code> before the ''View'' name (letter), respectively.
 
{| class="pretty"
 
{| class="pretty"
 
!Letter
 
!Letter
Line 37: Line 38:
 
|}
 
|}
  
{{example|1=&nbsp;
+
{{examples|1=&nbsp;
 
* <code>SetPerspective("G")</code> makes only the [[File:Menu view graphics.svg|link=|16px]] ''Graphics View'' visible
 
* <code>SetPerspective("G")</code> makes only the [[File:Menu view graphics.svg|link=|16px]] ''Graphics View'' visible
 
* <code>SetPerspective("AGS")</code> makes [[File:Menu view algebra.svg|link=|16px]] ''Algebra'', [[File:Menu view graphics.svg|link=|16px]] ''Graphics'' and [[File:Menu view spreadsheet.svg|link=|16px]] ''Spreadsheet View'' visible, aligned horizontally
 
* <code>SetPerspective("AGS")</code> makes [[File:Menu view algebra.svg|link=|16px]] ''Algebra'', [[File:Menu view graphics.svg|link=|16px]] ''Graphics'' and [[File:Menu view spreadsheet.svg|link=|16px]] ''Spreadsheet View'' visible, aligned horizontally
 
* <code>SetPerspective("S/G")</code> makes [[File:Menu view spreadsheet.svg|link=|16px]] ''Spreadsheet'' and [[File:Menu view graphics.svg|link=|16px]] ''Graphics View'' visible with ''Spreadsheet'' on top and ''Graphics View'' below
 
* <code>SetPerspective("S/G")</code> makes [[File:Menu view spreadsheet.svg|link=|16px]] ''Spreadsheet'' and [[File:Menu view graphics.svg|link=|16px]] ''Graphics View'' visible with ''Spreadsheet'' on top and ''Graphics View'' below
 
* <code>SetPerspective("S/(GA)")</code> is similar as above, the bottom part of the screen consists of [[File:Menu view graphics.svg|link=|16px]] ''Graphics View'' on the left and [[File:Menu view algebra.svg|link=|16px]] ''Algebra View'' on the right
 
* <code>SetPerspective("S/(GA)")</code> is similar as above, the bottom part of the screen consists of [[File:Menu view graphics.svg|link=|16px]] ''Graphics View'' on the left and [[File:Menu view algebra.svg|link=|16px]] ''Algebra View'' on the right
 +
*<code>SetPerspective("+D")</code> adds ''Graphics View'' 2 to the currently displayed ones, on the right
 +
*<code>SetPerspective("-D")</code> removes ''Graphics View'' 2 from the currently displayed ones
 
}}
 
}}
  

Revision as of 11:29, 12 January 2019


SetPerspective( <Text> )

Changes the layout and visibility of Views. The text parameter describes the desired layout. The text should be a valid expression. Views are represented by variables (letters): the horizontal arrangement of Views is represented by the related letters juxtaposition, and their vertical arrangement by a division symbol /. To open or close individual Views, add the symbols + or - before the View name (letter), respectively.

Letter View
A Menu view algebra.svg Algebra
B Menu view probability.svg Probability Calculator
C Menu view cas.svg CAS
D Menu view graphics2.svg Graphics 2
G Menu view graphics.svg Graphics
L Menu view construction protocol.svg Construction Protocol
P Menu-options.svg Properties
R Data analysis (Desktop only)
S Menu view spreadsheet.svg Spreadsheet
T Perspectives algebra 3Dgraphics.svg 3D Graphics
Examples:  
  • SetPerspective("G") makes only the Menu view graphics.svg Graphics View visible
  • SetPerspective("AGS") makes Menu view algebra.svg Algebra, Menu view graphics.svg Graphics and Menu view spreadsheet.svg Spreadsheet View visible, aligned horizontally
  • SetPerspective("S/G") makes Menu view spreadsheet.svg Spreadsheet and Menu view graphics.svg Graphics View visible with Spreadsheet on top and Graphics View below
  • SetPerspective("S/(GA)") is similar as above, the bottom part of the screen consists of Menu view graphics.svg Graphics View on the left and Menu view algebra.svg Algebra View on the right
  • SetPerspective("+D") adds Graphics View 2 to the currently displayed ones, on the right
  • SetPerspective("-D") removes Graphics View 2 from the currently displayed ones


Instead of these expressions you may also use a text containing a single digit to use a predefined perspective:

Text Perspective
"1" Algebra And Graphics
"2" Geometry
"3" Spreadsheet
"4" CAS
"5" 3D Graphics
"6" Probability

These roughly correspond to "AG", "G", "SG", "CG", "AT" and "B" respectively, but may also affect the display of Input Bar and content of Toolbar.

Notes:
© 2021 International GeoGebra Institute