]> git.saurik.com Git - wxWidgets.git/commitdiff
A few other tweaks, reduced some flicker in the demo, and etc...
authorRobin Dunn <robin@alldunn.com>
Sat, 6 Jul 2002 00:56:57 +0000 (00:56 +0000)
committerRobin Dunn <robin@alldunn.com>
Sat, 6 Jul 2002 00:56:57 +0000 (00:56 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/demo/ActiveXWrapper_IE.py
wxPython/demo/wxIEHtmlWin.py
wxPython/src/_extras.py
wxPython/src/_helpextras.py
wxPython/src/msw/wx.py
wxPython/wxPython/lib/activexwrapper.py

index 216825dd29c6538f7ae4eb4ddd54dd034863969e..c91db4d56b8a6e82e30d7c84ec4c61a6f6d5dff8 100644 (file)
@@ -34,7 +34,8 @@ if wxPlatform == '__WXMSW__':
 
 class TestPanel(wxWindow):
     def __init__(self, parent, log, frame=None):
 
 class TestPanel(wxWindow):
     def __init__(self, parent, log, frame=None):
-        wxWindow.__init__(self, parent, -1)#, style=wxCLIP_CHILDREN)
+        wxWindow.__init__(self, parent, -1,
+                          style=wxCLIP_CHILDREN|wxNO_FULL_REPAINT_ON_RESIZE)
         self.ie = None
         self.log = log
         self.current = "http://wxPython.org/"
         self.ie = None
         self.log = log
         self.current = "http://wxPython.org/"
@@ -53,33 +54,45 @@ class TestPanel(wxWindow):
                                     eventObj = self)
 
         # Create an instance of that class
                                     eventObj = self)
 
         # Create an instance of that class
-        self.ie = theClass(self, -1, style=wxSUNKEN_BORDER)
+        self.ie = theClass(self, -1) ##, style=wxSUNKEN_BORDER)
 
 
 
 
-        #btn = wxButton(self, wxNewId(), " Open ")
-        #EVT_BUTTON(self, btn.GetId(), self.OnOpenButton)
-        #btnSizer.Add(btn, 0, wxEXPAND|wxALL, 5)
+        btn = wxButton(self, wxNewId(), "Open", style=wxBU_EXACTFIT)
+        EVT_BUTTON(self, btn.GetId(), self.OnOpenButton)
+        btnSizer.Add(btn, 0, wxEXPAND|wxALL, 2)
 
 
-        btn = wxButton(self, wxNewId(), " Home ")
+        btn = wxButton(self, wxNewId(), "Home", style=wxBU_EXACTFIT)
         EVT_BUTTON(self, btn.GetId(), self.OnHomeButton)
         EVT_BUTTON(self, btn.GetId(), self.OnHomeButton)
-        btnSizer.Add(btn, 0, wxEXPAND|wxALL, 5)
+        btnSizer.Add(btn, 0, wxEXPAND|wxALL, 2)
 
 
-        btn = wxButton(self, wxNewId(), " <-- ")
+        btn = wxButton(self, wxNewId(), "<--", style=wxBU_EXACTFIT)
         EVT_BUTTON(self, btn.GetId(), self.OnPrevPageButton)
         EVT_BUTTON(self, btn.GetId(), self.OnPrevPageButton)
-        btnSizer.Add(btn, 0, wxEXPAND|wxALL, 5)
+        btnSizer.Add(btn, 0, wxEXPAND|wxALL, 2)
 
 
-        btn = wxButton(self, wxNewId(), " --> ")
+        btn = wxButton(self, wxNewId(), "-->", style=wxBU_EXACTFIT)
         EVT_BUTTON(self, btn.GetId(), self.OnNextPageButton)
         EVT_BUTTON(self, btn.GetId(), self.OnNextPageButton)
-        btnSizer.Add(btn, 0, wxEXPAND|wxALL, 5)
+        btnSizer.Add(btn, 0, wxEXPAND|wxALL, 2)
+
+        btn = wxButton(self, wxNewId(), "Stop", style=wxBU_EXACTFIT)
+        EVT_BUTTON(self, btn.GetId(), self.OnStopButton)
+        btnSizer.Add(btn, 0, wxEXPAND|wxALL, 2)
+
+        btn = wxButton(self, wxNewId(), "Search", style=wxBU_EXACTFIT)
+        EVT_BUTTON(self, btn.GetId(), self.OnSearchPageButton)
+        btnSizer.Add(btn, 0, wxEXPAND|wxALL, 2)
+
+        btn = wxButton(self, wxNewId(), "Refresh", style=wxBU_EXACTFIT)
+        EVT_BUTTON(self, btn.GetId(), self.OnRefreshPageButton)
+        btnSizer.Add(btn, 0, wxEXPAND|wxALL, 2)
 
         txt = wxStaticText(self, -1, "Location:")
 
         txt = wxStaticText(self, -1, "Location:")
-        btnSizer.Add(txt, 0, wxCENTER|wxALL, 5)
+        btnSizer.Add(txt, 0, wxCENTER|wxALL, 2)
 
         self.location = wxComboBox(self, wxNewId(), "", style=wxCB_DROPDOWN)
         EVT_COMBOBOX(self, self.location.GetId(), self.OnLocationSelect)
         EVT_KEY_UP(self.location, self.OnLocationKey)
         EVT_CHAR(self.location, self.IgnoreReturn)
 
         self.location = wxComboBox(self, wxNewId(), "", style=wxCB_DROPDOWN)
         EVT_COMBOBOX(self, self.location.GetId(), self.OnLocationSelect)
         EVT_KEY_UP(self.location, self.OnLocationKey)
         EVT_CHAR(self.location, self.IgnoreReturn)
-        btnSizer.Add(self.location, 1, wxEXPAND|wxALL, 5)
+        btnSizer.Add(self.location, 1, wxEXPAND|wxALL, 2)
 
         sizer.Add(btnSizer, 0, wxEXPAND)
         sizer.Add(self.ie, 1, wxEXPAND)
 
         sizer.Add(btnSizer, 0, wxEXPAND)
         sizer.Add(self.ie, 1, wxEXPAND)
@@ -134,10 +147,19 @@ class TestPanel(wxWindow):
     def OnPrevPageButton(self, event):
         self.ie.GoBack()
 
     def OnPrevPageButton(self, event):
         self.ie.GoBack()
 
-
     def OnNextPageButton(self, event):
         self.ie.GoForward()
 
     def OnNextPageButton(self, event):
         self.ie.GoForward()
 
+    def OnStopButton(self, evt):
+        self.ie.Stop()
+
+    def OnSearchPageButton(self, evt):
+        self.ie.GoSearch()
+
+    def OnRefreshPageButton(self, evt):
+        self.ie.Refresh2(3)
+
+
 
     # The following event handlers are called by the web browser COM
     # control since  we passed self to MakeActiveXClass.  It will look
 
     # The following event handlers are called by the web browser COM
     # control since  we passed self to MakeActiveXClass.  It will look
index 12210cf03b50a4d416f53c49eaff947822932130..5bdd7191bec39914af836f8b7bc0580222a69a58 100644 (file)
@@ -8,9 +8,10 @@ if wxPlatform == '__WXMSW__':
 
 class TestPanel(wxWindow):
     def __init__(self, parent, log, frame=None):
 
 class TestPanel(wxWindow):
     def __init__(self, parent, log, frame=None):
-        wxWindow.__init__(self, parent, -1, style=wxCLIP_CHILDREN)
+        wxWindow.__init__(self, parent, -1,
+                          style=wxCLIP_CHILDREN|wxNO_FULL_REPAINT_ON_RESIZE)
         self.log = log
         self.log = log
-        self.current = "http://wxPython.org/"
+        self.current = "http://wxWindows.org/"
         self.frame = frame
         if frame:
             self.titleBase = frame.GetTitle()
         self.frame = frame
         if frame:
             self.titleBase = frame.GetTitle()
@@ -19,7 +20,7 @@ class TestPanel(wxWindow):
         sizer = wxBoxSizer(wxVERTICAL)
         btnSizer = wxBoxSizer(wxHORIZONTAL)
 
         sizer = wxBoxSizer(wxVERTICAL)
         btnSizer = wxBoxSizer(wxHORIZONTAL)
 
-        self.ie = wxIEHtmlWin(self, -1) ##, style=wxSUNKEN_BORDER)
+        self.ie = wxIEHtmlWin(self, -1, style = wxNO_FULL_REPAINT_ON_RESIZE)
 
 
         btn = wxButton(self, wxNewId(), "Open", style=wxBU_EXACTFIT)
 
 
         btn = wxButton(self, wxNewId(), "Open", style=wxBU_EXACTFIT)
index 5289d06a0eb4453f8ed7c89c78fbdc5d262ae175..e802d6d65d5acccf7803ca9719e8129b9dbad6a5 100644 (file)
@@ -659,7 +659,8 @@ _wxCallAfterId = None
 def wxCallAfter(callable, *args, **kw):
     """
     Call the specified function after the current and pending event
 def wxCallAfter(callable, *args, **kw):
     """
     Call the specified function after the current and pending event
-    handlers have been completed.
+    handlers have been completed.  This is also good for making GUI
+    method calls from non-GUI threads.
     """
     app = wxGetApp()
     assert app, 'No wxApp created yet'
     """
     app = wxGetApp()
     assert app, 'No wxApp created yet'
index b925ee0362d49845021cc0947cbc3a3edf2cf285..c933721561e351283b8414100644e89d49ec7c4a 100644 (file)
@@ -1,4 +1,3 @@
 # Stuff these names into the wx namespace so wxPyConstructObject can find them
 import wx
 wx.wxHelpEventPtr         = wxHelpEventPtr
 # Stuff these names into the wx namespace so wxPyConstructObject can find them
 import wx
 wx.wxHelpEventPtr         = wxHelpEventPtr
-wx.wxContextMenuEventPtr  = wxContextMenuEventPtr
index 3ae0ac13d011f6626a2bb90c12c777a3c95eafb6..671a737189ea96a73349c27f7964eabe22e88b1f 100644 (file)
@@ -1583,7 +1583,8 @@ _wxCallAfterId = None
 def wxCallAfter(callable, *args, **kw):
     """
     Call the specified function after the current and pending event
 def wxCallAfter(callable, *args, **kw):
     """
     Call the specified function after the current and pending event
-    handlers have been completed.
+    handlers have been completed.  This is also good for making GUI
+    method calls from non-GUI threads.
     """
     app = wxGetApp()
     assert app, 'No wxApp created yet'
     """
     app = wxGetApp()
     assert app, 'No wxApp created yet'
index d7dde4bbda3f7d7a39a53bc28ce96a6597243ce4..30ed18ea4fb7c8ed3151ed124d7374378b150d71 100644 (file)
@@ -87,7 +87,7 @@ def MakeActiveXClass(CoClass, eventClass=None, eventObj=None):
 def axw__init__(self, parent, ID, pos=wxDefaultPosition, size=wxDefaultSize, style=0):
     # init base classes
     pywin.mfc.activex.Control.__init__(self)
 def axw__init__(self, parent, ID, pos=wxDefaultPosition, size=wxDefaultSize, style=0):
     # init base classes
     pywin.mfc.activex.Control.__init__(self)
-    wxWindow.__init__(self, parent, -1, pos, size, style)
+    wxWindow.__init__(self, parent, -1, pos, size, style|wxNO_FULL_REPAINT_ON_RESIZE)
 
     win32ui.EnableControlContainer()
     self._eventObj = self._eventObj  # move from class to instance
 
     win32ui.EnableControlContainer()
     self._eventObj = self._eventObj  # move from class to instance
@@ -106,7 +106,7 @@ def axw__init__(self, parent, ID, pos=wxDefaultPosition, size=wxDefaultSize, sty
 
     # hook some wx events
     EVT_SIZE(self, self.axw_OnSize)
 
     # hook some wx events
     EVT_SIZE(self, self.axw_OnSize)
-    EVT_ERASE_BACKGROUND(self, self.axw_OEB)
+    #EVT_ERASE_BACKGROUND(self, self.axw_OEB)
 
 
 def axw__getattr__(self, attr):
 
 
 def axw__getattr__(self, attr):
@@ -132,6 +132,7 @@ def axw_OEB(self, event):
 def axw_Cleanup(self):
     del self._wnd
     self.close()
 def axw_Cleanup(self):
     del self._wnd
     self.close()
+    pass
     ## anything else???
 
 
     ## anything else???