Salome HOME
Merge branch 'V8_4_BR'
[modules/gui.git] / doc / salome / gui / input / using_input_widgets.doc
1 /*!
2
3 \page using_input_widgets_page Using input widgets
4
5 This section contains some hints that might be useful when working
6 with SALOME GUI input widgets.
7
8 <h2>Spin boxes</h2>
9
10 This type of widgets is used for numeric (integer or floating-point)
11 data input. Spin boxes are used in standard \b SALOME modules if the
12 input value has a clearly defined input range (and precision in
13 case of a floating-point value).
14
15 Input precision has a specific semantics in \b SALOME floating-point
16 spin boxes:
17 - Positive precision value means that a number in the fixed-point format
18 (corresponding to the "f" format specifier for C printf function) is
19 expected. Positive precision value is the maximum allowed number of
20 digits after the decimal separator.
21 - Negative precision value means that a number either in the fixed-point
22 or the scientific (exponetial) format is expected. This is similar to the
23 behavior of the "g" format specifier for C printf function. Negative
24 precision value is the maximum allowed number of significant digits in
25 mantissa (note that one digit is always before the decimal separator).
26
27 To make the user aware of an input value constraints applied by some
28 \b SALOME operations, the following basic capabilties are provided by
29 spin boxes:
30 - The text input manually in a spin box by the user is checked to be a
31 number of valid type (integer or floating-point).
32 - The text is converted to a number and checked to be within the valid
33 range.
34 - Additionally, for floating-point data the input text is checked
35 against the precision rules described above.
36
37 If the input text in a spin box does not meet the
38 constraints, the user is shown a message in a
39 tooltip near the spin box just as he types in it. The tooltip contains
40 information about the valid data range. For a floating-point input, the
41 tooltip also contains information about the expected precision. 
42
43 In standard \b SALOME modules the precision value can be adjusted through
44 \ref setting_preferences_page "user preferences" of the correspodning  modules, and the tooltip contains a
45 reference to the corresponding parameter in the preferences.
46
47 On-line documentation for each standard SALOME module contains the
48 list of user preferences that can be used for tuning floating-point
49 precision for different types of input quantities.
50
51 <h2>Spin boxes and SALOME Notebook</h2>
52
53 Apart from the numeric input, spin boxes in some \b SALOME modules accept
54 the names of \b Notebook variables (see \ref using_notebook "Using Notebook" 
55 page for more details about \b Notebook).
56
57 If a spin box accepts variable names, then it is
58 additionally checked whether the manually input text represents a variable name. Variable
59 names should comply with the common naming rules for \b Python variables.
60 If the input is neither a valid number nor a variable name,
61 the tooltip informs the user that variable names are also acceptable in this spin box.
62
63
64 */