rem
stringlengths 0
322k
| add
stringlengths 0
2.05M
| context
stringlengths 8
228k
|
---|---|---|
logger.info('Transaction level %d -> %d', self.level, self.level+1)
|
logger.debug('Transaction level %d -> %d', self.level, self.level+1)
|
def pushLevel(self): logger.info('Transaction level %d -> %d', self.level, self.level+1) if not self.level: self.dbConn.begin() self.level += 1
|
logger.info('Transaction level %d -> %d', self.level,
|
logger.debug('Transaction level %d -> %d', self.level,
|
def popLevel(self): if self.level>0: logger.info('Transaction level %d -> %d', self.level, self.level-1) self.level -= 1 if not (self.level or self.is_aborted): self.dbConn.commit()
|
logger.info('Transaction aborted')
|
logger.debug('Transaction aborted')
|
def abort(self): if not self.is_aborted: logger.info('Transaction aborted') self.level = 0 self.dbConn.rollback() self.is_aborted = 1
|
allowedIndexFields = self.getAllowedIndexFields(obj)
|
allowedIndexFields = self.allowedIndexFields(obj)
|
def isStreamUpdatable(self, obj): allowedIndexFields = self.getAllowedIndexFields(obj) # assume obj.type=='stream': stream = obj if self.user.checkPermission('w', stream.permissions): item_fields = stream.allStreamFields for field_name in allowedIndexFields: field_type = item_fields[field_name] if self.user.checkPermission('w', field_type.indexPermissions): return 1 return 0
|
cr.add(uid, user, domain, password, force=force)
|
cr.add(uid, user, realm, password, force=force)
|
def add(self, uri, aliases, password, idtype=ID_ORIG, force=False): do = Domain(self.dburi, self.db) ur = Uri(self.dburi, self.db) cr = Cred(self.dburi, self.db) us = User(self.dburi, self.db)
|
return adjust_ser_uri(sul[0])
|
return [adjust_ser_uri(sul[0])]
|
def handle_servers(opts): if not opts['SERVERS']: return [opts['SER_URI']] sul = opts['SERVERS'].split(' ') if len(sul) < 2: return adjust_ser_uri(sul[0]) uris = [] for uri in sul: uris.append(adjust_ser_uri(uri)) return uris
|
print curi
|
def usrloc(command, uri, contact=None, *args, **opts): ad, al = arg_attrs(args) table = opts['UL_TABLE'] q = float(ad.get('q', 1)) expires = ad.get('expires') if expires is not None: expires = int(expires) flags = ad.get('flags') if flags is not None: flags = int(flags) # LB hack ur = Uri(opts['DB_URI']) uid = ur.get_uid(uri) curi = ur.get_canonical_uri(uid) print curi del(ur) if opts['SER_URI'][-1:] != '/': opts['SER_URI'] = opts['SER_URI'] + '/' opts['SER_URI'] = opts['SER_URI'] + 'sip:' + curi cmd = CMD.get(command) if cmd == CMD_ADD: if contact is None: raise Error (ENOARG, 'contact') u = Usrloc_ctl(opts['DB_URI'], any_rpc(opts)) u.add(uri, contact, table, expires, q, flags) elif cmd == CMD_RM: u = Usrloc_ctl(opts['DB_URI'], any_rpc(opts)) u.rm(uri, contact, table) elif cmd == CMD_SHOW: cols, numeric, limit, rsep, lsep, astab = show_opts(opts) u = Usrloc_ctl(opts['DB_URI'], any_rpc(opts)) ret = u.show(uri, table) if type(ret) == dict: # FIX: Is this a bug in usrloc SER code? ret = [ret] ret = [ (str(i['contact']), str(i['expires']), str(i['q'])) for i in ret ] desc = (('contact',), ('expires',), ('q',)) tabprint(ret, desc, rsep, lsep, astab) else: raise Error (EINVAL, command)
|
|
del defaults[o]
|
if defaults.has_key(o): del defaults[o]
|
def parse_cmdline(argv): lineopts, args = gnu_getopt(argv, opt.GETOPT_SHORT, opt.GETOPT_LONG) opts = {} defaults = {} for o, desc in opt.OPT.items(): if len(desc) < 4: continue defaults[o] = desc[3] for o, v in lineopts: o = opt.OPTS[o] if opt.OPT[o][2] is False: v = True opts[o] = v del defaults[o] return args, opts, defaults
|
password = get_password(opts)
|
prompt='Please, enter new user password.\nPassword: ' password = get_password(opts, prompt=prompt)
|
def user(command, uri, *aliases, **opts): force = opts['FORCE'] cmd = CMD.get(command) if cmd == CMD_ADD: password = get_password(opts) u = User_ctl(opts['DB_URI'], multi_rpc(opts)) u.add(uri, aliases, password, ID_ORIG, force) elif cmd == CMD_RM: u = User_ctl(opts['DB_URI'], multi_rpc(opts)) u.rm(uri, ID_ORIG, force) elif cmd == CMD_SHOW: cols, fformat, limit, rsep, lsep, astab = show_opts(opts) u = User_ctl(opts['DB_URI'], multi_rpc(opts)) ret, desc = u.show(uri, cols, fformat, limit) tabprint(ret, desc, rsep, lsep, astab) else: raise Error (EINVAL, command)
|
password = get_password(opts)
|
prompt='Please, enter new user password.\nPassword: ' password = get_password(opts, prompt=prompt)
|
def password(uri, password=None, **opts): force = opts['FORCE'] password = get_password(opts) u = User_ctl(opts['DB_URI'], multi_rpc(opts)) u.passwd(uri, password, force)
|
us.rm(uid)
|
try: us.rm(uid, force=force) except: pass
|
def rm(self, uri, idtype=ID_ORIG, force=False): us = User(self.dburi, self.db) ur = Uri(self.dburi, self.db) cr = Cred(self.dburi, self.db) try: uid = ur.get_uid(uri) except: if force: return raise ur.rm_uid_uri(uid, uri, force=force) try: cr.rm_uid(uid, force=force) except: pass us.rm(uid) us.purge() ur.purge() cr.purge() self._reload()
|
raise Error (EDUPL, err)
|
raise Error (EDUPL, errstr(did=did, domain=domain))
|
def add(self, did, domain, flags=None, force=False): dflags = self.default_flags() fmask = parse_flags(flags) flags = new_flags(dflags, fmask) canonical = is_canonical(flags)
|
if opts['SER_URI'][:-1] != '/':
|
if opts['SER_URI'][-1:] != '/':
|
def usrloc(command, uri, contact=None, *args, **opts): ad, al = arg_attrs(args) table = opts['UL_TABLE'] q = float(ad.get('q', 1)) expires = ad.get('expires') if expires is not None: expires = int(expires) flags = ad.get('flags') if flags is not None: flags = int(flags) # LB hack ur = Uri(opts['DB_URI']) uid = ur.get_uid(uri) curi = ur.get_canonical_uri(uid) del(ur) if opts['SER_URI'][:-1] != '/': opts['SER_URI'] = opts['SER_URI'] + '/' opts['SER_URI'] = opts['SER_URI'] + 'sip:' + curi cmd = CMD.get(command) if cmd == CMD_ADD: if contact is None: raise Error (ENOARG, 'contact') u = Usrloc_ctl(opts['DB_URI'], any_rpc(opts)) u.add(uri, contact, table, expires, q, flags) elif cmd == CMD_RM: u = Usrloc_ctl(opts['DB_URI'], any_rpc(opts)) u.rm(uri, contact, table) elif cmd == CMD_SHOW: cols, numeric, limit, rsep, lsep, astab = show_opts(opts) u = Usrloc_ctl(opts['DB_URI'], any_rpc(opts)) ret = u.show(uri, table) if type(ret) == dict: # FIX: Is this a bug in usrloc SER code? ret = [ret] ret = [ (str(i['contact']), str(i['expires']), str(i['q'])) for i in ret ] desc = (('contact',), ('expires',), ('q',)) tabprint(ret, desc, rsep, lsep, astab) else: raise Error (EINVAL, command)
|
self.plist[u'CFBundleIconFile'] = os.path.basename(iconfile)
|
plist[u'CFBundleIconFile'] = os.path.basename(iconfile)
|
def initialize_plist(self): plist = self.get_default_plist() for target in self.targets: plist.update(getattr(target, 'plist', {})) plist.update(self.plist) plist.update(self.get_plist_options())
|
self.plist[u'LSPrefersPPC'] = True
|
plist[u'LSPrefersPPC'] = True
|
def initialize_plist(self): plist = self.get_default_plist() for target in self.targets: plist.update(getattr(target, 'plist', {})) plist.update(self.plist) plist.update(self.get_plist_options())
|
self.__OnSpin(WXK_UP)
|
self.__OnSpin(wx.WXK_UP)
|
def __OnSpinUp(self, event): """ Event handler for any bound spin button on EVT_SPIN_UP; causes control to behave as if up arrow was pressed. """ dbg('TimeCtrl::OnSpinUp', indent=1) self.__OnSpin(WXK_UP) keep_processing = False dbg(indent=0) return keep_processing
|
self.__OnSpin(WXK_DOWN)
|
self.__OnSpin(wx.WXK_DOWN)
|
def __OnSpinDown(self, event): """ Event handler for any bound spin button on EVT_SPIN_DOWN; causes control to behave as if down arrow was pressed. """ dbg('TimeCtrl::OnSpinDown', indent=1) self.__OnSpin(WXK_DOWN) keep_processing = False dbg(indent=0) return keep_processing
|
self.SetSizeHints(minW=250, minH=200)
|
self.SetSizeHints(250, 200)
|
def __init__(self, parent, id, title, fileName=None): """ Standard constructor.
|
:param version: Specifies the version to look for, it can either be a sting or a list of strings. Each string is compared to the installed wxPythons and the best match is added to the sys.path, allowing an 'import wx' to find that version.
|
:param version: Specifies the version to look for, it can either be a string or a list of strings. Each string is compared to the installed wxPythons and the best match is inserted into the sys.path, allowing an 'import wx' to find that version.
|
def require(versions): """ Search for a wxPython installation that matches version. :param version: Specifies the version to look for, it can either be a sting or a list of strings. Each string is compared to the installed wxPythons and the best match is added to the sys.path, allowing an 'import wx' to find that version. The version string is composed of the dotted version number (at least 2 of the 4 components) optionally followed by hyphen ('-') separated options (wx port, unicode/ansi, flavour, etc.) A match is determined by how much of the installed version matches what is given in the version parameter. If the version number components don't match then the score is zero, otherwise the score is increased for every specified optional component that is specified and that matches. """ assert not sys.modules.has_key('wx') and not sys.modules.has_key('wxPython'), \ "wxversion.require() must be called before wxPython is imported" bestMatch = None bestScore = 0 if type(versions) == str: versions = [versions] packages = _find_installed() for pkg in packages: for ver in versions: score = pkg.Score(_wxPackageInfo(ver)) if score > bestScore: bestMatch = pkg bestScore = score assert bestMatch is not None, \ "Required version of wxPython not found" sys.path.insert(0, bestMatch.pathname)
|
return not evt.HasModifiers() and evt.GetKeyCode() != WXK_SHIFT
|
return (not (evt.ControlDown() or evt.AltDown()) and evt.GetKeyCode() != WXK_SHIFT)
|
def IsAcceptedKey(self, evt): """ Return TRUE to allow the given key to start editing: the base class version only checks that the event has no modifiers. F2 is special and will always start the editor. """ self.log.write("MyCellEditor: IsAcceptedKey: %d\n" % (evt.GetKeyCode()))
|
pass
|
wx.EvtHandler.__init__(self)
|
def __init__(self): """Initializes the DocService.""" pass
|
saveData['_defChild'] = str(self._defChild)
|
saveData['_defChild_class'] = self._defChild.__name__ saveData['_defChild_mod'] = self._defChild.__module__
|
def GetSaveData(self): saveData = {} saveData['_defChild'] = str(self._defChild) saveData['child'] = self.child.GetSaveData() return saveData
|
dChild = data['_defChild'] mod = dChild.split('.')[0]
|
mod = data['_defChild_mod'] dChild = mod + '.' + data['_defChild_class']
|
def SetSaveData(self,data): dChild = data['_defChild'] mod = dChild.split('.')[0] exec 'import %s' % mod self._defChild = eval(dChild) old = self.child self.child = MultiSplit(self,self,wxPoint(0,0),self.GetSize()) self.child.SetSaveData(data['child']) old.Destroy() self.OnMultiSize(None) self.child.OnSize(None)
|
self.child = MultiSplit(self,self,wxPoint(0,0),self.GetSize())
|
self.child = MultiSplit(self,self,wx.Point(0,0),self.GetSize())
|
def SetSaveData(self,data): dChild = data['_defChild'] mod = dChild.split('.')[0] exec 'import %s' % mod self._defChild = eval(dChild) old = self.child self.child = MultiSplit(self,self,wxPoint(0,0),self.GetSize()) self.child.SetSaveData(data['child']) old.Destroy() self.OnMultiSize(None) self.child.OnSize(None)
|
saveData['detailClass'] = str(self.detail.child.__class__)
|
saveData['detailClass_class'] = self.detail.child.__class__.__name__ saveData['detailClass_mod'] = self.detail.child.__module__
|
def GetSaveData(self): saveData = {} saveData['detailClass'] = str(self.detail.child.__class__) if hasattr(self.detail.child,'GetSaveData'): attr = getattr(self.detail.child,'GetSaveData') if callable(attr): dData = attr() if dData: saveData['detail'] = dData v1,v2 = self.GetPosition() saveData['x'] = v1 saveData['y'] = v2 v1,v2 = self.GetSize() saveData['w'] = v1 saveData['h'] = v2 return saveData
|
dChild = data['detailClass'] mod = dChild.split('.')[0]
|
mod = data['detailClass_mod'] dChild = mod + '.' + data['detailClass_class']
|
def SetSaveData(self,data): dChild = data['detailClass'] mod = dChild.split('.')[0] exec 'import %s' % mod detClass = eval(dChild) self.SetDimensions(data['x'],data['y'],data['w'],data['h']) old = self.detail self.detail = MultiClient(self,detClass) dData = data.get('detail',None) if dData: if hasattr(self.detail.child,'SetSaveData'): attr = getattr(self.detail.child,'SetSaveData') if callable(attr): attr(dData) old.Destroy() self.detail.OnSize(None)
|
MAIN_LIBS = ['mono', 'base', 'core', 'html', 'xml', 'net']
|
MAIN_LIBS = ['mono', 'base', 'core', 'adv', 'html', 'xml', 'net']
|
def mk_wxid(id): """Creates wxWindows library identifier from bakefile target ID that follows this convention: DLLs end with 'dll', static libraries end with 'lib'. If withPrefix=1, then _wxid is returned instead of wxid.""" if id.endswith('dll') or id.endswith('lib'): wxid = id[:-3] else: wxid = id return wxid
|
LIBS_GUI = ['core', 'html', 'gl']
|
LIBS_GUI = ['core', 'adv', 'html', 'gl']
|
def mk_wxid(id): """Creates wxWindows library identifier from bakefile target ID that follows this convention: DLLs end with 'dll', static libraries end with 'lib'. If withPrefix=1, then _wxid is returned instead of wxid.""" if id.endswith('dll') or id.endswith('lib'): wxid = id[:-3] else: wxid = id return wxid
|
mask = wxMaskColour(bmp, wxBLUE) bmp.SetMask(mask)
|
if wxPlatform == '__WXMSW__': mask = wxMaskColour(bmp, wxBLUE) bmp.SetMask(mask)
|
def __init__(self, parent, log): wxPanel.__init__(self, parent, -1) self.log = log
|
for x in range(1, 15):
|
for x in range(1, 16):
|
def __init__(self, parent, id, log): wx.Listbook.__init__(self, parent, id, style= wx.LB_DEFAULT #wxLB_TOP #wxLB_BOTTOM #wxLB_LEFT #wxLB_RIGHT ) self.log = log
|
editor.SetBackgroundColour(wx.Colour(red=255,green=255,blue=175))
|
editor.SetBackgroundColour(self.editorBgColour) editor.SetForegroundColour(self.editorFgColour)
|
def make_editor(self, col_style=wx.LIST_FORMAT_LEFT): editor = wx.PreTextCtrl() style =wx.TE_PROCESS_ENTER|wx.TE_PROCESS_TAB|wx.TE_RICH2 style |= {wx.LIST_FORMAT_LEFT: wx.TE_LEFT, wx.LIST_FORMAT_RIGHT: wx.TE_RIGHT, wx.LIST_FORMAT_CENTRE : wx.TE_CENTRE }[col_style] editor.Create(self, -1, style=style) editor.SetBackgroundColour(wx.Colour(red=255,green=255,blue=175)) #Yellow font = self.GetFont() editor.SetFont(font)
|
if self.IsVirtual(): self.SetVirtualData(self.curRow, self.curCol, text) else: self.SetStringItem(self.curRow, self.curCol, text)
|
self.SetFocus() evt = wx.ListEvent(wx.wxEVT_COMMAND_LIST_END_LABEL_EDIT, self.GetId()) evt.m_itemIndex = self.curRow evt.m_col = self.curCol item = self.GetItem(self.curRow, self.curCol) evt.m_item.SetId(item.GetId()) evt.m_item.SetColumn(item.GetColumn()) evt.m_item.SetData(item.GetData()) evt.m_item.SetText(text) ret = self.GetEventHandler().ProcessEvent(evt) if not ret or evt.IsAllowed(): if self.IsVirtual(): self.SetVirtualData(self.curRow, self.curCol, text) else: self.SetStringItem(self.curRow, self.curCol, text)
|
def CloseEditor(self, evt=None): ''' Close the editor and save the new value to the ListCtrl. ''' text = self.editor.GetValue() self.editor.Hide() if self.IsVirtual(): # replace by whather you use to populate the virtual ListCtrl # data source self.SetVirtualData(self.curRow, self.curCol, text) else: self.SetStringItem(self.curRow, self.curCol, text) self.RefreshItem(self.curRow)
|
opts = args = None
|
def OnInit(self): global debug # Process comand-line try: opts = args = None opts, args = getopt.getopt(sys.argv[1:], 'dhiv') for o,a in opts: if o == '-h': usage() sys.exit(0) elif o == '-d': debug = True elif o == '-v': print 'XRCed version', version sys.exit(0) except getopt.GetoptError: if wxPlatform != '__WXMAC__': # macs have some extra parameters print >> sys.stderr, 'Unknown option' usage() sys.exit(1)
|
|
\x00\x00szz\xf4\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\x00qID\ ATx\x9c\xed\xd6;\n\x800\x10E\xd1{\xc5\x8d\xb9r\x97\x16\x0b\xad$\x8a\x82:\x16\ o\xda\x84pB2\x1f\x81Fa\x8c\x9c\x08\x04Z{\xcf\xa72\xbcv\xfa\xc5\x08 \x80r\x80\ \xfc\xa2\x0e\x1c\xe4\xba\xfaX\x1d\xd0\xde]S\x07\x02\xd8>\xe1wa-`\x9fQ\xe9\ \x86\x01\x04\x10\x00\\(Dk\x1b-\x04\xdc\x1d\x07\x14\x98;\x0bS\x7f\x7f\xf9\x13\ \x04\x10@\xf9X\xbe\x00\xc9 \x14K\xab a\xf0\x00\x00\x00\x00IEND\xaeB`\x82'
|
\x00\x00szz\xf4\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\x00oID\ ATx\x9c\xed\x961\x0e\x800\x0c\x03\xcf\x88\x8f\xf1r\x9eV\x86n\xd0\xa2V*x\xb1W\ G\xcdIQ\x9c\x82Y\x02(/f)=wAs\x89\xed\xb3\xd7\x07\x15\x80\x00\xd8\x01\xec\xaa\ 9\xd0\xd9uI\xcbr@\x12\xcf\xc4I\x0e\x04\x00\xf6\x7f\xdb\xc9\x0bp\xdf\xa8\\\ \xc3\x00\x04 \x000\x10D\xf5\x8c\x1a\x01f\xbf\x03\x12p6\x8c\xa3]o\x1fA\x00\ \x02`\xd7\x05\xc8\xbf\x11E\x9e\xfb\xa0\xd3\x00\x00\x00\x00IEND\xaeB`\x82'
|
def getMondrianData(): return \
|
win.Connect(-1, -1, wxEVT_UPDATE_THROBBER, func) class UpdateThrobberEvent(wxPyEvent):
|
win.Connect(-1, -1, THROBBER_EVENT, func) class UpdateThrobberEvent(wx.PyEvent):
|
def EVT_UPDATE_THROBBER(win, func): win.Connect(-1, -1, wxEVT_UPDATE_THROBBER, func)
|
wxPyEvent.__init__(self) self.SetEventType(wxEVT_UPDATE_THROBBER)
|
wx.PyEvent.__init__(self) self.SetEventType(THROBBER_EVENT)
|
def __init__(self): wxPyEvent.__init__(self) self.SetEventType(wxEVT_UPDATE_THROBBER)
|
class Throbber(wxPanel):
|
class Throbber(wx.Panel):
|
def __init__(self): wxPyEvent.__init__(self) self.SetEventType(wxEVT_UPDATE_THROBBER)
|
pos = wxDefaultPosition, size = wxDefaultSize,
|
pos = wx.DefaultPosition, size = wx.DefaultSize,
|
def __init__(self, parent, id, bitmap, # single (composite) bitmap or list of bitmaps pos = wxDefaultPosition, size = wxDefaultSize, frameDelay = 0.1,# time between frames frames = 0, # number of frames (only necessary for composite image) frameWidth = 0, # width of each frame (only necessary for composite image) label = None, # optional text to be displayed overlay = None, # optional image to overlay on animation reverse = 0, # reverse direction at end of animation style = 0, # window style name = "throbber"): wxPanel.__init__(self, parent, id, pos, size, style, name) self.name = name self.label = label _seqTypes = (type([]), type(()))
|
wxPanel.__init__(self, parent, id, pos, size, style, name)
|
wx.Panel.__init__(self, parent, id, pos, size, style, name)
|
def __init__(self, parent, id, bitmap, # single (composite) bitmap or list of bitmaps pos = wxDefaultPosition, size = wxDefaultSize, frameDelay = 0.1,# time between frames frames = 0, # number of frames (only necessary for composite image) frameWidth = 0, # width of each frame (only necessary for composite image) label = None, # optional text to be displayed overlay = None, # optional image to overlay on animation reverse = 0, # reverse direction at end of animation style = 0, # window style name = "throbber"): wxPanel.__init__(self, parent, id, pos, size, style, name) self.name = name self.label = label _seqTypes = (type([]), type(()))
|
EVT_PAINT(self, self.OnPaint)
|
timerID = wx.NewId() self.timer = wx.Timer(self, timerID)
|
def __init__(self, parent, id, bitmap, # single (composite) bitmap or list of bitmaps pos = wxDefaultPosition, size = wxDefaultSize, frameDelay = 0.1,# time between frames frames = 0, # number of frames (only necessary for composite image) frameWidth = 0, # width of each frame (only necessary for composite image) label = None, # optional text to be displayed overlay = None, # optional image to overlay on animation reverse = 0, # reverse direction at end of animation style = 0, # window style name = "throbber"): wxPanel.__init__(self, parent, id, pos, size, style, name) self.name = name self.label = label _seqTypes = (type([]), type(()))
|
EVT_WINDOW_DESTROY(self, self.OnDestroyWindow) self.event = threading.Event() self.event.set()
|
wx.EVT_PAINT(self, self.OnPaint) wx.EVT_TIMER(self, timerID, self.OnTimer) wx.EVT_WINDOW_DESTROY(self, self.OnDestroyWindow) def OnTimer(self, event): wx.PostEvent(self, UpdateThrobberEvent())
|
def __init__(self, parent, id, bitmap, # single (composite) bitmap or list of bitmaps pos = wxDefaultPosition, size = wxDefaultSize, frameDelay = 0.1,# time between frames frames = 0, # number of frames (only necessary for composite image) frameWidth = 0, # width of each frame (only necessary for composite image) label = None, # optional text to be displayed overlay = None, # optional image to overlay on animation reverse = 0, # reverse direction at end of animation style = 0, # window style name = "throbber"): wxPanel.__init__(self, parent, id, pos, size, style, name) self.name = name self.label = label _seqTypes = (type([]), type(()))
|
dc.SetTextForeground(wxWHITE)
|
dc.SetTextForeground(wx.WHITE)
|
def Draw(self, dc): dc.DrawBitmap(self.submaps[self.sequence[self.current]], 0, 0, True) if self.overlay and self.showOverlay: dc.DrawBitmap(self.overlay, self.overlayX, self.overlayY, True) if self.label and self.showLabel: dc.DrawText(self.label, self.labelX, self.labelY) dc.SetTextForeground(wxWHITE) dc.DrawText(self.label, self.labelX-1, self.labelY-1)
|
self.Draw(wxPaintDC(self))
|
self.Draw(wx.PaintDC(self))
|
def OnPaint(self, event): self.Draw(wxPaintDC(self)) event.Skip()
|
def UpdateThread(self): try: while hasattr(self, 'event') and not self.event.isSet(): wxPostEvent(self, UpdateThrobberEvent()) self.event.wait(self.frameDelay) except wxPyDeadObjectError: return
|
def UpdateThread(self): try: while hasattr(self, 'event') and not self.event.isSet(): wxPostEvent(self, UpdateThrobberEvent()) self.event.wait(self.frameDelay) except wxPyDeadObjectError: # BUG: we were destroyed return
|
|
if self.event.isSet(): return
|
def Rotate(self, event): if self.event.isSet(): return self.current += self.direction if self.current >= len(self.sequence): if self.autoReverse: self.Reverse() self.current = len(self.sequence) - 1 else: self.current = 1 if self.current < 1: if self.autoReverse: self.Reverse() self.current = 1 else: self.current = len(self.sequence) - 1 self.Draw(wxClientDC(self))
|
|
self.Draw(wxClientDC(self))
|
self.Draw(wx.ClientDC(self))
|
def Rotate(self, event): if self.event.isSet(): return self.current += self.direction if self.current >= len(self.sequence): if self.autoReverse: self.Reverse() self.current = len(self.sequence) - 1 else: self.current = 1 if self.current < 1: if self.autoReverse: self.Reverse() self.current = 1 else: self.current = len(self.sequence) - 1 self.Draw(wxClientDC(self))
|
wxPanel.SetFont(self, font)
|
wx.Panel.SetFont(self, font)
|
def SetFont(self, font): """Set the font for the label""" wxPanel.SetFont(self, font) self.SetLabel(self.label) self.Draw(wxClientDC(self))
|
self.Draw(wxClientDC(self))
|
self.Draw(wx.ClientDC(self))
|
def SetFont(self, font): """Set the font for the label""" wxPanel.SetFont(self, font) self.SetLabel(self.label) self.Draw(wxClientDC(self))
|
self.Draw(wxClientDC(self))
|
self.Draw(wx.ClientDC(self))
|
def Rest(self): """Stop the animation and return to frame 0""" self.Stop() self.current = 0 self.Draw(wxClientDC(self))
|
return not self.event.isSet()
|
return self.running
|
def Running(self): """Returns True if the animation is running""" return not self.event.isSet()
|
if not self.Running(): self.event.clear() thread = threading.Thread(target = self.UpdateThread, name = "%s-thread" % self.name) thread.start()
|
if not self.running: self.running = not self.running self.timer.Start(self.frameDelay * 1000)
|
def Start(self): """Start the animation""" if not self.Running(): self.event.clear() thread = threading.Thread(target = self.UpdateThread, name = "%s-thread" % self.name) thread.start()
|
if self.event.isSet(): return self.event.set()
|
if self.running: self.timer.Stop() self.running = not self.running
|
def Stop(self): """Stop the animation""" if self.event.isSet(): return self.event.set()
|
self.Draw(wxClientDC(self))
|
self.Draw(wx.ClientDC(self))
|
def ToggleOverlay(self, state = None): """Toggle the overlay image""" if state is None: self.showOverlay = not self.showOverlay else: self.showOverlay = state self.Draw(wxClientDC(self))
|
self.Draw(wxClientDC(self))
|
self.Draw(wx.ClientDC(self))
|
def ToggleLabel(self, state = None): """Toggle the label""" if state is None: self.showLabel = not self.showLabel else: self.showLabel = state self.Draw(wxClientDC(self))
|
self.Draw(wxClientDC(self))
|
self.Draw(wx.ClientDC(self))
|
def SetLabel(self, label): """Change the text of the label""" self.label = label if label: extentX, extentY = self.GetTextExtent(label) self.labelX = (self.width - extentX)/2 self.labelY = (self.height - extentY)/2 self.Draw(wxClientDC(self))
|
glRotatef(self.lasty - self.y, 1.0, 0.0, 0.0); glRotatef(self.lastx - self.x, 0.0, 1.0, 0.0);
|
glRotatef((self.lasty - self.y)/100., 1.0, 0.0, 0.0); glRotatef((self.lastx - self.x)/100., 0.0, 1.0, 0.0);
|
def OnDraw(self): # clear color and depth buffers glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
glMatrixMode(GL_MODELVIEW);
|
def OnDraw(self): # clear color and depth buffers glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); # position viewer glMatrixMode(GL_MODELVIEW); # use a fresh transformation matrix glPushMatrix() # position object glTranslate(0.0, 0.0, -2.0); glRotate(30.0, 1.0, 0.0, 0.0); glRotate(30.0, 0.0, 1.0, 0.0);
|
|
glutSolidCone(1, 2, 50, 10)
|
glutSolidCone(0.5, 1, 30, 5)
|
def OnDraw(self): # clear color and depth buffers glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); # position viewer glMatrixMode(GL_MODELVIEW); # use a fresh transformation matrix glPushMatrix() # position object glTranslate(0.0, 0.0, -2.0); glRotate(30.0, 1.0, 0.0, 0.0); glRotate(30.0, 0.0, 1.0, 0.0);
|
dc = wxClientDC(self)
|
dc = wx.ClientDC(self)
|
def OnEraseBackground(self, evt): dc = evt.GetDC()
|
dc = wx.ClientDC(self)
|
def OnLeftUp(self, evt): if not self.dragImage or not self.dragShape: self.dragImage = None self.dragShape = None return
|
|
self.hiliteShape.Draw(dc)
|
self.RefreshRect(self.hiliteShape.GetRect())
|
def OnLeftUp(self, evt): if not self.dragImage or not self.dragShape: self.dragImage = None self.dragShape = None return
|
self.dragShape.Draw(dc)
|
self.RefreshRect(self.dragShape.GetRect())
|
def OnLeftUp(self, evt): if not self.dragImage or not self.dragShape: self.dragImage = None self.dragShape = None return
|
return '$(WXNAMEPREFIXGUI)$(WXNAMESUFFIX)$(WXCOMPILER)$(WXVERSIONTAG)'
|
return '$(WXDLLNAMEPREFIXGUI)$(WXNAMESUFFIX)$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)'
|
def mkDllName(wxid): """Returns string that can be used as DLL name, including name suffixes, prefixes, version tags etc. This must be kept in sync with variables defined in common.bkl!""" if wxid == 'mono': return '$(WXNAMEPREFIXGUI)$(WXNAMESUFFIX)$(WXCOMPILER)$(WXVERSIONTAG)' if wxid in LIBS_BASE: return '$(WXNAMEPREFIX)$(WXNAMESUFFIX)_%s$(WXCOMPILER)$(WXVERSIONTAG)' % wxid return '$(WXNAMEPREFIXGUI)$(WXNAMESUFFIX)_%s$(WXCOMPILER)$(WXVERSIONTAG)' % wxid
|
return '$(WXNAMEPREFIX)$(WXNAMESUFFIX)_%s$(WXCOMPILER)$(WXVERSIONTAG)' % wxid return '$(WXNAMEPREFIXGUI)$(WXNAMESUFFIX)_%s$(WXCOMPILER)$(WXVERSIONTAG)' % wxid
|
return '$(WXDLLNAMEPREFIX)$(WXNAMESUFFIX)_%s$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)' % wxid return '$(WXDLLNAMEPREFIXGUI)$(WXNAMESUFFIX)_%s$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)' % wxid
|
def mkDllName(wxid): """Returns string that can be used as DLL name, including name suffixes, prefixes, version tags etc. This must be kept in sync with variables defined in common.bkl!""" if wxid == 'mono': return '$(WXNAMEPREFIXGUI)$(WXNAMESUFFIX)$(WXCOMPILER)$(WXVERSIONTAG)' if wxid in LIBS_BASE: return '$(WXNAMEPREFIX)$(WXNAMESUFFIX)_%s$(WXCOMPILER)$(WXVERSIONTAG)' % wxid return '$(WXNAMEPREFIXGUI)$(WXNAMESUFFIX)_%s$(WXCOMPILER)$(WXVERSIONTAG)' % wxid
|
dc.SetPen(wxPen(wxBLACK, 3, wxSOLID))
|
dc.SetPen(wx.Pen(wx.BLACK, 3, wx.SOLID))
|
def Draw(self, dc, size): dc.SetFont(self.GetFont()) dc.SetTextForeground(wx.BLUE) dc.SetBackground(wx.Brush(self.GetBackgroundColour())) dc.Clear() dc.SetPen(wxPen(wxBLACK, 3, wxSOLID)) dc.DrawLine((self.linePos, 0), (self.linePos, size.height-10))
|
dc.SetPen(wxPen(color)) dc.SetBrush(wxBrush(color))
|
dc.SetPen(wx.Pen(color)) dc.SetBrush(wx.Brush(color))
|
def Draw(self, dc, size): dc.SetFont(self.GetFont()) dc.SetTextForeground(wx.BLUE) dc.SetBackground(wx.Brush(self.GetBackgroundColour())) dc.Clear() dc.SetPen(wxPen(wxBLACK, 3, wxSOLID)) dc.DrawLine((self.linePos, 0), (self.linePos, size.height-10))
|
width, height = self.GetSize()
|
width, height = size =self.GetSize()
|
def OnPaint(self, evt): width, height = self.GetSize() bmp = wx.EmptyBitmap(width, height)
|
self.Draw(dc, (width, height))
|
self.Draw(dc, size)
|
def OnPaint(self, evt): width, height = self.GetSize() bmp = wx.EmptyBitmap(width, height)
|
if self.__accept_mx:
|
if accept_mx:
|
def GetWxDateTime(self, value=None): """ This function is the conversion engine for wxTimeCtrl; it takes one of the following types: time string wxDateTime wxTimeSpan mxDateTime mxDateTimeDelta and converts it to a wxDateTime that always has Jan 1, 1970 as its date portion, so that range comparisons around values can work using wxDateTime's built-in comparison function. If a value is not provided to convert, the string value of the control will be used. If the value is not one of the accepted types, a ValueError will be raised. """ global accept_mx dbg(suspend=1) dbg('wxTimeCtrl::GetWxDateTime(%s)' % repr(value), indent=1) if value is None: dbg('getting control value') value = self.GetValue() dbg('value = "%s"' % value)
|
menu = wxMenu() menu.Append(wxID_UNDO, "Undo", "")
|
menu = wx.Menu() menu.Append(wx.ID_UNDO, "Undo", "")
|
def _OnContextMenu(self, event):
|
menu.Append(wxID_CUT, "Cut", "") menu.Append(wxID_COPY, "Copy", "") menu.Append(wxID_PASTE, "Paste", "") menu.Append(wxID_CLEAR, "Delete", "")
|
menu.Append(wx.ID_CUT, "Cut", "") menu.Append(wx.ID_COPY, "Copy", "") menu.Append(wx.ID_PASTE, "Paste", "") menu.Append(wx.ID_CLEAR, "Delete", "")
|
def _OnContextMenu(self, event):
|
menu.Append(wxID_SELECTALL, "Select All", "") EVT_MENU(menu, wxID_UNDO, self._OnCtrl_Z) EVT_MENU(menu, wxID_CUT, self._OnCtrl_X) EVT_MENU(menu, wxID_COPY, self._OnCtrl_C) EVT_MENU(menu, wxID_PASTE, self._OnCtrl_V) EVT_MENU(menu, wxID_CLEAR, self._OnClear) EVT_MENU(menu, wxID_SELECTALL, self._OnCtrl_A)
|
menu.Append(wx.ID_SELECTALL, "Select All", "") wx.EVT_MENU(menu, wx.ID_UNDO, self._OnCtrl_Z) wx.EVT_MENU(menu, wx.ID_CUT, self._OnCtrl_X) wx.EVT_MENU(menu, wx.ID_COPY, self._OnCtrl_C) wx.EVT_MENU(menu, wx.ID_PASTE, self._OnCtrl_V) wx.EVT_MENU(menu, wx.ID_CLEAR, self._OnClear) wx.EVT_MENU(menu, wx.ID_SELECTALL, self._OnCtrl_A)
|
def _OnContextMenu(self, event):
|
EVT_UPDATE_UI(self, wxID_UNDO, self._UndoUpdateUI)
|
wx.EVT_UPDATE_UI(self, wx.ID_UNDO, self._UndoUpdateUI)
|
def _OnContextMenu(self, event):
|
self._contextMenu.Enable(wxID_UNDO, False)
|
self._contextMenu.Enable(wx.ID_UNDO, False)
|
def _UndoUpdateUI(self, event): if self._prevValue is None or self._prevValue == self._curValue: self._contextMenu.Enable(wxID_UNDO, False) else: self._contextMenu.Enable(wxID_UNDO, True)
|
self._contextMenu.Enable(wxID_UNDO, True)
|
self._contextMenu.Enable(wx.ID_UNDO, True)
|
def _UndoUpdateUI(self, event): if self._prevValue is None or self._prevValue == self._curValue: self._contextMenu.Enable(wxID_UNDO, False) else: self._contextMenu.Enable(wxID_UNDO, True)
|
self.sizerHor.OnSize(evt) self.sizerVer.OnSize(evt) self.creatorHor.OnSize(evt) self.creatorVer.OnSize(evt) self.detail.OnSize(evt) self.closer.OnSize(evt)
|
def doresize(): try: self.sizerHor.OnSize(evt) self.sizerVer.OnSize(evt) self.creatorHor.OnSize(evt) self.creatorVer.OnSize(evt) self.detail.OnSize(evt) self.closer.OnSize(evt) except: pass wx.CallAfter(doresize)
|
def OnSize(self,evt): self.sizerHor.OnSize(evt) self.sizerVer.OnSize(evt) self.creatorHor.OnSize(evt) self.creatorVer.OnSize(evt) self.detail.OnSize(evt) self.closer.OnSize(evt)
|
b = images.getSmilesBitmap() print b.GetSize()
|
def __init__(self, parent, log): # Use the WANTS_CHARS style so the panel doesn't eat the Return key. wx.Panel.__init__(self, parent, -1, style=wx.WANTS_CHARS) self.Bind(wx.EVT_SIZE, self.OnSize)
|
|
PKGDIR+'.lib.mixins'
|
PKGDIR+'.lib.mixins', PKGDIR+'.lib.PyCrust',
|
def libFlag(): if FINAL: return '' elif HYBRID: return 'h' else: return 'd'
|
frame = DrawFrame(None, -1, "FloatCanvas Demo App",wxDefaultPosition,wxSize(700,700))
|
frame = DrawFrame(None, -1, "FloatCanvas Demo App", size=(700,700))
|
def OnInit(self): global colors wxPython.lib.colourdb.updateColourDB() colors = wxPython.lib.colourdb.getColourList() frame = DrawFrame(None, -1, "FloatCanvas Demo App",wxDefaultPosition,wxSize(700,700))
|
win = DrawFrame(None, -1, "FloatCanvas Drawing Window",wxDefaultPosition,wxSize(500,500))
|
win = DrawFrame(None, -1, "FloatCanvas Drawing Window", wx.DefaultPosition, (500,500))
|
def runTest(frame, nb, log): """ This method is used by the wxPython Demo Framework for integrating this demo with the rest. """ global colors wxPython.lib.colourdb.updateColourDB() colors = wxPython.lib.colourdb.getColourList()
|
wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER,
|
wx.Dialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wx.Point(567, 292), size=wx.Size(493, 482), style=wx.WANTS_CHARS | wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER,
|
def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSize(451, 455)) self.SetAutoLayout(True) self.SetSizeHints(425, 400, -1, -1) self.Center(wxBOTH) EVT_SIZE(self, self.OnStcstyleeditdlgSize)
|
self._init_utils() self.SetClientSize(wxSize(451, 455))
|
self.SetClientSize(wx.Size(485, 455))
|
def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSize(451, 455)) self.SetAutoLayout(True) self.SetSizeHints(425, 400, -1, -1) self.Center(wxBOTH) EVT_SIZE(self, self.OnStcstyleeditdlgSize)
|
self.Center(wxBOTH) EVT_SIZE(self, self.OnStcstyleeditdlgSize) self.speedsettingCh = wxChoice(choices=[],
|
self.Center(wx.BOTH) self.Bind(wx.EVT_SIZE, self.OnStcstyleeditdlgSize) self.speedsettingCh = wx.Choice(choices=[],
|
def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSize(451, 455)) self.SetAutoLayout(True) self.SetSizeHints(425, 400, -1, -1) self.Center(wxBOTH) EVT_SIZE(self, self.OnStcstyleeditdlgSize)
|
parent=self, pos=wxPoint(96, 28), size=wxSize(346, 21), style=0, validator=wxDefaultValidator)
|
parent=self, pos=wx.Point(96, 28), size=wx.Size(380, 21), style=0)
|
def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSize(451, 455)) self.SetAutoLayout(True) self.SetSizeHints(425, 400, -1, -1) self.Center(wxBOTH) EVT_SIZE(self, self.OnStcstyleeditdlgSize)
|
EVT_CHOICE(self.speedsettingCh, wxID_STCSTYLEEDITDLGSPEEDSETTINGCH, self.OnSpeedsettingchChoice) self.elementLb = wxListBox(choices=[], id=wxID_STCSTYLEEDITDLGELEMENTLB, name='elementLb', parent=self, pos=wxPoint(8, 72), size=wxSize(160, 112), style=0, validator=wxDefaultValidator)
|
self.speedsettingCh.Bind(wx.EVT_CHOICE, self.OnSpeedsettingchChoice, id=wxID_STCSTYLEEDITDLGSPEEDSETTINGCH) self.elementLb = wx.ListBox(choices=[], id=wxID_STCSTYLEEDITDLGELEMENTLB, name='elementLb', parent=self, pos=wx.Point(8, 70), size=wx.Size(175, 128), style=0)
|
def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSize(451, 455)) self.SetAutoLayout(True) self.SetSizeHints(425, 400, -1, -1) self.Center(wxBOTH) EVT_SIZE(self, self.OnStcstyleeditdlgSize)
|
EVT_LISTBOX(self.elementLb, wxID_STCSTYLEEDITDLGELEMENTLB, self.OnElementlbListbox) self.addCommonItemBtn = wxButton(id=wxID_STCSTYLEEDITDLGADDCOMMONITEMBTN, label='Add', name='addCommonItemBtn', parent=self, pos=wxPoint(8, 184), size=wxSize(80, 17), style=0)
|
self.elementLb.Bind(wx.EVT_LISTBOX, self.OnElementlbListbox, id=wxID_STCSTYLEEDITDLGELEMENTLB) self.addCommonItemBtn = wx.Button(id=wxID_STCSTYLEEDITDLGADDCOMMONITEMBTN, label='Add', name='addCommonItemBtn', parent=self, pos=wx.Point(8, 200), size=wx.Size(88, 17), style=0)
|
def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSize(451, 455)) self.SetAutoLayout(True) self.SetSizeHints(425, 400, -1, -1) self.Center(wxBOTH) EVT_SIZE(self, self.OnStcstyleeditdlgSize)
|
EVT_BUTTON(self.addCommonItemBtn, wxID_STCSTYLEEDITDLGADDCOMMONITEMBTN, self.OnAddsharebtnButton) self.removeCommonItemBtn = wxButton(id=wxID_STCSTYLEEDITDLGREMOVECOMMONITEMBTN,
|
self.addCommonItemBtn.Bind(wx.EVT_BUTTON, self.OnAddsharebtnButton, id=wxID_STCSTYLEEDITDLGADDCOMMONITEMBTN) self.removeCommonItemBtn = wx.Button(id=wxID_STCSTYLEEDITDLGREMOVECOMMONITEMBTN,
|
def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSize(451, 455)) self.SetAutoLayout(True) self.SetSizeHints(425, 400, -1, -1) self.Center(wxBOTH) EVT_SIZE(self, self.OnStcstyleeditdlgSize)
|
pos=wxPoint(88, 184), size=wxSize(80, 17), style=0)
|
pos=wx.Point(96, 200), size=wx.Size(88, 17), style=0)
|
def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSize(451, 455)) self.SetAutoLayout(True) self.SetSizeHints(425, 400, -1, -1) self.Center(wxBOTH) EVT_SIZE(self, self.OnStcstyleeditdlgSize)
|
EVT_BUTTON(self.removeCommonItemBtn, wxID_STCSTYLEEDITDLGREMOVECOMMONITEMBTN, self.OnRemovesharebtnButton) self.styleDefST = wxStaticText(id=wxID_STCSTYLEEDITDLGSTYLEDEFST,
|
self.removeCommonItemBtn.Bind(wx.EVT_BUTTON, self.OnRemovesharebtnButton, id=wxID_STCSTYLEEDITDLGREMOVECOMMONITEMBTN) self.styleDefST = wx.StaticText(id=wxID_STCSTYLEEDITDLGSTYLEDEFST,
|
def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSize(451, 455)) self.SetAutoLayout(True) self.SetSizeHints(425, 400, -1, -1) self.Center(wxBOTH) EVT_SIZE(self, self.OnStcstyleeditdlgSize)
|
pos=wxPoint(96, 8), size=wxSize(366, 16), style=wxST_NO_AUTORESIZE) self.styleDefST.SetFont(wxFont(self.style_font_size, wxSWISS, wxNORMAL, wxBOLD, False, ''))
|
pos=wx.Point(96, 8), size=wx.Size(376, 16), style=wx.ST_NO_AUTORESIZE) self.styleDefST.SetFont(wx.Font(self.style_font_size, wx.SWISS, wx.NORMAL, wx.BOLD, False, ''))
|
def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSize(451, 455)) self.SetAutoLayout(True) self.SetSizeHints(425, 400, -1, -1) self.Center(wxBOTH) EVT_SIZE(self, self.OnStcstyleeditdlgSize)
|
self.staticLine1 = wxStaticLine(id=wxID_STCSTYLEEDITDLGSTATICLINE1, name='staticLine1', parent=self, pos=wxPoint(48, 62), size=wxSize(120, 2), style=wxLI_HORIZONTAL)
|
self.staticLine1 = wx.StaticLine(id=wxID_STCSTYLEEDITDLGSTATICLINE1, name='staticLine1', parent=self, pos=wx.Point(48, 64), size=wx.Size(135, 0), style=wx.LI_HORIZONTAL)
|
def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSize(451, 455)) self.SetAutoLayout(True) self.SetSizeHints(425, 400, -1, -1) self.Center(wxBOTH) EVT_SIZE(self, self.OnStcstyleeditdlgSize)
|
self.staticText6 = wxStaticText(id=wxID_STCSTYLEEDITDLGSTATICTEXT6, label='Style', name='staticText6', parent=self, pos=wxPoint(8, 56), size=wxSize(40, 13), style=0) self.staticText8 = wxStaticText(id=wxID_STCSTYLEEDITDLGSTATICTEXT8,
|
self.staticText6 = wx.StaticText(id=wxID_STCSTYLEEDITDLGSTATICTEXT6, label='Style', name='staticText6', parent=self, pos=wx.Point(8, 56), size=wx.Size(40, 13), style=0) self.staticText8 = wx.StaticText(id=wxID_STCSTYLEEDITDLGSTATICTEXT8,
|
def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSize(451, 455)) self.SetAutoLayout(True) self.SetSizeHints(425, 400, -1, -1) self.Center(wxBOTH) EVT_SIZE(self, self.OnStcstyleeditdlgSize)
|
pos=wxPoint(8, 8), size=wxSize(88, 13), style=0) self.staticText9 = wxStaticText(id=wxID_STCSTYLEEDITDLGSTATICTEXT9,
|
pos=wx.Point(8, 8), size=wx.Size(88, 13), style=0) self.staticText9 = wx.StaticText(id=wxID_STCSTYLEEDITDLGSTATICTEXT9,
|
def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSize(451, 455)) self.SetAutoLayout(True) self.SetSizeHints(425, 400, -1, -1) self.Center(wxBOTH) EVT_SIZE(self, self.OnStcstyleeditdlgSize)
|
pos=wxPoint(8, 32), size=wxSize(88, 13), style=0) self.panel3 = wxPanel(id=wxID_STCSTYLEEDITDLGPANEL3, name='panel3', parent=self, pos=wxPoint(176, 56), size=wxSize(146, 104), style=wxTAB_TRAVERSAL)
|
pos=wx.Point(8, 32), size=wx.Size(88, 13), style=0) self.panel3 = wx.Panel(id=wxID_STCSTYLEEDITDLGPANEL3, name='panel3', parent=self, pos=wx.Point(199, 56), size=wx.Size(160, 120), style=wx.TAB_TRAVERSAL)
|
def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSize(451, 455)) self.SetAutoLayout(True) self.SetSizeHints(425, 400, -1, -1) self.Center(wxBOTH) EVT_SIZE(self, self.OnStcstyleeditdlgSize)
|
self.panel4 = wxPanel(id=wxID_STCSTYLEEDITDLGPANEL4, name='panel4', parent=self, pos=wxPoint(330, 56), size=wxSize(114, 104), style=wxTAB_TRAVERSAL)
|
self.panel4 = wx.Panel(id=wxID_STCSTYLEEDITDLGPANEL4, name='panel4', parent=self, pos=wx.Point(364, 56), size=wx.Size(114, 120), style=wx.TAB_TRAVERSAL)
|
def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSize(451, 455)) self.SetAutoLayout(True) self.SetSizeHints(425, 400, -1, -1) self.Center(wxBOTH) EVT_SIZE(self, self.OnStcstyleeditdlgSize)
|
self.panel1 = wxPanel(id=wxID_STCSTYLEEDITDLGPANEL1, name='panel1', parent=self, pos=wxPoint(176, 161), size=wxSize(143, 40), style=wxTAB_TRAVERSAL)
|
self.panel1 = wx.Panel(id=wxID_STCSTYLEEDITDLGPANEL1, name='panel1', parent=self, pos=wx.Point(202, 177), size=wx.Size(149, 40), style=wx.TAB_TRAVERSAL)
|
def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSize(451, 455)) self.SetAutoLayout(True) self.SetSizeHints(425, 400, -1, -1) self.Center(wxBOTH) EVT_SIZE(self, self.OnStcstyleeditdlgSize)
|
self.panel2 = wxPanel(id=wxID_STCSTYLEEDITDLGPANEL2, name='panel2', parent=self, pos=wxPoint(330, 162), size=wxSize(112, 40), style=wxTAB_TRAVERSAL)
|
self.panel2 = wx.Panel(id=wxID_STCSTYLEEDITDLGPANEL2, name='panel2', parent=self, pos=wx.Point(364, 178), size=wx.Size(112, 40), style=wx.TAB_TRAVERSAL)
|
def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSize(451, 455)) self.SetAutoLayout(True) self.SetSizeHints(425, 400, -1, -1) self.Center(wxBOTH) EVT_SIZE(self, self.OnStcstyleeditdlgSize)
|
self.stc = wxStyledTextCtrl(id=wxID_STCSTYLEEDITDLGSTC, name='stc', parent=self, pos=wxPoint(8, 208), size=wxSize(435, 207), style=wxSUNKEN_BORDER)
|
self.stc = wx.stc.StyledTextCtrl(id=wxID_STCSTYLEEDITDLGSTC, name='stc', parent=self, pos=wx.Point(8, 224), size=wx.Size(469, 191), style=wx.SUNKEN_BORDER)
|
def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSize(451, 455)) self.SetAutoLayout(True) self.SetSizeHints(425, 400, -1, -1) self.Center(wxBOTH) EVT_SIZE(self, self.OnStcstyleeditdlgSize)
|
self.stc.SetHelpText('The style preview window. Click or move the cursor over a spesific style to select the style for editing in the editors above.') EVT_LEFT_UP(self.stc, self.OnUpdateUI) EVT_KEY_UP(self.stc, self.OnUpdateUI) self.contextHelpButton1 = wxContextHelpButton(parent=self, pos=wxPoint(8, 423), size=wxSize(24, 24), style=wxBU_AUTODRAW)
|
self.stc.SetHelpText('The style preview window. Click or move the cursor over a specific style to select the style for editing in the editors above.') self.stc.Bind(wx.EVT_LEFT_UP, self.OnUpdateUI) self.stc.Bind(wx.EVT_KEY_UP, self.OnUpdateUI) self.contextHelpButton1 = wx.ContextHelpButton(parent=self, pos=wx.Point(8, 423), size=wx.Size(24, 24), style=wx.BU_AUTODRAW)
|
def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSize(451, 455)) self.SetAutoLayout(True) self.SetSizeHints(425, 400, -1, -1) self.Center(wxBOTH) EVT_SIZE(self, self.OnStcstyleeditdlgSize)
|
self.okBtn = wxButton(id=wxID_STCSTYLEEDITDLGOKBTN, label='OK', name='okBtn', parent=self, pos=wxPoint(282, 423), size=wxSize(75, 23), style=0)
|
self.okBtn = wx.Button(id=wxID_STCSTYLEEDITDLGOKBTN, label='OK', name='okBtn', parent=self, pos=wx.Point(316, 423), size=wx.Size(75, 23), style=0)
|
def _init_ctrls(self, prnt): # generated method, don't edit wxDialog.__init__(self, id=wxID_STCSTYLEEDITDLG, name='STCStyleEditDlg', parent=prnt, pos=wxPoint(583, 291), size=wxSize(459, 482), style=wxWANTS_CHARS | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER, title=self.stc_title) self._init_utils() self.SetClientSize(wxSize(451, 455)) self.SetAutoLayout(True) self.SetSizeHints(425, 400, -1, -1) self.Center(wxBOTH) EVT_SIZE(self, self.OnStcstyleeditdlgSize)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.