-
Notifications
You must be signed in to change notification settings - Fork 0
/
InitGui.py
59 lines (54 loc) · 1.87 KB
/
InitGui.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# OptElements gui init module
# (c) 2001 Juergen Riegel LGPL
class OptElementsWorkbench (Workbench):
"OptElements workbench object"
MenuText = "OptElements";
ToolTip = "OptElements workbench";
Icon = """
/* XPM */
static const char *test_icon[]={
"16 16 2 1",
"a c #000000",
". c None",
"..############..",
"..#..........#..",
"..#..........#..",
"..#..........#..",
"..#..........#..",
"..#..........#..",
"..############..",
"................",
"..############..",
"..#.............",
"..#.............",
"..############..",
"..#.............",
"..#.............",
"..############..",
"................"};
""";
def Initialize(self):
# load the module
import OptElementsGui;
self.appendToolbar("ControlTools", ["OSPropTool","ElPropTool","UpdateOS", \
"CalculateRayPropag"]);
self.appendToolbar("OptTools", ["CreateRay","DeleteRays","CreateLens", \
"CreateMirror", "CreateScreen",'CreateInterface','CreatePlate', \
'ElBuildTool']);
# self.appendToolbar("OptBuilder", ['ElBuildTool']);
self.appendToolbar("ControlTools", ["SetOrientZXFitAll", \
"SetOrientZX",'CoordsToConsol']);
self.appendMenu("OptTools", ["UpdateOS","SetOrientZXFitAll","OSPropTool", \
"ElPropTool","DeleteRays","CreateRay","CreateLens","CreateMirror", \
"CreateScreen",'CreateInterface','CreatePlate','CoordsToConsol',
'ElBuildTool']);
Log("Loading OptElements module... done\n");
def GetClassName(self):
return "Gui::PythonWorkbench";
def Activated(self):
# do something here if needed...
Msg("OptElementsWorkbench.Activated()\n");
def Deactivated(self):
# do something here if needed...
Msg("OptElementsWorkbench.Deactivated()\n");
Gui.addWorkbench(OptElementsWorkbench());