def __init__(self, top, SmilesString, SmilesName): self.top = top self.inputWindow = Toplevel() self.inputWindow.title = 'SMILES' self.inputWindow.protocol('WM_DELETE_WINDOW', self.Quit) WINDOWWIDTH = 400 WINDOWHEIGHT = 130 self.inputWindow.maxsize(WINDOWWIDTH, WINDOWHEIGHT) self.inputWindow.minsize(WINDOWWIDTH, WINDOWHEIGHT) General.CenterWindow(self.inputWindow, WINDOWWIDTH, WINDOWHEIGHT) self.SmilesString = SmilesString self.SmilesName = SmilesName self.Frame()
def __init__(self, root, top, menuindex, Project_Dir, Install_Dir, NRGsuite_Dir, OSid, PyMOL, Name, WINDOWWIDTH, WINDOWHEIGHT, RootPrefs): self.Name = Name self.OSid = OSid self.PyMOL = PyMOL self.pymol_major_version = int(cmd.get_version()[0][0]) self.NRGsuite_Dir = NRGsuite_Dir self.Install_Dir = Install_Dir self.Project_Dir = Project_Dir self.Folders = [self.NRGsuite_Dir] if self.Project_Dir: self.Folders.append(self.Project_Dir) self.Set_Folders() self.Validate_Folders() self.Prefs = RootPrefs self.Color_Green = '#CCFFCC' self.Color_Grey = '#EDEDED' self.Color_Gray = '#EDEDED' self.Color_Blue = '#6699FF' self.Color_Red = '#FF9999' self.Color_White = '#FFFFFF' self.Color_Black = '#000000' self.root = root self.root.title(self.Name) self.top = top self.menuindex = menuindex if self.menuindex != -1: self.Disable_MenuItem() self.WINDOWWIDTH = WINDOWWIDTH self.WINDOWHEIGHT = WINDOWHEIGHT #self.root.geometry() # Interface DIMENSIONS #self.root.maxsize(WINDOWWIDTH,WINDOWHEIGHT) self.root.minsize(self.WINDOWWIDTH, self.WINDOWHEIGHT) self.root.protocol('WM_DELETE_WINDOW', self.Quit) General.CenterWindow(self.root, self.WINDOWWIDTH, self.WINDOWHEIGHT) #================================================================================== # SET the default fonts of the interface #================================================================================== FontType = self.Prefs.GetFontType() FontSize = self.Prefs.GetFontSize() self.font_Title = tkFont.Font(family=FontType, size=FontSize, weight=tkFont.BOLD) self.font_Title_H = tkFont.Font(family=FontType, size=FontSize + 1, weight=tkFont.BOLD) self.font_Text = tkFont.Font(family=FontType, size=FontSize) self.font_Text_H = tkFont.Font(family=FontType, size=FontSize + 1) self.font_Text_I = tkFont.Font(family=FontType, size=FontSize, slant=tkFont.ITALIC) self.font_Text_U = tkFont.Font(family=FontType, size=FontSize, underline=True) self.ChildWindow = None self.ActiveFrame = None self.Run = None self.ProcessError = False self.ProcessRunning = False self.ProcessParsing = False self.ProcessDone = False self.ParseState = 10 self.SimulateState = -1 self.fMain = Frame(self.root) self.fMain.pack(expand=True) self.Def_Vars() self.Init_Vars() self.Frame_Main() self.Build_Tabs() self.MakeMenuBar() self.After_Init() self.Clean()