1 | *GSAS-II GUI Support Modules* |
---|
2 | ============================== |
---|
3 | |
---|
4 | The modules documented here provide GUI or graphics capabilities that |
---|
5 | are used in multiple sections of the GSAS-II GUI or graphics. |
---|
6 | |
---|
7 | --------------------------------------------- |
---|
8 | *GSASIIctrlGUI: Custom GUI controls* |
---|
9 | --------------------------------------------- |
---|
10 | |
---|
11 | .. py:currentmodule:: GSASIIctrlGUI |
---|
12 | |
---|
13 | A library of GUI controls for reuse throughout GSAS-II, as indexed below |
---|
14 | |
---|
15 | .. tabularcolumns:: |l|p{4in}| |
---|
16 | |
---|
17 | ================================ ================================================================= |
---|
18 | Class or function name Description |
---|
19 | ================================ ================================================================= |
---|
20 | :class:`EnumSelector` A combo box with a built-in call back routine that |
---|
21 | automatically sets a dict or list entry. |
---|
22 | :class:`DisAglDialog` Distance/Angle Controls input dialog. |
---|
23 | :class:`FlagSetDialog` Dialog that provides a table of items along with a |
---|
24 | checkbox for each. |
---|
25 | :class:`G2ChoiceButton` A customized wx.Choice that automatically initializes to |
---|
26 | the initial value and saves the choice directly into a dict |
---|
27 | or list value. Optionally calls function when a |
---|
28 | choice is selected |
---|
29 | :class:`G2CheckBox` A customized wx.CheckBox that automatically initializes to |
---|
30 | the initial value and saves the choice directly into a dict |
---|
31 | or list value. Optionally calls function when a |
---|
32 | choice is selected |
---|
33 | :func:`G2CheckBoxFrontLbl` A version of :class:`G2CheckBox` that places the label |
---|
34 | for the check box in front. Otherwise works the same. |
---|
35 | :func:`G2RadioButtons` Creates a series of grouped radio buttons. |
---|
36 | :class:`G2SliderWidget` A customized combination of a wx.Slider and a validated |
---|
37 | wx.TextCtrl (see :class:`ValidatedTxtCtrl`). |
---|
38 | :class:`G2Slider` A wrapped version of wx.Slider that implements scaling |
---|
39 | :class:`G2SpinWidget` A customized combination of a wx.SpinButton and a validated |
---|
40 | wx.TextCtrl (see :class:`ValidatedTxtCtrl`). |
---|
41 | :class:`G2ColumnIDDialog` A dialog for matching column data to desired items; some |
---|
42 | columns may be ignored. |
---|
43 | :class:`G2HistoDataDialog` A dialog for global edits to histogram data globally |
---|
44 | :class:`G2MultiChoiceDialog` Dialog similar to wx.MultiChoiceDialog, but provides |
---|
45 | a filter to select choices and buttons to make selection |
---|
46 | of multiple items more simple. |
---|
47 | :class:`G2MultiChoiceWindow` Similar to :class:`G2MultiChoiceDialog` but provides |
---|
48 | a sizer that can be placed in a frame or panel. |
---|
49 | :class:`G2SingleChoiceDialog` Dialog similar to wx.SingleChoiceDialog, but provides |
---|
50 | a filter to help search through choices. |
---|
51 | :class:`HelpButton` Creates a button labeled with a "?" that when pressed |
---|
52 | displays help text in a modal message window |
---|
53 | or web browser. |
---|
54 | :class:`MultiColumnSelection` A dialog that builds a multicolumn table, word wrapping |
---|
55 | is used for the 2nd, 3rd,... columns. |
---|
56 | :class:`MultiDataDialog` Dialog to obtain multiple data values from user, |
---|
57 | with optional range validation; items can be float, str or bool |
---|
58 | :class:`MultiIntegerDialog` Dialog to obtain multiple integer values from user, |
---|
59 | with a description for each value and optional |
---|
60 | defaults. |
---|
61 | :class:`MultiStringDialog` Dialog to obtain multiple string values from user, |
---|
62 | with a description for each value and optional |
---|
63 | defaults. |
---|
64 | :class:`OrderBox` Creates a wx.Panel with scrollbars where items can be |
---|
65 | ordered into columns. |
---|
66 | :class:`SortableLstCtrl` Creates a wx.Panel for a table of data that |
---|
67 | can be sorted by clicking on a column label. |
---|
68 | :class:`ScrolledMultiEditor` wx.Dialog for editing many dict- or list-contained items. |
---|
69 | with validation. Results are placed in dict or list. |
---|
70 | :class:`SGMagSpinBox` Special version of MessageBox that displays magnetic spin text |
---|
71 | :class:`SGMessageBox` Special version of MessageBox that displays space group & |
---|
72 | super space group text in two blocks |
---|
73 | :class:`SingleFloatDialog` Dialog to obtain a single float value from user, with |
---|
74 | optional range validation. |
---|
75 | :class:`SingleIntDialog` Dialog to obtain a single integer value from user, |
---|
76 | with optional range validation. |
---|
77 | :class:`SingleStringDialog` Dialog to obtain a single string value from user, |
---|
78 | with optional an optional default value. |
---|
79 | :class:`ValidatedTxtCtrl` A text control with a built-in call back routine to set dict |
---|
80 | or list elements. Optionally validates input as float, int or |
---|
81 | for strings non-blank. Value is set when focus changes |
---|
82 | :func:`CallScrolledMultiEditor` Routine for editing many dict- or list-contained items. |
---|
83 | using the :class:`ScrolledMultiEditor` dialog |
---|
84 | :func:`Define_wxId` Create a unique wx.Id symbol in _initMenus in :mod:`GSASIIdataGUI`. |
---|
85 | Such symbols are needed when the menu item is defined in a |
---|
86 | different location from the wx.Bind that links the menu item |
---|
87 | to a function. This function allows all the menu Ids to be |
---|
88 | defined as the menus are created in one place and then can be |
---|
89 | used in Bind elsewhere in the code. |
---|
90 | :func:`G2MessageBox` Displays text typically used for errors or warnings. |
---|
91 | :func:`ShowScrolledInfo` Displays longer text where scrolling is possibly needed |
---|
92 | :func:`G2ScrolledGrid` Displays a multicolumn table of information with |
---|
93 | possible scroll bars |
---|
94 | :func:`ShowScrolledColText` Displays tabular text with scrolling where needed |
---|
95 | :func:`GetItemOrder` Creates a dialog for ordering items into columns |
---|
96 | :func:`GetImportFile` Gets one ore more file from the appropriate import |
---|
97 | directory, which can be overridden. Arguments follow those |
---|
98 | of :func:`wx.FileDialog` |
---|
99 | :func:`HorizontalLine` Places a line in a Frame or Dialog to separate sections. |
---|
100 | :func:`ItemSelector` Select a single item or multiple items from list of choices. |
---|
101 | Creates and then destroys a wx.Dialog and returns the |
---|
102 | selections(s). |
---|
103 | :func:`SelectEdit1Var` Select a variable from a list, then edit it and select |
---|
104 | histograms to copy it to. |
---|
105 | :func:`askSaveFile` Get a file name from user |
---|
106 | :func:`askSaveDirectory` Get a directory name from user |
---|
107 | :func:`BlockSelector` Select a single block for instrument parameters |
---|
108 | :func:`MultipleBlockSelector` Select one or more blocks of data, used for |
---|
109 | CIF powder histogram imports only |
---|
110 | :func:`MultipleChoicesSelector` Dialog for displaying fairly complex choices, used for |
---|
111 | CIF powder histogram imports only |
---|
112 | :func:`PhaseSelector` Select a phase from a list (used for phase importers) |
---|
113 | :class:`gpxFileSelector` File browser dialog for opening existing .gpx files |
---|
114 | :class:`ScrolledStaticText` A wx.StaticText widget that fits a large string into a |
---|
115 | small space by scrolling it |
---|
116 | :func:`ReadOnlyTextCtrl` A wx.TextCtrl widget to be used wx.StaticText |
---|
117 | (no edits allowed) text appears in a box. |
---|
118 | :func:`setColorButton` A button for color selection as a replacement |
---|
119 | for wx.ColourSelect |
---|
120 | ================================ ================================================================= |
---|
121 | |
---|
122 | Other miscellaneous non-GUI routines that may be of use for GUI-related actions: |
---|
123 | |
---|
124 | .. tabularcolumns:: |l|p{4in}| |
---|
125 | |
---|
126 | ================================ ================================================================= |
---|
127 | Function name Description |
---|
128 | ================================ ================================================================= |
---|
129 | :func:`StripIndents` Regularizes the intentation from a string with multiple |
---|
130 | newline characters by removing spaces at the beginning |
---|
131 | of each line. |
---|
132 | :func:`StripUnicode` Removes unicode characters from strings |
---|
133 | :func:`GetImportPath` Determines the default location to use for importing files. |
---|
134 | Tries sequentially :attr:`G2frame.TutorialImportDir`, |
---|
135 | config var ``Import_directory`` and |
---|
136 | :attr:`G2frame.LastImportDir`. |
---|
137 | :func:`GetExportPath` Determines the default location to use for writing files. |
---|
138 | Tries sequentially :attr:`G2frame.LastExportDir` and |
---|
139 | :attr:`G2frame.LastGPXdir` |
---|
140 | ================================ ================================================================= |
---|
141 | |
---|
142 | |
---|
143 | GSASIIctrlGUI Classes & Routines |
---|
144 | --------------------------------------------- |
---|
145 | |
---|
146 | .. automodule:: GSASIIctrlGUI |
---|
147 | :members: |
---|
148 | |
---|
149 | --------------------------------------------- |
---|
150 | *GSASIIIO: Misc I/O routines* |
---|
151 | --------------------------------------------- |
---|
152 | |
---|
153 | Module with miscellaneous routines for input and output. Many |
---|
154 | are GUI routines to interact with user. |
---|
155 | |
---|
156 | Includes support for image reading. |
---|
157 | |
---|
158 | Also includes base class for data export routines (TODO: should move) |
---|
159 | |
---|
160 | GSASIIIO Classes & Routines |
---|
161 | --------------------------------------------- |
---|
162 | |
---|
163 | .. automodule:: GSASIIIO |
---|
164 | :members: |
---|
165 | |
---|
166 | --------------------------------------------- |
---|
167 | *gltext: draw OpenGL text* |
---|
168 | --------------------------------------------- |
---|
169 | |
---|
170 | .. automodule:: gltext |
---|
171 | :members: |
---|
172 | |
---|