mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-07 04:20:07 +01:00
Add statbox and wrapsizer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -78,6 +78,7 @@ INCLUDES = [ 'defs',
|
||||
'process',
|
||||
'utils',
|
||||
'sizer',
|
||||
'wrapsizer',
|
||||
|
||||
'evtloop',
|
||||
'apptrait',
|
||||
@@ -103,6 +104,7 @@ INCLUDES = [ 'defs',
|
||||
# controls
|
||||
'statbmp',
|
||||
'stattext',
|
||||
'statbox',
|
||||
'control',
|
||||
'ctrlsub',
|
||||
'choice',
|
||||
|
||||
49
etg/statbox.py
Normal file
49
etg/statbox.py
Normal file
@@ -0,0 +1,49 @@
|
||||
#---------------------------------------------------------------------------
|
||||
# Name: etg/statbox.py
|
||||
# Author: Robin Dunn
|
||||
#
|
||||
# Created: 29-Oct-2011
|
||||
# Copyright: (c) 2011 by Total Control Software
|
||||
# License: wxWindows License
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
import etgtools
|
||||
import etgtools.tweaker_tools as tools
|
||||
|
||||
PACKAGE = "wx"
|
||||
MODULE = "_core"
|
||||
NAME = "statbox" # Base name of the file to generate to for this script
|
||||
DOCSTRING = ""
|
||||
|
||||
# The classes and/or the basename of the Doxygen XML files to be processed by
|
||||
# this script.
|
||||
ITEMS = [ "wxStaticBox",
|
||||
]
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
def run():
|
||||
# Parse the XML file(s) building a collection of Extractor objects
|
||||
module = etgtools.ModuleDef(PACKAGE, MODULE, NAME, DOCSTRING)
|
||||
etgtools.parseDoxyXML(module, ITEMS)
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
# Tweak the parsed meta objects in the module object as needed for
|
||||
# customizing the generated code and docstrings.
|
||||
|
||||
c = module.find('wxStaticBox')
|
||||
assert isinstance(c, etgtools.ClassDef)
|
||||
c.find('wxStaticBox.label').default = 'wxEmptyString'
|
||||
c.find('Create.label').default = 'wxEmptyString'
|
||||
tools.fixWindowClass(c)
|
||||
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
tools.doCommonTweaks(module)
|
||||
tools.runGenerators(module)
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
if __name__ == '__main__':
|
||||
run()
|
||||
|
||||
51
etg/wrapsizer.py
Normal file
51
etg/wrapsizer.py
Normal file
@@ -0,0 +1,51 @@
|
||||
#---------------------------------------------------------------------------
|
||||
# Name: etg/wrapsizer.py
|
||||
# Author: Robin Dunn
|
||||
#
|
||||
# Created: 29-Oct-2011
|
||||
# Copyright: (c) 2011 by Total Control Software
|
||||
# License: wxWindows License
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
import etgtools
|
||||
import etgtools.tweaker_tools as tools
|
||||
|
||||
PACKAGE = "wx"
|
||||
MODULE = "_core"
|
||||
NAME = "wrapsizer" # Base name of the file to generate to for this script
|
||||
DOCSTRING = ""
|
||||
|
||||
# The classes and/or the basename of the Doxygen XML files to be processed by
|
||||
# this script.
|
||||
ITEMS = [ "wxWrapSizer",
|
||||
]
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
def run():
|
||||
# Parse the XML file(s) building a collection of Extractor objects
|
||||
module = etgtools.ModuleDef(PACKAGE, MODULE, NAME, DOCSTRING)
|
||||
etgtools.parseDoxyXML(module, ITEMS)
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
# Tweak the parsed meta objects in the module object as needed for
|
||||
# customizing the generated code and docstrings.
|
||||
|
||||
c = module.find('wxWrapSizer')
|
||||
assert isinstance(c, etgtools.ClassDef)
|
||||
tools.fixSizerClass(c)
|
||||
|
||||
c.find('IsSpaceItem').ignore(False)
|
||||
c.find('IsSpaceItem').isVirtual = True
|
||||
|
||||
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
tools.doCommonTweaks(module)
|
||||
tools.runGenerators(module)
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
if __name__ == '__main__':
|
||||
run()
|
||||
|
||||
21
unittests/test_statbox.py
Normal file
21
unittests/test_statbox.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import imp_unittest, unittest
|
||||
import wtc
|
||||
import wx
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class statbox_Tests(wtc.WidgetTestCase):
|
||||
|
||||
def test_statboxCtor(self):
|
||||
s = wx.StaticBox(self.frame, label='StaticBox')
|
||||
|
||||
def test_statboxDefaultCtor(self):
|
||||
s = wx.StaticBox()
|
||||
s.Create(self.frame, label='StaticBox')
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
20
unittests/test_wrapsizer.py
Normal file
20
unittests/test_wrapsizer.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import imp_unittest, unittest
|
||||
import wtc
|
||||
import wx
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class wrapsizer_Tests(wtc.WidgetTestCase):
|
||||
|
||||
def test_wrapsize(self):
|
||||
ws = wx.WrapSizer()
|
||||
ws.Add(wx.Panel(self.frame))
|
||||
ws.Add(wx.Panel(self.frame))
|
||||
ws.Add(wx.Panel(self.frame))
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user