rem
stringlengths
0
322k
add
stringlengths
0
2.05M
context
stringlengths
8
228k
dc.DrawRectangleRect(itemrect)
if wx.Platform in ["__WXGTK2__", "__WXMAC__"]: flags = wx.CONTROL_SELECTED if self._hasFocus: flags = flags | wx.CONTROL_FOCUSED wx.RendererNative.Get().DrawItemSelectionRect(self, dc, itemrect, flags) else: dc.DrawRectangleRect(itemrect)
def PaintItem(self, item, dc): """Actually paint an item."""
dirname = os.path.dirname(self.dataFile)
dirname = os.path.abspath(os.path.dirname(self.dataFile))
def OnSaveOrSaveAs(self, evt): if evt.GetId() == wxID_SAVEAS or not self.dataFile: if self.dataFile: defaultName = '' else: defaultName = 'UNTITLED.xrc' dirname = os.path.dirname(self.dataFile) dlg = wxFileDialog(self, 'Save As', dirname, defaultName, '*.xrc', wxSAVE | wxOVERWRITE_PROMPT | wxCHANGE_DIR) if dlg.ShowModal() == wxID_OK: path = dlg.GetPath() dlg.Destroy() else: dlg.Destroy() return else: path = self.dataFile self.SetStatusText('Saving...') wxYield() wxBeginBusyCursor() try: try: tmpFile,tmpName = tempfile.mkstemp(prefix='xrced-') os.close(tmpFile) self.Save(tmpName) # save temporary file first shutil.move(tmpName, path) self.dataFile = path self.SetStatusText('Data saved') self.SaveRecent(path) except IOError: self.SetStatusText('Failed') finally: wxEndBusyCursor()
if parent.__class__ not in [xxxMainNode, xxxPanel, xxxFrame]: error = True
if parent.__class__ not in [xxxMainNode, xxxPanel, xxxFrame] and \ not parent.isSizer: error = True
def OnPaste(self, evt): selected = tree.selection if not selected: return # key pressed event # For pasting with Ctrl pressed appendChild = True if evt.GetId() == pullDownMenu.ID_PASTE_SIBLING: appendChild = False elif evt.GetId() == self.ID_TOOL_PASTE: if g.tree.ctrl: appendChild = False else: appendChild = not tree.NeedInsert(selected) else: appendChild = not tree.NeedInsert(selected) xxx = tree.GetPyData(selected) if not appendChild: # If has next item, insert, else append to parent nextItem = tree.GetNextSibling(selected) parentLeaf = tree.GetItemParent(selected) # Expanded container (must have children) elif tree.IsExpanded(selected) and tree.GetChildrenCount(selected, False): # Insert as first child nextItem = tree.GetFirstChild(selected)[0] parentLeaf = selected else: # No children or unexpanded item - appendChild stays True nextItem = wxTreeItemId() # no next item parentLeaf = selected parent = tree.GetPyData(parentLeaf).treeObject()
grid1.Add( self.integerwidth, 0, wx.ALIGN_LEFT|wx.ALL, 5 )
grid1.Add( self.integerwidth, 0, wx.FIXED_SIZE|wx.ALIGN_LEFT|wx.ALL, 5 )
def __init__( self, parent, log ):
grid1.Add( self.groupchar, 0, wx.ALIGN_LEFT|wx.ALL, 5 )
grid1.Add( self.groupchar, 0, wx.FIXED_SIZE|wx.ALIGN_LEFT|wx.ALL, 5 )
def __init__( self, parent, log ):
grid1.Add( self.fractionwidth, 0, wx.ALIGN_LEFT|wx.ALL, 5 )
grid1.Add( self.fractionwidth, 0, wx.FIXED_SIZE|wx.ALIGN_LEFT|wx.ALL, 5 )
def __init__( self, parent, log ):
grid1.Add( self.decimalchar, 0, wx.ALIGN_LEFT|wx.ALL, 5 )
grid1.Add( self.decimalchar, 0, wx.FIXED_SIZE|wx.ALIGN_LEFT|wx.ALL, 5 )
def __init__( self, parent, log ):
def __init__(self, parent, id, pos, size, style):
def __init__(self, parent, id, pos, size, style, log):
def __init__(self, parent, id, pos, size, style): wxTreeCtrl.__init__(self, parent, id, pos, size, style)
self.log = log
def __init__(self, parent, id, pos, size, style): wxTreeCtrl.__init__(self, parent, id, pos, size, style)
wxTR_HAS_BUTTONS | wxTR_EDIT_LABELS)
wxTR_HAS_BUTTONS | wxTR_EDIT_LABELS , self.log)
def __init__(self, parent, log): # Use the WANTS_CHARS style so the panel doesn't eat the Return key. wxPanel.__init__(self, parent, -1, style=wxWANTS_CHARS) EVT_SIZE(self, self.OnSize)
EVT_WINDOW_CREATE(self, self.OnCreateWindow)
if wxPlatform != '__WXMSW__': EVT_WINDOW_CREATE(self, self.OnCreateWindow) else: hdl = self.GetHandle() self.renderWindow.SetWindowInfo(str(hdl))
def __init__(self, parent, id, position=wxDefaultPosition, size=wxDefaultSize, style=0): wxScrolledWindow.__init__(self, parent, id, position, size, style)
pen = wx.Pen(wx.NamedColour(colour), width, style)
if not isinstance(colour, wx.Colour): colour = wx.NamedColour(colour) pen = wx.Pen(colour, width, style)
def draw(self, dc, printerScale, coord= None): colour = self.attributes['colour'] width = self.attributes['width'] * printerScale style= self.attributes['style'] pen = wx.Pen(wx.NamedColour(colour), width, style) pen.SetCap(wx.CAP_BUTT) dc.SetPen(pen) if coord == None: dc.DrawLines(self.scaled) else: dc.DrawLines(coord) # draw legend line
dc.SetPen(wx.Pen(wx.NamedColour(colour), width))
if colour and not isinstance(colour, wx.Colour): colour = wx.NamedColour(colour) if fillcolour and not isinstance(fillcolour, wx.Colour): fillcolour = wx.NamedColour(fillcolour) dc.SetPen(wx.Pen(colour, width))
def draw(self, dc, printerScale, coord= None): colour = self.attributes['colour'] width = self.attributes['width'] * printerScale size = self.attributes['size'] * printerScale fillcolour = self.attributes['fillcolour'] fillstyle = self.attributes['fillstyle'] marker = self.attributes['marker']
dc.SetBrush(wx.Brush(wx.NamedColour(fillcolour),fillstyle)) else: dc.SetBrush(wx.Brush(wx.NamedColour(colour), fillstyle))
dc.SetBrush(wx.Brush(fillcolour,fillstyle)) else: dc.SetBrush(wx.Brush(colour, fillstyle))
def draw(self, dc, printerScale, coord= None): colour = self.attributes['colour'] width = self.attributes['width'] * printerScale size = self.attributes['size'] * printerScale fillcolour = self.attributes['fillcolour'] fillstyle = self.attributes['fillstyle'] marker = self.attributes['marker']
dc.SetPen(wx.Pen(wx.NamedColour('BLACK'), penWidth))
dc.SetPen(wx.Pen(self._gridColour, penWidth))
def _drawAxes(self, dc, p1, p2, scale, shift, xticks, yticks): penWidth= self.printerScale # increases thickness for printing only dc.SetPen(wx.Pen(wx.NamedColour('BLACK'), penWidth)) # set length of tick marks--long ones make grid if self._gridEnabled: x,y,width,height= self._point2ClientCoord(p1,p2) if self._gridEnabled == 'Horizontal': yTickLength= width/2.0 +1 xTickLength= 3 * self.printerScale elif self._gridEnabled == 'Vertical': yTickLength= 3 * self.printerScale xTickLength= height/2.0 +1 else: yTickLength= width/2.0 +1 xTickLength= height/2.0 +1 else: yTickLength= 3 * self.printerScale # lengthens lines for printing xTickLength= 3 * self.printerScale if self._xSpec is not 'none': lower, upper = p1[0],p2[0] text = 1 for y, d in [(p1[1], -xTickLength), (p2[1], xTickLength)]: # miny, maxy and tick lengths a1 = scale*_Numeric.array([lower, y])+shift a2 = scale*_Numeric.array([upper, y])+shift dc.DrawLine(a1[0],a1[1],a2[0],a2[1]) # draws upper and lower axis line for x, label in xticks: pt = scale*_Numeric.array([x, y])+shift dc.DrawLine(pt[0],pt[1],pt[0],pt[1] + d) # draws tick mark d units if text: dc.DrawText(label,pt[0],pt[1]) text = 0 # axis values not drawn on top side
pen.SetDashes([0, 1, 2, 3, 4, 5, 6, 7, 8])
pen.SetDashes([1, 2, 3, 4, 5, 6, 7, 8])
def DoDrawing(self, dc): dc.BeginDrawing() dc.SetPen(wxPen(wxNamedColour('RED'))) dc.DrawRectangle(5, 5, 50, 50)
testText =
testText = \
def test(): testText =
self._fgclr.SetSizeHints((20,20))
self._fgclr.SetMinSize((20,20))
def __init__(self, parent, label): wx.Panel.__init__(self, parent)
self._bgclr.SetSizeHints((20,20))
self._bgclr.SetMinSize((20,20))
def __init__(self, parent, label): wx.Panel.__init__(self, parent)
'src/_stockobjs.i', 'src/_dragimg.i',
'src/_stockobjs.i',
def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
'src/_cshelp.i',
'src/_cshelp.i', 'src/_dragimg.i',
def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
wxPanel.__init__(self, parent, -1)
wx.Panel.__init__(self, parent, -1)
def __init__(self, parent): wxPanel.__init__(self, parent, -1) print parent
text = wxStaticText(self, -1,
text = wx.StaticText(self, -1,
def __init__(self, parent): wxPanel.__init__(self, parent, -1) print parent
text.SetFont(wxFont(12, wxSWISS, wxNORMAL, wxBOLD))
text.SetFont(wx.Font(12, wx.SWISS, wx.NORMAL, wx.BOLD))
def __init__(self, parent): wxPanel.__init__(self, parent, -1) print parent
sizer = wxBoxSizer(wxVERTICAL) sizer.Add(text, 0, wxEXPAND|wxALL, 10) sizer.Add(pycrust, 1, wxEXPAND|wxBOTTOM|wxLEFT|wxRIGHT, 10)
sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(text, 0, wx.EXPAND|wx.ALL, 10) sizer.Add(pycrust, 1, wx.EXPAND|wx.BOTTOM|wx.LEFT|wx.RIGHT, 10)
def __init__(self, parent): wxPanel.__init__(self, parent, -1) print parent
includes += [ CONTRIBS_INC ]
CONTRIBS_INC = [ CONTRIBS_INC ] else: CONTRIBS_INC = []
def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
include_dirs = includes,
include_dirs = includes + CONTRIBS_INC,
def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
include_dirs = includes + [ location ],
include_dirs = includes + [ location ] + CONTRIBS_INC,
def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
dlg = wx.MessageDialog(frame, 'This demo only works on MSW.',
dlg = wx.MessageDialog(frame, 'This demo only works on Windows.',
def runTest(frame, nb, log): if wx.Platform == '__WXMSW__': win = TestPanel(nb, log, frame) return win else: dlg = wx.MessageDialog(frame, 'This demo only works on MSW.', 'Sorry', wx.OK | wx.ICON_INFORMATION) dlg.ShowModal() dlg.Destroy()
if type(self.ctx.classObj) != types.ClassType:
if type(self.ctx.classObj) not in [ types.ClassType, types.TypeType]:
def HandleWxpTag(self, tag): # create a new context object self.ctx = _Context()
print "Check imports is: " + `check_imports`
def import_hook(name, globals=None, locals=None, fromlist=None): # Fast path: see if the module has already been imported. try: return builtin_import(name, globals, locals, fromlist) except: print "Check imports is: " + `check_imports` if name.startswith("wxaddons"): print "Querying %s for module." % domain try: modname = name.split(".")[1] comp = None comp_xml = s.getComponent(modname) if not comp_xml: raise comp = xmlrpclib.loads(comp_xml)[0][0] url = get_url(comp["name"], comp["version"]) should_install = prompt_install(comp["name"], comp["version"]) if should_install: try: success = dl_and_install_addon(comp["name"], comp["version"], url) if not success: raise except: raise except: raise else: raise
be associated with any text entry control. (eg. wxTextCtrl, wxComboBox, etc.)
be associated with any text entry control. (eg. wx.TextCtrl, wx.ComboBox, etc.)
def _AdjustField(self, slice): """ 'Fixes' an integer field. Right or left-justifies, as required."""
if newvalue == self._curValue:
if newvalue == self._curValue or len(newvalue) == 0:
def _OnTextChange(self, event): """ Handler for EVT_TEXT event. self._Change() is provided for subclasses, and may return False to skip this method logic. This function returns True if the event detected was a legitimate event, or False if it was a "bogus" EVT_TEXT event. (NOTE: There is currently an issue with calling .SetValue from within the EVT_CHAR handler that causes duplicate EVT_TEXT events for the same change.) """ newvalue = self._GetValue()
The TAB key auto selects the entire contents of the wxTextCtrl *after*
The TAB key auto selects the entire contents of the wx.TextCtrl *after*
def _OnFocus(self,event): """ This event handler is currently necessary to work around new default behavior as of wxPython2.3.3; The TAB key auto selects the entire contents of the wxTextCtrl *after* the EVT_SET_FOCUS event occurs; therefore we can't query/adjust the selection *here*, because it hasn't happened yet. So to prevent this behavior, and preserve the correct selection when the focus event is not due to tab, we need to pull the following trick: """
valid = False
return False
def _validateNumeric(self, candidate=None): """ Validate that the value is within the specified range (if specified.)""" if candidate is None: value = self._GetValue() else: value = candidate try: groupchar = self._fields[0]._groupChar if self._isFloat: number = float(value.replace(groupchar, '').replace(self._decimalChar, '.').replace('(', '-').replace(')', '')) else: number = long( value.replace(groupchar, '').replace('(', '-').replace(')', '')) if value.strip(): if self._fields[0]._alignRight: require_digit_at = self._fields[0]._extent[1]-1 else: require_digit_at = self._fields[0]._extent[0]
do this is because the default behavior on TAB traveral in a wxTextCtrl is
do this is because the default behavior on TAB traveral in a wx.TextCtrl is
def _fixSelection(self): """ This gets called after the TAB traversal selection is made, if the focus event was due to this, but before the EVT_LEFT_* events if the focus shift was due to a mouse event.
do = wxTextDataObject()
do = wx.TextDataObject()
def _Cut(self): """ Used to override the default Cut() method in base controls, instead copying the selection to the clipboard and then blanking the selection, leaving only the mask in the selected area behind. Note: _Cut (read "undercut" ;-) must be called from a Cut() override in the derived control because the mixin functions can't override a method of a sibling class. """
wxTheClipboard.Open() wxTheClipboard.SetData(do) wxTheClipboard.Close()
wx.TheClipboard.Open() wx.TheClipboard.SetData(do) wx.TheClipboard.Close()
def _Cut(self): """ Used to override the default Cut() method in base controls, instead copying the selection to the clipboard and then blanking the selection, leaving only the mask in the selected area behind. Note: _Cut (read "undercut" ;-) must be called from a Cut() override in the derived control because the mixin functions can't override a method of a sibling class. """
do = wxTextDataObject() wxTheClipboard.Open() success = wxTheClipboard.GetData(do) wxTheClipboard.Close()
do = wx.TextDataObject() wx.TheClipboard.Open() success = wx.TheClipboard.GetData(do) wx.TheClipboard.Close()
def _getClipboardContents( self ): """ Subroutine for getting the current contents of the clipboard. """ do = wxTextDataObject() wxTheClipboard.Open() success = wxTheClipboard.GetData(do) wxTheClipboard.Close()
t2b1 = wx.Button(self, -1, "wx.FutureCall")
t2b1 = wx.Button(self, -1, "wx.CallLater")
def __init__(self, parent, log): self.log = log sp.ScrolledPanel.__init__(self, parent, -1)
self.t2 = wx.FutureCall(1000, self.OnTest2Timer,
self.t2 = wx.CallLater(1000, self.OnTest2Timer,
def OnTest2Start(self, evt): # Call OnTest2Timer one second in the future, passing some # optional arbitrary args. There is no need to hold a # reference to this one, unless we want to manipulate or query # it later like we do in the two methods below self.t2 = wx.FutureCall(1000, self.OnTest2Timer, 'a', 'b', 'c', one=1, two=2) self.log.write("FutureCall scheduled\n") self.t2b2.Enable()
self.log.write("FutureCall scheduled\n")
self.log.write("CallLater scheduled\n")
def OnTest2Start(self, evt): # Call OnTest2Timer one second in the future, passing some # optional arbitrary args. There is no need to hold a # reference to this one, unless we want to manipulate or query # it later like we do in the two methods below self.t2 = wx.FutureCall(1000, self.OnTest2Timer, 'a', 'b', 'c', one=1, two=2) self.log.write("FutureCall scheduled\n") self.t2b2.Enable()
self.log.write("FutureCall stopped, last return value was: %s\n" %
self.log.write("CallLater stopped, last return value was: %s\n" %
def OnTest2Stop(self, evt): self.t2.Stop() self.log.write("FutureCall stopped, last return value was: %s\n" % repr(self.t2.GetResult())) del self.t2 self.t2b2.Disable()
self.log.write("FutureCall called with args=%s, kwargs=%s\n" % (args, kw))
self.log.write("CallLater called with args=%s, kwargs=%s\n" % (args, kw))
def OnTest2Timer(self, *args, **kw): self.log.write("FutureCall called with args=%s, kwargs=%s\n" % (args, kw))
glLightModel(GL_LIGHT_MODEL_AMBIENT, [0.2, 0.2, 0.2, 1.0])
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, [0.2, 0.2, 0.2, 1.0])
def InitGL( self ): glMatrixMode(GL_PROJECTION) # camera frustrum setup glFrustum(-0.5, 0.5, -0.5, 0.5, 1.0, 3.0) glMaterial(GL_FRONT, GL_AMBIENT, [0.2, 0.2, 0.2, 1.0]) glMaterial(GL_FRONT, GL_DIFFUSE, [0.8, 0.8, 0.8, 1.0]) glMaterial(GL_FRONT, GL_SPECULAR, [1.0, 0.0, 1.0, 1.0]) glMaterial(GL_FRONT, GL_SHININESS, 50.0) glLight(GL_LIGHT0, GL_AMBIENT, [0.0, 1.0, 0.0, 1.0]) glLight(GL_LIGHT0, GL_DIFFUSE, [1.0, 1.0, 1.0, 1.0]) glLight(GL_LIGHT0, GL_SPECULAR, [1.0, 1.0, 1.0, 1.0]) glLight(GL_LIGHT0, GL_POSITION, [1.0, 1.0, 1.0, 0.0]) glLightModel(GL_LIGHT_MODEL_AMBIENT, [0.2, 0.2, 0.2, 1.0]) glEnable(GL_LIGHTING) glEnable(GL_LIGHT0) glDepthFunc(GL_LESS) glEnable(GL_DEPTH_TEST) glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) # position viewer glMatrixMode(GL_MODELVIEW) # position viewer glTranslatef(0.0, 0.0, -2.0);
glutInit([])
def InitGL( self ): glMatrixMode(GL_PROJECTION) # camera frustrum setup glFrustum(-0.5, 0.5, -0.5, 0.5, 1.0, 3.0) glMaterial(GL_FRONT, GL_AMBIENT, [0.2, 0.2, 0.2, 1.0]) glMaterial(GL_FRONT, GL_DIFFUSE, [0.8, 0.8, 0.8, 1.0]) glMaterial(GL_FRONT, GL_SPECULAR, [1.0, 0.0, 1.0, 1.0]) glMaterial(GL_FRONT, GL_SHININESS, 50.0) glLight(GL_LIGHT0, GL_AMBIENT, [0.0, 1.0, 0.0, 1.0]) glLight(GL_LIGHT0, GL_DIFFUSE, [1.0, 1.0, 1.0, 1.0]) glLight(GL_LIGHT0, GL_SPECULAR, [1.0, 1.0, 1.0, 1.0]) glLight(GL_LIGHT0, GL_POSITION, [1.0, 1.0, 1.0, 0.0]) glLightModel(GL_LIGHT_MODEL_AMBIENT, [0.2, 0.2, 0.2, 1.0]) glEnable(GL_LIGHTING) glEnable(GL_LIGHT0) glDepthFunc(GL_LESS) glEnable(GL_DEPTH_TEST) glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) # position viewer glMatrixMode(GL_MODELVIEW) # position viewer glTranslatef(0.0, 0.0, -2.0);
id=self.ID_WINDOW_TOP, id2=self.ID_WINDOW_BOTTOM,
id=min(winids), id2=max(winids)
def __init__(self, parent, log): wx.Panel.__init__(self, parent, -1)
win = wx.SashLayoutWindow( self, self.ID_WINDOW_TOP, wx.DefaultPosition, (200, 30), wx.NO_BORDER|wx.SW_3D ) win.SetDefaultSize((1000, 30)) win.SetOrientation(wx.LAYOUT_HORIZONTAL) win.SetAlignment(wx.LAYOUT_TOP) win.SetBackgroundColour(wx.Colour(255, 0, 0)) win.SetSashVisible(wx.SASH_BOTTOM, True) self.topWindow = win win = wx.SashLayoutWindow( self, self.ID_WINDOW_BOTTOM, wx.DefaultPosition, (200, 30), wx.NO_BORDER|wx.SW_3D ) win.SetDefaultSize((1000, 30)) win.SetOrientation(wx.LAYOUT_HORIZONTAL) win.SetAlignment(wx.LAYOUT_BOTTOM) win.SetBackgroundColour(wx.Colour(0, 0, 255)) win.SetSashVisible(wx.SASH_TOP, True) self.bottomWindow = win win = wx.SashLayoutWindow( self, self.ID_WINDOW_LEFT1, wx.DefaultPosition, (200, 30), wx.NO_BORDER|wx.SW_3D ) win.SetDefaultSize((120, 1000)) win.SetOrientation(wx.LAYOUT_VERTICAL) win.SetAlignment(wx.LAYOUT_LEFT) win.SetBackgroundColour(wx.Colour(0, 255, 0)) win.SetSashVisible(wx.SASH_RIGHT, True) win.SetExtraBorderSize(10) textWindow = wx.TextCtrl( win, -1, "", wx.DefaultPosition, wx.DefaultSize, wx.TE_MULTILINE|wx.SUNKEN_BORDER ) textWindow.SetValue("A sub window") self.leftWindow1 = win win = wx.SashLayoutWindow( self, self.ID_WINDOW_LEFT2, wx.DefaultPosition, (200, 30), wx.NO_BORDER|wx.SW_3D ) win.SetDefaultSize((120, 1000)) win.SetOrientation(wx.LAYOUT_VERTICAL) win.SetAlignment(wx.LAYOUT_LEFT) win.SetBackgroundColour(wx.Colour(0, 255, 255)) win.SetSashVisible(wx.SASH_RIGHT, True) self.leftWindow2 = win
def __init__(self, parent, log): wx.Panel.__init__(self, parent, -1)
eID = event.GetId()
eobj = event.GetEventObject()
def OnSashDrag(self, event): if event.GetDragStatus() == wx.SASH_STATUS_OUT_OF_RANGE: return
if eID == self.ID_WINDOW_TOP:
if eobj is self.topWindow: self.log.write('topwin received drag event')
def OnSashDrag(self, event): if event.GetDragStatus() == wx.SASH_STATUS_OUT_OF_RANGE: return
elif eID == self.ID_WINDOW_LEFT1:
elif eobj is self.leftWindow1: self.log.write('leftwin1 received drag event')
def OnSashDrag(self, event): if event.GetDragStatus() == wx.SASH_STATUS_OUT_OF_RANGE: return
elif eID == self.ID_WINDOW_LEFT2:
elif eobj is self.leftWindow2: self.log.write('leftwin2 received drag event')
def OnSashDrag(self, event): if event.GetDragStatus() == wx.SASH_STATUS_OUT_OF_RANGE: return
elif eID == self.ID_WINDOW_BOTTOM:
elif eobj is self.bottomWindow: self.log.write('bottomwin received drag event')
def OnSashDrag(self, event): if event.GetDragStatus() == wx.SASH_STATUS_OUT_OF_RANGE: return
wizard = wiz.Wizard(self, -1, "Simple Wizard", images.getWizTest1Bitmap())
wizard = wiz.Wizard(self, -1, "Dynamic Wizard", images.getWizTest1Bitmap())
def OnRunDynamicWizard(self, evt): # Create the wizard and the pages #wizard = wx.PreWizard() #wizard.SetExtraStyle(wx.WIZARD_EX_HELPBUTTON) #wizard.Create(self, self.ID_wiz, "Simple Wizard", # images.getWizTest1Bitmap()) wizard = wiz.Wizard(self, -1, "Simple Wizard", images.getWizTest1Bitmap())
def adjustLFLAGS(lfags, libdirs, libs):
def adjustLFLAGS(lflags, libdirs, libs):
def adjustLFLAGS(lfags, libdirs, libs): '''Extract the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
fgs.Add(wxTextCtrl(self, -1, "", validator = MyValidator(ALPHA_ONLY))
fgs.Add(wxTextCtrl(self, -1, "", validator = MyValidator(ALPHA_ONLY)))
def __init__(self, parent): wxPanel.__init__(self, parent, -1) self.SetAutoLayout(true) VSPACE = 10
fgs.Add(wxTextCtrl(self, -1, "", validator = MyValidator(DIGITS_ONLY)))
fgs.Add(wxTextCtrl(self, -1, "", validator = MyValidator(DIGIT_ONLY)))
def __init__(self, parent): wxPanel.__init__(self, parent, -1) self.SetAutoLayout(true) VSPACE = 10
dc.SetClippingRegion(0, 0, dcwidth, dcheight)
dc.SetClippingRegion((0, 0), (dcwidth, dcheight))
def OnPaint(self, event): dc = wx.PaintDC(self) dc.SetFont(self.GetFont()) dc.Clear() text = self.GetValue() textwidth, textheight = dc.GetTextExtent(text) dcwidth, dcheight = self.GetClientSize()
wxFlushEvents = misc2c.wxFlushEvents
def wxFindWindowAtPoint(*_args, **_kwargs): val = misc2c.wxFindWindowAtPoint(*_args,**_kwargs) return val
display an animation by extracing frames from a multi-images GIF file.
display an animation by extracing frames from a multi-image GIF file.
def runTest(frame, nb, log): win = TestPanel(nb, log) return win
'''Extrace the raw -I, -D, and -U flags and put them into
'''Extract the raw -I, -D, and -U flags and put them into
def adjustCFLAGS(cflags, defines, includes): '''Extrace the raw -I, -D, and -U flags and put them into defines and includes as needed.''' newCFLAGS = [] for flag in cflags: if flag[:2] == '-I': includes.append(flag[2:]) elif flag[:2] == '-D': flag = flag[2:] if flag.find('=') == -1: defines.append( (flag, None) ) else: defines.append( tuple(flag.split('=')) ) elif flag[:2] == '-U': defines.append( (flag[2:], ) ) else: newCFLAGS.append(flag) return newCFLAGS
opj(WXDIR, 'lib', 'vc_msw' + libFlag() + 'dll'),
opj(WXDIR, 'lib', 'vc_dll', 'msw' + libFlag()),
def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
libdirs = [ opj(WXDIR, 'lib', 'vc_msw' + libFlag() + 'dll') ]
libdirs = [ opj(WXDIR, 'lib', 'vc_dll') ]
def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS
Name("test1").Caption("Pane Caption").Top())
Name("test1").Caption("Pane Caption").Top(). CloseButton(True).MaximizeButton(True))
def __init__(self, parent, id=-1, title="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE | wx.SUNKEN_BORDER | wx.CLIP_CHILDREN):
Bottom().Position(1))
Bottom().Position(1).CloseButton(True).MaximizeButton(True))
def __init__(self, parent, id=-1, title="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE | wx.SUNKEN_BORDER | wx.CLIP_CHILDREN):
Bottom())
Bottom().CloseButton(True).MaximizeButton(True))
def __init__(self, parent, id=-1, title="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE | wx.SUNKEN_BORDER | wx.CLIP_CHILDREN):
Left())
Left().CloseButton(True).MaximizeButton(True))
def __init__(self, parent, id=-1, title="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE | wx.SUNKEN_BORDER | wx.CLIP_CHILDREN):
Right())
Right().CloseButton(True).MaximizeButton(True))
def __init__(self, parent, id=-1, title="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE | wx.SUNKEN_BORDER | wx.CLIP_CHILDREN):
Right().Row(1))
Right().Row(1).CloseButton(True).MaximizeButton(True))
def __init__(self, parent, id=-1, title="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE | wx.SUNKEN_BORDER | wx.CLIP_CHILDREN):
Left().Layer(1))
Left().Layer(1).CloseButton(True).MaximizeButton(True))
def __init__(self, parent, id=-1, title="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE | wx.SUNKEN_BORDER | wx.CLIP_CHILDREN):
Left().Layer(1).Position(1))
Left().Layer(1).Position(1).CloseButton(True).MaximizeButton(True))
def __init__(self, parent, id=-1, title="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE | wx.SUNKEN_BORDER | wx.CLIP_CHILDREN):
Bottom().Layer(1))
Bottom().Layer(1).CloseButton(True).MaximizeButton(True))
def __init__(self, parent, id=-1, title="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE | wx.SUNKEN_BORDER | wx.CLIP_CHILDREN):
Bottom().Layer(1).Position(1))
Bottom().Layer(1).Position(1).CloseButton(True).MaximizeButton(True))
def __init__(self, parent, id=-1, title="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE | wx.SUNKEN_BORDER | wx.CLIP_CHILDREN):
Bottom().Layer(1).Position(2).Fixed())
Bottom().Layer(1).Position(2).Fixed().CloseButton(True).MaximizeButton(True))
def __init__(self, parent, id=-1, title="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE | wx.SUNKEN_BORDER | wx.CLIP_CHILDREN):
Dockable(False).Float().Hide())
Dockable(False).Float().Hide().CloseButton(True).MaximizeButton(True))
def __init__(self, parent, id=-1, title="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE | wx.SUNKEN_BORDER | wx.CLIP_CHILDREN):
self.Bind(wx.aui.EVT_AUI_PANEBUTTON, self.OnPaneButton)
self.Bind(wx.aui.EVT_AUI_PANE_CLOSE, self.OnPaneClose)
def __init__(self, parent, id=-1, title="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE | wx.SUNKEN_BORDER | wx.CLIP_CHILDREN):
def OnPaneButton(self, event):
def OnPaneClose(self, event):
def OnPaneButton(self, event):
wx.YES_NO | wx.NO_DEFAULT | wx.CANCEL | wx.ICON_QUESTION)
wx.YES_NO | wx.NO_DEFAULT | wx.ICON_QUESTION)
def OnPaneButton(self, event):
dlg.Destroy() return
event.Veto()
def OnPaneButton(self, event):
event.Skip()
def OnPaneButton(self, event):
Name("Test").Caption("Tree Control").
Caption("Tree Control").
def OnCreateTree(self, event):
FloatingSize(wx.Size(150, 300)))
FloatingSize(wx.Size(150, 300)).CloseButton(True).MaximizeButton(True))
def OnCreateTree(self, event):
Name("Test").Caption("Grid").
Caption("Grid").
def OnCreateGrid(self, event):
FloatingSize(wx.Size(300, 200)))
FloatingSize(wx.Size(300, 200)).CloseButton(True).MaximizeButton(True))
def OnCreateGrid(self, event):
Name("Test").Caption("HTML Content").
Caption("HTML Content").
def OnCreateHTML(self, event):
FloatingSize(wx.Size(300, 200)))
FloatingSize(wx.Size(300, 200)).CloseButton(True).MaximizeButton(True))
def OnCreateHTML(self, event):
Name("Test").Caption("Text Control"). Float().FloatingPosition(self.GetStartPosition()))
Caption("Text Control"). Float().FloatingPosition(self.GetStartPosition()). CloseButton(True).MaximizeButton(True))
def OnCreateText(self, event):
Name("Test").Caption("Client Size Reporter"). Float().FloatingPosition(self.GetStartPosition()))
Caption("Client Size Reporter"). Float().FloatingPosition(self.GetStartPosition()). CloseButton(True).MaximizeButton(True))
def OnCreateSizeReport(self, event):
self._border_size.SetValue(frame.GetDockArt().GetMetric(wx.aui.AUI_ART_PANE_BORDER_SIZE)) self._sash_size.SetValue(frame.GetDockArt().GetMetric(wx.aui.AUI_ART_SASH_SIZE)) self._caption_size.SetValue(frame.GetDockArt().GetMetric(wx.aui.AUI_ART_CAPTION_SIZE))
self._border_size.SetValue(frame.GetDockArt().GetMetric(wx.aui.AUI_DOCKART_PANE_BORDER_SIZE)) self._sash_size.SetValue(frame.GetDockArt().GetMetric(wx.aui.AUI_DOCKART_SASH_SIZE)) self._caption_size.SetValue(frame.GetDockArt().GetMetric(wx.aui.AUI_DOCKART_CAPTION_SIZE))
def __init__(self, parent, frame):
bk = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_BACKGROUND_COLOUR)
bk = self._frame.GetDockArt().GetColour(wx.aui.AUI_DOCKART_BACKGROUND_COLOUR)
def UpdateColors(self): bk = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_BACKGROUND_COLOUR) self._background_color.SetBitmapLabel(self.CreateColorBitmap(bk)) cap = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_COLOUR) self._inactive_caption_color.SetBitmapLabel(self.CreateColorBitmap(cap)) capgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_GRADIENT_COLOUR) self._inactive_caption_gradient_color.SetBitmapLabel(self.CreateColorBitmap(capgrad)) captxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_TEXT_COLOUR) self._inactive_caption_text_color.SetBitmapLabel(self.CreateColorBitmap(captxt)) acap = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_COLOUR) self._active_caption_color.SetBitmapLabel(self.CreateColorBitmap(acap)) acapgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_GRADIENT_COLOUR) self._active_caption_gradient_color.SetBitmapLabel(self.CreateColorBitmap(acapgrad)) acaptxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_TEXT_COLOUR) self._active_caption_text_color.SetBitmapLabel(self.CreateColorBitmap(acaptxt)) sash = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_SASH_COLOUR) self._sash_color.SetBitmapLabel(self.CreateColorBitmap(sash)) border = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_BORDER_COLOUR) self._border_color.SetBitmapLabel(self.CreateColorBitmap(border)) gripper = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_GRIPPER_COLOUR) self._gripper_color.SetBitmapLabel(self.CreateColorBitmap(gripper))
cap = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_COLOUR)
cap = self._frame.GetDockArt().GetColour(wx.aui.AUI_DOCKART_INACTIVE_CAPTION_COLOUR)
def UpdateColors(self): bk = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_BACKGROUND_COLOUR) self._background_color.SetBitmapLabel(self.CreateColorBitmap(bk)) cap = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_COLOUR) self._inactive_caption_color.SetBitmapLabel(self.CreateColorBitmap(cap)) capgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_GRADIENT_COLOUR) self._inactive_caption_gradient_color.SetBitmapLabel(self.CreateColorBitmap(capgrad)) captxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_TEXT_COLOUR) self._inactive_caption_text_color.SetBitmapLabel(self.CreateColorBitmap(captxt)) acap = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_COLOUR) self._active_caption_color.SetBitmapLabel(self.CreateColorBitmap(acap)) acapgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_GRADIENT_COLOUR) self._active_caption_gradient_color.SetBitmapLabel(self.CreateColorBitmap(acapgrad)) acaptxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_TEXT_COLOUR) self._active_caption_text_color.SetBitmapLabel(self.CreateColorBitmap(acaptxt)) sash = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_SASH_COLOUR) self._sash_color.SetBitmapLabel(self.CreateColorBitmap(sash)) border = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_BORDER_COLOUR) self._border_color.SetBitmapLabel(self.CreateColorBitmap(border)) gripper = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_GRIPPER_COLOUR) self._gripper_color.SetBitmapLabel(self.CreateColorBitmap(gripper))
capgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_GRADIENT_COLOUR)
capgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR)
def UpdateColors(self): bk = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_BACKGROUND_COLOUR) self._background_color.SetBitmapLabel(self.CreateColorBitmap(bk)) cap = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_COLOUR) self._inactive_caption_color.SetBitmapLabel(self.CreateColorBitmap(cap)) capgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_GRADIENT_COLOUR) self._inactive_caption_gradient_color.SetBitmapLabel(self.CreateColorBitmap(capgrad)) captxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_TEXT_COLOUR) self._inactive_caption_text_color.SetBitmapLabel(self.CreateColorBitmap(captxt)) acap = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_COLOUR) self._active_caption_color.SetBitmapLabel(self.CreateColorBitmap(acap)) acapgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_GRADIENT_COLOUR) self._active_caption_gradient_color.SetBitmapLabel(self.CreateColorBitmap(acapgrad)) acaptxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_TEXT_COLOUR) self._active_caption_text_color.SetBitmapLabel(self.CreateColorBitmap(acaptxt)) sash = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_SASH_COLOUR) self._sash_color.SetBitmapLabel(self.CreateColorBitmap(sash)) border = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_BORDER_COLOUR) self._border_color.SetBitmapLabel(self.CreateColorBitmap(border)) gripper = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_GRIPPER_COLOUR) self._gripper_color.SetBitmapLabel(self.CreateColorBitmap(gripper))
captxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_TEXT_COLOUR)
captxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR)
def UpdateColors(self): bk = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_BACKGROUND_COLOUR) self._background_color.SetBitmapLabel(self.CreateColorBitmap(bk)) cap = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_COLOUR) self._inactive_caption_color.SetBitmapLabel(self.CreateColorBitmap(cap)) capgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_GRADIENT_COLOUR) self._inactive_caption_gradient_color.SetBitmapLabel(self.CreateColorBitmap(capgrad)) captxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_TEXT_COLOUR) self._inactive_caption_text_color.SetBitmapLabel(self.CreateColorBitmap(captxt)) acap = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_COLOUR) self._active_caption_color.SetBitmapLabel(self.CreateColorBitmap(acap)) acapgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_GRADIENT_COLOUR) self._active_caption_gradient_color.SetBitmapLabel(self.CreateColorBitmap(acapgrad)) acaptxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_TEXT_COLOUR) self._active_caption_text_color.SetBitmapLabel(self.CreateColorBitmap(acaptxt)) sash = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_SASH_COLOUR) self._sash_color.SetBitmapLabel(self.CreateColorBitmap(sash)) border = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_BORDER_COLOUR) self._border_color.SetBitmapLabel(self.CreateColorBitmap(border)) gripper = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_GRIPPER_COLOUR) self._gripper_color.SetBitmapLabel(self.CreateColorBitmap(gripper))
acap = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_COLOUR)
acap = self._frame.GetDockArt().GetColour(wx.aui.AUI_DOCKART_ACTIVE_CAPTION_COLOUR)
def UpdateColors(self): bk = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_BACKGROUND_COLOUR) self._background_color.SetBitmapLabel(self.CreateColorBitmap(bk)) cap = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_COLOUR) self._inactive_caption_color.SetBitmapLabel(self.CreateColorBitmap(cap)) capgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_GRADIENT_COLOUR) self._inactive_caption_gradient_color.SetBitmapLabel(self.CreateColorBitmap(capgrad)) captxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_TEXT_COLOUR) self._inactive_caption_text_color.SetBitmapLabel(self.CreateColorBitmap(captxt)) acap = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_COLOUR) self._active_caption_color.SetBitmapLabel(self.CreateColorBitmap(acap)) acapgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_GRADIENT_COLOUR) self._active_caption_gradient_color.SetBitmapLabel(self.CreateColorBitmap(acapgrad)) acaptxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_TEXT_COLOUR) self._active_caption_text_color.SetBitmapLabel(self.CreateColorBitmap(acaptxt)) sash = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_SASH_COLOUR) self._sash_color.SetBitmapLabel(self.CreateColorBitmap(sash)) border = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_BORDER_COLOUR) self._border_color.SetBitmapLabel(self.CreateColorBitmap(border)) gripper = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_GRIPPER_COLOUR) self._gripper_color.SetBitmapLabel(self.CreateColorBitmap(gripper))
acapgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_GRADIENT_COLOUR)
acapgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR)
def UpdateColors(self): bk = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_BACKGROUND_COLOUR) self._background_color.SetBitmapLabel(self.CreateColorBitmap(bk)) cap = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_COLOUR) self._inactive_caption_color.SetBitmapLabel(self.CreateColorBitmap(cap)) capgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_GRADIENT_COLOUR) self._inactive_caption_gradient_color.SetBitmapLabel(self.CreateColorBitmap(capgrad)) captxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_TEXT_COLOUR) self._inactive_caption_text_color.SetBitmapLabel(self.CreateColorBitmap(captxt)) acap = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_COLOUR) self._active_caption_color.SetBitmapLabel(self.CreateColorBitmap(acap)) acapgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_GRADIENT_COLOUR) self._active_caption_gradient_color.SetBitmapLabel(self.CreateColorBitmap(acapgrad)) acaptxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_TEXT_COLOUR) self._active_caption_text_color.SetBitmapLabel(self.CreateColorBitmap(acaptxt)) sash = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_SASH_COLOUR) self._sash_color.SetBitmapLabel(self.CreateColorBitmap(sash)) border = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_BORDER_COLOUR) self._border_color.SetBitmapLabel(self.CreateColorBitmap(border)) gripper = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_GRIPPER_COLOUR) self._gripper_color.SetBitmapLabel(self.CreateColorBitmap(gripper))
acaptxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_TEXT_COLOUR)
acaptxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR)
def UpdateColors(self): bk = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_BACKGROUND_COLOUR) self._background_color.SetBitmapLabel(self.CreateColorBitmap(bk)) cap = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_COLOUR) self._inactive_caption_color.SetBitmapLabel(self.CreateColorBitmap(cap)) capgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_GRADIENT_COLOUR) self._inactive_caption_gradient_color.SetBitmapLabel(self.CreateColorBitmap(capgrad)) captxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_TEXT_COLOUR) self._inactive_caption_text_color.SetBitmapLabel(self.CreateColorBitmap(captxt)) acap = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_COLOUR) self._active_caption_color.SetBitmapLabel(self.CreateColorBitmap(acap)) acapgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_GRADIENT_COLOUR) self._active_caption_gradient_color.SetBitmapLabel(self.CreateColorBitmap(acapgrad)) acaptxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_TEXT_COLOUR) self._active_caption_text_color.SetBitmapLabel(self.CreateColorBitmap(acaptxt)) sash = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_SASH_COLOUR) self._sash_color.SetBitmapLabel(self.CreateColorBitmap(sash)) border = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_BORDER_COLOUR) self._border_color.SetBitmapLabel(self.CreateColorBitmap(border)) gripper = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_GRIPPER_COLOUR) self._gripper_color.SetBitmapLabel(self.CreateColorBitmap(gripper))
sash = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_SASH_COLOUR)
sash = self._frame.GetDockArt().GetColour(wx.aui.AUI_DOCKART_SASH_COLOUR)
def UpdateColors(self): bk = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_BACKGROUND_COLOUR) self._background_color.SetBitmapLabel(self.CreateColorBitmap(bk)) cap = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_COLOUR) self._inactive_caption_color.SetBitmapLabel(self.CreateColorBitmap(cap)) capgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_GRADIENT_COLOUR) self._inactive_caption_gradient_color.SetBitmapLabel(self.CreateColorBitmap(capgrad)) captxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_TEXT_COLOUR) self._inactive_caption_text_color.SetBitmapLabel(self.CreateColorBitmap(captxt)) acap = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_COLOUR) self._active_caption_color.SetBitmapLabel(self.CreateColorBitmap(acap)) acapgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_GRADIENT_COLOUR) self._active_caption_gradient_color.SetBitmapLabel(self.CreateColorBitmap(acapgrad)) acaptxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_TEXT_COLOUR) self._active_caption_text_color.SetBitmapLabel(self.CreateColorBitmap(acaptxt)) sash = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_SASH_COLOUR) self._sash_color.SetBitmapLabel(self.CreateColorBitmap(sash)) border = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_BORDER_COLOUR) self._border_color.SetBitmapLabel(self.CreateColorBitmap(border)) gripper = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_GRIPPER_COLOUR) self._gripper_color.SetBitmapLabel(self.CreateColorBitmap(gripper))
border = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_BORDER_COLOUR)
border = self._frame.GetDockArt().GetColour(wx.aui.AUI_DOCKART_BORDER_COLOUR)
def UpdateColors(self): bk = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_BACKGROUND_COLOUR) self._background_color.SetBitmapLabel(self.CreateColorBitmap(bk)) cap = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_COLOUR) self._inactive_caption_color.SetBitmapLabel(self.CreateColorBitmap(cap)) capgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_GRADIENT_COLOUR) self._inactive_caption_gradient_color.SetBitmapLabel(self.CreateColorBitmap(capgrad)) captxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_TEXT_COLOUR) self._inactive_caption_text_color.SetBitmapLabel(self.CreateColorBitmap(captxt)) acap = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_COLOUR) self._active_caption_color.SetBitmapLabel(self.CreateColorBitmap(acap)) acapgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_GRADIENT_COLOUR) self._active_caption_gradient_color.SetBitmapLabel(self.CreateColorBitmap(acapgrad)) acaptxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_TEXT_COLOUR) self._active_caption_text_color.SetBitmapLabel(self.CreateColorBitmap(acaptxt)) sash = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_SASH_COLOUR) self._sash_color.SetBitmapLabel(self.CreateColorBitmap(sash)) border = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_BORDER_COLOUR) self._border_color.SetBitmapLabel(self.CreateColorBitmap(border)) gripper = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_GRIPPER_COLOUR) self._gripper_color.SetBitmapLabel(self.CreateColorBitmap(gripper))
gripper = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_GRIPPER_COLOUR)
gripper = self._frame.GetDockArt().GetColour(wx.aui.AUI_DOCKART_GRIPPER_COLOUR)
def UpdateColors(self): bk = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_BACKGROUND_COLOUR) self._background_color.SetBitmapLabel(self.CreateColorBitmap(bk)) cap = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_COLOUR) self._inactive_caption_color.SetBitmapLabel(self.CreateColorBitmap(cap)) capgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_GRADIENT_COLOUR) self._inactive_caption_gradient_color.SetBitmapLabel(self.CreateColorBitmap(capgrad)) captxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_INACTIVE_CAPTION_TEXT_COLOUR) self._inactive_caption_text_color.SetBitmapLabel(self.CreateColorBitmap(captxt)) acap = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_COLOUR) self._active_caption_color.SetBitmapLabel(self.CreateColorBitmap(acap)) acapgrad = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_GRADIENT_COLOUR) self._active_caption_gradient_color.SetBitmapLabel(self.CreateColorBitmap(acapgrad)) acaptxt = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_ACTIVE_CAPTION_TEXT_COLOUR) self._active_caption_text_color.SetBitmapLabel(self.CreateColorBitmap(acaptxt)) sash = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_SASH_COLOUR) self._sash_color.SetBitmapLabel(self.CreateColorBitmap(sash)) border = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_BORDER_COLOUR) self._border_color.SetBitmapLabel(self.CreateColorBitmap(border)) gripper = self._frame.GetDockArt().GetColour(wx.aui.AUI_ART_GRIPPER_COLOUR) self._gripper_color.SetBitmapLabel(self.CreateColorBitmap(gripper))
self._frame.GetDockArt().SetMetric(wx.aui.AUI_ART_PANE_BORDER_SIZE,
self._frame.GetDockArt().SetMetric(wx.aui.AUI_DOCKART_PANE_BORDER_SIZE,
def OnPaneBorderSize(self, event): self._frame.GetDockArt().SetMetric(wx.aui.AUI_ART_PANE_BORDER_SIZE, event.GetInt()) self._frame.DoUpdate()