updates for wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7188 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2,14 +2,16 @@
|
||||
"""
|
||||
|
||||
from wxPython.wx import *
|
||||
from wxPython.lib.activexwrapper import MakeActiveXClass
|
||||
|
||||
import win32com.client.gencache
|
||||
if wxPlatform == '__WXMSW__':
|
||||
from wxPython.lib.activexwrapper import MakeActiveXClass
|
||||
import win32com.client.gencache
|
||||
|
||||
try:
|
||||
acrobat = win32com.client.gencache.EnsureModule('{CA8A9783-280D-11CF-A24D-444553540000}', 0x0, 1, 3)
|
||||
except:
|
||||
raise ImportError("Can't load PDF.OCX, install Acrobat 4.0")
|
||||
|
||||
try:
|
||||
acrobat = win32com.client.gencache.EnsureModule('{CA8A9783-280D-11CF-A24D-444553540000}', 0x0, 1, 3)
|
||||
except:
|
||||
raise ImportError("Can't load PDF.OCX, install Acrobat 4.0")
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
@@ -77,8 +79,14 @@ class TestPanel(wxPanel):
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def runTest(frame, nb, log):
|
||||
win = TestPanel(nb, log)
|
||||
return win
|
||||
if wxPlatform == '__WXMSW__':
|
||||
win = TestPanel(nb, log)
|
||||
return win
|
||||
else:
|
||||
dlg = wxMessageDialog(frame, 'This demo only works on MSW.',
|
||||
'Sorry', wxOK | wxICON_INFORMATION)
|
||||
dlg.ShowModal()
|
||||
dlg.Destroy()
|
||||
|
||||
|
||||
overview = __doc__
|
||||
|
@@ -2,14 +2,15 @@
|
||||
"""
|
||||
|
||||
from wxPython.wx import *
|
||||
from wxPython.lib.activexwrapper import MakeActiveXClass
|
||||
|
||||
import win32com.client.gencache
|
||||
if wxPlatform == '__WXMSW__':
|
||||
from wxPython.lib.activexwrapper import MakeActiveXClass
|
||||
import win32com.client.gencache
|
||||
|
||||
try:
|
||||
browserModule = win32com.client.gencache.EnsureModule("{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}", 0, 1, 1)
|
||||
except:
|
||||
raise ImportError("IE4 or greater does not appear to be installed.")
|
||||
try:
|
||||
browserModule = win32com.client.gencache.EnsureModule("{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}", 0, 1, 1)
|
||||
except:
|
||||
raise ImportError("IE4 or greater does not appear to be installed.")
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
@@ -139,8 +140,14 @@ class TestPanel(wxWindow):
|
||||
# for the demo framework...
|
||||
|
||||
def runTest(frame, nb, log):
|
||||
win = TestPanel(nb, log, frame)
|
||||
return win
|
||||
if wxPlatform == '__WXMSW__':
|
||||
win = TestPanel(nb, log, frame)
|
||||
return win
|
||||
else:
|
||||
dlg = wxMessageDialog(frame, 'This demo only works on MSW.',
|
||||
'Sorry', wxOK | wxICON_INFORMATION)
|
||||
dlg.ShowModal()
|
||||
dlg.Destroy()
|
||||
|
||||
|
||||
overview = __doc__
|
||||
|
@@ -9,12 +9,14 @@ class TestPanel(wxPanel):
|
||||
def __init__(self, parent, ID, log):
|
||||
wxPanel.__init__(self, parent, ID)
|
||||
self.log = log
|
||||
self.fbb = FileBrowseButton(self, -1, wxPoint(20,20), wxSize(350, -1),
|
||||
self.fbb = FileBrowseButton(self, -1, wxPoint(20,20), wxSize(450, -1),
|
||||
changeCallback = self.fbbCallback)
|
||||
self.fbbh = FileBrowseButtonWithHistory(self, -1, wxPoint(20, 50),
|
||||
wxSize(350, -1),
|
||||
changeCallback = self.fbbhCallback)
|
||||
self.fbbh.SetHistory([])
|
||||
wxSize(450, -1),
|
||||
#changeCallback = self.fbbhCallback
|
||||
)
|
||||
|
||||
self.fbbh.SetHistory(['You', 'can', 'put', 'some', 'file', 'names', 'here'])
|
||||
|
||||
|
||||
def fbbCallback(self, evt):
|
||||
@@ -22,11 +24,12 @@ class TestPanel(wxPanel):
|
||||
|
||||
|
||||
def fbbhCallback(self, evt):
|
||||
value = evt.GetString()
|
||||
self.log.write('FileBrowseButtonWithHistory: %s\n' % value)
|
||||
history = self.fbbh.GetHistory()
|
||||
history.append(value)
|
||||
self.fbbh.SetHistory(history)
|
||||
if hasattr(self, 'fbbh'):
|
||||
value = evt.GetString()
|
||||
self.log.write('FileBrowseButtonWithHistory: %s\n' % value)
|
||||
history = self.fbbh.GetHistory()
|
||||
history.append(value)
|
||||
self.fbbh.SetHistory(history)
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
@@ -1771,7 +1771,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxNotifyEvent","_class_wxNotifyEvent",0},
|
||||
{ "_class_wxToolBarBase","_wxToolBarBase",0},
|
||||
{ "_wxMask","_class_wxMask",0},
|
||||
{ "_wxGrid","_class_wxGrid",0},
|
||||
{ "_wxPen","_class_wxPen",0},
|
||||
{ "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0},
|
||||
{ "_byte","_unsigned_char",0},
|
||||
@@ -1821,7 +1820,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxMask","_wxMask",0},
|
||||
{ "_wxTextDataObject","_class_wxTextDataObject",0},
|
||||
{ "_class_wxKeyEvent","_wxKeyEvent",0},
|
||||
{ "_class_wxGrid","_wxGrid",0},
|
||||
{ "_wxColour","_class_wxColour",0},
|
||||
{ "_class_wxDialog","_wxDialog",0},
|
||||
{ "_class_wxFileDataObject","_wxFileDataObject",0},
|
||||
@@ -1856,7 +1854,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxEvent","_wxEvent",0},
|
||||
{ "_wxCheckListBox","_class_wxCheckListBox",0},
|
||||
{ "_wxSplitterEvent","_class_wxSplitterEvent",0},
|
||||
{ "_wxGridEvent","_class_wxGridEvent",0},
|
||||
{ "_wxRect","_class_wxRect",0},
|
||||
{ "_wxCommandEvent","_class_wxSashEvent",SwigwxSashEventTowxCommandEvent},
|
||||
{ "_wxCommandEvent","_wxSashEvent",SwigwxSashEventTowxCommandEvent},
|
||||
@@ -1959,7 +1956,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_class_wxPoint","_wxPoint",0},
|
||||
{ "_wxRealPoint","_class_wxRealPoint",0},
|
||||
{ "_class_wxRadioBox","_wxRadioBox",0},
|
||||
{ "_wxGridCell","_class_wxGridCell",0},
|
||||
{ "_signed_short","_WXTYPE",0},
|
||||
{ "_signed_short","_short",0},
|
||||
{ "_wxMemoryDC","_class_wxMemoryDC",0},
|
||||
@@ -2069,14 +2065,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
||||
{ "_wxGauge","_class_wxGauge",0},
|
||||
{ "_class_wxCheckListBox","_wxCheckListBox",0},
|
||||
{ "_class_wxBusyInfo","_wxBusyInfo",0},
|
||||
{ "_class_wxGridEvent","_wxGridEvent",0},
|
||||
{ "_class_wxCommandEvent","_class_wxSashEvent",SwigwxSashEventTowxCommandEvent},
|
||||
{ "_class_wxCommandEvent","_wxSashEvent",SwigwxSashEventTowxCommandEvent},
|
||||
{ "_class_wxCommandEvent","_wxCommandEvent",0},
|
||||
{ "_class_wxClientDC","_wxClientDC",0},
|
||||
{ "_class_wxSizeEvent","_wxSizeEvent",0},
|
||||
{ "_wxCustomDataObject","_class_wxCustomDataObject",0},
|
||||
{ "_class_wxGridCell","_wxGridCell",0},
|
||||
{ "_class_wxSize","_wxSize",0},
|
||||
{ "_class_wxBitmap","_wxBitmap",0},
|
||||
{ "_class_wxMemoryDC","_wxMemoryDC",0},
|
||||
|
Reference in New Issue
Block a user