mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-04 19:10:09 +01:00
little tweaks and fixes for linux
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -46,12 +46,13 @@ def run():
|
||||
c.addProperty('StatusBarPane GetStatusBarPane SetStatusBarPane')
|
||||
c.addProperty('ToolBar GetToolBar SetToolBar')
|
||||
|
||||
|
||||
# TODO: should these go into a tools.addFrameVirtuals function?
|
||||
tools.fixTopLevelWindowClass(c)
|
||||
|
||||
# Add back the virtual flag for these methods.
|
||||
# TODO: maybe these should go into a tools.addFrameVirtuals function?
|
||||
c.find('OnCreateStatusBar').isVirtual = True
|
||||
c.find('OnCreateToolBar').isVirtual = True
|
||||
|
||||
tools.fixTopLevelWindowClass(c)
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
tools.doCommonTweaks(module)
|
||||
|
||||
@@ -34,6 +34,9 @@ def run():
|
||||
assert isinstance(c, etgtools.ClassDef)
|
||||
tools.removeVirtuals(c)
|
||||
|
||||
# The stipple bitmap ctor is not implemented on wxGTK
|
||||
c.find('wxPen').findOverload('wxBitmap').ignore()
|
||||
|
||||
c.find('GetDashes').ignore()
|
||||
c.find('SetDashes').ignore()
|
||||
c.addCppMethod('wxArrayInt*', 'GetDashes', '()', """\
|
||||
|
||||
@@ -85,7 +85,7 @@ def run():
|
||||
m.find('descent').out = True
|
||||
m.find('externalLeading').out = True
|
||||
|
||||
c.find('GetHandle').type = 'void*'
|
||||
c.find('GetHandle').type = 'unsigned long'
|
||||
c.find('GetHandle').setCppCode("return wxPyGetWinHandle(self);")
|
||||
|
||||
c.addCppMethod('void*', 'GetGtkWidget', '()', """\
|
||||
|
||||
@@ -15,16 +15,16 @@
|
||||
|
||||
|
||||
|
||||
void* wxPyGetWinHandle(wxWindow* win)
|
||||
wxUIntPtr wxPyGetWinHandle(wxWindow* win)
|
||||
{
|
||||
#ifdef __WXMSW__
|
||||
return (void*)win->GetHandle();
|
||||
return (wxUIntPtr)win->GetHandle();
|
||||
#endif
|
||||
#if defined(__WXGTK__) || defined(__WXX11__)
|
||||
return (void*)GetXWindow(win);
|
||||
return (wxUIntPtr)GetXWindow(win);
|
||||
#endif
|
||||
#ifdef __WXMAC__
|
||||
return (void*)win->GetHandle();
|
||||
return (wxUIntPtr)win->GetHandle();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,14 @@ class WindowTests(wtc.WidgetTestCase):
|
||||
self.assertTrue(w.GetWindowStyle() == wx.BORDER_SIMPLE|wx.VSCROLL)
|
||||
self.assertTrue(w.Parent is self.frame)
|
||||
|
||||
def test_windowHandle(self):
|
||||
w = wx.Window(self.frame, -1, (10,10), (50,50))
|
||||
hdl = w.GetHandle()
|
||||
self.assertTrue(isinstance(hdl, (int, long)))
|
||||
|
||||
|
||||
def test_windowProperties(self):
|
||||
w = wx.Window(self.frame, -1, (10,10), (50,50))
|
||||
# Just test that these properties exist for now. More tests can be
|
||||
# added later to ensure that they work correctly.
|
||||
w.AcceleratorTable
|
||||
|
||||
Reference in New Issue
Block a user