_treeList = [
# new stuff
('Recent Additions', [
- 'wxVListBox',
- 'wxListbook',
- 'wxMaskedNumCtrl',
+ 'VListBox',
+ 'Listbook',
+ 'MaskedNumCtrl',
'FloatCanvas',
- 'wxXmlResourceSubclass',
- 'wxGridBagSizer',
+ 'XmlResourceSubclass',
+ 'GridBagSizer',
'Cursor',
'PyPlot',
]),
# managed windows == things with a (optional) caption you can close
('Base Frames and Dialogs', [
- 'wxDialog',
- 'wxFrame',
- 'wxMDIWindows',
- 'wxMiniFrame',
- 'wxWizard',
+ 'Dialog',
+ 'Frame',
+ 'MDIWindows',
+ 'MiniFrame',
+ 'Wizard',
]),
# the common dialogs
('Common Dialogs', [
- 'wxColourDialog',
- 'wxDirDialog',
- 'wxFileDialog',
- 'wxFileDialog_Save',
- 'wxFindReplaceDialog',
- 'wxFontDialog',
- 'wxMessageDialog',
- 'wxPageSetupDialog',
- 'wxPrintDialog',
- 'wxProgressDialog',
- 'wxSingleChoiceDialog',
- 'wxTextEntryDialog',
+ 'ColourDialog',
+ 'DirDialog',
+ 'FileDialog',
+ 'FileDialog_Save',
+ 'FindReplaceDialog',
+ 'FontDialog',
+ 'MessageDialog',
+ 'PageSetupDialog',
+ 'PrintDialog',
+ 'ProgressDialog',
+ 'SingleChoiceDialog',
+ 'TextEntryDialog',
]),
# dialogs from libraries
('More Dialogs', [
'ErrorDialogs',
'ImageBrowser',
- 'wxMultipleChoiceDialog',
- 'wxScrolledMessageDialog',
+ 'MultipleChoiceDialog',
+ 'ScrolledMessageDialog',
]),
# core controls
('Core Windows/Controls', [
+ 'Button',
+ 'CheckBox',
+ 'CheckListBox',
+ 'Choice',
+ 'ComboBox',
+ 'Gauge',
+ 'Grid',
+ 'Grid_MegaExample',
+ 'ListBox',
+ 'ListCtrl',
+ 'ListCtrl_virtual',
+ 'Listbook',
+ 'Menu',
+ 'Notebook',
'PopupMenu',
- 'wxButton',
- 'wxCheckBox',
- 'wxCheckListBox',
- 'wxChoice',
- 'wxComboBox',
- 'wxGauge',
- 'wxGrid',
- 'wxGrid_MegaExample',
- 'wxListbook',
- 'wxListBox',
- 'wxListCtrl',
- 'wxListCtrl_virtual',
- 'wxMenu',
- 'wxNotebook',
- 'wxPopupWindow',
- 'wxRadioBox',
- 'wxRadioButton',
- 'wxSashWindow',
- 'wxScrolledWindow',
- 'wxSlider',
- 'wxSpinButton',
- 'wxSpinCtrl',
- 'wxSplitterWindow',
- 'wxStaticBitmap',
- 'wxStaticText',
- 'wxStatusBar',
- 'wxTextCtrl',
- 'wxToggleButton',
- 'wxToolBar',
- 'wxTreeCtrl',
- 'wxValidator',
+ 'PopupWindow',
+ 'RadioBox',
+ 'RadioButton',
+ 'SashWindow',
+ 'ScrolledWindow',
+ 'Slider',
+ 'SpinButton',
+ 'SpinCtrl',
+ 'SplitterWindow',
+ 'StaticBitmap',
+ 'StaticText',
+ 'StatusBar',
+ 'TextCtrl',
+ 'ToggleButton',
+ 'ToolBar',
+ 'TreeCtrl',
+ 'Validator',
]),
('Custom Controls', [
'AnalogClockWindow',
'ColourSelect',
+ 'Editor',
'GenericButtons',
- 'wxEditor',
- 'wxGenericDirCtrl',
- 'wxLEDNumberCtrl',
- 'wxMultiSash',
- 'wxPopupControl',
- 'wxPyColourChooser',
- 'wxTreeListCtrl',
+ 'GenericDirCtrl',
+ 'LEDNumberCtrl',
+ 'MultiSash',
+ 'PopupControl',
+ 'PyColourChooser',
+ 'TreeListCtrl',
]),
# controls coming from other libraries
('More Windows/Controls', [
- #'wxFloatBar', deprecated
- #'wxMVCTree', deprecated
- #'wxRightTextCtrl', deprecated as we have wxTE_RIGHT now.
+ #'RightTextCtrl', deprecated as we have wxTE_RIGHT now.
+ 'Calendar',
+ 'CalendarCtrl',
'ContextHelp',
+ 'DynamicSashWindow',
+ 'EditableListBox',
'FancyText',
- 'FloatCanvas',
'FileBrowseButton',
+ 'FloatBar',
+ 'FloatCanvas',
+ 'HtmlWindow',
+ 'IEHtmlWin',
+ 'IntCtrl',
+ 'MVCTree',
'MaskedEditControls',
- 'PyShell',
+ 'MaskedNumCtrl',
+ 'MimeTypesManager',
'PyCrust',
'PyPlot',
+ 'PyShell',
+ 'ScrolledPanel',
'SplitTree',
+ 'StyledTextCtrl_1',
+ 'StyledTextCtrl_2',
'TablePrint',
'Throbber',
- 'wxCalendar',
- 'wxCalendarCtrl',
- 'wxDynamicSashWindow',
- 'wxEditableListBox',
- 'wxHtmlWindow',
- 'wxIEHtmlWin',
- 'wxIntCtrl',
- 'wxMimeTypesManager',
- 'wxMaskedNumCtrl',
- 'wxScrolledPanel',
- 'wxStyledTextCtrl_1',
- 'wxStyledTextCtrl_2',
- 'wxTimeCtrl',
- 'wxVListBox',
+ 'TimeCtrl',
+ 'VListBox',
]),
# How to lay out the controls in a frame/dialog
('Window Layout', [
+ 'GridBagSizer',
'LayoutAnchors',
+ 'LayoutConstraints',
'Layoutf',
'RowColSizer',
+ 'ScrolledPanel',
'Sizers',
- 'wxGridBagSizer',
- 'wxLayoutConstraints',
- 'wxScrolledPanel',
- 'wxXmlResource',
- 'wxXmlResourceHandler',
- 'wxXmlResourceSubclass',
+ 'XmlResource',
+ 'XmlResourceHandler',
+ 'XmlResourceSubclass',
]),
# ditto
('Process and Events', [
'EventManager',
- 'infoframe',
+ 'KeyEvents',
'OOR',
+ 'Process',
'PythonEvents',
'Threads',
- 'wxKeyEvents',
- 'wxProcess',
- 'wxTimer',
+ 'Timer',
+ 'infoframe',
]),
# Clipboard and DnD
# Images
('Using Images', [
+ 'ArtProvider',
'Cursor',
+ 'DragImage',
+ 'Image',
+ 'ImageFromStream',
+ 'Mask',
'Throbber',
- 'wxArtProvider',
- 'wxDragImage',
- 'wxImage',
- 'wxImageFromStream',
- 'wxMask',
]),
# Other stuff
'ColourDB',
'DialogUnits',
'DrawXXXList',
+ 'FileHistory',
'FontEnumerator',
+ 'Joystick',
'NewNamespace',
+ 'OGL',
'PrintFramework',
'ShapedWindow',
'Throbber',
'Unicode',
- 'wxFileHistory',
- 'wxJoystick',
- 'wxOGL',
- 'wxWave',
+ 'Wave',
]),
# need libs not coming with the demo
('Objects using an external library', [
'ActiveXWrapper_Acrobat',
'ActiveXWrapper_IE',
- 'wxGLCanvas',
- #'wxPlotCanvas', # deprecated, use PyPlot
+ 'GLCanvas',
+ #'PlotCanvas', # deprecated, use PyPlot
]),
#---------------------------------------------------------------------------
# A class to be used to display source code in the demo. Try using the
-# wxSTC in the wxStyledTextCtrl_2 sample first, fall back to wxTextCtrl
+# wxSTC in the StyledTextCtrl_2 sample first, fall back to wxTextCtrl
# if there is an error, such as the stc module not being present.
#
try:
##raise ImportError
from wx import stc
- from wxStyledTextCtrl_2 import PythonSTC
+ from StyledTextCtrl_2 import PythonSTC
class DemoCodeViewer(PythonSTC):
def __init__(self, parent, ID):
PythonSTC.__init__(self, parent, ID)
# Python styles
self.StyleSetSpec(wx.stc.STC_P_DEFAULT, 'fore:#000000')
# Comments
- self.StyleSetSpec(wx.stc.STC_P_COMMENTLINE, 'fore:#00CC00,back:#F0FFF0')
- self.StyleSetSpec(wx.stc.STC_P_COMMENTBLOCK, 'fore:#00CC00,back:#F0FFF0')
+ self.StyleSetSpec(wx.stc.STC_P_COMMENTLINE, 'fore:#008000,back:#F0FFF0')
+ self.StyleSetSpec(wx.stc.STC_P_COMMENTBLOCK, 'fore:#008000,back:#F0FFF0')
# Numbers
self.StyleSetSpec(wx.stc.STC_P_NUMBER, 'fore:#008080')
# Strings and characters
def __init__(self, parent, id, title):
wx.Frame.__init__(self, parent, -1, title, size = (800, 600),
- style=wx.DEFAULT_FRAME_STYLE|wx.NO_FULL_REPAINT_ON_RESIZE)
+ style=wx.DEFAULT_FRAME_STYLE|wx.NO_FULL_REPAINT_ON_RESIZE)
self.cwd = os.getcwd()
self.curOverview = ""
icon = images.getMondrianIcon()
self.SetIcon(icon)
- if wx.Platform == '__WXMSW__':
+ if wx.Platform != '__WXMAC__':
# setup a taskbar icon, and catch some events from it
+ icon = wx.IconFromBitmap(
+ images.getMondrianImage().Scale(16,16).ConvertToBitmap() )
self.tbicon = wx.TaskBarIcon()
self.tbicon.SetIcon(icon, "wxPython Demo")
self.tbicon.Bind(wx.EVT_TASKBAR_LEFT_DCLICK, self.OnTaskBarActivate)
#wx.Log_SetActiveTarget(wx.LogStderr())
#wx.Log_SetTraceMask(wx.TraceMessages)
- self.Show(True)
-
# add the windows to the splitter and split it.
splitter2.SplitHorizontally(self.nb, self.log, -120)
def __init__(self):
bmp = wx.Image(opj("bitmaps/splash.gif")).ConvertToBitmap()
wx.SplashScreen.__init__(self, bmp,
- wx.SPLASH_CENTRE_ON_SCREEN|wx.SPLASH_TIMEOUT,
- 4000, None, -1,
- style = wx.SIMPLE_BORDER|wx.FRAME_NO_TASKBAR|wx.STAY_ON_TOP)
+ wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT,
+ 3000, None, -1)
self.Bind(wx.EVT_CLOSE, self.OnClose)
def OnClose(self, evt):
the main frame when it is time to do so.
"""
- #import locale
- #self.locale = wx.Locale(wx.LANGUAGE_FRENCH)
- #locale.setlocale(locale.LC_ALL, 'fr')
-
wx.InitAllImageHandlers()
+
+ # Normally when using a SplashScreen you would create it, show
+ # it and then continue on with the applicaiton's
+ # initialization, finally creating and showing the main
+ # application window(s). In this case we have nothing else to
+ # do so we'll delay showing the main frame until later (see
+ # OnClose above) so the users can see the SplashScrren effect.
splash = MySplashScreen()
splash.Show()
+
return True