This commit was manufactured by cvs2svn to create tag 'WX_2_4_0'.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/tags/WX_2_4_0@18627 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -25,18 +25,11 @@ import images
|
||||
_treeList = [
|
||||
# new stuff
|
||||
('New since last release', [
|
||||
'RowColSizer',
|
||||
'Unicode',
|
||||
'wxFileHistory',
|
||||
'wxGenericDirCtrl',
|
||||
'wxImageFromStream',
|
||||
'wxArtProvider',
|
||||
'ScrolledPanel',
|
||||
'wxMenu',
|
||||
'wxIEHtmlWin',
|
||||
'wxKeyEvents',
|
||||
'wxWizard',
|
||||
'wxXmlResourceHandler',
|
||||
'wxRadioButton',
|
||||
'Throbber',
|
||||
'wxPopupControl',
|
||||
'wxMultiSash',
|
||||
'EventManager',
|
||||
]),
|
||||
|
||||
# managed windows == things with a caption you can close
|
||||
@@ -88,14 +81,15 @@ _treeList = [
|
||||
'wxNotebook',
|
||||
'wxPopupWindow',
|
||||
'wxRadioBox',
|
||||
'wxRadioButton',
|
||||
'wxSashWindow',
|
||||
'wxSlider',
|
||||
'wxScrolledWindow',
|
||||
'wxSplitterWindow',
|
||||
'wxSlider',
|
||||
'wxSpinButton',
|
||||
'wxSpinCtrl',
|
||||
'wxStaticText',
|
||||
'wxSplitterWindow',
|
||||
'wxStaticBitmap',
|
||||
'wxStaticText',
|
||||
'wxStatusBar',
|
||||
'wxTextCtrl',
|
||||
'wxToggleButton',
|
||||
@@ -106,6 +100,8 @@ _treeList = [
|
||||
|
||||
# controls coming from other librairies
|
||||
('More Windows/Controls', [
|
||||
#'wxFloatBar', deprecated
|
||||
#'wxMVCTree', deprecated
|
||||
'ColourSelect',
|
||||
'ContextHelp',
|
||||
'FancyText',
|
||||
@@ -115,20 +111,22 @@ _treeList = [
|
||||
'PyCrustWithFilling',
|
||||
'SplitTree',
|
||||
'TablePrint',
|
||||
'Throbber',
|
||||
'wxCalendar',
|
||||
'wxCalendarCtrl',
|
||||
'wxDynamicSashWindow',
|
||||
'wxEditableListBox',
|
||||
'wxEditor',
|
||||
#'wxFloatBar', deprecated
|
||||
'wxHtmlWindow',
|
||||
'wxIEHtmlWin',
|
||||
'wxLEDNumberCtrl',
|
||||
'wxMimeTypesManager',
|
||||
#'wxMVCTree', deprecated
|
||||
'wxMultiSash',
|
||||
'wxPopupControl',
|
||||
'wxRightTextCtrl',
|
||||
'wxStyledTextCtrl_1',
|
||||
'wxStyledTextCtrl_2',
|
||||
'wxTimeCtrl',
|
||||
]),
|
||||
|
||||
# How to lay out the controls in a frame/dialog
|
||||
@@ -145,6 +143,7 @@ _treeList = [
|
||||
|
||||
# ditto
|
||||
('Process and Events', [
|
||||
'EventManager',
|
||||
'infoframe',
|
||||
'OOR',
|
||||
'PythonEvents',
|
||||
@@ -163,6 +162,7 @@ _treeList = [
|
||||
|
||||
# Images
|
||||
('Images', [
|
||||
'Throbber',
|
||||
'wxDragImage',
|
||||
'wxImage',
|
||||
'wxImageFromStream',
|
||||
@@ -177,6 +177,7 @@ _treeList = [
|
||||
'DrawXXXList',
|
||||
'FontEnumerator',
|
||||
'PrintFramework',
|
||||
'Throbber',
|
||||
'Unicode',
|
||||
'wxFileHistory',
|
||||
'wxJoystick',
|
||||
@@ -212,7 +213,8 @@ class MyLog(wxPyLog):
|
||||
if self.logTime:
|
||||
message = time.strftime("%X", time.localtime(timeStamp)) + \
|
||||
": " + message
|
||||
self.tc.AppendText(message + '\n')
|
||||
if self.tc:
|
||||
self.tc.AppendText(message + '\n')
|
||||
|
||||
|
||||
class MyTP(wxPyTipProvider):
|
||||
@@ -237,6 +239,7 @@ class wxPythonDemo(wxFrame):
|
||||
|
||||
self.cwd = os.getcwd()
|
||||
self.curOverview = ""
|
||||
self.window = None
|
||||
|
||||
icon = images.getMondrianIcon()
|
||||
self.SetIcon(icon)
|
||||
@@ -250,9 +253,9 @@ class wxPythonDemo(wxFrame):
|
||||
EVT_MENU(self.tbicon, self.TBMENU_RESTORE, self.OnTaskBarActivate)
|
||||
EVT_MENU(self.tbicon, self.TBMENU_CLOSE, self.OnTaskBarClose)
|
||||
|
||||
wxCallAfter(self.ShowTip)
|
||||
|
||||
self.otherWin = None
|
||||
self.showTip = true
|
||||
EVT_IDLE(self, self.OnIdle)
|
||||
EVT_CLOSE(self, self.OnCloseWindow)
|
||||
EVT_ICONIZE(self, self.OnIconfiy)
|
||||
@@ -358,7 +361,7 @@ class wxPythonDemo(wxFrame):
|
||||
|
||||
# Set up a TextCtrl on the Demo Code Notebook page
|
||||
self.txt = wxTextCtrl(self.nb, -1,
|
||||
style = wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL)
|
||||
style = wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL|wxTE_RICH2)
|
||||
self.nb.AddPage(self.txt, "Demo Code")
|
||||
|
||||
|
||||
@@ -380,12 +383,10 @@ class wxPythonDemo(wxFrame):
|
||||
|
||||
|
||||
# add the windows to the splitter and split it.
|
||||
splitter2.SplitHorizontally(self.nb, self.log)
|
||||
splitter.SplitVertically(self.tree, splitter2)
|
||||
splitter2.SplitHorizontally(self.nb, self.log, 450)
|
||||
splitter.SplitVertically(self.tree, splitter2, 180)
|
||||
|
||||
splitter.SetSashPosition(180, true)
|
||||
splitter.SetMinimumPaneSize(20)
|
||||
splitter2.SetSashPosition(450, true)
|
||||
splitter2.SetMinimumPaneSize(20)
|
||||
|
||||
|
||||
@@ -453,6 +454,11 @@ class wxPythonDemo(wxFrame):
|
||||
if self.nb.GetPageCount() == 3:
|
||||
if self.nb.GetSelection() == 2:
|
||||
self.nb.SetSelection(0)
|
||||
# inform the window that it's time to quit if it cares
|
||||
if self.window is not None:
|
||||
if hasattr(self.window, "ShutdownDemo"):
|
||||
self.window.ShutdownDemo()
|
||||
wxSafeYield() # in case the page has pending events
|
||||
self.nb.DeletePage(2)
|
||||
|
||||
if itemText == self.overviewText:
|
||||
@@ -478,7 +484,7 @@ class wxPythonDemo(wxFrame):
|
||||
wxSafeYield()
|
||||
|
||||
self.window = module.runTest(self, self.nb, self) ###
|
||||
if self.window:
|
||||
if self.window is not None:
|
||||
self.nb.AddPage(self.window, 'Demo')
|
||||
self.nb.SetSelection(2)
|
||||
self.nb.Refresh() # without this wxMac has troubles showing the just added page
|
||||
@@ -541,10 +547,6 @@ class wxPythonDemo(wxFrame):
|
||||
self.window = self.otherWin
|
||||
self.otherWin = None
|
||||
|
||||
if self.showTip:
|
||||
self.ShowTip()
|
||||
self.showTip = false
|
||||
|
||||
|
||||
#---------------------------------------------
|
||||
def ShowTip(self):
|
||||
|
||||
Reference in New Issue
Block a user