# Use convertion from unicode to current encoding
self.textNode = text
# Value returns string
- if wxUSE_UNICODE: # no conversion is needed
+ if wx.USE_UNICODE: # no conversion is needed
def value(self):
return self.textNode.data
def update(self, value):
self.textNode.data = unicode(value, g.currentEncoding)
except UnicodeDecodeError:
self.textNode.data = unicode(value)
- #wxLogMessage("Unicode error: set encoding in file\nglobals.py to something appropriate")
+ #wx.LogMessage("Unicode error: set encoding in file\nglobals.py to something appropriate")
# Integer parameter
class xxxParamInt(xxxParam):
text = n.childNodes[0] # first child must be text node
assert text.nodeType == minidom.Node.TEXT_NODE
l.append(text)
- data.append(str(text.data))
+ data.append(text.data)
else: # remove other
node.removeChild(n)
n.unlink()
else:
self.element.appendChild(elem)
else:
- wxLogWarning('Required parameter %s of %s missing' %
+ wx.LogWarning('Required parameter %s of %s missing' %
(param, self.className))
# Returns real tree object
def treeObject(self):
def FindResource(name, classname='', recursive=True):
found = DoFindResource(g.tree.mainNode, name, classname, recursive)
if found: return found
- wxLogError('XRC resource "%s" not found!' % name)
+ wx.LogError('XRC resource "%s" not found!' % name)
################################################################################
default = {'title': ''}
winStyles = []
exStyles = ['wxWIZARD_EX_HELPBUTTON']
+ styles = ['fg', 'bg', 'font', 'exstyle']
class xxxWizardPage(xxxContainer):
allParams = ['bitmap']
class xxxBitmapButton(xxxObject):
allParams = ['bitmap', 'selected', 'focus', 'disabled', 'default',
'pos', 'size', 'style']
+ paramDict = {'selected': ParamBitmap, 'focus': ParamBitmap, 'disabled': ParamBitmap,
+ 'default': ParamBool}
required = ['bitmap']
winStyles = ['wxBU_AUTODRAW', 'wxBU_LEFT', 'wxBU_RIGHT',
'wxBU_TOP', 'wxBU_BOTTOM', 'wxBU_EXACTFIT']
}
# Create IDs for all parameters of all classes
-paramIDs = {'fg': wxNewId(), 'bg': wxNewId(), 'exstyle': wxNewId(), 'font': wxNewId(),
- 'enabled': wxNewId(), 'focused': wxNewId(), 'hidden': wxNewId(),
- 'tooltip': wxNewId(), 'encoding': wxNewId(),
- 'cellpos': wxNewId(), 'cellspan': wxNewId()
+paramIDs = {'fg': wx.NewId(), 'bg': wx.NewId(), 'exstyle': wx.NewId(), 'font': wx.NewId(),
+ 'enabled': wx.NewId(), 'focused': wx.NewId(), 'hidden': wx.NewId(),
+ 'tooltip': wx.NewId(), 'encoding': wx.NewId(),
+ 'cellpos': wx.NewId(), 'cellspan': wx.NewId()
}
for cl in xxxDict.values():
if cl.allParams:
for param in cl.allParams + cl.paramDict.keys():
if not paramIDs.has_key(param):
- paramIDs[param] = wxNewId()
+ paramIDs[param] = wx.NewId()
################################################################################
# Helper functions