mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-07-21 20:51:09 +02:00
Add some missing enums and defines for propgrid
This commit is contained in:
@@ -2557,6 +2557,7 @@
|
||||
"PGArrayEditorDialog":"wx.propgrid.",
|
||||
"PGArrayStringEditorDialog":"wx.propgrid.",
|
||||
"PGAttributeStorage":"wx.propgrid.",
|
||||
"PGCachedString":"wx.propgrid.",
|
||||
"PGCell":"wx.propgrid.",
|
||||
"PGCellData":"wx.propgrid.",
|
||||
"PGCellRenderer":"wx.propgrid.",
|
||||
@@ -2589,6 +2590,7 @@
|
||||
"PGPropArgCls":"wx.propgrid.",
|
||||
"PGProperty":"wx.propgrid.",
|
||||
"PGPropertyFlags":"wx.propgrid.",
|
||||
"PGSortCallback":"wx.propgrid.",
|
||||
"PGSpinCtrlEditor":"wx.propgrid.",
|
||||
"PGTextCtrlAndButtonEditor":"wx.propgrid.",
|
||||
"PGTextCtrlEditor":"wx.propgrid.",
|
||||
@@ -2607,15 +2609,25 @@
|
||||
"PG_ACTION_PREV_PROPERTY":"wx.propgrid.",
|
||||
"PG_ALPHABETIC_MODE":"wx.propgrid.",
|
||||
"PG_AUTO_SORT":"wx.propgrid.",
|
||||
"PG_BASE_DEC":"wx.propgrid.",
|
||||
"PG_BASE_HEX":"wx.propgrid.",
|
||||
"PG_BASE_HEXL":"wx.propgrid.",
|
||||
"PG_BASE_OCT":"wx.propgrid.",
|
||||
"PG_BOLD_MODIFIED":"wx.propgrid.",
|
||||
"PG_CAPRECTXMARGIN":"wx.propgrid.",
|
||||
"PG_CAPRECTYMARGIN":"wx.propgrid.",
|
||||
"PG_COLOUR":"wx.propgrid.",
|
||||
"PG_COLOUR_BLACK":"wx.propgrid.",
|
||||
"PG_COLOUR_CUSTOM":"wx.propgrid.",
|
||||
"PG_COLOUR_UNSPECIFIED":"wx.propgrid.",
|
||||
"PG_COLOUR_WEB_BASE":"wx.propgrid.",
|
||||
"PG_COMPOSITE_FRAGMENT":"wx.propgrid.",
|
||||
"PG_CUSTOM_IMAGE_SPACINGY":"wx.propgrid.",
|
||||
"PG_DEFAULT_IMAGE_SIZE":"wx.propgrid.",
|
||||
"PG_DEFAULT_STYLE":"wx.propgrid.",
|
||||
"PG_DESCRIPTION":"wx.propgrid.",
|
||||
"PG_DONT_RECURSE":"wx.propgrid.",
|
||||
"PG_EDITABLE_VALUE":"wx.propgrid.",
|
||||
"PG_EX_AUTO_UNSPECIFIED_VALUES":"wx.propgrid.",
|
||||
"PG_EX_ENABLE_TLP_TRACKING":"wx.propgrid.",
|
||||
"PG_EX_HELP_AS_TOOLTIPS":"wx.propgrid.",
|
||||
@@ -2629,8 +2641,13 @@
|
||||
"PG_EX_TOOLBAR_SEPARATOR":"wx.propgrid.",
|
||||
"PG_EX_WINDOW_STYLES":"wx.propgrid.",
|
||||
"PG_EX_WRITEONLY_BUILTIN_ATTRIBUTES":"wx.propgrid.",
|
||||
"PG_FORCE":"wx.propgrid.",
|
||||
"PG_FULL_VALUE":"wx.propgrid.",
|
||||
"PG_GETPROPERTYVALUES_FLAGS":"wx.propgrid.",
|
||||
"PG_HIDE_CATEGORIES":"wx.propgrid.",
|
||||
"PG_HIDE_MARGIN":"wx.propgrid.",
|
||||
"PG_INC_ATTRIBUTES":"wx.propgrid.",
|
||||
"PG_INVALID_VALUE":"wx.propgrid.",
|
||||
"PG_ITERATE_ALL":"wx.propgrid.",
|
||||
"PG_ITERATE_ALL_PARENTS":"wx.propgrid.",
|
||||
"PG_ITERATE_ALL_PARENTS_RECURSIVELY":"wx.propgrid.",
|
||||
@@ -2645,9 +2662,19 @@
|
||||
"PG_ITERATOR_FLAGS_ALL":"wx.propgrid.",
|
||||
"PG_ITERATOR_MASK_OP_ITEM":"wx.propgrid.",
|
||||
"PG_ITERATOR_MASK_OP_PARENT":"wx.propgrid.",
|
||||
"PG_KEEP_STRUCTURE":"wx.propgrid.",
|
||||
"PG_KEYBOARD_ACTIONS":"wx.propgrid.",
|
||||
"PG_LABEL":"wx.propgrid.",
|
||||
"PG_LABEL_STRING":"wx.propgrid.",
|
||||
"PG_LIMITED_EDITING":"wx.propgrid.",
|
||||
"PG_MISC_ARG_FLAGS":"wx.propgrid.",
|
||||
"PG_NO_INTERNAL_BORDER":"wx.propgrid.",
|
||||
"PG_NULL_BITMAP":"wx.propgrid.",
|
||||
"PG_PREFIX_0x":"wx.propgrid.",
|
||||
"PG_PREFIX_DOLLAR_SIGN":"wx.propgrid.",
|
||||
"PG_PREFIX_NONE":"wx.propgrid.",
|
||||
"PG_PROGRAMMATIC_VALUE":"wx.propgrid.",
|
||||
"PG_PROPERTY_SPECIFIC":"wx.propgrid.",
|
||||
"PG_PROPERTY_VALIDATION_ERROR_MESSAGE":"wx.propgrid.",
|
||||
"PG_PROPERTY_VALIDATION_SATURATE":"wx.propgrid.",
|
||||
"PG_PROPERTY_VALIDATION_WRAP":"wx.propgrid.",
|
||||
@@ -2680,12 +2707,23 @@
|
||||
"PG_PROP_USE_CHECKBOX":"wx.propgrid.",
|
||||
"PG_PROP_USE_DCC":"wx.propgrid.",
|
||||
"PG_PROP_WAS_MODIFIED":"wx.propgrid.",
|
||||
"PG_RECURSE":"wx.propgrid.",
|
||||
"PG_RECURSE_STARTS":"wx.propgrid.",
|
||||
"PG_REPORT_ERROR":"wx.propgrid.",
|
||||
"PG_SETVALUE_FLAGS":"wx.propgrid.",
|
||||
"PG_SETVAL_AGGREGATED":"wx.propgrid.",
|
||||
"PG_SETVAL_BY_USER":"wx.propgrid.",
|
||||
"PG_SETVAL_FROM_PARENT":"wx.propgrid.",
|
||||
"PG_SETVAL_REFRESH_EDITOR":"wx.propgrid.",
|
||||
"PG_SORT_TOP_LEVEL_ONLY":"wx.propgrid.",
|
||||
"PG_SPLITTER_AUTO_CENTER":"wx.propgrid.",
|
||||
"PG_STATIC_LAYOUT":"wx.propgrid.",
|
||||
"PG_STATIC_SPLITTER":"wx.propgrid.",
|
||||
"PG_TOOLBAR":"wx.propgrid.",
|
||||
"PG_TOOLTIPS":"wx.propgrid.",
|
||||
"PG_UNEDITABLE_COMPOSITE_FRAGMENT":"wx.propgrid.",
|
||||
"PG_VALIDATION_FAILURE_BEHAVIOR_FLAGS":"wx.propgrid.",
|
||||
"PG_VALUE_IS_CURRENT":"wx.propgrid.",
|
||||
"PG_VFB_BEEP":"wx.propgrid.",
|
||||
"PG_VFB_DEFAULT":"wx.propgrid.",
|
||||
"PG_VFB_MARK_CELL":"wx.propgrid.",
|
||||
@@ -2825,6 +2863,7 @@
|
||||
"PropertyGridIteratorBase":"wx.propgrid.",
|
||||
"PropertyGridManager":"wx.propgrid.",
|
||||
"PropertyGridManagerNameStr":"wx.propgrid.",
|
||||
"PropertyGridNameStr":"wx.propgrid.",
|
||||
"PropertyGridPage":"wx.propgrid.",
|
||||
"PropertyGridPageState":"wx.propgrid.",
|
||||
"PropertySheetDialog":"wx.adv.",
|
||||
|
@@ -23,7 +23,8 @@ ITEMS = [ ]
|
||||
# The list of other ETG scripts and back-end generator modules that are
|
||||
# included as part of this module. These should all be items that are put in
|
||||
# the wxWidgets "propgrid" library in a multi-lib build.
|
||||
INCLUDES = [ 'propgridproperty',
|
||||
INCLUDES = [ 'propgriddefs',
|
||||
'propgridproperty',
|
||||
'propgrideditors',
|
||||
'propgridpagestate',
|
||||
'propgridiface',
|
||||
@@ -60,6 +61,8 @@ def run():
|
||||
|
||||
module.addHeaderCode('#include <wx/propgrid/propgrid.h>')
|
||||
|
||||
#module.addItem(etgtools.DefineDef(name='wxPG_INVALID_VALUE', value='INT_MAX'))
|
||||
|
||||
module.addInclude(INCLUDES)
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
|
@@ -33,7 +33,6 @@ def run():
|
||||
# Tweak the parsed meta objects in the module object as needed for
|
||||
# customizing the generated code and docstrings.
|
||||
|
||||
|
||||
c = module.find('wxPGValidationInfo')
|
||||
assert isinstance(c, etgtools.ClassDef)
|
||||
|
||||
@@ -42,6 +41,7 @@ def run():
|
||||
assert isinstance(c, etgtools.ClassDef)
|
||||
c.bases.remove('wxScrollHelper')
|
||||
tools.fixWindowClass(c)
|
||||
module.addGlobalStr('wxPropertyGridNameStr', c)
|
||||
|
||||
# TODO: provide a way to use a Python callable as a sort function
|
||||
c.find('GetSortFunction').ignore()
|
||||
|
60
etg/propgriddefs.py
Normal file
60
etg/propgriddefs.py
Normal file
@@ -0,0 +1,60 @@
|
||||
#---------------------------------------------------------------------------
|
||||
# Name: etg/propgriddefs.py
|
||||
# Author: Robin Dunn
|
||||
#
|
||||
# Created: 14-Feb-2017
|
||||
# Copyright: (c) 2017 by Total Control Software
|
||||
# License: wxWindows License
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
import etgtools
|
||||
import etgtools.tweaker_tools as tools
|
||||
|
||||
PACKAGE = "wx"
|
||||
MODULE = "_propgrid"
|
||||
NAME = "propgriddefs" # 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 = [ 'propgriddefs_8h.xml',
|
||||
]
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
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.find('wxPG_LABEL').ignore()
|
||||
module.find('wxPG_LABEL_STRING').ignore()
|
||||
module.find('wxPG_NULL_BITMAP').ignore()
|
||||
module.find('wxPG_COLOUR_BLACK').ignore()
|
||||
module.find('wxPG_COLOUR').ignore()
|
||||
module.find('wxPG_DEFAULT_IMAGE_SIZE').ignore()
|
||||
module.find('wxPGSortCallback').ignore()
|
||||
|
||||
module.addPyCode(
|
||||
code="""\
|
||||
PG_LABEL = "@!"
|
||||
PG_LABEL_STRING = PG_LABEL
|
||||
PG_NULL_BITMAP = wx.NullBitmap
|
||||
PG_COLOUR_BLACK = wx.BLACK
|
||||
PG_DEFAULT_IMAGE_SIZE = wx.Size(-1, -1)
|
||||
""",
|
||||
order=15)
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
tools.doCommonTweaks(module)
|
||||
tools.runGenerators(module)
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
if __name__ == '__main__':
|
||||
run()
|
||||
|
@@ -45,6 +45,10 @@ def run():
|
||||
c = module.find('wxPGCellData')
|
||||
assert isinstance(c, etgtools.ClassDef)
|
||||
c.find('~wxPGCellData').ignore(False)
|
||||
c.bases = ['wxRefCounter']
|
||||
|
||||
c = module.find('wxPGCellRenderer')
|
||||
c.bases = ['wxRefCounter']
|
||||
|
||||
|
||||
c = module.find('wxPGAttributeStorage')
|
||||
@@ -64,13 +68,14 @@ def run():
|
||||
|
||||
c = module.find('wxPGChoicesData')
|
||||
tools.ignoreConstOverloads(c)
|
||||
#c.addDtor()
|
||||
c.bases = ['wxRefCounter']
|
||||
c.find('~wxPGChoicesData').ignore(False)
|
||||
|
||||
|
||||
c = module.find('wxPGChoices')
|
||||
c.find('wxPGChoices').findOverload('wxChar **').ignore()
|
||||
tools.ignoreConstOverloads(c)
|
||||
c.find('operator[]').ignore()
|
||||
|
||||
# Ignore some string constants (#defines) coming from dox, and add them
|
||||
# back in Python code. They are wchar_t* values and this seemed the
|
||||
|
Submodule ext/wxWidgets updated: dc7acca2cd...44d465a26b
51
unittests/test_propgriddefs.py
Normal file
51
unittests/test_propgriddefs.py
Normal file
@@ -0,0 +1,51 @@
|
||||
import unittest
|
||||
from unittests import wtc
|
||||
import wx
|
||||
import wx.propgrid as pg
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class propgriddefs_Tests(wtc.WidgetTestCase):
|
||||
|
||||
def test_propgriddefs1(self):
|
||||
pg.PG_INVALID_VALUE
|
||||
pg.PG_DONT_RECURSE
|
||||
pg.PG_BASE_OCT
|
||||
pg.PG_BASE_DEC
|
||||
pg.PG_BASE_HEX
|
||||
pg.PG_BASE_HEXL
|
||||
pg.PG_PREFIX_NONE
|
||||
pg.PG_PREFIX_0x
|
||||
pg.PG_PREFIX_DOLLAR_SIGN
|
||||
|
||||
pg.PG_KEEP_STRUCTURE
|
||||
pg.PG_RECURSE
|
||||
pg.PG_INC_ATTRIBUTES
|
||||
pg.PG_RECURSE_STARTS
|
||||
pg.PG_FORCE
|
||||
pg.PG_SORT_TOP_LEVEL_ONLY
|
||||
|
||||
pg.PG_FULL_VALUE
|
||||
pg.PG_REPORT_ERROR
|
||||
pg.PG_PROPERTY_SPECIFIC
|
||||
pg.PG_EDITABLE_VALUE
|
||||
pg.PG_COMPOSITE_FRAGMENT
|
||||
pg.PG_UNEDITABLE_COMPOSITE_FRAGMENT
|
||||
pg.PG_VALUE_IS_CURRENT
|
||||
pg.PG_PROGRAMMATIC_VALUE
|
||||
|
||||
pg.PG_SETVAL_REFRESH_EDITOR
|
||||
pg.PG_SETVAL_AGGREGATED
|
||||
pg.PG_SETVAL_FROM_PARENT
|
||||
pg.PG_SETVAL_BY_USER
|
||||
|
||||
pg.PG_LABEL
|
||||
pg.PG_LABEL_STRING
|
||||
pg.PG_NULL_BITMAP
|
||||
pg.PG_COLOUR_BLACK
|
||||
pg.PG_DEFAULT_IMAGE_SIZE
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
Reference in New Issue
Block a user