0.1.7-0
------- Added new controls (Choicebook, Listbook, StatusBar, DatePicker), and completed style flags. Test window is opened for an available parent control if no specific view defined. Better handling of exceptions (highlighting does not 'stick' anymore). Tested on wxGTK 2.6.1.0. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36156 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
|
0.1.7-0
|
||||||
|
-------
|
||||||
|
|
||||||
|
Added new controls (Choicebook, Listbook, StatusBar, DatePicker), and
|
||||||
|
completed style flags. Test window is opened for an available parent
|
||||||
|
control if no specific view defined. Better handling of exceptions
|
||||||
|
(highlighting does not 'stick' anymore). Tested on wxGTK 2.6.1.0.
|
||||||
|
|
||||||
0.1.6-7
|
0.1.6-7
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
@@ -7,10 +7,16 @@
|
|||||||
System requirements
|
System requirements
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
XRCed requires wxWindows and wxPython greater or equal to 2.3.3, and
|
wxPython version must be recent enough to support all features (a warning
|
||||||
Python 2.2 or newer (it may work with earlier version, but was not tested).
|
message is shown if not).
|
||||||
|
|
||||||
wxPython must be compiled with XRC support.
|
|
||||||
|
User requirements
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
To use XRCed it is really important to be familiar with wxWindows class names
|
||||||
|
and at least partially with XRC resource format (read
|
||||||
|
wxWindows/doc/tech/tn0014.txt for reference).
|
||||||
|
|
||||||
|
|
||||||
Short manual
|
Short manual
|
||||||
@@ -51,8 +57,11 @@ should be "checked" first. This panel can be made separate by unchecking
|
|||||||
All properties can be edited as text, and some are supplied with special
|
All properties can be edited as text, and some are supplied with special
|
||||||
editing controls.
|
editing controls.
|
||||||
|
|
||||||
|
When no 'Edit' button is provided for editing a property's value, it is
|
||||||
|
supposed to be copied verbatim to XRC file.
|
||||||
|
|
||||||
The names of the properties are exactly as in XRC file, and it's usually not
|
The names of the properties are exactly as in XRC file, and it's usually not
|
||||||
hard to guess what they do. XML ID is the name of the window, and must be
|
hard to guess what they do. "XML ID" is the name of the window, and must be
|
||||||
present for top-level windows (though this is not enforced by XRCed).
|
present for top-level windows (though this is not enforced by XRCed).
|
||||||
|
|
||||||
To display the preview window double-click a top-level object (you should
|
To display the preview window double-click a top-level object (you should
|
||||||
@@ -61,8 +70,22 @@ from View menu, or press F5. After that, if you select a child object, it
|
|||||||
becomes highlighted, and if you change it, preview is updated when you select
|
becomes highlighted, and if you change it, preview is updated when you select
|
||||||
another item or press Ctrl-R (refresh). To turn off automatic update, toggle
|
another item or press Ctrl-R (refresh). To turn off automatic update, toggle
|
||||||
"View->Auto-refresh" or toolbar auto-refresh button (to the right of the
|
"View->Auto-refresh" or toolbar auto-refresh button (to the right of the
|
||||||
refresh button).
|
refresh button). If you double-click a non-window object (a button for
|
||||||
|
example), then test view is created for a closest ancestor which is a window.
|
||||||
|
|
||||||
|
|
||||||
|
Bugs
|
||||||
|
----
|
||||||
|
|
||||||
|
- Some combinations of parent/child windows are not valid but possible to put
|
||||||
|
into XML tree by using XRCed. Usually this produces a meaningful error
|
||||||
|
message from XRC library when test view is opened.
|
||||||
|
|
||||||
|
- Be careful when replacing a non-empty container control with another class,
|
||||||
|
and check parameters which can be copied from the previous object but not
|
||||||
|
valid for the new one. Is it not possible to undo replacement yet.
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
Copyright 2001-2003 Roman Rolinsky <rollrom@xrced.sourceforge.net>
|
Copyright 2001-2005 Roman Rolinsky <rollrom@xrced.sourceforge.net>
|
||||||
|
@@ -15,7 +15,16 @@ import sys
|
|||||||
# Global constants
|
# Global constants
|
||||||
|
|
||||||
progname = 'XRCed'
|
progname = 'XRCed'
|
||||||
version = '0.1.6-7'
|
version = '0.1.7-0'
|
||||||
|
# Minimal wxWindows version
|
||||||
|
MinWxVersion = (2,6,0)
|
||||||
|
if wxVERSION[:3] < MinWxVersion:
|
||||||
|
print '''\
|
||||||
|
******************************* WARNING **************************************
|
||||||
|
This version of XRCed may not work correctly on your version of wxWindows.
|
||||||
|
Please upgrade wxWindows to %d.%d.%d or higher.
|
||||||
|
******************************************************************************''' % MinWxVersion
|
||||||
|
|
||||||
# Can be changed to set other default encoding different
|
# Can be changed to set other default encoding different
|
||||||
#defaultEncoding = ''
|
#defaultEncoding = ''
|
||||||
# you comment above and can uncomment this:
|
# you comment above and can uncomment this:
|
||||||
|
@@ -272,13 +272,13 @@ class PropPage(ParamPage):
|
|||||||
self.box = wxStaticBox(self, -1, label)
|
self.box = wxStaticBox(self, -1, label)
|
||||||
self.box.SetFont(g.labelFont())
|
self.box.SetFont(g.labelFont())
|
||||||
topSizer = wxStaticBoxSizer(self.box, wxVERTICAL)
|
topSizer = wxStaticBoxSizer(self.box, wxVERTICAL)
|
||||||
sizer = wxFlexGridSizer(len(xxx.allParams), 2, 1, 1)
|
sizer = wxFlexGridSizer(len(xxx.allParams), 2, 0, 1)
|
||||||
sizer.AddGrowableCol(1)
|
sizer.AddGrowableCol(1)
|
||||||
if xxx.hasName:
|
if xxx.hasName:
|
||||||
label = wxStaticText(self, -1, 'XML ID:', size=(LABEL_WIDTH,-1))
|
label = wxStaticText(self, -1, 'XML ID:', size=(LABEL_WIDTH,-1))
|
||||||
control = ParamText(self, 'XML_name', 200)
|
control = ParamText(self, 'XML_name', 200)
|
||||||
sizer.AddMany([ (label, 0, wxALIGN_CENTER_VERTICAL),
|
sizer.AddMany([ (label, 0, wxALIGN_CENTER_VERTICAL),
|
||||||
(control, 0, wxALIGN_CENTER_VERTICAL | wxBOTTOM | wxGROW, 5) ])
|
(control, 0, wxALIGN_CENTER_VERTICAL | wxBOTTOM | wxGROW, 10) ])
|
||||||
self.controlName = control
|
self.controlName = control
|
||||||
for param in xxx.allParams:
|
for param in xxx.allParams:
|
||||||
present = xxx.params.has_key(param)
|
present = xxx.params.has_key(param)
|
||||||
@@ -345,7 +345,7 @@ class StylePage(ParamPage):
|
|||||||
box = wxStaticBox(self, -1, label)
|
box = wxStaticBox(self, -1, label)
|
||||||
box.SetFont(g.labelFont())
|
box.SetFont(g.labelFont())
|
||||||
topSizer = wxStaticBoxSizer(box, wxVERTICAL)
|
topSizer = wxStaticBoxSizer(box, wxVERTICAL)
|
||||||
sizer = wxFlexGridSizer(len(xxx.styles), 2, 1, 1)
|
sizer = wxFlexGridSizer(len(xxx.styles), 2, 0, 1)
|
||||||
sizer.AddGrowableCol(1)
|
sizer.AddGrowableCol(1)
|
||||||
for param in xxx.styles:
|
for param in xxx.styles:
|
||||||
present = xxx.params.has_key(param)
|
present = xxx.params.has_key(param)
|
||||||
|
@@ -11,14 +11,10 @@ from types import *
|
|||||||
from wxPython.xrc import *
|
from wxPython.xrc import *
|
||||||
|
|
||||||
genericStyles = [
|
genericStyles = [
|
||||||
'wxSIMPLE_BORDER', 'wxDOUBLE_BORDER', 'wxSUNKEN_BORDER',
|
'wxSIMPLE_BORDER', 'wxSUNKEN_BORDER', 'wxDOUBLE_BORDER',
|
||||||
'wxRAISED_BORDER', 'wxSTATIC_BORDER', 'wxNO_BORDER',
|
'wxRAISED_BORDER', 'wxSTATIC_BORDER', 'wxNO_BORDER',
|
||||||
'wxTRANSPARENT_WINDOW', 'wxTAB_TRAVERSAL',
|
'wxCLIP_CHILDREN', 'wxTRANSPARENT_WINDOW', 'wxWANTS_CHARS',
|
||||||
'wxWANTS_CHARS',
|
'wxNO_FULL_REPAINT_ON_RESIZE', 'wxFULL_REPAINT_ON_RESIZE'
|
||||||
'wxNO_FULL_REPAINT_ON_RESIZE',
|
|
||||||
'wxVSCROLL', 'wxHSCROLL', 'wxALWAYS_SHOW_SB',
|
|
||||||
'wxCLIP_CHILDREN',
|
|
||||||
'wxFULL_REPAINT_ON_RESIZE'
|
|
||||||
]
|
]
|
||||||
|
|
||||||
genericExStyles = [
|
genericExStyles = [
|
||||||
@@ -41,7 +37,7 @@ class PPanel(wxPanel):
|
|||||||
# Something strange is going on with enable so we make sure...
|
# Something strange is going on with enable so we make sure...
|
||||||
for w in self.GetChildren():
|
for w in self.GetChildren():
|
||||||
w.Enable(value)
|
w.Enable(value)
|
||||||
wxPanel.Enable(self, value)
|
#wxPanel.Enable(self, value)
|
||||||
def SetModified(self):
|
def SetModified(self):
|
||||||
self.modified = True
|
self.modified = True
|
||||||
g.panel.SetModified(True)
|
g.panel.SetModified(True)
|
||||||
@@ -108,14 +104,17 @@ class ParamBinaryOr(PPanel):
|
|||||||
|
|
||||||
class ParamFlag(ParamBinaryOr):
|
class ParamFlag(ParamBinaryOr):
|
||||||
values = ['wxTOP', 'wxBOTTOM', 'wxLEFT', 'wxRIGHT', 'wxALL',
|
values = ['wxTOP', 'wxBOTTOM', 'wxLEFT', 'wxRIGHT', 'wxALL',
|
||||||
'wxEXPAND', 'wxGROW', 'wxSHAPED', 'wxALIGN_CENTRE', 'wxALIGN_RIGHT',
|
'wxEXPAND', 'wxGROW', 'wxSHAPED', 'wxSTRETCH_NOT',
|
||||||
'wxFIXED_MINSIZE',
|
'wxALIGN_CENTRE', 'wxALIGN_LEFT', 'wxALIGN_RIGHT',
|
||||||
'wxALIGN_BOTTOM', 'wxALIGN_CENTRE_VERTICAL',
|
'wxALIGN_TOP', 'wxALIGN_BOTTOM',
|
||||||
'wxALIGN_CENTRE_HORIZONTAL',
|
'wxALIGN_CENTRE_VERTICAL', 'wxALIGN_CENTRE_HORIZONTAL',
|
||||||
|
'wxADJUST_MINSIZE', 'wxFIXED_MINSIZE'
|
||||||
]
|
]
|
||||||
equal = {'wxALIGN_CENTER': 'wxALIGN_CENTRE',
|
equal = {'wxALIGN_CENTER': 'wxALIGN_CENTRE',
|
||||||
'wxALIGN_CENTER_VERTICAL': 'wxALIGN_CENTRE_VERTICAL',
|
'wxALIGN_CENTER_VERTICAL': 'wxALIGN_CENTRE_VERTICAL',
|
||||||
'wxALIGN_CENTER_HORIZONTAL': 'wxALIGN_CENTRE_HORIZONTAL'}
|
'wxALIGN_CENTER_HORIZONTAL': 'wxALIGN_CENTRE_HORIZONTAL',
|
||||||
|
'wxUP': 'wxTOP', 'wxDOWN': 'wxBOTTOM', 'wxNORTH': 'wxTOP',
|
||||||
|
'wxSOUTH': 'wxBOTTOM', 'wxWEST': 'wxLEFT', 'wxEAST': 'wxRIGHT'}
|
||||||
def __init__(self, parent, name):
|
def __init__(self, parent, name):
|
||||||
ParamBinaryOr.__init__(self, parent, name)
|
ParamBinaryOr.__init__(self, parent, name)
|
||||||
|
|
||||||
@@ -196,10 +195,10 @@ class ParamColour(PPanel):
|
|||||||
self.ID_TEXT_CTRL = wxNewId()
|
self.ID_TEXT_CTRL = wxNewId()
|
||||||
self.ID_BUTTON = wxNewId()
|
self.ID_BUTTON = wxNewId()
|
||||||
sizer = wxBoxSizer()
|
sizer = wxBoxSizer()
|
||||||
self.text = wxTextCtrl(self, self.ID_TEXT_CTRL, size=(65,-1))
|
self.text = wxTextCtrl(self, self.ID_TEXT_CTRL, size=(80,-1))
|
||||||
sizer.Add(self.text, 0, wxRIGHT | wxALIGN_CENTER_VERTICAL, 5)
|
sizer.Add(self.text, 0, wxALIGN_CENTER_VERTICAL | wxTOP | wxBOTTOM, 2)
|
||||||
self.button = wxPanel(self, self.ID_BUTTON, wxDefaultPosition, wxSize(20, 1))
|
self.button = wxPanel(self, self.ID_BUTTON, wxDefaultPosition, wxSize(20, 20))
|
||||||
sizer.Add(self.button, 0, wxGROW | wxALIGN_CENTER_VERTICAL)
|
sizer.Add(self.button, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, 5)
|
||||||
self.SetAutoLayout(True)
|
self.SetAutoLayout(True)
|
||||||
self.SetSizer(sizer)
|
self.SetSizer(sizer)
|
||||||
sizer.Fit(self)
|
sizer.Fit(self)
|
||||||
@@ -269,7 +268,7 @@ class ParamFont(PPanel):
|
|||||||
PPanel.OnChange(self, evt)
|
PPanel.OnChange(self, evt)
|
||||||
self.textModified = True
|
self.textModified = True
|
||||||
def _defaultValue(self):
|
def _defaultValue(self):
|
||||||
return ['12', 'default', 'normal', 'normal', '0', '', '']
|
return [`g._sysFont.GetPointSize()`, 'default', 'normal', 'normal', '0', '', '']
|
||||||
def GetValue(self):
|
def GetValue(self):
|
||||||
if self.textModified: # text has newer value
|
if self.textModified: # text has newer value
|
||||||
try:
|
try:
|
||||||
@@ -293,7 +292,7 @@ class ParamFont(PPanel):
|
|||||||
self.value = self._defaultValue()
|
self.value = self._defaultValue()
|
||||||
# Make initial font
|
# Make initial font
|
||||||
# Default values
|
# Default values
|
||||||
size = 12
|
size = g._sysFont.GetPointSize()
|
||||||
family = wxDEFAULT
|
family = wxDEFAULT
|
||||||
style = weight = wxNORMAL
|
style = weight = wxNORMAL
|
||||||
underlined = 0
|
underlined = 0
|
||||||
@@ -472,7 +471,7 @@ class ParamText(PPanel):
|
|||||||
self.text = wxTextCtrl(self, self.ID_TEXT_CTRL, size=wxSize(textWidth,-1))
|
self.text = wxTextCtrl(self, self.ID_TEXT_CTRL, size=wxSize(textWidth,-1))
|
||||||
if textWidth == -1: option = 1
|
if textWidth == -1: option = 1
|
||||||
else: option = 0
|
else: option = 0
|
||||||
sizer.Add(self.text, option, wxALIGN_CENTER_VERTICAL)
|
sizer.Add(self.text, option, wxALIGN_CENTER_VERTICAL | wxTOP | wxBOTTOM, 2)
|
||||||
self.SetAutoLayout(True)
|
self.SetAutoLayout(True)
|
||||||
self.SetSizer(sizer)
|
self.SetSizer(sizer)
|
||||||
sizer.Fit(self)
|
sizer.Fit(self)
|
||||||
@@ -951,5 +950,5 @@ paramDict = {
|
|||||||
'fg': ParamColour, 'bg': ParamColour, 'font': ParamFont,
|
'fg': ParamColour, 'bg': ParamColour, 'font': ParamFont,
|
||||||
'enabled': ParamBool, 'focused': ParamBool, 'hidden': ParamBool,
|
'enabled': ParamBool, 'focused': ParamBool, 'hidden': ParamBool,
|
||||||
'tooltip': ParamText, 'bitmap': ParamBitmap, 'icon': ParamBitmap,
|
'tooltip': ParamText, 'bitmap': ParamBitmap, 'icon': ParamBitmap,
|
||||||
'encoding': ParamEncoding
|
'encoding': ParamEncoding, 'borders': ParamUnit
|
||||||
}
|
}
|
||||||
|
@@ -230,7 +230,7 @@ class Tools(wxPanel):
|
|||||||
ID_NEW.MENU_ITEM,
|
ID_NEW.MENU_ITEM,
|
||||||
ID_NEW.SEPARATOR ],
|
ID_NEW.SEPARATOR ],
|
||||||
False)
|
False)
|
||||||
if state == STATE_STDDLGBTN:
|
elif state == STATE_STDDLGBTN:
|
||||||
pass # nothing can be added from toolbar
|
pass # nothing can be added from toolbar
|
||||||
elif state == STATE_MENUBAR:
|
elif state == STATE_MENUBAR:
|
||||||
self.EnableGroup(GROUP_MENUS)
|
self.EnableGroup(GROUP_MENUS)
|
||||||
@@ -277,9 +277,9 @@ class Tools(wxPanel):
|
|||||||
False)
|
False)
|
||||||
self.EnableGroup(GROUP_SIZERS)
|
self.EnableGroup(GROUP_SIZERS)
|
||||||
self.EnableGroup(GROUP_CONTROLS)
|
self.EnableGroup(GROUP_CONTROLS)
|
||||||
# Special case for notebook (always executed)
|
# Special case for *book (always executed)
|
||||||
if state == STATE_ELSE:
|
if state == STATE_ELSE:
|
||||||
if xxx.__class__ == xxxNotebook:
|
if xxx.__class__ in [xxxNotebook, xxxChoicebook, xxxListbook]:
|
||||||
self.EnableGroup(GROUP_SIZERS, False)
|
self.EnableGroup(GROUP_SIZERS, False)
|
||||||
else:
|
else:
|
||||||
self.EnableGroup(GROUP_SIZERS)
|
self.EnableGroup(GROUP_SIZERS)
|
||||||
|
@@ -56,6 +56,7 @@ class ID_NEW:
|
|||||||
TOOL = wxNewId()
|
TOOL = wxNewId()
|
||||||
MENU_BAR = wxNewId()
|
MENU_BAR = wxNewId()
|
||||||
MENU = wxNewId()
|
MENU = wxNewId()
|
||||||
|
STATUS_BAR = wxNewId()
|
||||||
|
|
||||||
STATIC_TEXT = wxNewId()
|
STATIC_TEXT = wxNewId()
|
||||||
TEXT_CTRL = wxNewId()
|
TEXT_CTRL = wxNewId()
|
||||||
@@ -82,16 +83,21 @@ class ID_NEW:
|
|||||||
LIST_CTRL = wxNewId()
|
LIST_CTRL = wxNewId()
|
||||||
CHECK_LIST = wxNewId()
|
CHECK_LIST = wxNewId()
|
||||||
NOTEBOOK = wxNewId()
|
NOTEBOOK = wxNewId()
|
||||||
|
CHOICEBOOK = wxNewId()
|
||||||
|
LISTBOOK = wxNewId()
|
||||||
SPLITTER_WINDOW = wxNewId()
|
SPLITTER_WINDOW = wxNewId()
|
||||||
SCROLLED_WINDOW = wxNewId()
|
SCROLLED_WINDOW = wxNewId()
|
||||||
HTML_WINDOW = wxNewId()
|
HTML_WINDOW = wxNewId()
|
||||||
CALENDAR_CTRL = wxNewId()
|
CALENDAR_CTRL = wxNewId()
|
||||||
|
DATE_CTRL = wxNewId()
|
||||||
GENERIC_DIR_CTRL = wxNewId()
|
GENERIC_DIR_CTRL = wxNewId()
|
||||||
SPIN_CTRL = wxNewId()
|
SPIN_CTRL = wxNewId()
|
||||||
UNKNOWN = wxNewId()
|
UNKNOWN = wxNewId()
|
||||||
WIZARD = wxNewId()
|
WIZARD = wxNewId()
|
||||||
WIZARD_PAGE = wxNewId()
|
WIZARD_PAGE = wxNewId()
|
||||||
WIZARD_PAGE_SIMPLE = wxNewId()
|
WIZARD_PAGE_SIMPLE = wxNewId()
|
||||||
|
BITMAP = wxNewId()
|
||||||
|
ICON = wxNewId()
|
||||||
STATUS_BAR = wxNewId()
|
STATUS_BAR = wxNewId()
|
||||||
|
|
||||||
BOX_SIZER = wxNewId()
|
BOX_SIZER = wxNewId()
|
||||||
@@ -151,9 +157,12 @@ class PullDownMenu:
|
|||||||
ID_NEW.WIZARD_PAGE_SIMPLE: 'wxWizardPageSimple',
|
ID_NEW.WIZARD_PAGE_SIMPLE: 'wxWizardPageSimple',
|
||||||
ID_NEW.TOOL_BAR: 'wxToolBar',
|
ID_NEW.TOOL_BAR: 'wxToolBar',
|
||||||
ID_NEW.TOOL: 'tool',
|
ID_NEW.TOOL: 'tool',
|
||||||
|
ID_NEW.STATUS_BAR: 'wxStatusBar',
|
||||||
ID_NEW.MENU_BAR: 'wxMenuBar',
|
ID_NEW.MENU_BAR: 'wxMenuBar',
|
||||||
ID_NEW.MENU: 'wxMenu',
|
ID_NEW.MENU: 'wxMenu',
|
||||||
ID_NEW.MENU_ITEM: 'wxMenuItem',
|
ID_NEW.MENU_ITEM: 'wxMenuItem',
|
||||||
|
ID_NEW.BITMAP: 'wxBitmap',
|
||||||
|
ID_NEW.ICON: 'wxIcon',
|
||||||
ID_NEW.SEPARATOR: 'separator',
|
ID_NEW.SEPARATOR: 'separator',
|
||||||
|
|
||||||
ID_NEW.STATIC_TEXT: 'wxStaticText',
|
ID_NEW.STATIC_TEXT: 'wxStaticText',
|
||||||
@@ -170,6 +179,7 @@ class PullDownMenu:
|
|||||||
ID_NEW.RADIO_BOX: 'wxRadioBox',
|
ID_NEW.RADIO_BOX: 'wxRadioBox',
|
||||||
ID_NEW.COMBO_BOX: 'wxComboBox',
|
ID_NEW.COMBO_BOX: 'wxComboBox',
|
||||||
ID_NEW.LIST_BOX: 'wxListBox',
|
ID_NEW.LIST_BOX: 'wxListBox',
|
||||||
|
ID_NEW.CHECK_LIST: 'wxCheckListBox',
|
||||||
|
|
||||||
ID_NEW.STATIC_LINE: 'wxStaticLine',
|
ID_NEW.STATIC_LINE: 'wxStaticLine',
|
||||||
ID_NEW.STATIC_BITMAP: 'wxStaticBitmap',
|
ID_NEW.STATIC_BITMAP: 'wxStaticBitmap',
|
||||||
@@ -179,12 +189,14 @@ class PullDownMenu:
|
|||||||
ID_NEW.SCROLL_BAR: 'wxScrollBar',
|
ID_NEW.SCROLL_BAR: 'wxScrollBar',
|
||||||
ID_NEW.TREE_CTRL: 'wxTreeCtrl',
|
ID_NEW.TREE_CTRL: 'wxTreeCtrl',
|
||||||
ID_NEW.LIST_CTRL: 'wxListCtrl',
|
ID_NEW.LIST_CTRL: 'wxListCtrl',
|
||||||
ID_NEW.CHECK_LIST: 'wxCheckListBox',
|
|
||||||
ID_NEW.NOTEBOOK: 'wxNotebook',
|
ID_NEW.NOTEBOOK: 'wxNotebook',
|
||||||
|
ID_NEW.CHOICEBOOK: 'wxChoicebook',
|
||||||
|
ID_NEW.LISTBOOK: 'wxListbook',
|
||||||
ID_NEW.SPLITTER_WINDOW: 'wxSplitterWindow',
|
ID_NEW.SPLITTER_WINDOW: 'wxSplitterWindow',
|
||||||
ID_NEW.SCROLLED_WINDOW: 'wxScrolledWindow',
|
ID_NEW.SCROLLED_WINDOW: 'wxScrolledWindow',
|
||||||
ID_NEW.HTML_WINDOW: 'wxHtmlWindow',
|
ID_NEW.HTML_WINDOW: 'wxHtmlWindow',
|
||||||
ID_NEW.CALENDAR_CTRL: 'wxCalendarCtrl',
|
ID_NEW.CALENDAR_CTRL: 'wxCalendarCtrl',
|
||||||
|
ID_NEW.DATE_CTRL: 'wxDatePickerCtrl',
|
||||||
ID_NEW.GENERIC_DIR_CTRL: 'wxGenericDirCtrl',
|
ID_NEW.GENERIC_DIR_CTRL: 'wxGenericDirCtrl',
|
||||||
ID_NEW.SPIN_CTRL: 'wxSpinCtrl',
|
ID_NEW.SPIN_CTRL: 'wxSpinCtrl',
|
||||||
|
|
||||||
@@ -214,13 +226,19 @@ class PullDownMenu:
|
|||||||
None,
|
None,
|
||||||
(ID_NEW.TOOL_BAR, 'ToolBar', 'Create toolbar'),
|
(ID_NEW.TOOL_BAR, 'ToolBar', 'Create toolbar'),
|
||||||
(ID_NEW.MENU_BAR, 'MenuBar', 'Create menubar'),
|
(ID_NEW.MENU_BAR, 'MenuBar', 'Create menubar'),
|
||||||
(ID_NEW.MENU, 'Menu', 'Create menu')
|
(ID_NEW.MENU, 'Menu', 'Create menu'),
|
||||||
|
None,
|
||||||
|
(ID_NEW.BITMAP, 'Bitmap', 'Create bitmap'),
|
||||||
|
(ID_NEW.ICON, 'Icon', 'Create icon'),
|
||||||
]
|
]
|
||||||
self.containers = [
|
self.containers = [
|
||||||
(ID_NEW.PANEL, 'Panel', 'Create panel'),
|
(ID_NEW.PANEL, 'Panel', 'Create panel'),
|
||||||
(ID_NEW.NOTEBOOK, 'Notebook', 'Create notebook control'),
|
(ID_NEW.NOTEBOOK, 'Notebook', 'Create notebook control'),
|
||||||
|
(ID_NEW.CHOICEBOOK, 'Choicebook', 'Create choicebook control'),
|
||||||
|
(ID_NEW.LISTBOOK, 'Listbook', 'Create listbook control'),
|
||||||
(ID_NEW.SPLITTER_WINDOW, 'SplitterWindow', 'Create splitter window'),
|
(ID_NEW.SPLITTER_WINDOW, 'SplitterWindow', 'Create splitter window'),
|
||||||
(ID_NEW.TOOL_BAR, 'ToolBar', 'Create toolbar'),
|
(ID_NEW.TOOL_BAR, 'ToolBar', 'Create toolbar'),
|
||||||
|
(ID_NEW.STATUS_BAR, 'StatusBar', 'Create status bar'),
|
||||||
# (ID_NEW.WIZARD_PAGE, 'WizardPage', 'Create wizard page'),
|
# (ID_NEW.WIZARD_PAGE, 'WizardPage', 'Create wizard page'),
|
||||||
(ID_NEW.WIZARD_PAGE_SIMPLE, 'WizardPageSimple', 'Create simple wizard page'),
|
(ID_NEW.WIZARD_PAGE_SIMPLE, 'WizardPageSimple', 'Create simple wizard page'),
|
||||||
]
|
]
|
||||||
@@ -250,10 +268,10 @@ class PullDownMenu:
|
|||||||
(ID_NEW.SCROLL_BAR, 'ScrollBar', 'Create scroll bar'),
|
(ID_NEW.SCROLL_BAR, 'ScrollBar', 'Create scroll bar'),
|
||||||
(ID_NEW.TREE_CTRL, 'TreeCtrl', 'Create tree'),
|
(ID_NEW.TREE_CTRL, 'TreeCtrl', 'Create tree'),
|
||||||
(ID_NEW.LIST_CTRL, 'ListCtrl', 'Create list'),
|
(ID_NEW.LIST_CTRL, 'ListCtrl', 'Create list'),
|
||||||
(ID_NEW.CHECK_LIST, 'CheckList', 'Create check list'),
|
|
||||||
(ID_NEW.SCROLLED_WINDOW, 'ScrolledWindow', 'Create scrolled window'),
|
(ID_NEW.SCROLLED_WINDOW, 'ScrolledWindow', 'Create scrolled window'),
|
||||||
(ID_NEW.HTML_WINDOW, 'HtmlWindow', 'Create HTML window'),
|
(ID_NEW.HTML_WINDOW, 'HtmlWindow', 'Create HTML window'),
|
||||||
(ID_NEW.CALENDAR_CTRL, 'CalendarCtrl', 'Create calendar control'),
|
(ID_NEW.CALENDAR_CTRL, 'CalendarCtrl', 'Create calendar control'),
|
||||||
|
(ID_NEW.DATE_CTRL, 'DatePickerCtrl', 'Create date picker control'),
|
||||||
(ID_NEW.GENERIC_DIR_CTRL, 'GenericDirCtrl', 'Create generic dir control'),
|
(ID_NEW.GENERIC_DIR_CTRL, 'GenericDirCtrl', 'Create generic dir control'),
|
||||||
(ID_NEW.UNKNOWN, 'Unknown', 'Create custom control placeholder'),
|
(ID_NEW.UNKNOWN, 'Unknown', 'Create custom control placeholder'),
|
||||||
],
|
],
|
||||||
@@ -270,12 +288,16 @@ class PullDownMenu:
|
|||||||
(ID_NEW.RADIO_BOX, 'RadioBox', 'Create radio box'),
|
(ID_NEW.RADIO_BOX, 'RadioBox', 'Create radio box'),
|
||||||
(ID_NEW.COMBO_BOX, 'ComboBox', 'Create combo box'),
|
(ID_NEW.COMBO_BOX, 'ComboBox', 'Create combo box'),
|
||||||
(ID_NEW.LIST_BOX, 'ListBox', 'Create list box'),
|
(ID_NEW.LIST_BOX, 'ListBox', 'Create list box'),
|
||||||
|
(ID_NEW.CHECK_LIST, 'CheckListBox', 'Create checklist box'),
|
||||||
],
|
],
|
||||||
['container', 'Containers',
|
['container', 'Containers',
|
||||||
(ID_NEW.PANEL, 'Panel', 'Create panel'),
|
(ID_NEW.PANEL, 'Panel', 'Create panel'),
|
||||||
(ID_NEW.NOTEBOOK, 'Notebook', 'Create notebook control'),
|
(ID_NEW.NOTEBOOK, 'Notebook', 'Create notebook control'),
|
||||||
|
(ID_NEW.CHOICEBOOK, 'Choicebook', 'Create choicebook control'),
|
||||||
|
(ID_NEW.LISTBOOK, 'Listbook', 'Create listbook control'),
|
||||||
(ID_NEW.SPLITTER_WINDOW, 'SplitterWindow', 'Create splitter window'),
|
(ID_NEW.SPLITTER_WINDOW, 'SplitterWindow', 'Create splitter window'),
|
||||||
(ID_NEW.TOOL_BAR, 'ToolBar', 'Create toolbar'),
|
(ID_NEW.TOOL_BAR, 'ToolBar', 'Create toolbar'),
|
||||||
|
(ID_NEW.STATUS_BAR, 'StatusBar', 'Create status bar'),
|
||||||
# (ID_NEW.WIZARD_PAGE, 'Wizard Page', 'Create wizard page'),
|
# (ID_NEW.WIZARD_PAGE, 'Wizard Page', 'Create wizard page'),
|
||||||
(ID_NEW.WIZARD_PAGE_SIMPLE, 'WizardPageSimple', 'Create simple wizard page'),
|
(ID_NEW.WIZARD_PAGE_SIMPLE, 'WizardPageSimple', 'Create simple wizard page'),
|
||||||
],
|
],
|
||||||
@@ -311,7 +333,6 @@ class PullDownMenu:
|
|||||||
(ID_NEW.GAUGE, 'Gauge', 'Create gauge'),
|
(ID_NEW.GAUGE, 'Gauge', 'Create gauge'),
|
||||||
(ID_NEW.SCROLL_BAR, 'ScrollBar', 'Create scroll bar'),
|
(ID_NEW.SCROLL_BAR, 'ScrollBar', 'Create scroll bar'),
|
||||||
(ID_NEW.LIST_CTRL, 'ListCtrl', 'Create list control'),
|
(ID_NEW.LIST_CTRL, 'ListCtrl', 'Create list control'),
|
||||||
(ID_NEW.CHECK_LIST, 'CheckList', 'Create check list'),
|
|
||||||
],
|
],
|
||||||
['button', 'Buttons',
|
['button', 'Buttons',
|
||||||
(ID_NEW.BUTTON, 'Button', 'Create button'),
|
(ID_NEW.BUTTON, 'Button', 'Create button'),
|
||||||
@@ -325,6 +346,7 @@ class PullDownMenu:
|
|||||||
(ID_NEW.RADIO_BOX, 'RadioBox', 'Create radio box'),
|
(ID_NEW.RADIO_BOX, 'RadioBox', 'Create radio box'),
|
||||||
(ID_NEW.COMBO_BOX, 'ComboBox', 'Create combo box'),
|
(ID_NEW.COMBO_BOX, 'ComboBox', 'Create combo box'),
|
||||||
(ID_NEW.LIST_BOX, 'ListBox', 'Create list box'),
|
(ID_NEW.LIST_BOX, 'ListBox', 'Create list box'),
|
||||||
|
(ID_NEW.CHECK_LIST, 'CheckListBox', 'Create checklist box'),
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
self.stdButtons = [
|
self.stdButtons = [
|
||||||
@@ -592,15 +614,16 @@ class XML_Tree(wxTreeCtrl):
|
|||||||
# Root at (0,0)
|
# Root at (0,0)
|
||||||
if item == g.testWin.item: return wxPoint(0, 0)
|
if item == g.testWin.item: return wxPoint(0, 0)
|
||||||
itemParent = self.GetItemParent(item)
|
itemParent = self.GetItemParent(item)
|
||||||
# Select NB page
|
# Select book page
|
||||||
if not obj: obj = self.FindNodeObject(item)
|
if not obj: obj = self.FindNodeObject(item)
|
||||||
if self.GetPyData(itemParent).treeObject().__class__ == xxxNotebook:
|
if self.GetPyData(itemParent).treeObject().__class__ in \
|
||||||
notebook = self.FindNodeObject(itemParent)
|
[xxxNotebook, xxxChoicebook, xxxListbook]:
|
||||||
|
book = self.FindNodeObject(itemParent)
|
||||||
# Find position
|
# Find position
|
||||||
for i in range(notebook.GetPageCount()):
|
for i in range(book.GetPageCount()):
|
||||||
if notebook.GetPage(i) == obj:
|
if book.GetPage(i) == obj:
|
||||||
if notebook.GetSelection() != i:
|
if book.GetSelection() != i:
|
||||||
notebook.SetSelection(i)
|
book.SetSelection(i)
|
||||||
# Remove highlight - otherwise highlight window won't be visible
|
# Remove highlight - otherwise highlight window won't be visible
|
||||||
if g.testWin.highLight:
|
if g.testWin.highLight:
|
||||||
g.testWin.highLight.Remove()
|
g.testWin.highLight.Remove()
|
||||||
@@ -630,6 +653,7 @@ class XML_Tree(wxTreeCtrl):
|
|||||||
# Top-level sizer? return window's sizer
|
# Top-level sizer? return window's sizer
|
||||||
if xxx.isSizer and isinstance(parentWin, wxWindow):
|
if xxx.isSizer and isinstance(parentWin, wxWindow):
|
||||||
return parentWin.GetSizer()
|
return parentWin.GetSizer()
|
||||||
|
elif isinstance(xxx, xxxStatusBar): return None
|
||||||
elif isinstance(xxx, xxxToolBar):
|
elif isinstance(xxx, xxxToolBar):
|
||||||
# If it's the main toolbar, we can't really select it
|
# If it's the main toolbar, we can't really select it
|
||||||
if xxx.parent.__class__ == xxxFrame: return None
|
if xxx.parent.__class__ == xxxFrame: return None
|
||||||
@@ -642,6 +666,9 @@ class XML_Tree(wxTreeCtrl):
|
|||||||
if ch.GetWindow() and ch.GetWindow().GetName() == xxx.name:
|
if ch.GetWindow() and ch.GetWindow().GetName() == xxx.name:
|
||||||
return ch.GetWindow()
|
return ch.GetWindow()
|
||||||
return None
|
return None
|
||||||
|
elif xxx.parent.__class__ in [xxxChoicebook, xxxListbook]:
|
||||||
|
# First window is controld
|
||||||
|
return parentWin.GetChildren()[self.ItemIndex(item)+1]
|
||||||
# Otherwise get parent's object and it's child
|
# Otherwise get parent's object and it's child
|
||||||
child = parentWin.GetChildren()[self.ItemIndex(item)]
|
child = parentWin.GetChildren()[self.ItemIndex(item)]
|
||||||
# Return window or sizer for sizer items
|
# Return window or sizer for sizer items
|
||||||
@@ -649,7 +676,7 @@ class XML_Tree(wxTreeCtrl):
|
|||||||
if child.IsWindow(): child = child.GetWindow()
|
if child.IsWindow(): child = child.GetWindow()
|
||||||
elif child.IsSizer():
|
elif child.IsSizer():
|
||||||
child = child.GetSizer()
|
child = child.GetSizer()
|
||||||
# Test for notebook sizers
|
# Test for notebook sizers (deprecated)
|
||||||
if isinstance(child, wxNotebookSizer):
|
if isinstance(child, wxNotebookSizer):
|
||||||
child = child.GetNotebook()
|
child = child.GetNotebook()
|
||||||
return child
|
return child
|
||||||
@@ -729,18 +756,29 @@ class XML_Tree(wxTreeCtrl):
|
|||||||
xxx = self.GetPyData(item)
|
xxx = self.GetPyData(item)
|
||||||
if g.panel.IsModified():
|
if g.panel.IsModified():
|
||||||
self.Apply(xxx, item) # apply changes
|
self.Apply(xxx, item) # apply changes
|
||||||
treeObj = xxx.treeObject()
|
availableViews = ['wxFrame', 'wxPanel', 'wxDialog',
|
||||||
if treeObj.className not in ['wxFrame', 'wxPanel', 'wxDialog',
|
|
||||||
'wxMenuBar', 'wxToolBar', 'wxWizard',
|
'wxMenuBar', 'wxToolBar', 'wxWizard',
|
||||||
'wxWizardPageSimple']:
|
'wxWizardPageSimple']
|
||||||
|
originalItem = item
|
||||||
|
# Walk up the tree until we find an item that has a view
|
||||||
|
while item and self.GetPyData(item).treeObject().className not in availableViews:
|
||||||
|
item = self.GetItemParent(item)
|
||||||
|
if not item or not item.IsOk():
|
||||||
wxLogMessage('No view for this element (yet)')
|
wxLogMessage('No view for this element (yet)')
|
||||||
return
|
return
|
||||||
# Show item in bold
|
# Show item in bold
|
||||||
if g.testWin: # Reset old
|
if g.testWin: # Reset old
|
||||||
self.SetItemBold(g.testWin.item, False)
|
self.SetItemBold(g.testWin.item, False)
|
||||||
|
try:
|
||||||
|
wxBeginBusyCursor()
|
||||||
self.CreateTestWin(item)
|
self.CreateTestWin(item)
|
||||||
|
finally:
|
||||||
|
wxEndBusyCursor()
|
||||||
# Maybe an error occurred, so we need to test
|
# Maybe an error occurred, so we need to test
|
||||||
if g.testWin: self.SetItemBold(g.testWin.item)
|
if g.testWin:
|
||||||
|
self.SetItemBold(g.testWin.item)
|
||||||
|
# Select original item
|
||||||
|
self.ChangeSelection(originalItem)
|
||||||
|
|
||||||
# Double-click on Linux
|
# Double-click on Linux
|
||||||
def OnItemActivated(self, evt):
|
def OnItemActivated(self, evt):
|
||||||
@@ -778,7 +816,6 @@ class XML_Tree(wxTreeCtrl):
|
|||||||
# self.CreateTestWin(child)
|
# self.CreateTestWin(child)
|
||||||
# return
|
# return
|
||||||
|
|
||||||
wxBeginBusyCursor()
|
|
||||||
# Close old window, remember where it was
|
# Close old window, remember where it was
|
||||||
highLight = None
|
highLight = None
|
||||||
if testWin:
|
if testWin:
|
||||||
@@ -851,7 +888,7 @@ class XML_Tree(wxTreeCtrl):
|
|||||||
res.LoadOnFrame(testWin, g.frame, STD_NAME)
|
res.LoadOnFrame(testWin, g.frame, STD_NAME)
|
||||||
# Create status bar
|
# Create status bar
|
||||||
testWin.panel = testWin
|
testWin.panel = testWin
|
||||||
testWin.CreateStatusBar()
|
#testWin.CreateStatusBar()
|
||||||
testWin.SetClientSize(testWin.GetBestSize())
|
testWin.SetClientSize(testWin.GetBestSize())
|
||||||
testWin.SetPosition(pos)
|
testWin.SetPosition(pos)
|
||||||
testWin.Show(True)
|
testWin.Show(True)
|
||||||
@@ -932,7 +969,6 @@ class XML_Tree(wxTreeCtrl):
|
|||||||
wxLogError(traceback.format_exception(inf[0], inf[1], None)[-1])
|
wxLogError(traceback.format_exception(inf[0], inf[1], None)[-1])
|
||||||
wxLogError('Error loading resource')
|
wxLogError('Error loading resource')
|
||||||
wxMemoryFSHandler_RemoveFile('xxx.xrc')
|
wxMemoryFSHandler_RemoveFile('xxx.xrc')
|
||||||
wxEndBusyCursor()
|
|
||||||
|
|
||||||
def CloseTestWindow(self):
|
def CloseTestWindow(self):
|
||||||
if not g.testWin: return
|
if not g.testWin: return
|
||||||
@@ -1030,7 +1066,7 @@ class XML_Tree(wxTreeCtrl):
|
|||||||
SetMenu(m, pullDownMenu.stdButtons)
|
SetMenu(m, pullDownMenu.stdButtons)
|
||||||
else:
|
else:
|
||||||
SetMenu(m, pullDownMenu.controls)
|
SetMenu(m, pullDownMenu.controls)
|
||||||
if xxx.__class__ == xxxNotebook:
|
if xxx.__class__ in [xxxNotebook, xxxChoicebook, xxxListbook]:
|
||||||
m.Enable(m.FindItem('sizer'), False)
|
m.Enable(m.FindItem('sizer'), False)
|
||||||
elif not (xxx.isSizer or xxx.parent and xxx.parent.isSizer):
|
elif not (xxx.isSizer or xxx.parent and xxx.parent.isSizer):
|
||||||
m.Enable(ID_NEW.SPACER, False)
|
m.Enable(ID_NEW.SPACER, False)
|
||||||
|
@@ -54,7 +54,7 @@ Consult README file for the details.</HTML>
|
|||||||
|
|
||||||
defaultIDs = {xxxPanel:'PANEL', xxxDialog:'DIALOG', xxxFrame:'FRAME',
|
defaultIDs = {xxxPanel:'PANEL', xxxDialog:'DIALOG', xxxFrame:'FRAME',
|
||||||
xxxMenuBar:'MENUBAR', xxxMenu:'MENU', xxxToolBar:'TOOLBAR',
|
xxxMenuBar:'MENUBAR', xxxMenu:'MENU', xxxToolBar:'TOOLBAR',
|
||||||
xxxWizard:'WIZARD'}
|
xxxWizard:'WIZARD', xxxBitmap:'BITMAP', xxxIcon:'ICON'}
|
||||||
|
|
||||||
defaultName = 'UNTITLED.xrc'
|
defaultName = 'UNTITLED.xrc'
|
||||||
|
|
||||||
@@ -207,8 +207,8 @@ class Frame(wxFrame):
|
|||||||
'Refresh', 'Refresh view')
|
'Refresh', 'Refresh view')
|
||||||
tb.AddSimpleTool(self.ID_AUTO_REFRESH, images.getAutoRefreshBitmap(),
|
tb.AddSimpleTool(self.ID_AUTO_REFRESH, images.getAutoRefreshBitmap(),
|
||||||
'Auto-refresh', 'Toggle auto-refresh mode', True)
|
'Auto-refresh', 'Toggle auto-refresh mode', True)
|
||||||
if wxPlatform == '__WXGTK__':
|
# if wxPlatform == '__WXGTK__':
|
||||||
tb.AddSeparator() # otherwise auto-refresh sticks in status line
|
# tb.AddSeparator() # otherwise auto-refresh sticks in status line
|
||||||
tb.ToggleTool(self.ID_AUTO_REFRESH, conf.autoRefresh)
|
tb.ToggleTool(self.ID_AUTO_REFRESH, conf.autoRefresh)
|
||||||
tb.Realize()
|
tb.Realize()
|
||||||
|
|
||||||
@@ -482,7 +482,8 @@ class Frame(wxFrame):
|
|||||||
if not parent.__class__ in [xxxMainNode, xxxMenuBar, xxxMenu]: error = True
|
if not parent.__class__ in [xxxMainNode, xxxMenuBar, xxxMenu]: error = True
|
||||||
elif x.__class__ == xxxMenuItem:
|
elif x.__class__ == xxxMenuItem:
|
||||||
if not parent.__class__ in [xxxMenuBar, xxxMenu]: error = True
|
if not parent.__class__ in [xxxMenuBar, xxxMenu]: error = True
|
||||||
elif x.isSizer and parent.__class__ == xxxNotebook: error = True
|
elif x.isSizer and parent.__class__ in [xxxNotebook, xxxChoicebook, xxxListbook]:
|
||||||
|
error = True
|
||||||
else: # normal controls can be almost anywhere
|
else: # normal controls can be almost anywhere
|
||||||
if parent.__class__ == xxxMainNode or \
|
if parent.__class__ == xxxMainNode or \
|
||||||
parent.__class__ in [xxxMenuBar, xxxMenu]: error = True
|
parent.__class__ in [xxxMenuBar, xxxMenu]: error = True
|
||||||
@@ -497,10 +498,11 @@ class Frame(wxFrame):
|
|||||||
# If parent is sizer or notebook, child is of wrong class or
|
# If parent is sizer or notebook, child is of wrong class or
|
||||||
# parent is normal window, child is child container then detach child.
|
# parent is normal window, child is child container then detach child.
|
||||||
isChildContainer = isinstance(xxx, xxxChildContainer)
|
isChildContainer = isinstance(xxx, xxxChildContainer)
|
||||||
|
parentIsBook = parent.__class__ in [xxxNotebook, xxxChoicebook, xxxListbook]
|
||||||
if isChildContainer and \
|
if isChildContainer and \
|
||||||
((parent.isSizer and not isinstance(xxx, xxxSizerItem)) or \
|
((parent.isSizer and not isinstance(xxx, xxxSizerItem)) or \
|
||||||
(isinstance(parent, xxxNotebook) and not isinstance(xxx, xxxNotebookPage)) or \
|
(parentIsBook and not isinstance(xxx, xxxPage)) or \
|
||||||
not (parent.isSizer or isinstance(parent, xxxNotebook))):
|
not (parent.isSizer or parentIsBook)):
|
||||||
elem.removeChild(xxx.child.element) # detach child
|
elem.removeChild(xxx.child.element) # detach child
|
||||||
elem.unlink() # delete child container
|
elem.unlink() # delete child container
|
||||||
elem = xxx.child.element # replace
|
elem = xxx.child.element # replace
|
||||||
@@ -517,6 +519,14 @@ class Frame(wxFrame):
|
|||||||
pageElem = MakeEmptyDOM('notebookpage')
|
pageElem = MakeEmptyDOM('notebookpage')
|
||||||
pageElem.appendChild(elem)
|
pageElem.appendChild(elem)
|
||||||
elem = pageElem
|
elem = pageElem
|
||||||
|
elif isinstance(parent, xxxChoicebook) and not isChildContainer:
|
||||||
|
pageElem = MakeEmptyDOM('choicebookpage')
|
||||||
|
pageElem.appendChild(elem)
|
||||||
|
elem = pageElem
|
||||||
|
elif isinstance(parent, xxxListbook) and not isChildContainer:
|
||||||
|
pageElem = MakeEmptyDOM('listbookpage')
|
||||||
|
pageElem.appendChild(elem)
|
||||||
|
elem = pageElem
|
||||||
# Insert new node, register undo
|
# Insert new node, register undo
|
||||||
newItem = tree.InsertNode(parentLeaf, parent, elem, nextItem)
|
newItem = tree.InsertNode(parentLeaf, parent, elem, nextItem)
|
||||||
undoMan.RegisterUndo(UndoPasteCreate(parentLeaf, parent, newItem, selected))
|
undoMan.RegisterUndo(UndoPasteCreate(parentLeaf, parent, newItem, selected))
|
||||||
@@ -960,6 +970,7 @@ Homepage: http://xrced.sourceforge.net\
|
|||||||
def OnIdle(self, evt):
|
def OnIdle(self, evt):
|
||||||
if self.inIdle: return # Recursive call protection
|
if self.inIdle: return # Recursive call protection
|
||||||
self.inIdle = True
|
self.inIdle = True
|
||||||
|
try:
|
||||||
if tree.needUpdate:
|
if tree.needUpdate:
|
||||||
if conf.autoRefresh:
|
if conf.autoRefresh:
|
||||||
if g.testWin:
|
if g.testWin:
|
||||||
@@ -969,9 +980,17 @@ Homepage: http://xrced.sourceforge.net\
|
|||||||
self.SetStatusText('')
|
self.SetStatusText('')
|
||||||
tree.needUpdate = False
|
tree.needUpdate = False
|
||||||
elif tree.pendingHighLight:
|
elif tree.pendingHighLight:
|
||||||
|
try:
|
||||||
tree.HighLight(tree.pendingHighLight)
|
tree.HighLight(tree.pendingHighLight)
|
||||||
|
except:
|
||||||
|
# Remove highlight if any problem
|
||||||
|
if g.testWin.highLight:
|
||||||
|
g.testWin.highLight.Remove()
|
||||||
|
tree.pendingHighLight = None
|
||||||
|
raise
|
||||||
else:
|
else:
|
||||||
evt.Skip()
|
evt.Skip()
|
||||||
|
finally:
|
||||||
self.inIdle = False
|
self.inIdle = False
|
||||||
|
|
||||||
# We don't let close panel window
|
# We don't let close panel window
|
||||||
@@ -1018,9 +1037,10 @@ Homepage: http://xrced.sourceforge.net\
|
|||||||
g.testWin = None
|
g.testWin = None
|
||||||
# Numbers for new controls
|
# Numbers for new controls
|
||||||
self.maxIDs = {}
|
self.maxIDs = {}
|
||||||
self.maxIDs[xxxPanel] = self.maxIDs[xxxDialog] = self.maxIDs[xxxFrame] = \
|
for cl in [xxxPanel, xxxDialog, xxxFrame,
|
||||||
self.maxIDs[xxxMenuBar] = self.maxIDs[xxxMenu] = self.maxIDs[xxxToolBar] = \
|
xxxMenuBar, xxxMenu, xxxToolBar,
|
||||||
self.maxIDs[xxxWizard] = 0
|
xxxWizard, xxxBitmap, xxxIcon]:
|
||||||
|
self.maxIDs[cl] = 0
|
||||||
|
|
||||||
def SetModified(self, state=True):
|
def SetModified(self, state=True):
|
||||||
self.modified = state
|
self.modified = state
|
||||||
@@ -1138,6 +1158,11 @@ def usage():
|
|||||||
|
|
||||||
class App(wxApp):
|
class App(wxApp):
|
||||||
def OnInit(self):
|
def OnInit(self):
|
||||||
|
# Check version
|
||||||
|
if wxVERSION[:3] < MinWxVersion:
|
||||||
|
wxLogWarning('''\
|
||||||
|
This version of XRCed may not work correctly on your version of wxWindows. \
|
||||||
|
Please upgrade wxWindows to %d.%d.%d or higher.''' % MinWxVersion)
|
||||||
global debug
|
global debug
|
||||||
# Process comand-line
|
# Process comand-line
|
||||||
opts = args = None
|
opts = args = None
|
||||||
|
@@ -410,6 +410,7 @@ class xxxMainNode(xxxContainer):
|
|||||||
|
|
||||||
class xxxPanel(xxxContainer):
|
class xxxPanel(xxxContainer):
|
||||||
allParams = ['pos', 'size', 'style']
|
allParams = ['pos', 'size', 'style']
|
||||||
|
winStyles = ['wxNO_3D', 'wxTAB_TRAVERSAL']
|
||||||
styles = ['fg', 'bg', 'font', 'enabled', 'focused', 'hidden', 'exstyle',
|
styles = ['fg', 'bg', 'font', 'enabled', 'focused', 'hidden', 'exstyle',
|
||||||
'tooltip']
|
'tooltip']
|
||||||
|
|
||||||
@@ -418,11 +419,13 @@ class xxxDialog(xxxContainer):
|
|||||||
paramDict = {'centered': ParamBool}
|
paramDict = {'centered': ParamBool}
|
||||||
required = ['title']
|
required = ['title']
|
||||||
default = {'title': ''}
|
default = {'title': ''}
|
||||||
winStyles = ['wxDEFAULT_DIALOG_STYLE',
|
winStyles = ['wxDEFAULT_DIALOG_STYLE', 'wxCAPTION',
|
||||||
'wxCAPTION', 'wxMINIMIZE_BOX', 'wxMAXIMIZE_BOX', 'wxCLOSE_BOX',
|
'wxSTAY_ON_TOP', 'wxSYSTEM_MENU', 'wxTHICK_FRAME',
|
||||||
'wxSTAY_ON_TOP',
|
'wxRESIZE_BORDER', 'wxRESIZE_BOX', 'wxCLOSE_BOX',
|
||||||
'wxTHICK_FRAME',
|
'wxMAXIMIZE_BOX', 'wxMINIMIZE_BOX',
|
||||||
'wxNO_3D', 'wxDIALOG_NO_PARENT']
|
'wxDIALOG_MODAL', 'wxDIALOG_MODELESS', 'wxDIALOG_NO_PARENT'
|
||||||
|
'wxNO_3D', 'wxTAB_TRAVERSAL']
|
||||||
|
exStyles = ['wxWS_EX_VALIDATE_RECURSIVELY', 'wxDIALOG_EX_METAL']
|
||||||
styles = ['fg', 'bg', 'font', 'enabled', 'focused', 'hidden', 'exstyle',
|
styles = ['fg', 'bg', 'font', 'enabled', 'focused', 'hidden', 'exstyle',
|
||||||
'tooltip']
|
'tooltip']
|
||||||
|
|
||||||
@@ -431,13 +434,14 @@ class xxxFrame(xxxContainer):
|
|||||||
paramDict = {'centered': ParamBool}
|
paramDict = {'centered': ParamBool}
|
||||||
required = ['title']
|
required = ['title']
|
||||||
default = {'title': ''}
|
default = {'title': ''}
|
||||||
winStyles = ['wxDEFAULT_FRAME_STYLE',
|
winStyles = ['wxDEFAULT_FRAME_STYLE', 'wxDEFAULT_DIALOG_STYLE', 'wxCAPTION',
|
||||||
'wxCAPTION', 'wxMINIMIZE_BOX', 'wxMAXIMIZE_BOX', 'wxCLOSE_BOX',
|
'wxSTAY_ON_TOP', 'wxSYSTEM_MENU', 'wxTHICK_FRAME',
|
||||||
'wxSTAY_ON_TOP',
|
'wxRESIZE_BORDER', 'wxRESIZE_BOX', 'wxCLOSE_BOX',
|
||||||
'wxSYSTEM_MENU', 'wxRESIZE_BORDER',
|
'wxMAXIMIZE_BOX', 'wxMINIMIZE_BOX',
|
||||||
'wxFRAME_TOOL_WINDOW', 'wxFRAME_NO_TASKBAR',
|
'wxFRAME_NO_TASKBAR', 'wxFRAME_SHAPED', 'wxFRAME_TOOL_WINDOW',
|
||||||
'wxFRAME_FLOAT_ON_PARENT', 'wxFRAME_SHAPED'
|
'wxFRAME_FLOAT_ON_PARENT',
|
||||||
]
|
'wxNO_3D', 'wxTAB_TRAVERSAL']
|
||||||
|
exStyles = ['wxWS_EX_VALIDATE_RECURSIVELY', 'wxFRAME_EX_METAL']
|
||||||
styles = ['fg', 'bg', 'font', 'enabled', 'focused', 'hidden', 'exstyle',
|
styles = ['fg', 'bg', 'font', 'enabled', 'focused', 'hidden', 'exstyle',
|
||||||
'tooltip']
|
'tooltip']
|
||||||
|
|
||||||
@@ -458,6 +462,13 @@ class xxxToolBar(xxxContainer):
|
|||||||
'wxTB_3DBUTTONS','wxTB_TEXT', 'wxTB_NOICONS', 'wxTB_NODIVIDER',
|
'wxTB_3DBUTTONS','wxTB_TEXT', 'wxTB_NOICONS', 'wxTB_NODIVIDER',
|
||||||
'wxTB_NOALIGN', 'wxTB_HORZ_LAYOUT', 'wxTB_HORZ_TEXT']
|
'wxTB_NOALIGN', 'wxTB_HORZ_LAYOUT', 'wxTB_HORZ_TEXT']
|
||||||
|
|
||||||
|
class xxxStatusBar(xxxObject):
|
||||||
|
hasStyle = False
|
||||||
|
allParams = ['fields', 'widths', 'styles', 'style']
|
||||||
|
paramDict = {'fields': ParamIntNN, 'widths': ParamText, 'styles': ParamText,
|
||||||
|
'style': ParamNonGenericStyle}
|
||||||
|
winStyles = ['wxST_SIZEGRIP']
|
||||||
|
|
||||||
class xxxWizard(xxxContainer):
|
class xxxWizard(xxxContainer):
|
||||||
allParams = ['title', 'bitmap', 'pos']
|
allParams = ['title', 'bitmap', 'pos']
|
||||||
required = ['title']
|
required = ['title']
|
||||||
@@ -505,8 +516,24 @@ class xxxStaticBitmap(xxxObject):
|
|||||||
|
|
||||||
class xxxTextCtrl(xxxObject):
|
class xxxTextCtrl(xxxObject):
|
||||||
allParams = ['value', 'pos', 'size', 'style']
|
allParams = ['value', 'pos', 'size', 'style']
|
||||||
winStyles = ['wxTE_PROCESS_ENTER', 'wxTE_PROCESS_TAB', 'wxTE_MULTILINE',
|
winStyles = ['wxTE_NO_VSCROLL',
|
||||||
'wxTE_PASSWORD', 'wxTE_READONLY', 'wxHSCROLL']
|
'wxTE_AUTO_SCROLL',
|
||||||
|
'wxTE_PROCESS_ENTER',
|
||||||
|
'wxTE_PROCESS_TAB',
|
||||||
|
'wxTE_MULTILINE',
|
||||||
|
'wxTE_PASSWORD',
|
||||||
|
'wxTE_READONLY',
|
||||||
|
'wxHSCROLL',
|
||||||
|
'wxTE_RICH',
|
||||||
|
'wxTE_RICH2',
|
||||||
|
'wxTE_AUTO_URL',
|
||||||
|
'wxTE_NOHIDESEL',
|
||||||
|
'wxTE_LEFT',
|
||||||
|
'wxTE_CENTRE',
|
||||||
|
'wxTE_RIGHT',
|
||||||
|
'wxTE_DONTWRAP',
|
||||||
|
'wxTE_LINEWRAP',
|
||||||
|
'wxTE_WORDWRAP']
|
||||||
paramDict = {'value': ParamMultilineText}
|
paramDict = {'value': ParamMultilineText}
|
||||||
|
|
||||||
class xxxChoice(xxxObject):
|
class xxxChoice(xxxObject):
|
||||||
@@ -544,42 +571,71 @@ class xxxListCtrl(xxxObject):
|
|||||||
winStyles = ['wxLC_LIST', 'wxLC_REPORT', 'wxLC_ICON', 'wxLC_SMALL_ICON',
|
winStyles = ['wxLC_LIST', 'wxLC_REPORT', 'wxLC_ICON', 'wxLC_SMALL_ICON',
|
||||||
'wxLC_ALIGN_TOP', 'wxLC_ALIGN_LEFT', 'wxLC_AUTOARRANGE',
|
'wxLC_ALIGN_TOP', 'wxLC_ALIGN_LEFT', 'wxLC_AUTOARRANGE',
|
||||||
'wxLC_USER_TEXT', 'wxLC_EDIT_LABELS', 'wxLC_NO_HEADER',
|
'wxLC_USER_TEXT', 'wxLC_EDIT_LABELS', 'wxLC_NO_HEADER',
|
||||||
'wxLC_SINGLE_SEL', 'wxLC_SORT_ASCENDING', 'wxLC_SORT_DESCENDING']
|
'wxLC_SINGLE_SEL', 'wxLC_SORT_ASCENDING', 'wxLC_SORT_DESCENDING',
|
||||||
|
'wxLC_VIRTUAL', 'wxLC_HRULES', 'wxLC_VRULES', 'wxLC_NO_SORT_HEADER']
|
||||||
|
|
||||||
class xxxTreeCtrl(xxxObject):
|
class xxxTreeCtrl(xxxObject):
|
||||||
allParams = ['pos', 'size', 'style']
|
allParams = ['pos', 'size', 'style']
|
||||||
winStyles = ['wxTR_HAS_BUTTONS', 'wxTR_NO_LINES', 'wxTR_LINES_AT_ROOT',
|
winStyles = ['wxTR_EDIT_LABELS',
|
||||||
'wxTR_EDIT_LABELS', 'wxTR_MULTIPLE']
|
'wxTR_NO_BUTTONS',
|
||||||
|
'wxTR_HAS_BUTTONS',
|
||||||
|
'wxTR_TWIST_BUTTONS',
|
||||||
|
'wxTR_NO_LINES',
|
||||||
|
'wxTR_FULL_ROW_HIGHLIGHT',
|
||||||
|
'wxTR_LINES_AT_ROOT',
|
||||||
|
'wxTR_HIDE_ROOT',
|
||||||
|
'wxTR_ROW_LINES',
|
||||||
|
'wxTR_HAS_VARIABLE_ROW_HEIGHT',
|
||||||
|
'wxTR_SINGLE',
|
||||||
|
'wxTR_MULTIPLE',
|
||||||
|
'wxTR_EXTENDED',
|
||||||
|
'wxTR_DEFAULT_STYLE']
|
||||||
|
|
||||||
class xxxHtmlWindow(xxxObject):
|
class xxxHtmlWindow(xxxObject):
|
||||||
allParams = ['pos', 'size', 'style', 'borders', 'url', 'htmlcode']
|
allParams = ['pos', 'size', 'style', 'borders', 'url', 'htmlcode']
|
||||||
paramDict = {'borders': ParamUnit, 'htmlcode':ParamMultilineText}
|
paramDict = {'htmlcode':ParamMultilineText}
|
||||||
winStyles = ['wxHW_SCROLLBAR_NEVER', 'wxHW_SCROLLBAR_AUTO']
|
winStyles = ['wxHW_SCROLLBAR_NEVER', 'wxHW_SCROLLBAR_AUTO', 'wxHW_NO_SELECTION']
|
||||||
|
|
||||||
class xxxCalendarCtrl(xxxObject):
|
class xxxCalendarCtrl(xxxObject):
|
||||||
allParams = ['pos', 'size', 'style']
|
allParams = ['pos', 'size', 'style']
|
||||||
|
winStyles = ['wxCAL_SUNDAY_FIRST', 'wxCAL_MONDAY_FIRST', 'wxCAL_SHOW_HOLIDAYS',
|
||||||
|
'wxCAL_NO_YEAR_CHANGE', 'wxCAL_NO_MONTH_CHANGE',
|
||||||
|
'wxCAL_SEQUENTIAL_MONTH_SELECTION', 'wxCAL_SHOW_SURROUNDING_WEEKS']
|
||||||
|
|
||||||
class xxxNotebook(xxxContainer):
|
class xxxNotebook(xxxContainer):
|
||||||
allParams = ['usenotebooksizer', 'pos', 'size', 'style']
|
allParams = ['pos', 'size', 'style']
|
||||||
paramDict = {'usenotebooksizer': ParamBool}
|
winStyles = ['wxNB_DEFAULT', 'wxNB_LEFT', 'wxNB_RIGHT', 'wxNB_BOTTOM',
|
||||||
winStyles = ['wxNB_FIXEDWIDTH', 'wxNB_LEFT', 'wxNB_RIGHT', 'wxNB_BOTTOM']
|
'wxNB_FIXEDWIDTH', 'wxNB_MULTILINE', 'wxNB_NOPAGETHEME']
|
||||||
|
|
||||||
|
class xxxChoicebook(xxxContainer):
|
||||||
|
allParams = ['pos', 'size', 'style']
|
||||||
|
winStyles = ['wxCHB_DEFAULT', 'wxCHB_LEFT', 'wxCHB_RIGHT', 'wxCHB_TOP', 'wxCHB_BOTTOM']
|
||||||
|
|
||||||
|
class xxxListbook(xxxContainer):
|
||||||
|
allParams = ['pos', 'size', 'style']
|
||||||
|
winStyles = ['wxLB_DEFAULT', 'wxLB_LEFT', 'wxLB_RIGHT', 'wxLB_TOP', 'wxLB_BOTTOM']
|
||||||
|
|
||||||
class xxxSplitterWindow(xxxContainer):
|
class xxxSplitterWindow(xxxContainer):
|
||||||
allParams = ['orientation', 'sashpos', 'minsize', 'pos', 'size', 'style']
|
allParams = ['orientation', 'sashpos', 'minsize', 'pos', 'size', 'style']
|
||||||
paramDict = {'orientation': ParamOrientation, 'sashpos': ParamUnit, 'minsize': ParamUnit }
|
paramDict = {'orientation': ParamOrientation, 'sashpos': ParamUnit, 'minsize': ParamUnit }
|
||||||
winStyles = ['wxSP_3D', 'wxSP_3DSASH', 'wxSP_3DBORDER', 'wxSP_BORDER',
|
winStyles = ['wxSP_3D', 'wxSP_3DSASH', 'wxSP_3DBORDER',
|
||||||
'wxSP_NOBORDER', 'wxSP_PERMIT_UNSPLIT', 'wxSP_LIVE_UPDATE',
|
'wxSP_FULLSASH', 'wxSP_NOBORDER', 'wxSP_PERMIT_UNSPLIT', 'wxSP_LIVE_UPDATE',
|
||||||
'wxSP_NO_XP_THEME' ]
|
'wxSP_NO_XP_THEME' ]
|
||||||
|
|
||||||
class xxxGenericDirCtrl(xxxObject):
|
class xxxGenericDirCtrl(xxxObject):
|
||||||
allParams = ['defaultfolder', 'filter', 'defaultfilter', 'pos', 'size', 'style']
|
allParams = ['defaultfolder', 'filter', 'defaultfilter', 'pos', 'size', 'style']
|
||||||
paramDict = {'defaultfilter': ParamIntNN}
|
paramDict = {'defaultfilter': ParamIntNN}
|
||||||
winStyles = ['wxDIRCTRL_DIR_ONLY', 'wxDIRCTRL_3D_INTERNAL', 'wxDIRCTRL_SELECT_FIRST',
|
winStyles = ['wxDIRCTRL_DIR_ONLY', 'wxDIRCTRL_3D_INTERNAL', 'wxDIRCTRL_SELECT_FIRST',
|
||||||
'wxDIRCTRL_SHOW_FILTERS', 'wxDIRCTRL_EDIT_LABELS']
|
'wxDIRCTRL_SHOW_FILTERS']
|
||||||
|
|
||||||
class xxxScrolledWindow(xxxContainer):
|
class xxxScrolledWindow(xxxContainer):
|
||||||
allParams = ['pos', 'size', 'style']
|
allParams = ['pos', 'size', 'style']
|
||||||
winStyles = ['wxHSCROLL', 'wxVSCROLL']
|
winStyles = ['wxHSCROLL', 'wxVSCROLL', 'wxNO_3D', 'wxTAB_TRAVERSAL']
|
||||||
|
|
||||||
|
class xxxDateCtrl(xxxObject):
|
||||||
|
allParams = ['pos', 'size', 'style', 'borders']
|
||||||
|
winStyles = ['wxDP_DEFAULT', 'wxDP_SPIN', 'wxDP_DROPDOWN',
|
||||||
|
'wxDP_ALLOWNONE', 'wxDP_SHOWCENTURY']
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Buttons
|
# Buttons
|
||||||
@@ -588,20 +644,20 @@ class xxxButton(xxxObject):
|
|||||||
allParams = ['label', 'default', 'pos', 'size', 'style']
|
allParams = ['label', 'default', 'pos', 'size', 'style']
|
||||||
paramDict = {'default': ParamBool}
|
paramDict = {'default': ParamBool}
|
||||||
required = ['label']
|
required = ['label']
|
||||||
winStyles = ['wxBU_LEFT', 'wxBU_TOP', 'wxBU_RIGHT', 'wxBU_BOTTOM']
|
winStyles = ['wxBU_LEFT', 'wxBU_TOP', 'wxBU_RIGHT', 'wxBU_BOTTOM', 'wxBU_EXACTFIT']
|
||||||
|
|
||||||
class xxxBitmapButton(xxxObject):
|
class xxxBitmapButton(xxxObject):
|
||||||
allParams = ['bitmap', 'selected', 'focus', 'disabled', 'default',
|
allParams = ['bitmap', 'selected', 'focus', 'disabled', 'default',
|
||||||
'pos', 'size', 'style']
|
'pos', 'size', 'style']
|
||||||
required = ['bitmap']
|
required = ['bitmap']
|
||||||
winStyles = ['wxBU_AUTODRAW', 'wxBU_LEFT', 'wxBU_TOP',
|
winStyles = ['wxBU_AUTODRAW', 'wxBU_LEFT', 'wxBU_RIGHT',
|
||||||
'wxBU_RIGHT', 'wxBU_BOTTOM']
|
'wxBU_TOP', 'wxBU_BOTTOM', 'wxBU_EXACTFIT']
|
||||||
|
|
||||||
class xxxRadioButton(xxxObject):
|
class xxxRadioButton(xxxObject):
|
||||||
allParams = ['label', 'value', 'pos', 'size', 'style']
|
allParams = ['label', 'value', 'pos', 'size', 'style']
|
||||||
paramDict = {'value': ParamBool}
|
paramDict = {'value': ParamBool}
|
||||||
required = ['label']
|
required = ['label']
|
||||||
winStyles = ['wxRB_GROUP']
|
winStyles = ['wxRB_GROUP', 'wxRB_SINGLE']
|
||||||
|
|
||||||
class xxxSpinButton(xxxObject):
|
class xxxSpinButton(xxxObject):
|
||||||
allParams = ['value', 'min', 'max', 'pos', 'size', 'style']
|
allParams = ['value', 'min', 'max', 'pos', 'size', 'style']
|
||||||
@@ -630,7 +686,8 @@ class xxxRadioBox(xxxObject):
|
|||||||
paramDict = {'dimension': ParamIntNN}
|
paramDict = {'dimension': ParamIntNN}
|
||||||
required = ['label', 'content']
|
required = ['label', 'content']
|
||||||
default = {'content': '[]'}
|
default = {'content': '[]'}
|
||||||
winStyles = ['wxRA_SPECIFY_ROWS', 'wxRA_SPECIFY_COLS']
|
winStyles = ['wxRA_SPECIFY_ROWS', 'wxRA_SPECIFY_COLS', 'wxRA_HORIZONTAL',
|
||||||
|
'wxRA_VERTICAL']
|
||||||
|
|
||||||
class xxxCheckBox(xxxObject):
|
class xxxCheckBox(xxxObject):
|
||||||
allParams = ['label', 'checked', 'pos', 'size', 'style']
|
allParams = ['label', 'checked', 'pos', 'size', 'style']
|
||||||
@@ -656,10 +713,8 @@ class xxxCheckList(xxxObject):
|
|||||||
allParams = ['content', 'pos', 'size', 'style']
|
allParams = ['content', 'pos', 'size', 'style']
|
||||||
required = ['content']
|
required = ['content']
|
||||||
default = {'content': '[]'}
|
default = {'content': '[]'}
|
||||||
winStyles = ['wxLC_LIST', 'wxLC_REPORT', 'wxLC_ICON', 'wxLC_SMALL_ICON',
|
winStyles = ['wxLB_SINGLE', 'wxLB_MULTIPLE', 'wxLB_EXTENDED', 'wxLB_HSCROLL',
|
||||||
'wxLC_ALIGN_TOP', 'wxLC_ALIGN_LEFT', 'wxLC_AUTOARRANGE',
|
'wxLB_ALWAYS_SB', 'wxLB_NEEDED_SB', 'wxLB_SORT']
|
||||||
'wxLC_USER_TEXT', 'wxLC_EDIT_LABELS', 'wxLC_NO_HEADER',
|
|
||||||
'wxLC_SINGLE_SEL', 'wxLC_SORT_ASCENDING', 'wxLC_SORT_DESCENDING']
|
|
||||||
paramDict = {'content': ParamContentCheckList}
|
paramDict = {'content': ParamContentCheckList}
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
@@ -711,7 +766,7 @@ class xxxParamMulti:
|
|||||||
class xxxFlexGridSizer(xxxGridSizer):
|
class xxxFlexGridSizer(xxxGridSizer):
|
||||||
specials = ['growablecols', 'growablerows']
|
specials = ['growablecols', 'growablerows']
|
||||||
allParams = ['cols', 'rows', 'vgap', 'hgap'] + specials
|
allParams = ['cols', 'rows', 'vgap', 'hgap'] + specials
|
||||||
paramDict = {'growablecols':ParamIntList, 'growablerows':ParamIntList}
|
paramDict = {'growablecols': ParamIntList, 'growablerows': ParamIntList}
|
||||||
# Special processing for growable* parameters
|
# Special processing for growable* parameters
|
||||||
# (they are represented by several nodes)
|
# (they are represented by several nodes)
|
||||||
def special(self, tag, node):
|
def special(self, tag, node):
|
||||||
@@ -800,7 +855,7 @@ class xxxSizerItemButton(xxxSizerItem):
|
|||||||
self.child.allParams = self.child.allParams[:]
|
self.child.allParams = self.child.allParams[:]
|
||||||
self.child.allParams.remove('pos')
|
self.child.allParams.remove('pos')
|
||||||
|
|
||||||
class xxxNotebookPage(xxxChildContainer):
|
class xxxPage(xxxChildContainer):
|
||||||
allParams = ['label', 'selected']
|
allParams = ['label', 'selected']
|
||||||
paramDict = {'selected': ParamBool}
|
paramDict = {'selected': ParamBool}
|
||||||
required = ['label']
|
required = ['label']
|
||||||
@@ -845,6 +900,7 @@ class xxxSeparator(xxxObject):
|
|||||||
|
|
||||||
class xxxUnknown(xxxObject):
|
class xxxUnknown(xxxObject):
|
||||||
allParams = ['pos', 'size', 'style']
|
allParams = ['pos', 'size', 'style']
|
||||||
|
winStyles = ['wxNO_FULL_REPAINT_ON_RESIZE']
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
@@ -854,6 +910,7 @@ xxxDict = {
|
|||||||
'wxFrame': xxxFrame,
|
'wxFrame': xxxFrame,
|
||||||
'tool': xxxTool,
|
'tool': xxxTool,
|
||||||
'wxToolBar': xxxToolBar,
|
'wxToolBar': xxxToolBar,
|
||||||
|
'wxStatusBar': xxxStatusBar,
|
||||||
'wxWizard': xxxWizard,
|
'wxWizard': xxxWizard,
|
||||||
'wxWizardPage': xxxWizardPage,
|
'wxWizardPage': xxxWizardPage,
|
||||||
'wxWizardPageSimple': xxxWizardPageSimple,
|
'wxWizardPageSimple': xxxWizardPageSimple,
|
||||||
@@ -884,14 +941,19 @@ xxxDict = {
|
|||||||
'wxTreeCtrl': xxxTreeCtrl,
|
'wxTreeCtrl': xxxTreeCtrl,
|
||||||
'wxListCtrl': xxxListCtrl,
|
'wxListCtrl': xxxListCtrl,
|
||||||
'wxCheckListBox': xxxCheckList,
|
'wxCheckListBox': xxxCheckList,
|
||||||
|
'notebookpage': xxxPage,
|
||||||
|
'choicebookpage': xxxPage,
|
||||||
|
'listbookpage': xxxPage,
|
||||||
'wxNotebook': xxxNotebook,
|
'wxNotebook': xxxNotebook,
|
||||||
|
'wxChoicebook': xxxChoicebook,
|
||||||
|
'wxListbook': xxxListbook,
|
||||||
'wxSplitterWindow': xxxSplitterWindow,
|
'wxSplitterWindow': xxxSplitterWindow,
|
||||||
'notebookpage': xxxNotebookPage,
|
|
||||||
'wxHtmlWindow': xxxHtmlWindow,
|
'wxHtmlWindow': xxxHtmlWindow,
|
||||||
'wxCalendarCtrl': xxxCalendarCtrl,
|
'wxCalendarCtrl': xxxCalendarCtrl,
|
||||||
'wxGenericDirCtrl': xxxGenericDirCtrl,
|
'wxGenericDirCtrl': xxxGenericDirCtrl,
|
||||||
'wxSpinCtrl': xxxSpinCtrl,
|
'wxSpinCtrl': xxxSpinCtrl,
|
||||||
'wxScrolledWindow': xxxScrolledWindow,
|
'wxScrolledWindow': xxxScrolledWindow,
|
||||||
|
'wxDatePickerCtrl': xxxDateCtrl,
|
||||||
|
|
||||||
'wxBoxSizer': xxxBoxSizer,
|
'wxBoxSizer': xxxBoxSizer,
|
||||||
'wxStaticBoxSizer': xxxStaticBoxSizer,
|
'wxStaticBoxSizer': xxxStaticBoxSizer,
|
||||||
@@ -979,6 +1041,14 @@ def MakeEmptyXXX(parent, className):
|
|||||||
pageElem = MakeEmptyDOM('notebookpage')
|
pageElem = MakeEmptyDOM('notebookpage')
|
||||||
pageElem.appendChild(elem)
|
pageElem.appendChild(elem)
|
||||||
elem = pageElem
|
elem = pageElem
|
||||||
|
elif isinstance(parent, xxxChoicebook):
|
||||||
|
pageElem = MakeEmptyDOM('choicebookpage')
|
||||||
|
pageElem.appendChild(elem)
|
||||||
|
elem = pageElem
|
||||||
|
elif isinstance(parent, xxxListbook):
|
||||||
|
pageElem = MakeEmptyDOM('listbookpage')
|
||||||
|
pageElem.appendChild(elem)
|
||||||
|
elem = pageElem
|
||||||
# Now just make object
|
# Now just make object
|
||||||
return MakeXXXFromDOM(parent, elem)
|
return MakeXXXFromDOM(parent, elem)
|
||||||
|
|
||||||
@@ -1002,6 +1072,14 @@ def MakeEmptyRefXXX(parent, ref):
|
|||||||
pageElem = MakeEmptyDOM('notebookpage')
|
pageElem = MakeEmptyDOM('notebookpage')
|
||||||
pageElem.appendChild(elem)
|
pageElem.appendChild(elem)
|
||||||
elem = pageElem
|
elem = pageElem
|
||||||
|
elif isinstance(parent, xxxChoicebook):
|
||||||
|
pageElem = MakeEmptyDOM('choicebookpage')
|
||||||
|
pageElem.appendChild(elem)
|
||||||
|
elem = pageElem
|
||||||
|
elif isinstance(parent, xxxListbook):
|
||||||
|
pageElem = MakeEmptyDOM('listbookpage')
|
||||||
|
pageElem.appendChild(elem)
|
||||||
|
elem = pageElem
|
||||||
# Now just make object
|
# Now just make object
|
||||||
return MakeXXXFromDOM(parent, elem)
|
return MakeXXXFromDOM(parent, elem)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user