Salome HOME
Merge branch 'V8_4_BR'
[modules/gui.git] / doc / salome / gui / input / common_functionality.doc
1 /*!
2
3 \page common_functionality_page  Functionality common for OCC and VTK viewers 
4
5 \anchor viewer_background
6 <h2>Background</h2>
7
8 Viewers background can be customized using the "Change background"
9 popup menu command that opens the following dialog box:
10
11 \image html change_background_dlg.png
12
13 The following types of the background are supported:
14
15 - <b> Single color: </b> the background is colored with the solid color
16   specified by the user in the dialog box.
17
18 - <b> Gradient background: </b> the background is gradiently colored according
19   to two colors and the gradient type specified in the dialog box. The
20   following types of background are supported:
21
22   - Horizontal
23
24   - Vertical
25
26   - First diagonal
27
28   - Second diagonal
29
30   - First corner
31
32   - Second corner
33
34   - Third corner
35
36   - Fourth corner
37
38 - \b Image: allows to set image as viewer background and define filling type:
39
40   - \b Center: the image is located at the center of the viewer backgound
41
42   - \b Tile: the image fills the entire viewer backgound one by one
43
44   - \b Stretch: the image is stretched to the entire viewer backgound.
45
46 Default background for the OCC viewer is specified via the
47 \ref occ_preferences "OCC 3D Viewer Preferences" and for the
48 VTK viewer via the \ref vtk_preferences "VTK 3D Viewer Preferences".
49
50 <hr>
51
52 <h2>Selection</h2>
53
54 An element can be selected by clicking on it with the left mouse button.
55 Selecting objects with locked \em Shift key produces a multi selection. 
56
57 Additionally, when the viewer owns an input focus, an object can be selected
58 by pressing \em "S" on the keyboard. Pressing \em "S" when holding
59 \em Shift key allows adding/removing an object to/from the current selection.
60
61 OCC viewer provides a way to navigate between the selectable objects. 
62 This feature (disabled by default) is used in some dialog boxes (for example, 
63 in Geometry module). When there are several objects which suit current
64 selection requirements (specified by the dialog) under the current mouse cursor,
65 it is possible to switch between them by means of mouse scroll wheel.
66 The same can be also done by pressing \em "N" and \em "P" keys.
67
68 There are also two additional selection mechanisms: rectangle and 
69 polyline selection.
70
71 <h3>Rectangle selection</h3>
72
73 Rectangle Selection is the basic and commonly used selection tool.
74  
75 To select a rectangle area press and hold the left mouse button while drawing the diagonal of the selection rectangle in the viewer.
76
77 \image html rectselectionvtk.png
78
79 As a result, the objects within the rectangle are selected.
80
81 \image html rectselectionvtk2.png
82
83 \note It is possible to add an area to the existing selection by holding down 
84 \em Shift key while selecting.
85
86 <h3>Polyline selection</h3>
87
88 OCC and VTK Viewers feature a special Polyline Selection mechanism,
89 which allows selecting an arbitrary part of the graphic area using a
90 polygon frame (rubber band), instead of the usual selection with a
91 rectangular frame.
92
93 To produce a Polyline Selection, press and hold the right mouse button and draw
94 the first side of the selection polygon, then change the direction by clicking
95 the left mouse button add draw another side, etc. Click twice by left mouse 
96 button to finish drawing.
97
98 \image html polyselectionvtk11.png
99
100 As a result, the objects within the polygon are selected.
101
102 \image html polyselectionvtk21.png
103
104 To add an area to the existing selection it is necessary to hold down 
105 \em Shift key while selecting.
106
107 <hr>
108
109 \anchor viewer_navigation_modes
110 <h2>Navigation modes</h2>
111
112 OCC and VTK 3D viewers support two different navigation modes:
113
114 - <b>Salome standard controls</b>
115
116   Rectangle selection in this mode is performed by the left mouse button
117   and polyline selection by the right mouse button;
118   multiple selection is available when \em Shift button is pressed.
119
120   Also, holding \em Ctrl key with pressed mouse buttons performs the following view transformations:
121   - \em Ctrl + left mouse button - zooming;
122   - \em Ctrl + middle mouse button - panning;
123   - \em Ctrl + right mouse button - rotation.
124
125 - <b>Keyboard free style</b>
126
127   This mode allows performing all view transformations without using the 
128   keyboard (only by the mouse):
129   - Left mouse button performs view rotation;
130   - Middle mouse button performs panning; 
131   - Right mouse button makes zooming.
132
133   In this style rectangle selection is done by the left mouse button with \em Ctrl key pressed;
134   polyline selection is done by the right mouse button with \em Ctrl key pressed.
135
136 In both styles selection of objects in the viewer can be performed by pressing
137 \em "S" key or by the left mouse button click. 
138
139 Zooming can be alternatively done by scrolling mouse wheel.
140
141 */