source:
sasview/guiframe/gui_style.py
@
3f0351c6
Last change on this file since 3f0351c6 was f036c692, checked in by Gervaise Alina <gervyh@…>, 14 years ago | |
---|---|
|
|
File size: 1.2 KB |
Rev | Line | |
---|---|---|
[b7c7a1c] | 1 | |
2 | """ | |
3 | Provide the style for guiframe | |
4 | """ | |
[f036c692] | 5 | import wx |
[b7c7a1c] | 6 | |
[52b8b74] | 7 | class GUIFRAME: |
8 | MANAGER_ON = 1 | |
9 | FLOATING_PANEL = 2 | |
[7a67e075] | 10 | FIXED_PANEL = 4 |
[3feed3e] | 11 | PLOTTING_ON = 8 |
[7a67e075] | 12 | DATALOADER_ON = 16 |
13 | TOOL_ON = 32 | |
14 | SINGLE_APPLICATION = 64 | |
[d828481] | 15 | WELCOME_PANEL_ON = 128 |
[3feed3e] | 16 | DEFAULT_STYLE = SINGLE_APPLICATION|DATALOADER_ON|PLOTTING_ON|FIXED_PANEL |
[d828481] | 17 | MULTIPLE_APPLICATIONS = DEFAULT_STYLE|MANAGER_ON|WELCOME_PANEL_ON |
[f036c692] | 18 | |
19 | class GUIFRAME_ID: | |
20 | UNDO_ID = wx.NewId() | |
21 | REDO_ID = wx.NewId() | |
22 | BOOKMARK_ID = wx.NewId() | |
23 | SAVE_ID = wx.NewId() | |
24 | ZOOM_IN_ID = wx.NewId() | |
25 | ZOOM_OUT_ID = wx.NewId() | |
26 | ZOOM_ID = wx.NewId() | |
27 | DRAG_ID = wx.NewId() | |
28 | RESET_ID = wx.NewId() | |
29 | PREVIEW_ID = wx.NewId() | |
30 | PRINT_ID = wx.NewId() | |
31 | CURRENT_APPLICATION = wx.NewId() | |
[b7c7a1c] | 32 | |
[52b8b74] | 33 | if __name__ == "__main__": |
34 | ||
35 | print GUIFRAME.DEFAULT_STYLE | |
36 | print GUIFRAME.FLOATING_PANEL | |
[7a67e075] | 37 | print GUIFRAME.SINGLE_APPLICATION |
38 | style = GUIFRAME.MULTIPLE_APPLICATIONS | |
[3feed3e] | 39 | style &= GUIFRAME.PLOTTING_ON |
40 | print style == GUIFRAME.PLOTTING_ON | |
[7a67e075] | 41 | style1 = GUIFRAME.MULTIPLE_APPLICATIONS |
42 | style1 &= (~GUIFRAME.MANAGER_ON) | |
43 | print style1 == GUIFRAME.DEFAULT_STYLE | |
44 | print style1 | |
45 | ||
[52b8b74] | 46 | |
[7a67e075] | 47 |
Note: See TracBrowser
for help on using the repository browser.