mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 09:40:07 +01:00
Add wx.adv.PropertySheetDialog
This commit is contained in:
4
TODO.rst
4
TODO.rst
@@ -136,12 +136,8 @@ Other Dev Stuff
|
|||||||
* [] New activex classes in wx/msw/ole/activex.h ?
|
* [] New activex classes in wx/msw/ole/activex.h ?
|
||||||
* Any others?
|
* Any others?
|
||||||
|
|
||||||
* Add _propdlg module
|
|
||||||
|
|
||||||
* Add _aui module ?? (or go with only agw aui?)
|
* Add _aui module ?? (or go with only agw aui?)
|
||||||
|
|
||||||
* Add _propgrid (in progress)
|
|
||||||
|
|
||||||
* Add the UTF8 PyMethods from classic (see _stc_utf8_methods.py) to StyledTextCtrl
|
* Add the UTF8 PyMethods from classic (see _stc_utf8_methods.py) to StyledTextCtrl
|
||||||
|
|
||||||
* Reimplement the classes in the valgen, valnum and valtext headers as
|
* Reimplement the classes in the valgen, valnum and valtext headers as
|
||||||
|
|||||||
@@ -2623,6 +2623,14 @@
|
|||||||
"PRINT_QUALITY_HIGH":"wx.",
|
"PRINT_QUALITY_HIGH":"wx.",
|
||||||
"PRINT_QUALITY_LOW":"wx.",
|
"PRINT_QUALITY_LOW":"wx.",
|
||||||
"PRINT_QUALITY_MEDIUM":"wx.",
|
"PRINT_QUALITY_MEDIUM":"wx.",
|
||||||
|
"PROPSHEET_BUTTONTOOLBOOK":"wx.adv.",
|
||||||
|
"PROPSHEET_CHOICEBOOK":"wx.adv.",
|
||||||
|
"PROPSHEET_DEFAULT":"wx.adv.",
|
||||||
|
"PROPSHEET_LISTBOOK":"wx.adv.",
|
||||||
|
"PROPSHEET_NOTEBOOK":"wx.adv.",
|
||||||
|
"PROPSHEET_SHRINKTOFIT":"wx.adv.",
|
||||||
|
"PROPSHEET_TOOLBOOK":"wx.adv.",
|
||||||
|
"PROPSHEET_TREEBOOK":"wx.adv.",
|
||||||
"PageSetupDialog":"wx.",
|
"PageSetupDialog":"wx.",
|
||||||
"PageSetupDialogData":"wx.",
|
"PageSetupDialogData":"wx.",
|
||||||
"PaintDC":"wx.",
|
"PaintDC":"wx.",
|
||||||
@@ -2693,6 +2701,8 @@
|
|||||||
"PropertyGridManagerNameStr":"wx.propgrid.",
|
"PropertyGridManagerNameStr":"wx.propgrid.",
|
||||||
"PropertyGridPage":"wx.propgrid.",
|
"PropertyGridPage":"wx.propgrid.",
|
||||||
"PropertyGridPageState":"wx.propgrid.",
|
"PropertyGridPageState":"wx.propgrid.",
|
||||||
|
"PropertySheetDialog":"wx.adv.",
|
||||||
|
"PropertySheetDialogFlags":"wx.adv.",
|
||||||
"PseudoDC":"wx.adv.",
|
"PseudoDC":"wx.adv.",
|
||||||
"PyApp":"wx.",
|
"PyApp":"wx.",
|
||||||
"PyAxBaseWindow":"wx.msw.",
|
"PyAxBaseWindow":"wx.msw.",
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ INCLUDES = [
|
|||||||
'timectrl',
|
'timectrl',
|
||||||
'wizard',
|
'wizard',
|
||||||
'pseudodc',
|
'pseudodc',
|
||||||
|
'propdlg',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
50
etg/propdlg.py
Normal file
50
etg/propdlg.py
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Name: etg/propdlg.py
|
||||||
|
# Author: Robin Dunn
|
||||||
|
#
|
||||||
|
# Created: 30-Sep-2016
|
||||||
|
# Copyright: (c) 2016 by Total Control Software
|
||||||
|
# License: wxWindows License
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
import etgtools
|
||||||
|
import etgtools.tweaker_tools as tools
|
||||||
|
|
||||||
|
PACKAGE = "wx"
|
||||||
|
MODULE = "_adv"
|
||||||
|
NAME = "propdlg" # 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 = [ 'wxPropertySheetDialog',
|
||||||
|
]
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
module.addHeaderCode('#include <wx/propdlg.h>')
|
||||||
|
|
||||||
|
c = module.find('wxPropertySheetDialog')
|
||||||
|
assert isinstance(c, etgtools.ClassDef)
|
||||||
|
tools.fixTopLevelWindowClass(c, hideVirtuals=False)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------
|
||||||
|
tools.doCommonTweaks(module)
|
||||||
|
tools.runGenerators(module)
|
||||||
|
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
if __name__ == '__main__':
|
||||||
|
run()
|
||||||
|
|
||||||
Submodule ext/wxWidgets updated: 9164090b46...c9e56dd3e5
71
unittests/test_propdlg.py
Normal file
71
unittests/test_propdlg.py
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
import unittest
|
||||||
|
from unittests import wtc
|
||||||
|
import wx
|
||||||
|
import wx.adv
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class propdlg_Tests(wtc.WidgetTestCase):
|
||||||
|
|
||||||
|
def test_propdlg1(self):
|
||||||
|
# Constants
|
||||||
|
wx.adv.PROPSHEET_DEFAULT
|
||||||
|
wx.adv.PROPSHEET_NOTEBOOK
|
||||||
|
wx.adv.PROPSHEET_TOOLBOOK
|
||||||
|
wx.adv.PROPSHEET_CHOICEBOOK
|
||||||
|
wx.adv.PROPSHEET_LISTBOOK
|
||||||
|
wx.adv.PROPSHEET_BUTTONTOOLBOOK
|
||||||
|
wx.adv.PROPSHEET_TREEBOOK
|
||||||
|
wx.adv.PROPSHEET_SHRINKTOFIT
|
||||||
|
|
||||||
|
|
||||||
|
def test_propgrid2(self):
|
||||||
|
# Normal, simple usage
|
||||||
|
dlg = wx.adv.PropertySheetDialog(self.frame, title="Property Sheet")
|
||||||
|
dlg.SetSheetStyle(wx.adv.PROPSHEET_NOTEBOOK)
|
||||||
|
dlg.Destroy()
|
||||||
|
|
||||||
|
|
||||||
|
def test_propgrid3(self):
|
||||||
|
# 2-Phase create
|
||||||
|
dlg = wx.adv.PropertySheetDialog()
|
||||||
|
dlg.Create(self.frame, title="Property Sheet")
|
||||||
|
dlg.SetSheetStyle(wx.adv.PROPSHEET_NOTEBOOK)
|
||||||
|
dlg.Destroy()
|
||||||
|
|
||||||
|
|
||||||
|
def test_propgrid4(self):
|
||||||
|
# Derived class
|
||||||
|
class MyPropSheetDlg(wx.adv.PropertySheetDialog):
|
||||||
|
def __init__(self, parent, title):
|
||||||
|
wx.adv.PropertySheetDialog.__init__(self) # 1st phase
|
||||||
|
|
||||||
|
# Setup
|
||||||
|
self.SetSheetStyle(wx.adv.PROPSHEET_NOTEBOOK)
|
||||||
|
self.SetSheetInnerBorder(10)
|
||||||
|
self.SetSheetOuterBorder(15)
|
||||||
|
|
||||||
|
self.Create(parent, title=title) # 2nd phase create
|
||||||
|
|
||||||
|
# Create the stock buttons
|
||||||
|
self.CreateButtons(wx.OK|wx.CANCEL)
|
||||||
|
|
||||||
|
# Add some pages
|
||||||
|
notebook = self.GetBookCtrl()
|
||||||
|
notebook.AddPage(wx.Panel(notebook), "Page1")
|
||||||
|
notebook.AddPage(wx.Panel(notebook), "Page2")
|
||||||
|
|
||||||
|
# Do the layout
|
||||||
|
self.LayoutDialog()
|
||||||
|
|
||||||
|
|
||||||
|
dlg = MyPropSheetDlg(self.frame, "Property Sheet Dlg")
|
||||||
|
wx.CallLater(250, dlg.EndModal, wx.ID_OK)
|
||||||
|
dlg.ShowModal()
|
||||||
|
dlg.Destroy()
|
||||||
|
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
Reference in New Issue
Block a user