Version 0.1.5-1

Added wxWizard, wxWizardPageSimple (only from pull-down menu).

Hide command for test window.

Replacing classes works better.

Added Locate tool.

params.py, xxx.py: some window styles were fixed
(to correspond more to the docs)

xrced.py: subclass bug fixed


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Roman Rolinsky 2005-04-26 18:49:44 +00:00
parent fe2e64f8f0
commit 64bce500c0
10 changed files with 857 additions and 407 deletions

View File

@ -1,3 +1,14 @@
0.1.5-1
-------
Added wxWizard, wxWizardPageSimple (only from pull-down menu).
Hide command for test window.
Replacing classes works better.
Added Locate tool.
0.1.4-1
-------

View File

@ -6,12 +6,16 @@
from wxPython.wx import *
from wxPython.xrc import *
try:
from wxPython.wizard import *
except:
pass
import sys
# Global constants
progname = 'XRCed'
version = '0.1.4-1'
version = '0.1.5-1'
# Can be changed to set other default encoding different
defaultEncoding = sys.getdefaultencoding()

File diff suppressed because it is too large Load Diff

View File

@ -11,19 +11,24 @@ from types import *
from wxPython.xrc import *
genericStyles = [
'wxCLIP_CHILDREN',
'wxSIMPLE_BORDER',
'wxSUNKEN_BORDER',
'wxDOUBLE_BORDER',
'wxRAISED_BORDER',
'wxSTATIC_BORDER',
'wxNO_BORDER',
'wxTRANSPARENT_WINDOW',
'wxSIMPLE_BORDER', 'wxDOUBLE_BORDER', 'wxSUNKEN_BORDER',
'wxRAISED_BORDER', 'wxSTATIC_BORDER', 'wxNO_BORDER',
'wxTRANSPARENT_WINDOW', 'wxTAB_TRAVERSAL',
'wxWANTS_CHARS',
'wxNO_FULL_REPAINT_ON_RESIZE',
'wxFULL_REPAINT_ON_RESIZE',
'wxVSCROLL', 'wxHSCROLL', 'wxALWAYS_SHOW_SB',
'wxCLIP_CHILDREN',
'wxFULL_REPAINT_ON_RESIZE'
]
genericExStyles = [
'wxWS_EX_VALIDATE_RECURSIVELY',
'wxWS_EX_BLOCK_EVENTS',
]
'wxWS_EX_TRANSIENT',
'wxFRAME_EX_CONTEXTHELP',
'wxWS_EX_PROCESS_IDLE',
'wxWS_EX_PROCESS_UI_UPDATES'
]
buttonSize = (35,-1) # in dialog units, transformed to pixels in panel ctor
@ -127,7 +132,7 @@ class ParamNonGenericStyle(ParamBinaryOr):
class ParamExStyle(ParamBinaryOr):
def __init__(self, parent, name):
if g.currentXXX:
self.values = g.currentXXX.exStyles # constant at the moment
self.values = g.currentXXX.exStyles + genericExStyles
else:
self.values = []
ParamBinaryOr.__init__(self, parent, name)

Binary file not shown.

After

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

View File

@ -81,13 +81,19 @@ class ID_NEW:
GENERIC_DIR_CTRL = wxNewId()
SPIN_CTRL = wxNewId()
UNKNOWN = wxNewId()
WIZARD = wxNewId()
WIZARD_PAGE = wxNewId()
WIZARD_PAGE_SIMPLE = wxNewId()
STATUS_BAR = wxNewId()
BOX_SIZER = wxNewId()
STATIC_BOX_SIZER = wxNewId()
GRID_SIZER = wxNewId()
FLEX_GRID_SIZER = wxNewId()
GRID_BAG_SIZER = wxNewId()
STD_DIALOG_BUTTON_SIZER = wxNewId()
SPACER = wxNewId()
TOOL_BAR = wxNewId()
TOOL = wxNewId()
MENU = wxNewId()
@ -117,6 +123,9 @@ class PullDownMenu:
ID_NEW.PANEL: 'wxPanel',
ID_NEW.DIALOG: 'wxDialog',
ID_NEW.FRAME: 'wxFrame',
ID_NEW.WIZARD: 'wxWizard',
ID_NEW.WIZARD_PAGE: 'wxWizardPage',
ID_NEW.WIZARD_PAGE_SIMPLE: 'wxWizardPageSimple',
ID_NEW.TOOL_BAR: 'wxToolBar',
ID_NEW.TOOL: 'tool',
ID_NEW.MENU_BAR: 'wxMenuBar',
@ -161,6 +170,7 @@ class PullDownMenu:
ID_NEW.GRID_SIZER: 'wxGridSizer',
ID_NEW.FLEX_GRID_SIZER: 'wxFlexGridSizer',
ID_NEW.GRID_BAG_SIZER: 'wxGridBagSizer',
ID_NEW.STD_DIALOG_BUTTON_SIZER: 'wxStdDialogButtonSizer',
ID_NEW.SPACER: 'spacer',
ID_NEW.UNKNOWN: 'unknown',
}
@ -168,6 +178,7 @@ class PullDownMenu:
(ID_NEW.PANEL, 'Panel', 'Create panel'),
(ID_NEW.DIALOG, 'Dialog', 'Create dialog'),
(ID_NEW.FRAME, 'Frame', 'Create frame'),
(ID_NEW.WIZARD, 'Wizard', 'Create wizard'),
None,
(ID_NEW.TOOL_BAR, 'ToolBar', 'Create toolbar'),
(ID_NEW.MENU_BAR, 'MenuBar', 'Create menubar'),
@ -178,6 +189,8 @@ class PullDownMenu:
(ID_NEW.NOTEBOOK, 'Notebook', 'Create notebook control'),
(ID_NEW.SPLITTER_WINDOW, 'SplitterWindow', 'Create splitter window'),
(ID_NEW.TOOL_BAR, 'ToolBar', 'Create toolbar'),
# (ID_NEW.WIZARD_PAGE, 'WizardPage', 'Create wizard page'),
(ID_NEW.WIZARD_PAGE_SIMPLE, 'WizardPageSimple', 'Create simple wizard page'),
]
self.sizers = [
(ID_NEW.BOX_SIZER, 'BoxSizer', 'Create box sizer'),
@ -188,6 +201,8 @@ class PullDownMenu:
'Create flexgrid sizer'),
(ID_NEW.GRID_BAG_SIZER, 'GridBagSizer',
'Create gridbag sizer'),
# (ID_NEW.STD_DIALOG_BUTTON_SIZER, 'StdDialogButtonSizer',
# 'Create standard button sizer'),
(ID_NEW.SPACER, 'Spacer', 'Create spacer'),
]
self.controls = [
@ -229,6 +244,8 @@ class PullDownMenu:
(ID_NEW.NOTEBOOK, 'Notebook', 'Create notebook control'),
(ID_NEW.SPLITTER_WINDOW, 'SplitterWindow', 'Create splitter window'),
(ID_NEW.TOOL_BAR, 'ToolBar', 'Create toolbar'),
# (ID_NEW.WIZARD_PAGE, 'Wizard Page', 'Create wizard page'),
(ID_NEW.WIZARD_PAGE_SIMPLE, 'WizardPageSimple', 'Create simple wizard page'),
],
['sizer', 'Sizers',
(ID_NEW.BOX_SIZER, 'BoxSizer', 'Create box sizer'),
@ -240,6 +257,8 @@ class PullDownMenu:
(ID_NEW.GRID_BAG_SIZER, 'GridBagSizer',
'Create gridbag sizer'),
(ID_NEW.SPACER, 'Spacer', 'Create spacer'),
(ID_NEW.STD_DIALOG_BUTTON_SIZER, 'StdDialogButtonSizer',
'Create standard button sizer'),
]
]
self.menuControls = [
@ -636,7 +655,8 @@ class XML_Tree(wxTreeCtrl):
self.Apply(xxx, item) # apply changes
treeObj = xxx.treeObject()
if treeObj.className not in ['wxFrame', 'wxPanel', 'wxDialog',
'wxMenuBar', 'wxToolBar']:
'wxMenuBar', 'wxToolBar', 'wxWizard',
'wxWizardPageSimple']:
wxLogMessage('No view for this element (yet)')
return
# Show item in bold
@ -724,6 +744,10 @@ class XML_Tree(wxTreeCtrl):
else:
name = xxx.name
elem.setAttribute('name', STD_NAME)
# Replace wizard page class temporarily
if xxx.__class__ in [xxxWizardPage, xxxWizardPageSimple]:
oldCl = elem.getAttribute('class')
elem.setAttribute('class', 'wxPanel')
parent = elem.parentNode
next = elem.nextSibling
parent.replaceChild(self.dummyNode, elem)
@ -739,6 +763,8 @@ class XML_Tree(wxTreeCtrl):
elem.removeAttribute('name')
else:
elem.setAttribute('name', xxx.name)
if xxx.__class__ in [xxxWizardPage, xxxWizardPageSimple]:
elem.setAttribute('class', oldCl)
memFile.close() # write to wxMemoryFS
xmlFlags = wxXRC_NO_SUBCLASSING
# Use translations if encoding is not specified
@ -783,6 +809,32 @@ class XML_Tree(wxTreeCtrl):
# Dialog's default code does not produce EVT_CLOSE
EVT_BUTTON(testWin, wxID_OK, self.OnCloseTestWin)
EVT_BUTTON(testWin, wxID_CANCEL, self.OnCloseTestWin)
elif xxx.__class__ == xxxWizard:
wiz = wxPreWizard()
res.LoadOnObject(wiz, None, STD_NAME, 'wxWizard')
# Find first page (don't know better way)
firstPage = None
for w in wiz.GetChildren():
if isinstance(w, wxWizardPage):
firstPage = w
break
if not firstPage:
wxLogError('Wizard is empty')
else:
# Wizard should be modal
self.SetItemBold(item)
wiz.RunWizard(w)
self.SetItemBold(item, False)
wiz.Destroy()
elif xxx.__class__ in [xxxWizardPage, xxxWizardPageSimple]:
# Create new frame
if not testWin:
testWin = g.testWin = wxFrame(g.frame, -1, 'Wizard page: ' + name,
pos=pos, name=STD_NAME)
testWin.panel = wxPrePanel()
res.LoadOnObject(testWin.panel, testWin, STD_NAME, 'wxPanel')
testWin.SetClientSize(testWin.GetBestSize())
testWin.Show(True)
elif xxx.__class__ == xxxMenuBar:
testWin = g.testWin = wxFrame(g.frame, -1, 'MenuBar: ' + name,
pos=pos, name=STD_NAME)
@ -801,6 +853,7 @@ class XML_Tree(wxTreeCtrl):
testWin.toolBar = res.LoadToolBar(testWin, STD_NAME)
testWin.SetToolBar(testWin.toolBar)
testWin.Show(True)
if testWin:
testWin.item = item
EVT_CLOSE(testWin, self.OnCloseTestWin)
testWin.highLight = None
@ -818,12 +871,17 @@ class XML_Tree(wxTreeCtrl):
wxMemoryFSHandler_RemoveFile('xxx.xrc')
wxEndBusyCursor()
def OnCloseTestWin(self, evt):
def CloseTestWindow(self):
if not g.testWin: return
self.SetItemBold(g.testWin.item, False)
g.frame.tb.ToggleTool(g.frame.ID_LOCATE_TOOL, False)
g.testWinPos = g.testWin.GetPosition()
g.testWin.Destroy()
g.testWin = None
def OnCloseTestWin(self, evt):
self.CloseTestWindow()
# Return item index in parent
def ItemIndex(self, item):
n = 0 # index of sibling

View File

@ -54,7 +54,8 @@ Consult README file for the details.</HTML>
"""
defaultIDs = {xxxPanel:'PANEL', xxxDialog:'DIALOG', xxxFrame:'FRAME',
xxxMenuBar:'MENUBAR', xxxMenu:'MENU', xxxToolBar:'TOOLBAR'}
xxxMenuBar:'MENUBAR', xxxMenu:'MENU', xxxToolBar:'TOOLBAR',
xxxWizard:'WIZARD'}
################################################################################
@ -97,6 +98,14 @@ class Frame(wxFrame):
# Idle flag
self.inIdle = False
# Load our own resources
self.res = wxXmlResource('')
# !!! Blocking of assert failure occuring in older unicode builds
try:
self.res.Load(os.path.join(basePath, 'xrced.xrc'))
except wx._core.PyAssertionError:
print 'PyAssertionError was ignored'
# Make menus
menuBar = wxMenuBar()
@ -124,8 +133,9 @@ class Frame(wxFrame):
menu.Append(wxID_PASTE, '&Paste\tCtrl-V', 'Paste from the clipboard')
self.ID_DELETE = wxNewId()
menu.Append(self.ID_DELETE, '&Delete\tCtrl-D', 'Delete object')
# menu.AppendSeparator()
menu.AppendSeparator()
self.ID_LOCATE = wxNewId()
self.ID_LOCATE_TOOL = wxNewId()
menu.Append(self.ID_LOCATE, '&Locate\tCtrl-L', 'Locate control in test window and select it')
menuBar.Append(menu, '&Edit')
@ -146,6 +156,8 @@ class Frame(wxFrame):
menu.Append(self.ID_AUTO_REFRESH, '&Auto-refresh\tCtrl-A',
'Toggle auto-refresh mode', True)
menu.Check(self.ID_AUTO_REFRESH, conf.autoRefresh)
self.ID_TEST_HIDE = wxNewId()
menu.Append(self.ID_TEST_HIDE, '&Hide\tCtrl-H', 'Close test window')
menuBar.Append(menu, '&View')
menu = wxMenu()
@ -175,6 +187,10 @@ class Frame(wxFrame):
tb.AddSimpleTool(wxID_COPY, images.getCopyBitmap(), 'Copy', 'Copy')
tb.AddSimpleTool(wxID_PASTE, images.getPasteBitmap(), 'Paste', 'Paste')
tb.AddControl(wxStaticLine(tb, -1, size=(-1,23), style=wxLI_VERTICAL))
tb.AddCheckTool(self.ID_LOCATE_TOOL,
images.getLocateBitmap(), images.getLocateArmedBitmap(),
'Locate', 'Locate control in test window and select it')
tb.AddControl(wxStaticLine(tb, -1, size=(-1,23), style=wxLI_VERTICAL))
tb.AddSimpleTool(self.ID_TEST, images.getTestBitmap(), 'Test', 'Test window')
tb.AddSimpleTool(self.ID_REFRESH, images.getRefreshBitmap(),
'Refresh', 'Refresh view')
@ -184,6 +200,7 @@ class Frame(wxFrame):
tb.AddSeparator() # otherwise auto-refresh sticks in status line
tb.ToggleTool(self.ID_AUTO_REFRESH, conf.autoRefresh)
tb.Realize()
self.tb = tb
self.minWidth = tb.GetSize()[0] # minimal width is the size of toolbar
@ -201,12 +218,14 @@ class Frame(wxFrame):
EVT_MENU(self, wxID_PASTE, self.OnPaste)
EVT_MENU(self, self.ID_DELETE, self.OnCutDelete)
EVT_MENU(self, self.ID_LOCATE, self.OnLocate)
EVT_MENU(self, self.ID_LOCATE_TOOL, self.OnLocate)
# View
EVT_MENU(self, self.ID_EMBED_PANEL, self.OnEmbedPanel)
EVT_MENU(self, self.ID_SHOW_TOOLS, self.OnShowTools)
EVT_MENU(self, self.ID_TEST, self.OnTest)
EVT_MENU(self, self.ID_REFRESH, self.OnRefresh)
EVT_MENU(self, self.ID_AUTO_REFRESH, self.OnAutoRefresh)
EVT_MENU(self, self.ID_TEST_HIDE, self.OnTestHide)
# Help
EVT_MENU(self, wxID_ABOUT, self.OnAbout)
EVT_MENU(self, self.ID_README, self.OnReadme)
@ -215,6 +234,8 @@ class Frame(wxFrame):
EVT_UPDATE_UI(self, wxID_CUT, self.OnUpdateUI)
EVT_UPDATE_UI(self, wxID_COPY, self.OnUpdateUI)
EVT_UPDATE_UI(self, wxID_PASTE, self.OnUpdateUI)
EVT_UPDATE_UI(self, self.ID_LOCATE, self.OnUpdateUI)
EVT_UPDATE_UI(self, self.ID_LOCATE_TOOL, self.OnUpdateUI)
EVT_UPDATE_UI(self, wxID_UNDO, self.OnUpdateUI)
EVT_UPDATE_UI(self, wxID_REDO, self.OnUpdateUI)
EVT_UPDATE_UI(self, self.ID_DELETE, self.OnUpdateUI)
@ -407,7 +428,7 @@ class Frame(wxFrame):
error = False
# Top-level
x = xxx.treeObject()
if x.__class__ in [xxxDialog, xxxFrame, xxxMenuBar]:
if x.__class__ in [xxxDialog, xxxFrame, xxxMenuBar, xxxWizard]:
# Top-level classes
if parent.__class__ != xxxMainNode: error = True
elif x.__class__ == xxxToolBar:
@ -581,6 +602,9 @@ class Frame(wxFrame):
if not tree.selection: return # key pressed event
tree.ShowTestWindow(tree.selection)
def OnTestHide(self, evt):
tree.CloseTestWindow()
# Find object by relative position
def FindObject(self, item, obj):
# We simply perform depth-first traversal, sinse it's too much
@ -603,6 +627,11 @@ class Frame(wxFrame):
item = self.FindObject(g.testWin.item, evt.GetEventObject())
if item:
tree.SelectItem(item)
self.tb.ToggleTool(self.ID_LOCATE_TOOL, False)
if item:
self.SetStatusText('Selected %s' % tree.GetItemText(item))
else:
self.SetStatusText('Locate failed!')
def SetHandler(self, w, h=None):
if h:
@ -616,8 +645,16 @@ class Frame(wxFrame):
def OnLocate(self, evt):
if g.testWin:
if evt.GetId() == self.ID_LOCATE or \
evt.GetId() == self.ID_LOCATE_TOOL and evt.IsChecked():
self.SetHandler(g.testWin, g.testWin)
g.testWin.Connect(wxID_ANY, wxID_ANY, wxEVT_LEFT_DOWN, self.OnTestWinLeftDown)
if evt.GetId() == self.ID_LOCATE:
self.tb.ToggleTool(self.ID_LOCATE_TOOL, True)
elif evt.GetId() == self.ID_LOCATE_TOOL and not evt.IsChecked():
self.SetHandler(g.testWin, None)
g.testWin.Disconnect(wxID_ANY, wxID_ANY, wxEVT_LEFT_DOWN)
self.SetStatusText('Click somewhere in your test window now')
def OnRefresh(self, evt):
# If modified, apply first
@ -744,6 +781,7 @@ Homepage: http://xrced.sourceforge.net\
nodes = elem.childNodes[:]
tags = []
for node in nodes:
if node.nodeType != minidom.Node.ELEMENT_NODE: continue
remove = False
tag = node.tagName
if tag == 'object':
@ -766,6 +804,8 @@ Homepage: http://xrced.sourceforge.net\
dummy.unlink()
# Change class name
elem.setAttribute('class', className)
if elem.hasAttribute('subclass'):
elem.removeAttribute('subclass') # clear subclassing
# Re-create xxx element
xxx = MakeXXXFromDOM(parentXXX, elem)
# Update parent in child objects
@ -835,6 +875,8 @@ Homepage: http://xrced.sourceforge.net\
evt.Enable((self.clipboard and tree.selection) != None)
elif evt.GetId() == self.ID_TEST:
evt.Enable(tree.selection is not None and tree.selection != tree.root)
elif evt.GetId() in [self.ID_LOCATE, self.ID_LOCATE_TOOL]:
evt.Enable(g.testWin is not None)
elif evt.GetId() == wxID_UNDO: evt.Enable(undoMan.CanUndo())
elif evt.GetId() == wxID_REDO: evt.Enable(undoMan.CanRedo())
@ -894,7 +936,8 @@ Homepage: http://xrced.sourceforge.net\
# Numbers for new controls
self.maxIDs = {}
self.maxIDs[xxxPanel] = self.maxIDs[xxxDialog] = self.maxIDs[xxxFrame] = \
self.maxIDs[xxxMenuBar] = self.maxIDs[xxxMenu] = self.maxIDs[xxxToolBar] = 0
self.maxIDs[xxxMenuBar] = self.maxIDs[xxxMenu] = self.maxIDs[xxxToolBar] = \
self.maxIDs[xxxWizard] = 0
def Open(self, path):
if not os.path.exists(path):
@ -1040,13 +1083,6 @@ class App(wxApp):
# Create main frame
frame = Frame(pos, size)
frame.Show(True)
# Load resources from XRC file (!!! should be transformed to .py later?)
frame.res = wxXmlResource('')
# !!! Temporary blocking of assert failure occuring in unicode build
try:
frame.res.Load(os.path.join(basePath, 'xrced.xrc'))
except wx._core.PyAssertionError:
pass
# Load file after showing
if args:

View File

@ -1,4 +1,4 @@
<?xml version="1.0" ?>
<?xml version="1.0" encoding="ascii"?>
<resource>
<object class="wxDialog" name="DIALOG_TEXT">
<title>Text Dialog</title>
@ -10,19 +10,35 @@
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<object class="wxTextCtrl" name="TEXT">
<size>250,100</size>
<style>wxTE_MULTILINE</style>
</object>
<option>1</option>
<flag>wxALL|wxEXPAND</flag>
<border>5</border>
</object>
</object>
<option>1</option>
<flag>wxEXPAND</flag>
</object>
<object class="sizeritem">
<object class="wxStaticLine"/>
<flag>wxEXPAND</flag>
</object>
<object class="sizeritem">
@ -30,19 +46,33 @@
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<object class="wxButton" name="wxID_OK">
<label>OK</label>
<default>1</default>
</object>
<flag>wxRIGHT</flag>
<border>10</border>
</object>
<object class="sizeritem">
<object class="wxButton" name="wxID_CANCEL">
<label>Cancel</label>
</object>
</object>
</object>
<flag>wxALL|wxALIGN_CENTRE_HORIZONTAL</flag>
<border>10</border>
</object>
</object>
@ -59,10 +89,18 @@
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<object class="wxListBox" name="LIST">
<content/>
</object>
<option>1</option>
<flag>wxTOP|wxBOTTOM|wxLEFT|wxEXPAND</flag>
<border>5</border>
</object>
<object class="sizeritem">
@ -70,44 +108,78 @@
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<object class="wxButton" name="BUTTON_UP">
<label>Move Up</label>
</object>
<flag>wxBOTTOM|wxEXPAND</flag>
<border>5</border>
</object>
<object class="sizeritem">
<object class="wxButton" name="BUTTON_DOWN">
<label>Move Down</label>
</object>
<flag>wxEXPAND</flag>
</object>
<object class="spacer">
<size>10,20</size>
<option>1</option>
</object>
<object class="sizeritem">
<object class="wxButton" name="BUTTON_APPEND">
<label>Append...</label>
</object>
<flag>wxBOTTOM|wxEXPAND</flag>
<border>5</border>
</object>
<object class="sizeritem">
<object class="wxButton" name="BUTTON_REMOVE">
<label>Remove</label>
</object>
<flag>wxEXPAND</flag>
</object>
</object>
<flag>wxALL|wxEXPAND</flag>
<border>5</border>
</object>
</object>
<option>1</option>
<flag>wxEXPAND</flag>
</object>
<object class="sizeritem">
<object class="wxStaticLine"/>
<flag>wxEXPAND</flag>
</object>
<object class="sizeritem">
@ -115,19 +187,33 @@
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<object class="wxButton" name="wxID_OK">
<label>OK</label>
<default>1</default>
</object>
<flag>wxRIGHT</flag>
<border>10</border>
</object>
<object class="sizeritem">
<object class="wxButton" name="wxID_CANCEL">
<label>Cancel</label>
</object>
</object>
</object>
<flag>wxALL|wxALIGN_CENTRE_HORIZONTAL</flag>
<border>10</border>
</object>
</object>
@ -144,10 +230,18 @@
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<object class="wxCheckListBox" name="CHECK_LIST">
<content/>
</object>
<option>1</option>
<flag>wxTOP|wxBOTTOM|wxLEFT|wxEXPAND</flag>
<border>5</border>
</object>
<object class="sizeritem">
@ -155,44 +249,78 @@
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<object class="wxButton" name="BUTTON_UP">
<label>Move Up</label>
</object>
<flag>wxBOTTOM|wxEXPAND</flag>
<border>5</border>
</object>
<object class="sizeritem">
<object class="wxButton" name="BUTTON_DOWN">
<label>Move Down</label>
</object>
<flag>wxEXPAND</flag>
</object>
<object class="spacer">
<size>10,20</size>
<option>1</option>
</object>
<object class="sizeritem">
<object class="wxButton" name="BUTTON_APPEND">
<label>Append...</label>
</object>
<flag>wxBOTTOM|wxEXPAND</flag>
<border>5</border>
</object>
<object class="sizeritem">
<object class="wxButton" name="BUTTON_REMOVE">
<label>Remove</label>
</object>
<flag>wxEXPAND</flag>
</object>
</object>
<flag>wxALL|wxEXPAND</flag>
<border>5</border>
</object>
</object>
<option>1</option>
<flag>wxEXPAND</flag>
</object>
<object class="sizeritem">
<object class="wxStaticLine"/>
<flag>wxEXPAND</flag>
</object>
<object class="sizeritem">
@ -200,19 +328,33 @@
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<object class="wxButton" name="wxID_OK">
<label>OK</label>
<default>1</default>
</object>
<flag>wxRIGHT</flag>
<border>10</border>
</object>
<object class="sizeritem">
<object class="wxButton" name="wxID_CANCEL">
<label>Cancel</label>
</object>
</object>
</object>
<flag>wxALL|wxALIGN_CENTRE_HORIZONTAL</flag>
<border>10</border>
</object>
</object>
@ -225,16 +367,30 @@
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<object class="wxCheckListBox" name="CHECK_LIST">
<content/>
<size>250,250</size>
<style></style>
</object>
<option>1</option>
<flag>wxALL|wxEXPAND</flag>
<border>5</border>
</object>
<object class="sizeritem">
<object class="wxStaticLine"/>
<flag>wxEXPAND</flag>
</object>
<object class="sizeritem">
@ -242,19 +398,33 @@
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<object class="wxButton" name="wxID_OK">
<label>OK</label>
<default>1</default>
</object>
<flag>wxRIGHT</flag>
<border>10</border>
</object>
<object class="sizeritem">
<object class="wxButton" name="wxID_CANCEL">
<label>Cancel</label>
</object>
</object>
</object>
<flag>wxALL|wxALIGN_CENTRE_HORIZONTAL</flag>
<border>10</border>
</object>
</object>
@ -271,12 +441,24 @@
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<object class="wxListBox" name="LIST">
<content/>
<size>80,100</size>
<style>wxLB_SORT</style>
</object>
<option>1</option>
<flag>wxALL|wxALIGN_CENTRE_HORIZONTAL</flag>
<border>10</border>
</object>
<object class="sizeritem">
@ -284,26 +466,44 @@
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<object class="wxButton" name="BUTTON_ADD">
<label>Add...</label>
</object>
<flag>wxBOTTOM</flag>
<border>3</border>
</object>
<object class="sizeritem">
<object class="wxButton" name="BUTTON_REMOVE">
<label>Remove</label>
</object>
</object>
</object>
<flag>wxALL|wxALIGN_CENTRE_HORIZONTAL</flag>
<border>5</border>
</object>
</object>
<option>1</option>
<flag>wxEXPAND</flag>
</object>
<object class="sizeritem">
<object class="wxStaticLine"/>
<flag>wxEXPAND</flag>
</object>
<object class="sizeritem">
@ -311,19 +511,33 @@
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<object class="wxButton" name="wxID_OK">
<label>OK</label>
<default>1</default>
</object>
<flag>wxBOTTOM</flag>
<border>5</border>
</object>
<object class="sizeritem">
<object class="wxButton" name="wxID_CANCEL">
<label>Cancel</label>
</object>
</object>
</object>
<flag>wxALL|wxALIGN_CENTRE_HORIZONTAL</flag>
<border>10</border>
</object>
</object>
@ -339,12 +553,18 @@
<rows>2</rows>
<object class="sizeritem">
<object class="wxRadioButton" name="RADIO_STD">
<label>art:</label>
</object>
<flag>wxALIGN_CENTRE_VERTICAL</flag>
</object>
<object class="sizeritem">
<object class="wxComboBox" name="COMBO_STD">
<content>
<item>wxART_ADD_BOOKMARK</item>
<item>wxART_DEL_BOOKMARK</item>
@ -360,13 +580,20 @@
<item>wxART_GO_TO_PARENT</item>
<item>wxART_GO_HOME</item>
<item>wxART_FILE_OPEN</item>
<item>wxART_FILE_SAVE</item>
<item>wxART_FILE_SAVE_AS</item>
<item>wxART_PRINT</item>
<item>wxART_HELP</item>
<item>wxART_TIP</item>
<item>wxART_REPORT_VIEW</item>
<item>wxART_LIST_VIEW</item>
<item>wxART_NEW_DIR</item>
<item>wxART_HARDDISK</item>
<item>wxART_FLOPPY</item>
<item>wxART_CDROM</item>
<item>wxART_REMOVABLE</item>
<item>wxART_FOLDER</item>
<item>wxART_FOLDER_OPEN</item>
<item>wxART_GO_DIR_UP</item>
<item>wxART_EXECUTABLE_FILE</item>
<item>wxART_NORMAL_FILE</item>
@ -377,15 +604,32 @@
<item>wxART_WARNING</item>
<item>wxART_INFORMATION</item>
<item>wxART_MISSING_IMAGE</item>
<item>wxART_COPY</item>
<item>wxART_CUT</item>
<item>wxART_PASTE</item>
<item>wxART_DELETE</item>
<item>wxART_UNDO</item>
<item>wxART_REDO</item>
<item>wxART_QUIT</item>
<item>wxART_FIND</item>
<item>wxART_FIND</item>
</content>
</object>
<flag>wxRIGHT|wxEXPAND</flag>
<border>5</border>
</object>
<object class="sizeritem">
<object class="wxRadioButton" name="RADIO_FILE">
<label>file:</label>
</object>
<flag>wxALIGN_CENTRE_VERTICAL</flag>
</object>
<object class="sizeritem">
@ -393,23 +637,39 @@
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<object class="wxTextCtrl" name="TEXT_FILE"/>
<option>1</option>
<flag>wxRIGHT|wxEXPAND</flag>
<border>5</border>
</object>
<object class="sizeritem">
<object class="wxButton" name="BUTTON_BROWSE">
<label>Browse...</label>
<size>40,-1d</size>
</object>
</object>
</object>
<flag>wxRIGHT|wxEXPAND</flag>
<border>5</border>
</object>
<vgap>2</vgap>
<growablecols>1</growablecols>
</object>
<flag>wxEXPAND</flag>
</object>
</object>

View File

@ -335,6 +335,7 @@ class xxxParamFont(xxxObject, xxxNode):
class xxxContainer(xxxObject):
hasChildren = True
exStyles = []
# Simulate normal parameter for encoding
class xxxEncoding:
@ -362,37 +363,34 @@ class xxxPanel(xxxContainer):
allParams = ['pos', 'size', 'style']
styles = ['fg', 'bg', 'font', 'enabled', 'focused', 'hidden', 'exstyle',
'tooltip']
winStyles = ['wxNO_3D', 'wxTAB_TRAVERSAL', 'wxCLIP_CHILDREN']
exStyles = ['wxWS_EX_VALIDATE_RECURSIVELY']
class xxxDialog(xxxContainer):
allParams = ['title', 'centered', 'pos', 'size', 'style']
paramDict = {'centered': ParamBool}
required = ['title']
default = {'title': ''}
winStyles = ['wxDEFAULT_DIALOG_STYLE', 'wxSTAY_ON_TOP',
## 'wxDIALOG_MODAL', 'wxDIALOG_MODELESS',
'wxCAPTION', 'wxSYSTEM_MENU', 'wxRESIZE_BORDER', 'wxRESIZE_BOX',
winStyles = ['wxDEFAULT_DIALOG_STYLE',
'wxCAPTION', 'wxMINIMIZE_BOX', 'wxMAXIMIZE_BOX', 'wxCLOSE_BOX',
'wxSTAY_ON_TOP',
'wxTHICK_FRAME',
'wxNO_3D', 'wxTAB_TRAVERSAL', 'wxCLIP_CHILDREN']
'wxNO_3D', 'wxDIALOG_NO_PARENT']
styles = ['fg', 'bg', 'font', 'enabled', 'focused', 'hidden', 'exstyle',
'tooltip']
exStyles = ['wxWS_EX_VALIDATE_RECURSIVELY']
class xxxFrame(xxxContainer):
allParams = ['title', 'centered', 'pos', 'size', 'style']
paramDict = {'centered': ParamBool}
required = ['title']
default = {'title': ''}
winStyles = ['wxDEFAULT_FRAME_STYLE', 'wxDEFAULT_DIALOG_STYLE',
winStyles = ['wxDEFAULT_FRAME_STYLE',
'wxCAPTION', 'wxMINIMIZE_BOX', 'wxMAXIMIZE_BOX', 'wxCLOSE_BOX',
'wxSTAY_ON_TOP',
'wxCAPTION', 'wxSYSTEM_MENU', 'wxRESIZE_BORDER',
'wxRESIZE_BOX', 'wxMINIMIZE_BOX', 'wxMAXIMIZE_BOX',
'wxFRAME_FLOAT_ON_PARENT', 'wxFRAME_TOOL_WINDOW',
'wxNO_3D', 'wxTAB_TRAVERSAL', 'wxCLIP_CHILDREN']
'wxSYSTEM_MENU', 'wxRESIZE_BORDER',
'wxFRAME_TOOL_WINDOW', 'wxFRAME_NO_TASKBAR',
'wxFRAME_FLOAT_ON_PARENT', 'wxFRAME_SHAPED'
]
styles = ['fg', 'bg', 'font', 'enabled', 'focused', 'hidden', 'exstyle',
'tooltip']
exStyles = ['wxWS_EX_VALIDATE_RECURSIVELY']
class xxxTool(xxxObject):
allParams = ['bitmap', 'bitmap2', 'toggle', 'tooltip', 'longhelp', 'label']
@ -409,6 +407,23 @@ class xxxToolBar(xxxContainer):
'style': ParamNonGenericStyle}
winStyles = ['wxTB_FLAT', 'wxTB_DOCKABLE', 'wxTB_VERTICAL', 'wxTB_HORIZONTAL', 'wxTB_TEXT']
class xxxWizard(xxxContainer):
allParams = ['title', 'bitmap', 'pos']
required = ['title']
default = {'title': ''}
winStyles = []
exStyles = ['wxWIZARD_EX_HELPBUTTON']
class xxxWizardPage(xxxContainer):
allParams = ['bitmap']
winStyles = []
exStyles = []
class xxxWizardPageSimple(xxxContainer):
allParams = ['bitmap']
winStyles = []
exStyles = []
################################################################################
# Bitmap, Icon
@ -622,6 +637,9 @@ class xxxGridSizer(xxxSizer):
required = ['cols']
default = {'cols': '2', 'rows': '2'}
class xxxStdDialogButtonSizer(xxxSizer):
allParams = []
# For repeated parameters
class xxxParamMulti:
def __init__(self, node):
@ -774,6 +792,9 @@ xxxDict = {
'wxFrame': xxxFrame,
'tool': xxxTool,
'wxToolBar': xxxToolBar,
'wxWizard': xxxWizard,
'wxWizardPage': xxxWizardPage,
'wxWizardPageSimple': xxxWizardPageSimple,
'wxBitmap': xxxBitmap,
'wxIcon': xxxIcon,
@ -815,6 +836,7 @@ xxxDict = {
'wxGridSizer': xxxGridSizer,
'wxFlexGridSizer': xxxFlexGridSizer,
'wxGridBagSizer': xxxGridBagSizer,
'wxStdDialogButtonSizer': xxxStdDialogButtonSizer,
'sizeritem': xxxSizerItem,
'spacer': xxxSpacer,