TemplatePyMod/InitGui.py
Go to the documentation of this file.00001
00002
00003
00004
00005
00006 class TemplatePyModWorkbench ( Workbench ):
00007 "Test workbench object"
00008 Icon = """
00009 /* XPM */
00010 static const char *test_icon[]={
00011 "16 16 2 1",
00012 "a c #000000",
00013 ". c None",
00014 "................",
00015 "................",
00016 "..############..",
00017 "..############..",
00018 "..############..",
00019 "......####......",
00020 "......####......",
00021 "......####......",
00022 "......####......",
00023 "......####......",
00024 "......####......",
00025 "......####......",
00026 "......####......",
00027 "......####......",
00028 "................",
00029 "................"};
00030 """
00031 MenuText = "Python sandbox"
00032 ToolTip = "Python template workbench"
00033
00034 def Initialize(self):
00035 import Commands
00036
00037 self.appendToolbar("TemplateTools",["TemplatePyMod_Cmd1","TemplatePyMod_Cmd2","TemplatePyMod_Cmd3","TemplatePyMod_Cmd4","TemplatePyMod_Cmd5"])
00038
00039 menu = ["ModulePy &Commands","PyModuleCommands"]
00040 list = ["TemplatePyMod_Cmd1","TemplatePyMod_Cmd2","TemplatePyMod_Cmd3","TemplatePyMod_Cmd5","TemplatePyMod_Cmd6"]
00041 self.appendCommandbar("PyModuleCommands",list)
00042 self.appendMenu(menu,list)
00043
00044 Log ('Loading TemplatePyMod module... done\n')
00045 def Activated(self):
00046 Msg("TemplatePyModWorkbench::Activated()\n")
00047 def Deactivated(self):
00048 Msg("TemplatePyModWorkbench::Deactivated()\n")
00049
00050 Gui.addWorkbench(TemplatePyModWorkbench)