📄 wxpychemsplash.py
字号:
#Boa:Frame:wxPyChemSplash
"""
Splash screen for PyChem
$Id: wxPyChemSplash.py Copyright (C) 2005 Roger Jarvis
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
"""
from wxPython.wx import *
import os, string
# Hack to find out where the data files are installed
import pychem
whereami = pychem.__path__[0]
#whereami for stand alone dist
whereami = string.split(pychem.__path__[0],'\\library.zip\\pychem')[0]
def create(parent):
return wxPyChemSplash(parent)
[wxID_WXPYCHEMSPLASH, wxID_WXPYCHEMSPLASHSBMPYPOW,
wxID_WXPYCHEMSPLASHSTATICTEXT1, wxID_WXPYCHEMSPLASHSTATICTEXT2,
wxID_WXPYCHEMSPLASHSTATICTEXT3, wxID_WXPYCHEMSPLASHSTATICTEXT4,
wxID_WXPYCHEMSPLASHSTATICTEXT5, wxID_WXPYCHEMSPLASHWDSPLASH,
] = map(lambda _init_ctrls: wxNewId(), range(8))
class wxPyChemSplash(wxFrame):
def _init_ctrls(self, prnt):
# generated method, don't edit
wxFrame.__init__(self, id=wxID_WXPYCHEMSPLASH, name='wxPyChemSplash',
parent=prnt, pos=wxPoint(339, 155), size=wxSize(314, 420),
style=0, title='')
self.SetClientSize(wxSize(306, 386))
self.SetToolTipString('')
self.SetBackgroundColour(wxColour(255, 255, 255))
self.SetThemeEnabled(False)
self.wdSplash = wxWindow(id=wxID_WXPYCHEMSPLASHWDSPLASH,
name='wdSplash', parent=self, pos=wxPoint(0, 0), size=wxSize(306,
386), style=0)
self.wdSplash.SetToolTipString('')
self.wdSplash.SetBackgroundColour(wxColour(167, 167, 236))
self.staticText1 = wxStaticText(id=wxID_WXPYCHEMSPLASHSTATICTEXT1,
label='p', name='staticText1', parent=self.wdSplash,
pos=wxPoint(96, -80), size=wxSize(109, 245), style=0)
self.staticText1.SetFont(wxFont(150, wxSWISS, wxNORMAL, wxNORMAL, False,
'Symbol'))
self.staticText1.SetToolTipString('')
self.staticText1.SetBackgroundColour(wxColour(167, 167, 236))
self.staticText1.SetForegroundColour(wxColour(0, 0, 0))
self.staticText2 = wxStaticText(id=wxID_WXPYCHEMSPLASHSTATICTEXT2,
label='chem', name='staticText2', parent=self.wdSplash,
pos=wxPoint(80, 128), size=wxSize(148, 84), style=0)
self.staticText2.SetFont(wxFont(48, wxSWISS, wxNORMAL, wxNORMAL, False,
'Sylfaen'))
self.staticText2.SetToolTipString('')
self.staticText2.SetBackgroundColour(wxColour(167, 167, 236))
self.staticText2.SetForegroundColour(wxColour(0, 0, 0))
self.staticText4 = wxStaticText(id=wxID_WXPYCHEMSPLASHSTATICTEXT4,
label='Version 1.0.2', name='staticText4', parent=self.wdSplash,
pos=wxPoint(96, 224), size=wxSize(109, 25), style=0)
self.staticText4.SetToolTipString('')
self.staticText4.SetFont(wxFont(14, wxSWISS, wxNORMAL, wxNORMAL, False,
'Sylfaen'))
self.staticText4.SetBackgroundColour(wxColour(167, 167, 236))
self.staticText3 = wxStaticText(id=wxID_WXPYCHEMSPLASHSTATICTEXT3,
label='10th February 2006', name='staticText3',
parent=self.wdSplash, pos=wxPoint(90, 256), size=wxSize(118, 19),
style=0)
self.staticText3.SetToolTipString('')
self.staticText3.SetFont(wxFont(11, wxSWISS, wxNORMAL, wxNORMAL, False,
'Sylfaen'))
self.staticText3.SetBackgroundColour(wxColour(167, 167, 236))
self.sbmPyPow = wxStaticBitmap(bitmap=wxBitmap(os.path.join(whereami,'gif','PythonPowered.gif'),
wxBITMAP_TYPE_GIF), id=wxID_WXPYCHEMSPLASHSBMPYPOW,
name='sbmPyPow', parent=self.wdSplash, pos=wxPoint(96, 288),
size=wxSize(110, 44), style=0)
self.sbmPyPow.SetToolTipString('')
self.staticText5 = wxStaticText(id=wxID_WXPYCHEMSPLASHSTATICTEXT5,
label='Distributed under the GNU General Public License',
name='staticText5', parent=self.wdSplash, pos=wxPoint(40, 344),
size=wxSize(236, 14), style=0)
self.staticText5.SetToolTipString('')
self.staticText5.SetFont(wxFont(8, wxSWISS, wxNORMAL, wxNORMAL, False,
'Sylfaen'))
def __init__(self, parent):
self._init_ctrls(parent)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -