Preferences for default "sizeritem" parameters for new panels and

controls can be configured ("File">"Preferences...").

Implemented comment object for including simple one-line comments and
comment directives as tree nodes. No validation is performed for a
valid XML string so comments must not contain "-->". Comment directive
is a special comment starting with '%' character, followed by a line
of python code. It is executed using 'exec' when the resource file is
opened. This is useful to import plugin modules containing custom
handlers which are specific to the resource file, hovewer this is of
course a security hole if you use foreign XRC files. A warning is
displayed if the preference option 'ask' is selected (by default).

Added support for custom controls and plugin modules. Refer to this
wxPythonWiki for the details:
        http://wiki.wxpython.org/index.cgi/XRCed#custom

Tool panel sections can be collapsed/expanded by clicking on the
label of a tool group.

Some undo/redo and other fixes.

Fixes for wxMSW (notebook highlighting, control sizes, tree Unselect).

Notebook page highlighting fix. Highlight resizes when the window
is resized. ParamUnit spin button detects event handler re-entry
(wxGTK probably has a bug in wxSpinButton with repeated events).

Fix for dealing with empty 'growable' property, using MiniFrame
for properties panel, the panel is restored together with the
main window.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2007-03-19 17:55:26 +00:00
parent 459fbbc100
commit 30d91f9ebc
11 changed files with 989 additions and 376 deletions

View File

@@ -470,11 +470,10 @@ def getToolGaugeData():
return \
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x18\x00\x00\x00\x0e\x08\x02\
\x00\x00\x00\xba\x9aK)\x00\x00\x00\x03sBIT\x08\x08\x08\xdb\xe1O\xe0\x00\x00\
\x00XIDAT(\x91c\x9c2u\n\x03U\x00U\x0c\xfa\xff\xff?\x0b\x9c\x85)\xcd\xc8\xc8x\
\x00TIDAT(\x91c\x9c2u\n\x03U\x00U\x0c\xfa\xff\xff?\x0b\x9c\x85)\xcd\xc8\xc8x\
\xf5\xdaU"\xcdb\x81\xb3\xde\xbf~O\x89\xa3\x98pIl\xdb\xbd\x8d:\x06\x91\nF\r"\
\x0cX\x909\xa4\xc6\x14\x16\x83\x18\x19\x19)r\x0f\xdc \xe2S0>\x83\xfe\xff\xff\
O\xa1)\x0c\x0c\x0c\x00U\xa6\x18\xb48\xff\xd0\x00\x00\x00\x00\x00IEND\xaeB`\
\x82'
\x0cX\x909\xa4\xc6\x14\x16\x83\x18\x19\x19)r\x0f\xdc \xe2S0>\x83\xb0\xe6\x0f\
R\x01\x00U\xa6\x18\xb4\x82\x95pI\x00\x00\x00\x00IEND\xaeB`\x82'
def getToolGaugeBitmap():
return BitmapFromImage(getToolGaugeImage())
@@ -842,13 +841,13 @@ def getToolRadioButtonData():
return \
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x0b\x00\x00\x00\x0b\x08\x06\
\x00\x00\x00\xa9\xacw&\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\
\x00\x98IDAT\x18\x95m\x8f\xc1\r\xc20\x0cE\x9f\x1d\x06\xe8\x81)\xe8\x06\x91:V\
\xc5\x08P\xb2\x15\xa8\xdd\xa0L\xd1C\x06\x00\xc2\xa1\xa4J\x83\xbfd\xc5N\xde\
\xb7~\x10u\xd4\x15\x86\x90\xac{\xa5\xd2\xedrM\xe5YJ-\xb0?\xf7X\x06\xb5\xc0\
\xf99\x9b\x06\xb5@\xc04H\x18\xc2\x1fX\xaa=\xb5\x84!\x00 \xa2\x8e\xcf\xfb\x95\
\x00\xa6\xc7Dsl60.\x11\xdf\xf95\x82;\x88\xe6\x06\xc0w\x9e\xb8D\x13\\W\xab\
\xdb*\xfd4\xde\xc7\xdc\xa6\xf2]D\xdd.c\x8e\xb4\xdb\x98\xe7\xfaC\x19\xa8A\x80\
/\x17\xa5W:\x12\xac\xa3\xbe\x00\x00\x00\x00IEND\xaeB`\x82'
\x00\x96IDAT\x18\x95m\x90\xc1\r\xc20\x10\x04\xc7g\n\xc8\x83*H\x07\x96RVD\t`\
\xdc\x15(\xe9 T\x91\x87\x0b\x00\xcc#1\xb2\xcd\xadd\xf9t\x9a=\xad\x16#\x96\
\xf6\x05\x1f\x92\xb6\x17\x1a\xdd.\xd7T\xfe\xa5D\x03\xc7\xf3\x88f\x10\r\\\x9e\
\x8bj\x10\r\x04T\x83\t>\xfc\x81\xa5\xfaSO\xf0\x01\x00c\xc4\xf2y\xbf\x12\xc0\
\xfc\x98\xe9\x8e\xdd\x0f\x8ck\xc4\rn\x8b`\x0fF\xf2\x00\xe0\x06G\\\xa3\nn\xa7\
\x8b\x1e\xd3\xae\xe9>\xe5\xb1\xee\xdb\x88\xad2\xe6H\xd5E\xad\xe7\x12hA\x80/\
\x17\xa5W:+\xbbb\xd2\x00\x00\x00\x00IEND\xaeB`\x82'
def getToolRadioButtonBitmap():
return BitmapFromImage(getToolRadioButtonImage())
@@ -865,13 +864,13 @@ def getToolRadioButtonIcon():
#----------------------------------------------------------------------
def getToolRootData():
return \
"\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x0e\x08\x06\
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x0e\x08\x06\
\x00\x00\x00&/\x9c\x8a\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\
\x00cIDAT(\x91\xed\x90\xc1\x0e\x800\x08C[\xf0\x97T\xfe\xff\xa6~\x93n\xb7e.`\
\xa6\xbb\xda\x84\x03\xa4m\xf2 E1\xa2\xc9;\xa6\xebL\xf5NQ\x86\x05\xeb2\xdf\
\xcc\xdb~\x84fW\x14\x85\x99%\x8a\xe2\xcb\xb8\x08\x1eF\x84T\nj\x947\x18\xa5\
\xa0\r==\xce-h\xf5#\xf4#\x90\xa2\xbd^W2\x94\x06\x90\x01\x0f\xb3'\x06\xe8\x11\
R\xf1\x00\x00\x00\x00IEND\xaeB`\x82"
\x00aIDAT(\x91\xed\x93\xc1\n\x80@\x08Dg\xb4_\xaa\xfc\xff[\xf5M\xb5\xdd\x96m\
\xd1\xa8\xbc6\xe0A\x19\x07\x9e )\x8a\x8c\x06oX\x8e\xbd\xb4=E\x19\x06\xcc\xd3\
x1/\xeb\x16\x9a]Q\x14fV(\x8a/\xe5"x\x18\x11R\rhQ\xde`\xd4\x80~\xe9\xeepn@\
\xaf\x1f\xe19\x02\xb3\xbf \xa9m\x00\'\x0f\xb3\'\x06(\x95\x90F\x00\x00\x00\
\x00IEND\xaeB`\x82'
def getToolRootBitmap():
return BitmapFromImage(getToolRootImage())
@@ -917,8 +916,8 @@ def getToolSeparatorData():
return \
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x0e\x00\x00\x00\x02\x08\x02\
\x00\x00\x00\xe7\xe8z\xfd\x00\x00\x00\x03sBIT\x08\x08\x08\xdb\xe1O\xe0\x00\
\x00\x00\x17IDAT\x18\x95c\x9c2u\n\x03\x11 ;+\x9b\x05B\x11\xa3\x1a\x00\xfb\
\x1c\x04C\xb1\x8cE\xa0\x00\x00\x00\x00IEND\xaeB`\x82'
\x00\x00\x17IDAT\x08\x99c\x9c2u\n\x03\x11 ;+\x9b\x05B\x11\xa3\x1a\x00\xfb\
\x1c\x04CU\x1cv\xec\x00\x00\x00\x00IEND\xaeB`\x82'
def getToolSeparatorBitmap():
return BitmapFromImage(getToolSeparatorImage())
@@ -1052,28 +1051,28 @@ def getToolSplitterWindowIcon():
#----------------------------------------------------------------------
def getToolStaticBitmapData():
return \
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x0e\x00\x00\x00\x11\x08\x06\
"\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x0e\x00\x00\x00\x11\x08\x06\
\x00\x00\x00\xed\xc8\x9d\x9f\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\
\x00\x00\x01\xf7IDAT(\x91\x85\x921h\x13Q\x18\xc7\x7fw\xf7\x86\x17p\xb8\x83\
\x0c\x97-\x05\x1dts\xb3N\x9et\x90\xe0`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\x8ah\xac\x87'\xc7Q\
\x7fY\xc7$\x8ca\xa5\x89M\x17\x88 1\xf4\xfb=\xba\x07Cj\x8fV3q\xb2\x1e\xb5\xd6\
hc\x80\x02\xf1\xa8\x0bI\x841Cz\xfd>f\x14S{\xb1G\xb8U\xcf\x8bc;\xca\xba}\xe7\
\x96\xec\xb4B\xa6\xce\xb4X}\x10\x10E\x11\xdd\x83\x1e\xf7\x1f\x87x\xc5s\x84[\
\xcd\xdc\x1c\xb1l\x07\xcbv@!\xb37*\xb2\xfbeW\xda\x1f?H\xe5j \xd5\xc5\x9b\xb2\
\xffu_RKc-\xdb\xf9\x03\xce^\xab\x88\x88H\xbb\xd3\x96`&\x90\xea\xbd\xaa\x0c\
\x06\x83\x13@\x0e\xf4}_6\xc3M\xa9\\\td\xf5\xe9\x13YX\\\x10\xb7\xe8N\x04r \
\xc1\xcc\xb4l\xbc\xdd\x18W\xbc\x14H\xf9t\xf9\xff`\n\x97\xcb\xbeL_8/\xd5\xa5\
\xea?!\xcbv\xc6\x8f\x1c@\x8e\x0e\xc5\xf7]\x8c1|\xff\xf1+\xf7\xf7&\xd9o(\xba\
\xfe\xd4S\x004\x8f\x00\x00\x00\x00IEND\xaeB`\x82"
def getToolStaticBitmapBitmap():
return BitmapFromImage(getToolStaticBitmapImage())
@@ -1140,8 +1139,8 @@ def getToolStaticLineData():
return \
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x14\x00\x00\x00\x02\x08\x02\
\x00\x00\x00\xd7dk\xdc\x00\x00\x00\x03sBIT\x08\x08\x08\xdb\xe1O\xe0\x00\x00\
\x00\x17IDAT\x18\x95c\x9c2u\n\x03Y ;+\x9b\x05B\x91\xa7\x1f\x00gO\x04C\xda+\
\x0c\xd5\x00\x00\x00\x00IEND\xaeB`\x82'
\x00\x17IDAT\x08\x99c\x9c2u\n\x03Y ;+\x9b\x05B\x91\xa7\x1f\x00gO\x04C>\xbb?\
\x99\x00\x00\x00\x00IEND\xaeB`\x82'
def getToolStaticLineBitmap():
return BitmapFromImage(getToolStaticLineImage())
@@ -1204,9 +1203,9 @@ def getToolToolData():
return \
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\t\x00\x00\x00\t\x08\x02\x00\
\x00\x00o\xf3\x91G\x00\x00\x00\x03sBIT\x08\x08\x08\xdb\xe1O\xe0\x00\x00\x00>\
IDAT\x18\x95c\xfc\xf1\xe7\x07\x036\xc0\xc1\xc2\xc1\xc2\xc0\xc0p\xe3\xc6\r4\
IDAT\x08\x99c\xfc\xf1\xe7\x07\x036\xc0\xc1\xc2\xc1\xc2\xc0\xc0p\xe3\xc6\r4\
\x89\x03\x07\x0e0000a\xd5\x04\x01,hj\x19\x18\x18\x1c\x1c\x1c \x0c|\xfa\x883\
\x13n\x14\x8a\x1c\xdc&\x12\x00\x00b\xc7\r\xe0\xb7\\uG\x00\x00\x00\x00IEND\
\x13n\x14\x8a\x1c\xdc&\x12\x00\x00b\xc7\r\xe0y\xf1\x04O\x00\x00\x00\x00IEND\
\xaeB`\x82'
def getToolToolBitmap():
@@ -1248,13 +1247,13 @@ def getToolToolBarIcon():
#----------------------------------------------------------------------
def getToolTreeCtrlData():
return \
"\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x0e\x08\x06\
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x0e\x08\x06\
\x00\x00\x00&/\x9c\x8a\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\
\x00cIDAT(\x91\xed\x90\xc1\x0e\x800\x08C[\xf0\x97T\xfe\xff\xa6~\x93n\xb7e.`\
\xa6\xbb\xda\x84\x03\xa4m\xf2 E1\xa2\xc9;\xa6\xebL\xf5NQ\x86\x05\xeb2\xdf\
\xcc\xdb~\x84fW\x14\x85\x99%\x8a\xe2\xcb\xb8\x08\x1eF\x84T\nj\x947\x18\xa5\
\xa0\r==\xce-h\xf5#\xf4#\x90\xa2\xbd^W2\x94\x06\x90\x01\x0f\xb3'\x06\xe8\x11\
R\xf1\x00\x00\x00\x00IEND\xaeB`\x82"
\x00aIDAT(\x91\xed\x93\xc1\n\x80@\x08Dg\xb4_\xaa\xfc\xff[\xf5M\xb5\xdd\x96m\
\xd1\xa8\xbc6\xe0A\x19\x07\x9e )\x8a\x8c\x06oX\x8e\xbd\xb4=E\x19\x06\xcc\xd3\
x1/\xeb\x16\x9a]Q\x14fV(\x8a/\xe5"x\x18\x11R\rhQ\xde`\xd4\x80~\xe9\xeepn@\
\xaf\x1f\xe19\x02\xb3\xbf \xa9m\x00\'\x0f\xb3\'\x06(\x95\x90F\x00\x00\x00\
\x00IEND\xaeB`\x82'
def getToolTreeCtrlBitmap():
return BitmapFromImage(getToolTreeCtrlImage())
@@ -1290,6 +1289,27 @@ def getToolUnknownIcon():
icon.CopyFromBitmap(getToolUnknownBitmap())
return icon
#----------------------------------------------------------------------
def getTreeCommentData():
return \
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x0e\x08\x06\
\x00\x00\x00&/\x9c\x8a\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\
\x00AIDAT(\x91cddbf\xa0\x040Q\xa4\x9bf\x06\xfc\xff\xf7\xf7\xff\xff\x7f\x7f\
\xff\xa3\xb3\xe9\xe7\x02R\x00#z,\xe0s.#\x133#A\x17 +\xc2\xc5\xc6k\x00\xa9`\
\x18x\x81\xfaa@*\x00\x00\xb0\xac\x18?Q\xffAR\x00\x00\x00\x00IEND\xaeB`\x82'
def getTreeCommentBitmap():
return BitmapFromImage(getTreeCommentImage())
def getTreeCommentImage():
stream = cStringIO.StringIO(getTreeCommentData())
return ImageFromStream(stream)
def getTreeCommentIcon():
icon = EmptyIcon()
icon.CopyFromBitmap(getTreeCommentBitmap())
return icon
#----------------------------------------------------------------------
def getTreeDefaultData():
return \
@@ -1449,13 +1469,13 @@ def getTreePanelIcon():
#----------------------------------------------------------------------
def getTreeRootData():
return \
"\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x0e\x08\x06\
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x0e\x08\x06\
\x00\x00\x00&/\x9c\x8a\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\
\x00cIDAT(\x91\xed\x90\xc1\x0e\x800\x08C[\xf0\x97T\xfe\xff\xa6~\x93n\xb7e.`\
\xa6\xbb\xda\x84\x03\xa4m\xf2 E1\xa2\xc9;\xa6\xebL\xf5NQ\x86\x05\xeb2\xdf\
\xcc\xdb~\x84fW\x14\x85\x99%\x8a\xe2\xcb\xb8\x08\x1eF\x84T\nj\x947\x18\xa5\
\xa0\r==\xce-h\xf5#\xf4#\x90\xa2\xbd^W2\x94\x06\x90\x01\x0f\xb3'\x06\xe8\x11\
R\xf1\x00\x00\x00\x00IEND\xaeB`\x82"
\x00aIDAT(\x91\xed\x93\xc1\n\x80@\x08Dg\xb4_\xaa\xfc\xff[\xf5M\xb5\xdd\x96m\
\xd1\xa8\xbc6\xe0A\x19\x07\x9e )\x8a\x8c\x06oX\x8e\xbd\xb4=E\x19\x06\xcc\xd3\
x1/\xeb\x16\x9a]Q\x14fV(\x8a/\xe5"x\x18\x11R\rhQ\xde`\xd4\x80~\xe9\xeepn@\
\xaf\x1f\xe19\x02\xb3\xbf \xa9m\x00\'\x0f\xb3\'\x06(\x95\x90F\x00\x00\x00\
\x00IEND\xaeB`\x82'
def getTreeRootBitmap():
return BitmapFromImage(getTreeRootImage())