Salome HOME
Update copyrights
[modules/gui.git] / doc / salome / gui / input / python_viewer.rst
1 .. _python_viewer_page:
2
3 *************
4 Python viewer
5 *************
6
7 The functionalities of Python viewer are available via its Toolbar.
8
9 .. image:: ../images/pythonviewer_toolbar.png
10         :align: center
11
12 ____
13
14
15 .. image:: ../images/python_new.png
16         :align: center
17
18 **New** - clears the viewer to create a new script. If viewer was modified, you will be asked to close it before removing.
19
20 ____
21
22
23 .. image:: ../images/python_open.png
24         :align: center
25
26 **Open** - allows opening an existing script by browsing for it in a standard **Open File** dialog box, choosing the required .py file and clicking **Open** button. If there is an already opened script, you will be asked to close it before opening new one.
27
28 ____
29
30
31 .. image:: ../images/python_save.png
32         :align: center
33
34 **Save** - saves the current script.
35
36 .. note::
37         If the script has not been previously saved, Save calls the standard **Save File** dialog, where you can enter the script name and save it.
38
39
40 ____
41
42
43 .. image:: ../images/python_saveas.png
44         :align: center
45
46 **Save As...** - allows saving the current script with a new name. Input a new name for the script in the standard **Save file as ** dialog box and click **Save** button.
47
48 ____
49
50
51 .. image:: ../images/python_undo.png
52         :align: center
53
54 **Undo** - undoes the last action in Python viewer.
55
56 ____
57
58
59 .. image:: ../images/python_redo.png
60         :align: center
61
62 **Redo** - redoes the previously undone action in Python viewer.
63
64 ____
65
66
67 .. image:: ../images/python_cut.png
68         :align: center
69
70 **Cut** - saves the selected text into the clipboard and removes it from the viewer.
71
72 ____
73
74
75 .. image:: ../images/python_copy.png
76         :align: center
77
78 **Copy** - saves the selected text into the clipboard.
79
80 ____
81
82
83 .. image:: ../images/python_paste.png
84         :align: center
85
86 **Paste** - restores the saved text from the clipboard.
87
88 ____
89
90
91 .. image:: ../images/python_delete.png
92         :align: center
93
94 **Delete** - removes the selected text.
95
96 ____
97
98
99 .. image:: ../images/python_selectall.png
100         :align: center
101
102 **Select All** - selects the whole text.
103
104 ____
105
106
107 .. image:: ../images/python_preferences.png
108         :align: center
109
110 **Preferences** - provides  access to the preferences dialog box, that allows specifying advanced parameters for the Python Viewer.
111
112 .. _custom_python_preferences:
113
114 Custom Python preferences
115 =========================
116
117 .. image:: ../images/python_view_preferences.png
118         :align: center
119
120 The following options are available:
121
122 - **Font settings** allows setting font variant and its size.
123
124 - **Display settings** specifies the script representation in the viewer:
125
126   - **Enable current line highlight** switches on background coloring of the current line.
127   - **Enable text wrapping** wraps lines at the view border of the editor.
128   - **Center cursor on scroll** scrolls the script vertically to make the cursor visible at the center of the viewer.
129   - **Display line numbers area** shows a panel with line numbers of the script at the left border of the editor.
130
131 - **Tab settings** allows displaying tab indentation as a certain number of white-spaces.
132
133 - **Vertical edge settings** manages drawing of a vertical line at the specified column of the viewer.
134
135 - **Save settings as default** button stores the applied Python viewer settings in the SALOME preferences .xml file. The settings will be restored in the current and next SALOME sessions.
136
137 The buttons in in the bottom part of dialog box peform the following actions:
138 - **OK** button applies preferences to the editor;
139 - **Cancel** button rejects changes;
140 - **Defaults** button restores preferences from applicaion's defaults;
141 - **Help** button opens Help browser.
142
143