1. wxHtmlHelpController and related classes
2. the C++ versions of wxSizer and firends, Python versions are 'depreciated' 3. wxPyEvent and wxPyCommandEvent, event classes that can carry some python objects through the event system and safely come back out again. 4. wxGridSizer and wxFlexGridSizer 5. wxValidator 6. wxPyOnDemandOutputWindow 7. several tweaks, fixes and additions of missing methods, etc. 8. and probably several other things I am forgetting since CVS was down so long... git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -36,12 +36,12 @@ _treeList = [
|
||||
'wxTreeCtrl', 'wxSpinButton', 'wxStaticText', 'wxStaticBitmap',
|
||||
'wxRadioBox', 'wxSlider']),
|
||||
|
||||
('Window Layout', ['wxLayoutConstraints', 'Sizers']),
|
||||
('Window Layout', ['wxLayoutConstraints', 'Sizers', 'OldSizers']),
|
||||
|
||||
('Miscellaneous', ['wxTimer', 'wxGLCanvas', 'DialogUnits', 'wxImage',
|
||||
'PrintFramework', 'wxOGL']),
|
||||
('Miscellaneous', ['wxTimer', 'wxValidator', 'wxGLCanvas', 'DialogUnits',
|
||||
'wxImage', 'PrintFramework', 'wxOGL']),
|
||||
|
||||
('wxPython Library', ['Sizers', 'Layoutf', 'wxScrolledMessageDialog',
|
||||
('wxPython Library', ['OldSizers', 'Layoutf', 'wxScrolledMessageDialog',
|
||||
'wxMultipleChoiceDialog', 'wxPlotCanvas']),
|
||||
|
||||
('Cool Contribs', ['pyTree', 'hangman', 'SlashDot', 'XMLtreeview']),
|
||||
@@ -52,8 +52,8 @@ _treeList = [
|
||||
|
||||
class wxPythonDemo(wxFrame):
|
||||
def __init__(self, parent, id, title):
|
||||
wxFrame.__init__(self, parent, -1, title,
|
||||
wxDefaultPosition, wxSize(700, 550))
|
||||
wxFrame.__init__(self, parent, -1, title, size = (725, 550))
|
||||
|
||||
if wxPlatform == '__WXMSW__':
|
||||
self.icon = wxIcon('bitmaps/mondrian.ico', wxBITMAP_TYPE_ICO)
|
||||
self.SetIcon(self.icon)
|
||||
@@ -72,9 +72,9 @@ class wxPythonDemo(wxFrame):
|
||||
# Make a File menu
|
||||
self.mainmenu = wxMenuBar()
|
||||
menu = wxMenu()
|
||||
mID = wxNewId()
|
||||
menu.Append(mID, 'E&xit', 'Get the heck outta here!')
|
||||
EVT_MENU(self, mID, self.OnFileExit)
|
||||
exitID = wxNewId()
|
||||
menu.Append(exitID, 'E&xit\tCtrl-X', 'Get the heck outta here!')
|
||||
EVT_MENU(self, exitID, self.OnFileExit)
|
||||
self.mainmenu.Append(menu, '&File')
|
||||
|
||||
# Make a Demo menu
|
||||
@@ -90,13 +90,18 @@ class wxPythonDemo(wxFrame):
|
||||
|
||||
|
||||
# Make a Help menu
|
||||
mID = wxNewId()
|
||||
helpID = wxNewId()
|
||||
menu = wxMenu()
|
||||
menu.Append(mID, '&About', 'wxPython RULES!!!')
|
||||
EVT_MENU(self, mID, self.OnHelpAbout)
|
||||
menu.Append(helpID, '&About\tCtrl-H', 'wxPython RULES!!!')
|
||||
EVT_MENU(self, helpID, self.OnHelpAbout)
|
||||
self.mainmenu.Append(menu, '&Help')
|
||||
self.SetMenuBar(self.mainmenu)
|
||||
|
||||
# set the menu accellerator table...
|
||||
aTable = wxAcceleratorTable([(wxACCEL_CTRL, ord('X'), exitID),
|
||||
(wxACCEL_CTRL, ord('H'), helpID)])
|
||||
self.SetAcceleratorTable(aTable)
|
||||
|
||||
|
||||
# Create a TreeCtrl
|
||||
tID = wxNewId()
|
||||
@@ -113,6 +118,7 @@ class wxPythonDemo(wxFrame):
|
||||
EVT_TREE_ITEM_EXPANDED (self.tree, tID, self.OnItemExpanded)
|
||||
EVT_TREE_ITEM_COLLAPSED (self.tree, tID, self.OnItemCollapsed)
|
||||
EVT_TREE_SEL_CHANGED (self.tree, tID, self.OnSelChanged)
|
||||
###EVT_TREE_SEL_CHANGING (self.tree, tID, self.OnSelChanging)
|
||||
|
||||
# Create a Notebook
|
||||
self.nb = wxNotebook(splitter2, -1)
|
||||
@@ -190,6 +196,7 @@ class wxPythonDemo(wxFrame):
|
||||
def OnSelChanged(self, event):
|
||||
if self.dying:
|
||||
return
|
||||
###print 'OnSelChanged entry'
|
||||
|
||||
if self.nb.GetPageCount() == 3:
|
||||
if self.nb.GetSelection() == 2:
|
||||
@@ -228,6 +235,11 @@ class wxPythonDemo(wxFrame):
|
||||
self.txt.Clear()
|
||||
self.window = None
|
||||
|
||||
###print 'OnSelChanged exit: ', itemText
|
||||
|
||||
###def OnSelChanging(self, event):
|
||||
### print 'OnSelChanging'
|
||||
|
||||
|
||||
#---------------------------------------------
|
||||
# Get the Demo files
|
||||
@@ -288,15 +300,15 @@ class wxPythonDemo(wxFrame):
|
||||
|
||||
#---------------------------------------------
|
||||
def OnDemoMenu(self, event):
|
||||
print event.GetId(), self.mainmenu.GetLabel(event.GetId())
|
||||
try:
|
||||
selectedDemo = self.treeMap[self.mainmenu.GetLabel(event.GetId())]
|
||||
except:
|
||||
selectedDemo = None
|
||||
if selectedDemo:
|
||||
###print "---- start ----"
|
||||
self.tree.SelectItem(selectedDemo)
|
||||
self.tree.EnsureVisible(selectedDemo)
|
||||
|
||||
###print "---- end ----"
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user