index
int64
0
50.7k
project_path
stringclasses
279 values
completion_path
stringlengths
57
199
signature_postion
stringlengths
3
11
class_position
stringlengths
3
11
function_name
stringlengths
1
62
class_name
stringlengths
0
55
body_position
stringlengths
3
11
body_position_with_comments
stringlengths
3
11
masked_class
stringlengths
14
8.32k
masked_class_with_comment
stringlengths
14
8.32k
func_body
stringlengths
9
6.72k
func_body_with_comment
stringlengths
9
6.72k
len_func_body
int64
1
643
len_input
int64
10
2.02k
len_output
int64
4
1.9k
total
int64
20
2.05k
file_code
stringlengths
14
442k
file_code_with_comment
stringlengths
14
442k
42,084
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/etgtools/generators.py
21,22
18,25
generate
WrapperGeneratorBase
22,25
22,25
class WrapperGeneratorBase(object): def __init__(self): pass def generate(self, module, destFile=None): FILL_FUNC_BODY
class WrapperGeneratorBase(object): def __init__(self): pass def generate(self, module, destFile=None): FILL_FUNC_BODY
raise NotImplementedError
raise NotImplementedError
2
45
13
58
#--------------------------------------------------------------------------- # Name: etgtools/generators.py # Author: Robin Dunn # # Created: 3-Nov-2010 # Copyright: (c) 2010-2020 by Total Control Software # License: wxWindows License #--------------------------------------------------------------...
#--------------------------------------------------------------------------- # Name: etgtools/generators.py # Author: Robin Dunn # # Created: 3-Nov-2010 # Copyright: (c) 2010-2020 by Total Control Software # License: wxWindows License #--------------------------------------------------------------...
42,085
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/etgtools/map_generator.py
69,70
27,102
generateEnum
ItemMapGenerator
70,86
70,86
class ItemMapGenerator(generators.DocsGeneratorBase): def __init__(self): super(ItemMapGenerator, self).__init__() def generate(self, module): assert isinstance(module, extractors.ModuleDef) realModuleName = MODULENAME_REPLACE[module.module] dispatchMap = { extracto...
class ItemMapGenerator(generators.DocsGeneratorBase): def __init__(self): super(ItemMapGenerator, self).__init__() def generate(self, module): assert isinstance(module, extractors.ModuleDef) realModuleName = MODULENAME_REPLACE[module.module] dispatchMap = { extracto...
# map names of enum types and enum elements if item.ignored: return name = self._getName(item) if name and not name.startswith('@'): imm[name] = scope # TODO: Investigate if there are cases where nested enum elements # should be tracked too. ...
# map names of enum types and enum elements if item.ignored: return name = self._getName(item) if name and not name.startswith('@'): imm[name] = scope # TODO: Investigate if there are cases where nested enum elements # should be tracked too. ...
70
499
154
653
# -*- coding: utf-8 -*- # --------------------------------------------------------------------------- # Name: etgtools/map_generator.py # Author: Robin Dunn # # Created: 20-May-2016 # Copyright: (c) 2016-2020 by Total Control Software # License: wxWindows License # --------------------------------...
# -*- coding: utf-8 -*- # --------------------------------------------------------------------------- # Name: etgtools/map_generator.py # Author: Robin Dunn # # Created: 20-May-2016 # Copyright: (c) 2016-2020 by Total Control Software # License: wxWindows License # --------------------------------...
42,088
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/combo/combo1.py
105,106
28,144
PaintComboControl
ListCtrlComboPopup
106,111
106,111
class ListCtrlComboPopup(wx.ComboPopup): def __init__(self): wx.ComboPopup.__init__(self) self.log = NullLog() self.lc = None def AddItem(self, txt): self.lc.InsertItem(self.lc.GetItemCount(), txt) def OnMotion(self, evt): item, flags = self.lc.HitTest(evt.GetPosi...
class ListCtrlComboPopup(wx.ComboPopup): def __init__(self): wx.ComboPopup.__init__(self) self.log = NullLog() self.lc = None def AddItem(self, txt): self.lc.InsertItem(self.lc.GetItemCount(), txt) def OnMotion(self, evt): item, flags = self.lc.HitTest(evt.GetPosi...
self.log.write("ListCtrlComboPopup.PaintComboControl") wx.ComboPopup.PaintComboControl(self, dc, rect) # Receives key events from the parent ComboCtrl. Events not # handled should be skipped, as usual.
self.log.write("ListCtrlComboPopup.PaintComboControl") wx.ComboPopup.PaintComboControl(self, dc, rect) # Receives key events from the parent ComboCtrl. Events not # handled should be skipped, as usual.
21
1,249
79
1,328
#--------------------------------------------------------------------------- # Name: samples/combo/combo1.py # Author: Robin Dunn # # Created: 1-June-2012 # Copyright: (c) 2012-2020 by Total Control Software # License: wxWindows License #------------------------------------------------------------...
#--------------------------------------------------------------------------- # Name: samples/combo/combo1.py # Author: Robin Dunn # # Created: 1-June-2012 # Copyright: (c) 2012-2020 by Total Control Software # License: wxWindows License #------------------------------------------------------------...
42,089
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/combo/combo1.py
19,20
18,28
write
NullLog
20,28
20,28
class NullLog: def write(self, *args): FILL_FUNC_BODY
class NullLog: def write(self, *args): FILL_FUNC_BODY
#print(' '.join(args)) pass #---------------------------------------------------------------------- # This class is used to provide an interface between a ComboCtrl and the # ListCtrl that is used as the popup for the combo widget.
#print(' '.join(args)) pass #---------------------------------------------------------------------- # This class is used to provide an interface between a ComboCtrl and the # ListCtrl that is used as the popup for the combo widget.
30
25
61
86
#--------------------------------------------------------------------------- # Name: samples/combo/combo1.py # Author: Robin Dunn # # Created: 1-June-2012 # Copyright: (c) 2012-2020 by Total Control Software # License: wxWindows License #------------------------------------------------------------...
#--------------------------------------------------------------------------- # Name: samples/combo/combo1.py # Author: Robin Dunn # # Created: 1-June-2012 # Copyright: (c) 2012-2020 by Total Control Software # License: wxWindows License #------------------------------------------------------------...
42,091
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/BB_HitTest.py
22,23
1,134
BB_HitTest
24,56
23,56
#!/usr/bin/env python """ Test of an alternative hit test methoid that used the bounding boxes of the objects instead. Poorly tested! Edited from code contributed by Benjamin Jessup on the mailing list """ import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a ...
#!/usr/bin/env python """ Test of an alternative hit test methoid that used the bounding boxes of the objects instead. Poorly tested! Edited from code contributed by Benjamin Jessup on the mailing list """ import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a ...
if self.HitDict and self.HitDict[HitEvent]: # loop though the objects associated with this event objects = [] #Create object list for holding multiple objects object_index_list = [] #Create list for holding the indexes xy_p = event.GetPosition() xy = self.PixelToWorld( xy_p )...
""" Hit Test Function for BoundingBox Based HitMap System""" if self.HitDict and self.HitDict[HitEvent]: # loop though the objects associated with this event objects = [] #Create object list for holding multiple objects object_index_list = [] #Create list for holding the indexes ...
147
803
444
1,247
#!/usr/bin/env python """ Test of an alternative hit test methoid that used the bounding boxes of the objects instead. Poorly tested! Edited from code contributed by Benjamin Jessup on the mailing list """ import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a ...
#!/usr/bin/env python """ Test of an alternative hit test methoid that used the bounding boxes of the objects instead. Poorly tested! Edited from code contributed by Benjamin Jessup on the mailing list """ import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a ...
42,092
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/BB_HitTest.py
111,112
58,118
OnMove
DrawFrame
116,118
112,118
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas Canvas = NavCanvas.NavCanvas(self,-1, s...
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas Canvas = NavCanvas.NavCanvas(self,-1, s...
self.SetStatusText("%.2f, %.2f"%tuple(event.Coords))
""" Updates the status bar with the world coordinates """ self.SetStatusText("%.2f, %.2f"%tuple(event.Coords))
2
547
29
576
#!/usr/bin/env python """ Test of an alternative hit test methoid that used the bounding boxes of the objects instead. Poorly tested! Edited from code contributed by Benjamin Jessup on the mailing list """ import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a ...
#!/usr/bin/env python """ Test of an alternative hit test methoid that used the bounding boxes of the objects instead. Poorly tested! Edited from code contributed by Benjamin Jessup on the mailing list """ import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a ...
42,093
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/BarPlot.py
20,21
1,150
YScaleFun
28,32
21,32
#!/usr/bin/env python import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("../") #from floatcanvas import NavCanvas, FloatCanvas import numpy as N from numpy import random as random NumChannels = 200 MaxValue = 2000 #...
#!/usr/bin/env python import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("../") #from floatcanvas import NavCanvas, FloatCanvas import numpy as N from numpy import random as random NumChannels = 200 MaxValue = 2000 #...
# center gets ignored in this case return N.array((1, float(NumChannels)/MaxValue), N.float)
""" Function that returns a scaling vector to scale y data to same range as x data This is used by FloatCanvas as a "projection function", so that you can have a different scale for X and Y. With the default projection, X and Y are the same scale. """ # center gets ignored in this case re...
11
1,252
37
1,289
#!/usr/bin/env python import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("../") #from floatcanvas import NavCanvas, FloatCanvas import numpy as N from numpy import random as random NumChannels = 200 MaxValue = 2000 #...
#!/usr/bin/env python import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("../") #from floatcanvas import NavCanvas, FloatCanvas import numpy as N from numpy import random as random NumChannels = 200 MaxValue = 2000 #...
42,094
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/BarPlot.py
128,129
47,134
ResetData
DrawFrame
129,134
129,134
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas FloatCanvas.FloatCanvas.ScaleWorldToPixel = ScaleWorldToPixel NC = N...
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas FloatCanvas.FloatCanvas.ScaleWorldToPixel = ScaleWorldToPixel NC = N...
self.Values = random.randint(0, MaxValue, (NumChannels,)) for i, bar in enumerate(self.Bars): bar.SetShape(bar.XY, (self.BarWidth, self.Values[i])) self.Canvas.Draw(Force=True)
self.Values = random.randint(0, MaxValue, (NumChannels,)) for i, bar in enumerate(self.Bars): bar.SetShape(bar.XY, (self.BarWidth, self.Values[i])) self.Canvas.Draw(Force=True)
14
768
79
847
#!/usr/bin/env python import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("../") #from floatcanvas import NavCanvas, FloatCanvas import numpy as N from numpy import random as random NumChannels = 200 MaxValue = 2000 #...
#!/usr/bin/env python import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("../") #from floatcanvas import NavCanvas, FloatCanvas import numpy as N from numpy import random as random NumChannels = 200 MaxValue = 2000 #...
42,095
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/Chart.py
60,61
14,111
BuildChartBackground
DrawFrame
61,80
61,80
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas Canvas = NavCanvas.NavCanvas(self,-1, s...
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas Canvas = NavCanvas.NavCanvas(self,-1, s...
Canvas = self.Canvas top = 0 bottom = -(self.LineHeight * self.NumRows) width = self.SpaceWidth * 16 + self.TextWidth # put in the rows: for i in range(1, self.NumRows+1, 2): Canvas.AddRectangle((0-self.TextWidth, -i*self.LineHeight), ...
Canvas = self.Canvas top = 0 bottom = -(self.LineHeight * self.NumRows) width = self.SpaceWidth * 16 + self.TextWidth # put in the rows: for i in range(1, self.NumRows+1, 2): Canvas.AddRectangle((0-self.TextWidth, -i*self.LineHeight), ...
71
657
260
917
#!/usr/bin/env python import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("../") #from floatcanvas import NavCanvas, FloatCanvas class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ ...
#!/usr/bin/env python import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("../") #from floatcanvas import NavCanvas, FloatCanvas class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ ...
42,096
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/ClickableBoxes.py
77,78
36,104
SquareHitLeft
DrawFrame
78,84
78,84
class DrawFrame(wx.Frame): """ A frame used for the Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) # Add the Canvas Canvas = FloatCanvas.FloatCanvas(self, size = (500,500), ...
class DrawFrame(wx.Frame): """ A frame used for the Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) # Add the Canvas Canvas = FloatCanvas.FloatCanvas(self, size = (500,500), ...
print("square hit:", square.indexes) # set a random color c = random.sample(colors, 1)[0] square.SetFillColor( c ) self.Canvas.Draw(True)
print("square hit:", square.indexes) # set a random color c = random.sample(colors, 1)[0] square.SetFillColor( c ) self.Canvas.Draw(True)
16
591
64
655
#!/usr/bin/env python """ This is a little demo of how to make clickable (and changeable) objects with FloatCanvas Also an example of constant size, rather than the usual zooming and panning Developed as an answer to a question on the wxPYhton mailing lilst: "get panel id while dragging across several panels' ...
#!/usr/bin/env python """ This is a little demo of how to make clickable (and changeable) objects with FloatCanvas Also an example of constant size, rather than the usual zooming and panning Developed as an answer to a question on the wxPYhton mailing lilst: "get panel id while dragging across several panels' ...
42,097
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/DrawBot.py
53,54
30,70
MakePic
DrawFrame
54,70
54,70
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self,parent, id,title,position,size): wx.Frame.__init__(self,parent, id,title,position, size) # Add the Canvas self.Canvas = NavCanvas.NavCanvas(self,-1,(500,500), ...
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self,parent, id,title,position,size): wx.Frame.__init__(self,parent, id,title,position, size) # Add the Canvas self.Canvas = NavCanvas.NavCanvas(self,-1,(500,500), ...
Canvas = self.Canvas phi = (sqrt(5) + 1)/2 - 1 oradius = 10.0 for i in moves.xrange(720): radius = 1.5 * oradius * sin(i * pi/720) Color = (255*(i / 720.), 255*( i / 720.), 255 * 0.25) x = oradius + 0.25*i*cos(phi*i*2*pi) y = oradius + 0.25...
Canvas = self.Canvas phi = (sqrt(5) + 1)/2 - 1 oradius = 10.0 for i in moves.xrange(720): radius = 1.5 * oradius * sin(i * pi/720) Color = (255*(i / 720.), 255*( i / 720.), 255 * 0.25) x = oradius + 0.25*i*cos(phi*i*2*pi) y = oradius + 0.25...
61
175
233
408
#!/usr/bin/env python """ DrawBot.py This a a demo of how one can use the FloatCanvas to do a drawing similar to one of the "DrawBot" demos: http://just.letterror.com/ltrwiki/DrawBot I think it's easier with FloatCavnas, and you get zoomign and scrolling to boot! """ import wx from six import moves from math im...
#!/usr/bin/env python """ DrawBot.py This a a demo of how one can use the FloatCanvas to do a drawing similar to one of the "DrawBot" demos: http://just.letterror.com/ltrwiki/DrawBot I think it's easier with FloatCavnas, and you get zoomign and scrolling to boot! """ import wx from six import moves from math im...
42,098
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/DrawRect.py
79,80
25,102
SetDraw
DrawFrame
80,90
80,90
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self,parent, id,title,position,size): wx.Frame.__init__(self,parent, id,title,position, size) self.CreateStatusBar() # Add the Canvas NC = NavCanvas.NavCanvas(self, ...
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self,parent, id,title,position,size): wx.Frame.__init__(self,parent, id,title,position, size) self.CreateStatusBar() # Add the Canvas NC = NavCanvas.NavCanvas(self, ...
label = self.DrawButton.GetLabel() if label == "Draw": self.DrawButton.SetLabel("StopDrawing") self.Canvas.SetMode(self.RBBoxMode) elif label == "StopDrawing": self.DrawButton.SetLabel("Draw") self.Canvas.SetMode(GUIMode.GUIMouse()) else: #...
label = self.DrawButton.GetLabel() if label == "Draw": self.DrawButton.SetLabel("StopDrawing") self.Canvas.SetMode(self.RBBoxMode) elif label == "StopDrawing": self.DrawButton.SetLabel("Draw") self.Canvas.SetMode(GUIMode.GUIMouse()) else: #...
19
591
113
704
#!/usr/bin/env python """ A simple demo that shows how to use FloatCanvas to draw rectangles on the screen Note: this is now broken -- the events are not getting to the Rubber Band Box object. It should be re-factored to use GUIMode """ import wx ## import a local version #import sys #sys.path.append("..") #...
#!/usr/bin/env python """ A simple demo that shows how to use FloatCanvas to draw rectangles on the screen Note: this is now broken -- the events are not getting to the Rubber Band Box object. It should be re-factored to use GUIMode """ import wx ## import a local version #import sys #sys.path.append("..") #...
42,099
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/GridDemo.py
60,61
19,69
OnMove
DrawFrame
65,69
61,69
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas Canvas = NavCanvas.NavCanvas(self,-1, s...
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas Canvas = NavCanvas.NavCanvas(self,-1, s...
self.SetStatusText("%.2f, %.2f"%tuple(event.Coords))
""" Updates the status bar with the world coordinates """ self.SetStatusText("%.2f, %.2f"%tuple(event.Coords))
2
387
33
420
#!/usr/bin/env python """ A simple demo to show how to do grids """ import wx try: # See if there is a local copy import sys sys.path.append("../") from floatcanvas import NavCanvas, FloatCanvas except ImportError: from wx.lib.floatcanvas import NavCanvas, FloatCanvas class DrawFrame(wx.Frame)...
#!/usr/bin/env python """ A simple demo to show how to do grids """ import wx try: # See if there is a local copy import sys sys.path.append("../") from floatcanvas import NavCanvas, FloatCanvas except ImportError: from wx.lib.floatcanvas import NavCanvas, FloatCanvas class DrawFrame(wx.Frame)...
42,100
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/GroupDeleteDemo.py
93,94
18,106
RemoveGroup
DrawFrame
94,99
94,99
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas NC = NavCanvas.NavCanvas(self,-1, size ...
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas NC = NavCanvas.NavCanvas(self,-1, size ...
print("removing group:", group) G = self.Groups[group] self.Canvas.RemoveObject(G) self.Canvas.Draw(Force=True)
print("removing group:", group) G = self.Groups[group] self.Canvas.RemoveObject(G) self.Canvas.Draw(Force=True)
8
1,041
52
1,093
#!/usr/bin/env python """ A small demo of how to use Groups of Objects """ import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("..") #from floatcanvas import NavCanvas, FloatCanvas class DrawFrame(wx.Frame): ""...
#!/usr/bin/env python """ A small demo of how to use Groups of Objects """ import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("..") #from floatcanvas import NavCanvas, FloatCanvas class DrawFrame(wx.Frame): ""...
42,101
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/GroupDemo.py
91,92
18,96
HideGroup
DrawFrame
92,96
92,96
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas NC = NavCanvas.NavCanvas(self,-1, size ...
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas NC = NavCanvas.NavCanvas(self,-1, size ...
G = self.Groups[group] G.Visible = not G.Visible self.Canvas.Draw(Force=True)
G = self.Groups[group] G.Visible = not G.Visible self.Canvas.Draw(Force=True)
8
918
38
956
#!/usr/bin/env python """ A small demo of how to use Groups of Objects """ import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("..") #from floatcanvas import NavCanvas, FloatCanvas class DrawFrame(wx.Frame): ""...
#!/usr/bin/env python """ A small demo of how to use Groups of Objects """ import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("..") #from floatcanvas import NavCanvas, FloatCanvas class DrawFrame(wx.Frame): ""...
42,102
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/Hexagons.py
50,51
28,87
MakeHexagons
DrawFrame
51,82
51,82
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) # Add the Canvas self.Canvas = NavCanvas.NavCanvas(self,-1,(500,500), ProjectionFun =...
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) # Add the Canvas self.Canvas = NavCanvas.NavCanvas(self,-1,(500,500), ProjectionFun =...
print("Building %i Hexagons"%NumHexagons) # get a list of colors for random colors wx.lib.colourdb.updateColourDB() self.colors = wx.lib.colourdb.getColourList() print("Max colors:", len(self.colors)) Canvas = self.Canvas D = 1.0 h = D *N.sqrt(3)/2 ...
print("Building %i Hexagons"%NumHexagons) # get a list of colors for random colors wx.lib.colourdb.updateColourDB() self.colors = wx.lib.colourdb.getColourList() print("Max colors:", len(self.colors)) Canvas = self.Canvas D = 1.0 h = D *N.sqrt(3)/2 ...
103
243
423
666
#!/usr/bin/env python """ A simple demo to display a lot of hexagons This was an example someone had on the wxPython-users list """ import wx import wx.lib.colourdb ## import local version: #import sys #sys.path.append("..") #from floatcanvas import NavCanvas, FloatCanvas ## import installed version from wx.lib.fl...
#!/usr/bin/env python """ A simple demo to display a lot of hexagons This was an example someone had on the wxPython-users list """ import wx import wx.lib.colourdb ## import local version: #import sys #sys.path.append("..") #from floatcanvas import NavCanvas, FloatCanvas ## import installed version from wx.lib.fl...
42,103
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/Map.py
44,45
16,73
LoadMap
DrawFrame
45,57
45,57
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas NC = NavCanvas.NavCanvas(self,-1, size = (5...
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas NC = NavCanvas.NavCanvas(self,-1, size = (5...
Image = wx.Image(filename) self.Canvas.AddScaledBitmap(Image, (0,0), Height = Image.GetSize()[1], Position = "tl") self.Canvas.AddPoint((0,0), Diameter=3) self.Canvas.AddText("(0,0)", (0,0), Position="cl") p = (Image.GetSize()[0],-Image.GetSize()[1]) self.Canvas.AddPoint...
Image = wx.Image(filename) self.Canvas.AddScaledBitmap(Image, (0,0), Height = Image.GetSize()[1], Position = "tl") self.Canvas.AddPoint((0,0), Diameter=3) self.Canvas.AddText("(0,0)", (0,0), Position="cl") p = (Image.GetSize()[0],-Image.GetSize()[1]) self.Canvas.AddPoint...
30
367
198
565
#!/usr/bin/env python TestFileName = "data/TestMap.png" import wx from wx.lib.floatcanvas import NavCanvas, FloatCanvas #import sys #sys.path.append("..") #from floatcanvas import NavCanvas, FloatCanvas class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self...
#!/usr/bin/env python TestFileName = "data/TestMap.png" import wx from wx.lib.floatcanvas import NavCanvas, FloatCanvas #import sys #sys.path.append("..") #from floatcanvas import NavCanvas, FloatCanvas class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self...
42,104
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/MicroDemo.py
61,62
14,68
OnMove
DrawFrame
66,68
62,68
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas Canvas = NavCanvas.NavCanvas(self,-1, s...
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas Canvas = NavCanvas.NavCanvas(self,-1, s...
self.SetStatusText("%.2f, %.2f"%tuple(event.Coords))
""" Updates the status bar with the world coordinates """ self.SetStatusText("%.2f, %.2f"%tuple(event.Coords))
2
437
29
466
#!/usr/bin/env python import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("../") #from floatcanvas import NavCanvas, FloatCanvas class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ ...
#!/usr/bin/env python import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("../") #from floatcanvas import NavCanvas, FloatCanvas class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ ...
42,105
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/MiniDemo.py
361,362
311,370
OnInit
DemoApp
362,370
362,370
class DemoApp(wx.App): """ How the demo works: Under the Draw menu, there are three options: *Draw Test: will put up a picture of a bunch of randomly generated objects, of each kind supported. *Draw Map: will draw a map of the world. Be patient, it is a big map, with a lot of data, and wi...
class DemoApp(wx.App): """ How the demo works: Under the Draw menu, there are three options: *Draw Test: will put up a picture of a bunch of randomly generated objects, of each kind supported. *Draw Map: will draw a map of the world. Be patient, it is a big map, with a lot of data, and wi...
frame = DrawFrame(None, wx.ID_ANY, title = "FloatCanvas Demo App", size = (700,700) ) self.SetTopWindow(frame) return True
frame = DrawFrame(None, wx.ID_ANY, title = "FloatCanvas Demo App", size = (700,700) ) self.SetTopWindow(frame) return True
16
544
67
611
#!/usr/bin/env python import wx ## import local version: #import sys #sys.path.append("../") #from floatcanvas import NavCanvas, FloatCanvas ## import installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas import wx.lib.colourdb class DrawFrame(wx.Frame): """ A frame used for the FloatCan...
#!/usr/bin/env python import wx ## import local version: #import sys #sys.path.append("../") #from floatcanvas import NavCanvas, FloatCanvas ## import installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas import wx.lib.colourdb class DrawFrame(wx.Frame): """ A frame used for the FloatCan...
42,107
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/MouseTest.py
41,42
21,44
OnLeftDown
TestFrame
42,44
42,44
class TestFrame(wx.Frame): def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.canvas =FloatCanvas.FloatCanvas(self, BackgroundColor = "DARK SLATE BLUE") # Layout MainSizer = wx.BoxSizer(wx.VERTICAL) MainSizer.Add(self.canvas, 4, wx.EXPAND) ...
class TestFrame(wx.Frame): def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.canvas =FloatCanvas.FloatCanvas(self, BackgroundColor = "DARK SLATE BLUE") # Layout MainSizer = wx.BoxSizer(wx.VERTICAL) MainSizer.Add(self.canvas, 4, wx.EXPAND) ...
print('Left Button clicked at: %s' % event.Coords)
print('Left Button clicked at: %s' % event.Coords)
7
251
21
272
#!/usr/bin/env python """ Small demo of catching Mouse events using just FloatCanvas, rather than NavCanvas """ import wx app = wx.App(0) try: # See if there is a local copy import sys sys.path.append("../") from floatcanvas import NavCanvas, FloatCanvas, GUIMode except ImportError: from wx.lib...
#!/usr/bin/env python """ Small demo of catching Mouse events using just FloatCanvas, rather than NavCanvas """ import wx app = wx.App(0) try: # See if there is a local copy import sys sys.path.append("../") from floatcanvas import NavCanvas, FloatCanvas, GUIMode except ImportError: from wx.lib...
42,108
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/MovingPlot.py
222,223
181,232
OnInit
DemoApp
223,232
223,232
class DemoApp(wx.App): """ How the demo works: Either under the Draw menu, or on the toolbar, you can push Run and Stop "Run" start an oscilloscope like display of a moving sine curve "Stop" stops it. While the plot os running (or not) you can zoom in and out and move about the picture. T...
class DemoApp(wx.App): """ How the demo works: Either under the Draw menu, or on the toolbar, you can push Run and Stop "Run" start an oscilloscope like display of a moving sine curve "Stop" stops it. While the plot os running (or not) you can zoom in and out and move about the picture. T...
frame = DrawFrame(None, wx.ID_ANY, title = "Plotting Test", size = (700,400) ) self.SetTopWindow(frame) return True
frame = DrawFrame(None, wx.ID_ANY, title = "Plotting Test", size = (700,400) ) self.SetTopWindow(frame) return True
15
411
67
478
#!/usr/bin/env python """ A small test app that uses FloatCanvas to draw a plot, and have an efficient moving line on it. """ import wx import numpy as N ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("../") #from floatca...
#!/usr/bin/env python """ A small test app that uses FloatCanvas to draw a plot, and have an efficient moving line on it. """ import wx import numpy as N ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("../") #from floatca...
42,109
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/MovingPlot.py
107,108
21,181
DrawAxis
DrawFrame
108,141
108,141
class DrawFrame(wx.Frame): def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) ## Set up the MenuBar MenuBar = wx.MenuBar() file_menu = wx.Menu() item = file_menu.Append(wx.ID_EXIT, "", "Terminate the program") self.Bind(wx.EVT_MENU, self....
class DrawFrame(wx.Frame): def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) ## Set up the MenuBar MenuBar = wx.MenuBar() file_menu = wx.Menu() item = file_menu.Append(wx.ID_EXIT, "", "Terminate the program") self.Bind(wx.EVT_MENU, self....
Canvas = self.Canvas # Draw the Axis # Note: the AddRectangle Parameters all have sensible # defaults. I've put them all here explicitly, so you can see # what the options are. self.Canvas.AddRectangle((0, -1.1), (2*N.pi, 2.2), ...
Canvas = self.Canvas # Draw the Axis # Note: the AddRectangle Parameters all have sensible # defaults. I've put them all here explicitly, so you can see # what the options are. self.Canvas.AddRectangle((0, -1.1), (2*N.pi, 2.2), ...
103
1,220
365
1,585
#!/usr/bin/env python """ A small test app that uses FloatCanvas to draw a plot, and have an efficient moving line on it. """ import wx import numpy as N ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("../") #from floatca...
#!/usr/bin/env python """ A small test app that uses FloatCanvas to draw a plot, and have an efficient moving line on it. """ import wx import numpy as N ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("../") #from floatca...
42,110
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/NoToolbar.py
71,72
19,78
Binding
DrawFrame
72,78
72,78
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas Canvas = FloatCanvas.FloatCanvas(self, ...
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas Canvas = FloatCanvas.FloatCanvas(self, ...
print("Writing a png file:") self.Canvas.SaveAsImage("junk.png") print("Writing a jpeg file:") self.Canvas.SaveAsImage("junk.jpg",wx.BITMAP_TYPE_JPEG)
print("Writing a png file:") self.Canvas.SaveAsImage("junk.png") print("Writing a jpeg file:") self.Canvas.SaveAsImage("junk.jpg",wx.BITMAP_TYPE_JPEG)
10
431
75
506
#!/usr/bin/env python """ A simple example of how to use FloatCanvas by itself, without the NavCanvas toolbar """ import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("../") #from floatcanvas import NavCanvas, FloatCa...
#!/usr/bin/env python """ A simple example of how to use FloatCanvas by itself, without the NavCanvas toolbar """ import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("../") #from floatcanvas import NavCanvas, FloatCa...
42,111
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/OverlayDemo.py
118,119
78,127
OnMove
DrawFrame
123,127
119,127
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas Canvas = NavCanvas.NavCanvas(self,-1, s...
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas Canvas = NavCanvas.NavCanvas(self,-1, s...
self.SetStatusText("%.2f, %.2f"%tuple(event.Coords))
""" Updates the status bar with the world coordinates """ self.SetStatusText("%.2f, %.2f"%tuple(event.Coords))
2
333
33
366
#!/usr/bin/env python """ A simple demo to show how to "Overlays": i.e. drawing something on top of eveything else on the Canvas, relative to window coords, rather than screen coords. This method uses the "GridOver" object in the FloatCanvas - it was originally dsigend for grids, graticule,s etc. that are alway...
#!/usr/bin/env python """ A simple demo to show how to "Overlays": i.e. drawing something on top of eveything else on the Canvas, relative to window coords, rather than screen coords. This method uses the "GridOver" object in the FloatCanvas - it was originally dsigend for grids, graticule,s etc. that are alway...
42,112
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/OverlayDemo.py
59,60
26,78
_Draw
TextOverlay
64,78
60,78
class TextOverlay(FloatCanvas.Text): """ An example of an Overlay object: all it needs is a new _Draw method. NOTE: you may want to get fancier with this, deriving from ScaledTextBox """ def __init__(self, String, xy, Size = 24, ...
class TextOverlay(FloatCanvas.Text): """ An example of an Overlay object: all it needs is a new _Draw method. NOTE: you may want to get fancier with this, deriving from ScaledTextBox """ def __init__(self, String, xy, Size = 24, ...
dc.SetFont(self.Font) dc.SetTextForeground(self.Color) if self.BackgroundColor: dc.SetBackgroundMode(wx.SOLID) dc.SetTextBackground(self.BackgroundColor) else: dc.SetBackgroundMode(wx.TRANSPARENT) ## maybe inpliment this... #if self.Tex...
""" _Draw method for Overlay note: this is a differeent signarture than the DrawObject Draw """ dc.SetFont(self.Font) dc.SetTextForeground(self.Color) if self.BackgroundColor: dc.SetBackgroundMode(wx.SOLID) dc.SetTextBackground(self.Backgr...
33
282
201
483
#!/usr/bin/env python """ A simple demo to show how to "Overlays": i.e. drawing something on top of eveything else on the Canvas, relative to window coords, rather than screen coords. This method uses the "GridOver" object in the FloatCanvas - it was originally dsigend for grids, graticule,s etc. that are alway...
#!/usr/bin/env python """ A simple demo to show how to "Overlays": i.e. drawing something on top of eveything else on the Canvas, relative to window coords, rather than screen coords. This method uses the "GridOver" object in the FloatCanvas - it was originally dsigend for grids, graticule,s etc. that are alway...
42,113
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/PieChart.py
82,83
19,89
OnMove
DrawFrame
86,89
83,89
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas Canvas = NavCanvas.NavCanvas(self,-1, s...
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas Canvas = NavCanvas.NavCanvas(self,-1, s...
self.SetStatusText("%.2g, %.2g"%tuple(event.Coords))
""" Updates the status bar with the world coordinates """ self.SetStatusText("%.2g, %.2g"%tuple(event.Coords))
2
768
31
799
#!/usr/bin/env python import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas from wx.lib.floatcanvas.FCObjects import PieChart ## import a local version #import sys #sys.path.append("..") #from floatcanvas import NavCanvas, FloatCanvas #from floatcanvas.SpecialObjects import...
#!/usr/bin/env python import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas from wx.lib.floatcanvas.FCObjects import PieChart ## import a local version #import sys #sys.path.append("..") #from floatcanvas import NavCanvas, FloatCanvas #from floatcanvas.SpecialObjects import...
42,114
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/PixelBitmap.py
126,127
81,135
OnMove
DrawFrame
131,135
127,135
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas Canvas = NavCanvas.NavCanvas(self,-1, s...
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas Canvas = NavCanvas.NavCanvas(self,-1, s...
self.SetStatusText("%.2f, %.2f"%tuple(event.Coords))
""" Updates the status bar with the world coordinates """ self.SetStatusText("%.2f, %.2f"%tuple(event.Coords))
2
521
33
554
#!/usr/bin/env python """ A simple demo to show how to drw a bitmap on top of the Canvas at given pixel coords. """ import wx import numpy as np try: # See if there is a local copy import sys sys.path.append("../") from floatcanvas import NavCanvas, FloatCanvas except ImportError: from wx.lib.fl...
#!/usr/bin/env python """ A simple demo to show how to drw a bitmap on top of the Canvas at given pixel coords. """ import wx import numpy as np try: # See if there is a local copy import sys sys.path.append("../") from floatcanvas import NavCanvas, FloatCanvas except ImportError: from wx.lib.fl...
42,115
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/PixelBitmap.py
77,78
73,81
_Draw
GridGroup
78,81
78,81
class GridGroup: def __init__(self, grids=[]): self.Grids = grids def _Draw(self, *args): FILL_FUNC_BODY
class GridGroup: def __init__(self, grids=[]): self.Grids = grids def _Draw(self, *args): FILL_FUNC_BODY
for grid in self.Grids: grid._Draw(*args)
for grid in self.Grids: grid._Draw(*args)
5
49
22
71
#!/usr/bin/env python """ A simple demo to show how to drw a bitmap on top of the Canvas at given pixel coords. """ import wx import numpy as np try: # See if there is a local copy import sys sys.path.append("../") from floatcanvas import NavCanvas, FloatCanvas except ImportError: from wx.lib.fl...
#!/usr/bin/env python """ A simple demo to show how to drw a bitmap on top of the Canvas at given pixel coords. """ import wx import numpy as np try: # See if there is a local copy import sys sys.path.append("../") from floatcanvas import NavCanvas, FloatCanvas except ImportError: from wx.lib.fl...
42,116
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/PixelBitmap.py
58,59
20,73
_Draw
PixelBitmap
59,73
59,73
class PixelBitmap: """ An unscaled bitmap that can be put on top of the canvas using: Canvas.GridOver = MyPixelBitmap It will always be drawn on top of everything else, and be positioned according to pixel coordinates on the screen, regardless of zoom and pan position. """ def __init_...
class PixelBitmap: """ An unscaled bitmap that can be put on top of the canvas using: Canvas.GridOver = MyPixelBitmap It will always be drawn on top of everything else, and be positioned according to pixel coordinates on the screen, regardless of zoom and pan position. """ def __init_...
w, h = Canvas.Size XY = self.XY if self.Position[0] == 'b': XY = (XY[0], h - XY[1] - self.Height) elif self.Position[0] == 'c': XY = (XY[0], XY[1] + (h - self.Height)/2) if self.Position[1] == 'r': XY = (w - XY[0] - self.Width, XY[1]) ...
w, h = Canvas.Size XY = self.XY if self.Position[0] == 'b': XY = (XY[0], h - XY[1] - self.Height) elif self.Position[0] == 'c': XY = (XY[0], XY[1] + (h - self.Height)/2) if self.Position[1] == 'r': XY = (w - XY[0] - self.Width, XY[1]) ...
58
414
201
615
#!/usr/bin/env python """ A simple demo to show how to drw a bitmap on top of the Canvas at given pixel coords. """ import wx import numpy as np try: # See if there is a local copy import sys sys.path.append("../") from floatcanvas import NavCanvas, FloatCanvas except ImportError: from wx.lib.fl...
#!/usr/bin/env python """ A simple demo to show how to drw a bitmap on top of the Canvas at given pixel coords. """ import wx import numpy as np try: # See if there is a local copy import sys sys.path.append("../") from floatcanvas import NavCanvas, FloatCanvas except ImportError: from wx.lib.fl...
42,117
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/PointsHitDemo.py
59,60
14,66
OnMove
DrawFrame
64,66
60,66
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas Canvas = NavCanvas.NavCanvas(self,-1, s...
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas Canvas = NavCanvas.NavCanvas(self,-1, s...
self.SetStatusText("%.2f, %.2f" % tuple(event.Coords))
""" Updates the status bar with the world coordinates """ self.SetStatusText("%.2f, %.2f" % tuple(event.Coords))
4
510
28
538
#!/usr/bin/env python import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("../") #from floatcanvas import NavCanvas, FloatCanvas class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ ...
#!/usr/bin/env python import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("../") #from floatcanvas import NavCanvas, FloatCanvas class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ ...
42,118
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/PolyEditor.py
142,143
21,205
OnLeftClick
DrawFrame
143,147
143,147
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self,parent, id,title,position,size): wx.Frame.__init__(self,parent, id,title,position, size) ## Set up the MenuBar MenuBar = wx.MenuBar() FileMenu = wx.Menu() exit = FileMe...
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self,parent, id,title,position,size): wx.Frame.__init__(self,parent, id,title,position, size) ## Set up the MenuBar MenuBar = wx.MenuBar() FileMenu = wx.Menu() exit = FileMe...
## If a click happens outside the polygon, it's no longer selected self.DeSelectPoly() self.Canvas.Draw()
## If a click happens outside the polygon, it's no longer selected self.DeSelectPoly() self.Canvas.Draw()
14
2,007
41
2,048
#!/usr/bin/env python """ PolyEditor: a simple app for editing polygons Used as a demo for FloatCanvas """ import numpy as N import random import numpy.random as RandomArray from wx.lib.floatcanvas import NavCanvas, FloatCanvas # import a local copy: #import sys #sys.path.append("..") #from floatcanvas import NavCa...
#!/usr/bin/env python """ PolyEditor: a simple app for editing polygons Used as a demo for FloatCanvas """ import numpy as N import random import numpy.random as RandomArray from wx.lib.floatcanvas import NavCanvas, FloatCanvas # import a local copy: #import sys #sys.path.append("..") #from floatcanvas import NavCa...
42,119
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/PolyEditor.py
212,213
205,226
OnInit
PolyEditor
213,226
213,226
class PolyEditor(wx.App): """ A simple example of making editable shapes with FloatCanvas """ def OnInit(self): FILL_FUNC_BODY
class PolyEditor(wx.App): """ A simple example of making editable shapes with FloatCanvas """ def OnInit(self): FILL_FUNC_BODY
frame = DrawFrame(None, -1, "FloatCanvas Demo App", wx.DefaultPosition, (700,700), ) self.SetTopWindow(frame) frame.Show() frame.Setup() return True...
frame = DrawFrame(None, -1, "FloatCanvas Demo App", wx.DefaultPosition, (700,700), ) self.SetTopWindow(frame) frame.Show() frame.Setup() return True...
15
51
87
138
#!/usr/bin/env python """ PolyEditor: a simple app for editing polygons Used as a demo for FloatCanvas """ import numpy as N import random import numpy.random as RandomArray from wx.lib.floatcanvas import NavCanvas, FloatCanvas # import a local copy: #import sys #sys.path.append("..") #from floatcanvas import NavCa...
#!/usr/bin/env python """ PolyEditor: a simple app for editing polygons Used as a demo for FloatCanvas """ import numpy as N import random import numpy.random as RandomArray from wx.lib.floatcanvas import NavCanvas, FloatCanvas # import a local copy: #import sys #sys.path.append("..") #from floatcanvas import NavCa...
42,120
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/ScaleDemo.py
27,28
1,101
YScaleFun
32,35
28,35
#!/usr/bin/env python """ This demonstrates how to use FloatCanvas with a coordinate system where X and Y have different scales. In the example, a user had: X data in the range: 50e-6 to 2000e-6 Y data in the range: 0 to 50000 -chb """ import wx ## import the installed version from wx.lib.floatcanvas import NavCa...
#!/usr/bin/env python """ This demonstrates how to use FloatCanvas with a coordinate system where X and Y have different scales. In the example, a user had: X data in the range: 50e-6 to 2000e-6 Y data in the range: 0 to 50000 -chb """ import wx ## import the installed version from wx.lib.floatcanvas import NavCa...
# center gets ignored in this case return N.array((5e7, 1), N.float)
""" function that returns a scaling vector to scale y data to same range as x data """ # center gets ignored in this case return N.array((5e7, 1), N.float)
11
687
31
718
#!/usr/bin/env python """ This demonstrates how to use FloatCanvas with a coordinate system where X and Y have different scales. In the example, a user had: X data in the range: 50e-6 to 2000e-6 Y data in the range: 0 to 50000 -chb """ import wx ## import the installed version from wx.lib.floatcanvas import NavCa...
#!/usr/bin/env python """ This demonstrates how to use FloatCanvas with a coordinate system where X and Y have different scales. In the example, a user had: X data in the range: 50e-6 to 2000e-6 Y data in the range: 0 to 50000 -chb """ import wx ## import the installed version from wx.lib.floatcanvas import NavCa...
42,121
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/ScaleDemo.py
78,79
35,85
OnMove
DrawFrame
82,85
79,85
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas Canvas = NavCanvas.NavCanvas(self,-1, s...
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas Canvas = NavCanvas.NavCanvas(self,-1, s...
self.SetStatusText("%.2g, %.2g"%tuple(event.Coords))
""" Updates the status bar with the world coordinates """ self.SetStatusText("%.2g, %.2g"%tuple(event.Coords))
2
407
31
438
#!/usr/bin/env python """ This demonstrates how to use FloatCanvas with a coordinate system where X and Y have different scales. In the example, a user had: X data in the range: 50e-6 to 2000e-6 Y data in the range: 0 to 50000 -chb """ import wx ## import the installed version from wx.lib.floatcanvas import NavCa...
#!/usr/bin/env python """ This demonstrates how to use FloatCanvas with a coordinate system where X and Y have different scales. In the example, a user had: X data in the range: 50e-6 to 2000e-6 Y data in the range: 0 to 50000 -chb """ import wx ## import the installed version from wx.lib.floatcanvas import NavCa...
42,122
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/ScaledBitmap2Demo.py
60,61
25,68
OnMove
DrawFrame
65,68
61,68
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas Canvas = NavCanvas.NavCanvas(self, Proje...
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas Canvas = NavCanvas.NavCanvas(self, Proje...
self.SetStatusText("%i, %i"%tuple(event.Coords))
""" Updates the status bar with the world coordinates """ self.SetStatusText("%i, %i"%tuple(event.Coords))
2
316
27
343
#!/usr/bin/env python """ This demo shows how to use a ScaledBitmap2 (which is like a scaled bitmap, but uses memory more efficiently for large images and high zoom levels.) """ ## Set a path to an Image file here: ImageFile = "white_tank.jpg" import wx import random ## import the installed version from wx.lib.f...
#!/usr/bin/env python """ This demo shows how to use a ScaledBitmap2 (which is like a scaled bitmap, but uses memory more efficiently for large images and high zoom levels.) """ ## Set a path to an Image file here: ImageFile = "white_tank.jpg" import wx import random ## import the installed version from wx.lib.f...
42,123
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/SplitterWindow.py
64,65
63,70
OnInit
MyApp
65,70
65,70
class MyApp(wx.App): def OnInit(self): FILL_FUNC_BODY
class MyApp(wx.App): def OnInit(self): FILL_FUNC_BODY
frame = MyFrame(None, title='splitter test') frame.Show(True) self.SetTopWindow(frame) return True
frame = MyFrame(None, title='splitter test') frame.Show(True) self.SetTopWindow(frame) return True
9
27
44
71
#!/usr/bin/env python import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("../") #from floatcanvas import NavCanvas, FloatCanvas class MyFrame(wx.Frame): def __init__(self, *args, **kwargs): wx.Frame.__ini...
#!/usr/bin/env python import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("../") #from floatcanvas import NavCanvas, FloatCanvas class MyFrame(wx.Frame): def __init__(self, *args, **kwargs): wx.Frame.__ini...
42,124
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/SubClassNavCanvas.py
57,58
33,65
OnMove
NavPanel
62,65
58,65
class NavPanel(NavCanvas.NavCanvas): """ a subclass of NavCAnvas -- with some specific drawing code """ def __init__(self, parent): NavCanvas.NavCanvas.__init__(self, parent, ProjectionFun = None, ...
class NavPanel(NavCanvas.NavCanvas): """ a subclass of NavCAnvas -- with some specific drawing code """ def __init__(self, parent): NavCanvas.NavCanvas.__init__(self, parent, ProjectionFun = None, ...
self.parent_frame.SetStatusText("%f, %f"%tuple(event.Coords)) pass
""" Updates the status bar with the world coordinates """ self.parent_frame.SetStatusText("%f, %f"%tuple(event.Coords)) pass
3
246
33
279
#!/usr/bin/env python """ A simple example of sub-classing the Navcanvas -- an alternative to simply putting a NavCanvas on your your own panel or whatever """ import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("../...
#!/usr/bin/env python """ A simple example of sub-classing the Navcanvas -- an alternative to simply putting a NavCanvas on your your own panel or whatever """ import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("../...
42,125
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/TestSpline.py
161,162
156,167
OnInit
DemoApp
162,167
162,167
class DemoApp(wx.App): def __init__(self, *args, **kwargs): wx.App.__init__(self, *args, **kwargs) def OnInit(self): FILL_FUNC_BODY
class DemoApp(wx.App): def __init__(self, *args, **kwargs): wx.App.__init__(self, *args, **kwargs) def OnInit(self): FILL_FUNC_BODY
frame = DrawFrame(None, title="FloatCanvas Spline Demo", size = (700,700)) self.SetTopWindow(frame) return True
frame = DrawFrame(None, title="FloatCanvas Spline Demo", size = (700,700)) self.SetTopWindow(frame) return True
12
60
53
113
#!/usr/bin/env python """ This is a very small app using the FloatCanvas It tests the Spline object, including how you can put points together to create an object with curves and square corners. """ import wx #### import local version: #import sys #sys.path.append("../") #from floatcanvas import NavCanvas #from f...
#!/usr/bin/env python """ This is a very small app using the FloatCanvas It tests the Spline object, including how you can put points together to create an object with curves and square corners. """ import wx #### import local version: #import sys #sys.path.append("../") #from floatcanvas import NavCanvas #from f...
42,126
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/TestSpline.py
95,96
35,156
DrawTest
DrawFrame
96,156
96,156
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) ## Set up the MenuBar MenuBar = wx.MenuBar() file_menu = wx.Menu() item = file_menu.Append(-1, "&Close","Close thi...
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) ## Set up the MenuBar MenuBar = wx.MenuBar() file_menu = wx.Menu() item = file_menu.Append(-1, "&Close","Close thi...
wx.GetApp().Yield() Canvas = self.Canvas Points = [(0, 0), (200,0), (200,0), (200,0), (200,15), (185,15), (119,15), (104,15), (104,30), ...
wx.GetApp().Yield() Canvas = self.Canvas Points = [(0, 0), (200,0), (200,0), (200,0), (200,15), (185,15), (119,15), (104,15), (104,30), ...
94
561
572
1,133
#!/usr/bin/env python """ This is a very small app using the FloatCanvas It tests the Spline object, including how you can put points together to create an object with curves and square corners. """ import wx #### import local version: #import sys #sys.path.append("../") #from floatcanvas import NavCanvas #from f...
#!/usr/bin/env python """ This is a very small app using the FloatCanvas It tests the Spline object, including how you can put points together to create an object with curves and square corners. """ import wx #### import local version: #import sys #sys.path.append("../") #from floatcanvas import NavCanvas #from f...
42,127
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/TestSpline.py
27,28
23,35
_Draw
Spline
28,35
28,35
class Spline(FC.Line): def __init__(self, *args, **kwargs): FC.Line.__init__(self, *args, **kwargs) def _Draw(self, dc , WorldToPixel, ScaleWorldToPixel, HTdc=None): FILL_FUNC_BODY
class Spline(FC.Line): def __init__(self, *args, **kwargs): FC.Line.__init__(self, *args, **kwargs) def _Draw(self, dc , WorldToPixel, ScaleWorldToPixel, HTdc=None): FILL_FUNC_BODY
Points = WorldToPixel(self.Points) dc.SetPen(self.Pen) dc.DrawSpline(Points) if HTdc and self.HitAble: HTdc.SetPen(self.HitPen) HTdc.DrawSpline(Points)
Points = WorldToPixel(self.Points) dc.SetPen(self.Pen) dc.DrawSpline(Points) if HTdc and self.HitAble: HTdc.SetPen(self.HitPen) HTdc.DrawSpline(Points)
11
79
87
166
#!/usr/bin/env python """ This is a very small app using the FloatCanvas It tests the Spline object, including how you can put points together to create an object with curves and square corners. """ import wx #### import local version: #import sys #sys.path.append("../") #from floatcanvas import NavCanvas #from f...
#!/usr/bin/env python """ This is a very small app using the FloatCanvas It tests the Spline object, including how you can put points together to create an object with curves and square corners. """ import wx #### import local version: #import sys #sys.path.append("../") #from floatcanvas import NavCanvas #from f...
42,128
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/TextBox2.py
132,133
41,213
OnMove
DrawFrame
139,178
133,178
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self,parent, id,title,position,size): wx.Frame.__init__(self,parent, id,title,position, size) self.CreateStatusBar() # Add the Canvas Canvas = NavCanvas.NavCanvas(self,-1,(500,500), ...
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self,parent, id,title,position,size): wx.Frame.__init__(self,parent, id,title,position, size) self.CreateStatusBar() # Add the Canvas Canvas = NavCanvas.NavCanvas(self,-1,(500,500), ...
self.SetStatusText("%.4f, %.4f"%tuple(event.Coords)) if self.Resizing: ((xy),(wh)) = self.Box.GetBoxRect() (xp, yp) = self.Canvas.WorldToPixel(xy) (wp, hp) = self.Canvas.ScaleWorldToPixel(wh) hp = -hp Corner = event.GetPosition() ...
""" Updates the status bar with the world coordinates And moves a point if there is one """ self.SetStatusText("%.4f, %.4f"%tuple(event.Coords)) if self.Resizing: ((xy),(wh)) = self.Box.GetBoxRect() (xp, yp) = self.Canvas.WorldToPixel(xy) ...
116
1,208
625
1,833
#!/usr/bin/env python """ A test and demo of the ScaledTextbox. It also shows how one can use the Mouse to interact and change objects on a Canvas. this really needs to be re-done with GUI-Modes. """ import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas, Resources ## i...
#!/usr/bin/env python """ A test and demo of the ScaledTextbox. It also shows how one can use the Mouse to interact and change objects on a Canvas. this really needs to be re-done with GUI-Modes. """ import wx ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas, Resources ## i...
42,129
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/VectPlot.py
190,191
149,198
OnInit
DemoApp
191,198
191,198
class DemoApp(wx.App): """ How the demo works: Either under the Draw menu, or on the toolbar, you can push Run and Stop "Run" start an oscilloscope like display of a moving sine curve "Stop" stops it. While the plot os running (or not) you can zoom in and out and move about the picture. T...
class DemoApp(wx.App): """ How the demo works: Either under the Draw menu, or on the toolbar, you can push Run and Stop "Run" start an oscilloscope like display of a moving sine curve "Stop" stops it. While the plot os running (or not) you can zoom in and out and move about the picture. T...
frame = DrawFrame(None, wx.ID_ANY, "Plotting Test",wx.DefaultPosition,wx.Size(700,400)) self.SetTopWindow(frame) return True
frame = DrawFrame(None, wx.ID_ANY, "Plotting Test",wx.DefaultPosition,wx.Size(700,400)) self.SetTopWindow(frame) return True
9
411
64
475
#!/usr/bin/env python """ A small test app that uses FloatCanvas to draw a vector plot. """ import wx import numpy as N import random ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("../") #from floatcanvas import NavCanva...
#!/usr/bin/env python """ A small test app that uses FloatCanvas to draw a vector plot. """ import wx import numpy as N import random ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("../") #from floatcanvas import NavCanva...
42,130
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/VectPlot.py
88,89
21,149
DrawAxis
DrawFrame
89,124
89,124
class DrawFrame(wx.Frame): def __init__(self,parent, id,title,position,size): wx.Frame.__init__(self,parent, id,title,position, size) ## Set up the MenuBar MenuBar = wx.MenuBar() file_menu = wx.Menu() item = file_menu.Append(wx.ID_ANY, "E&xit","Terminate the program") ...
class DrawFrame(wx.Frame): def __init__(self,parent, id,title,position,size): wx.Frame.__init__(self,parent, id,title,position, size) ## Set up the MenuBar MenuBar = wx.MenuBar() file_menu = wx.Menu() item = file_menu.Append(wx.ID_ANY, "E&xit","Terminate the program") ...
Canvas = self.Canvas # Draw the Axis # Note: the AddRectangle Parameters all have sensible # defaults. I've put them all here explicitly, so you can see # what the options are. self.Canvas.AddRectangle((0, -1.1), (2*N.pi, 2.2), ...
Canvas = self.Canvas # Draw the Axis # Note: the AddRectangle Parameters all have sensible # defaults. I've put them all here explicitly, so you can see # what the options are. self.Canvas.AddRectangle((0, -1.1), (2*N.pi, 2.2), ...
102
877
372
1,249
#!/usr/bin/env python """ A small test app that uses FloatCanvas to draw a vector plot. """ import wx import numpy as N import random ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("../") #from floatcanvas import NavCanva...
#!/usr/bin/env python """ A small test app that uses FloatCanvas to draw a vector plot. """ import wx import numpy as N import random ## import the installed version from wx.lib.floatcanvas import NavCanvas, FloatCanvas ## import a local version #import sys #sys.path.append("../") #from floatcanvas import NavCanva...
42,131
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/YDownDemo.py
28,29
1,96
YDownProjection
29,31
29,31
#!/usr/bin/env python """ This demonstrates how to use FloatCanvas with a coordinate system where Y is increased down, instead of up. This is a standard system for images, for instance. Note that there are some problems with doing this for bitmaps and text: things that require positioning. I'm sure it can be fixed, ...
#!/usr/bin/env python """ This demonstrates how to use FloatCanvas with a coordinate system where Y is increased down, instead of up. This is a standard system for images, for instance. Note that there are some problems with doing this for bitmaps and text: things that require positioning. I'm sure it can be fixed, ...
return N.array((1,-1))
return N.array((1,-1))
2
658
14
672
#!/usr/bin/env python """ This demonstrates how to use FloatCanvas with a coordinate system where Y is increased down, instead of up. This is a standard system for images, for instance. Note that there are some problems with doing this for bitmaps and text: things that require positioning. I'm sure it can be fixed, ...
#!/usr/bin/env python """ This demonstrates how to use FloatCanvas with a coordinate system where Y is increased down, instead of up. This is a standard system for images, for instance. Note that there are some problems with doing this for bitmaps and text: things that require positioning. I'm sure it can be fixed, ...
42,132
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/floatcanvas/YDownDemo.py
73,74
31,80
OnMove
DrawFrame
77,80
74,80
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas Canvas = NavCanvas.NavCanvas(self,-1, s...
class DrawFrame(wx.Frame): """ A frame used for the FloatCanvas Demo """ def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **kwargs) self.CreateStatusBar() # Add the Canvas Canvas = NavCanvas.NavCanvas(self,-1, s...
self.SetStatusText("%.2f, %.2f"%tuple(event.Coords))
""" Updates the status bar with the world coordinates """ self.SetStatusText("%.2f, %.2f"%tuple(event.Coords))
2
380
31
411
#!/usr/bin/env python """ This demonstrates how to use FloatCanvas with a coordinate system where Y is increased down, instead of up. This is a standard system for images, for instance. Note that there are some problems with doing this for bitmaps and text: things that require positioning. I'm sure it can be fixed, ...
#!/usr/bin/env python """ This demonstrates how to use FloatCanvas with a coordinate system where Y is increased down, instead of up. This is a standard system for images, for instance. Note that there are some problems with doing this for bitmaps and text: things that require positioning. I'm sure it can be fixed, ...
42,133
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/mainloop/mainloop.py
158,159
156,175
MainLoop
MyApp
159,163
159,163
class MyApp(wx.App): def MainLoop(self): FILL_FUNC_BODY def ExitMainLoop(self): self.mainLoop.Exit() def OnInit(self): frame = MyFrame(None, -1, "This is a test") frame.Show(True) self.SetTopWindow(frame) #self.keepGoing = True return True
class MyApp(wx.App): def MainLoop(self): FILL_FUNC_BODY def ExitMainLoop(self): self.mainLoop.Exit() def OnInit(self): frame = MyFrame(None, -1, "This is a test") frame.Show(True) self.SetTopWindow(frame) #self.keepGoing = True return True
self.SetExitOnFrameDelete(True) self.mainLoop = MyEventLoop() self.mainLoop.Run()
self.SetExitOnFrameDelete(True) self.mainLoop = MyEventLoop() self.mainLoop.Run()
5
109
37
146
#!/usr/bin/env python """ This demo attempts to override the C++ MainLoop and implement it in Python. """ import time import wx import wx.lib.newevent as ne ##import os; raw_input('PID: %d\nPress enter...' % os.getpid()) GooEvent, EVT_GOO = ne.NewCommandEvent() #---------------------------------------------------...
#!/usr/bin/env python """ This demo attempts to override the C++ MainLoop and implement it in Python. """ import time import wx import wx.lib.newevent as ne ##import os; raw_input('PID: %d\nPress enter...' % os.getpid()) GooEvent, EVT_GOO = ne.NewCommandEvent() #---------------------------------------------------...
42,134
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/mainloop/mainloop.py
97,98
83,156
Run
MyEventLoop
98,136
98,136
class MyEventLoop(wx.GUIEventLoop): def __init__(self): wx.GUIEventLoop.__init__(self) self.exitCode = 0 self.shouldExit = False def DoMyStuff(self): # Do whatever you want to have done for each iteration of the event # loop. In this example we'll just sleep a bit to si...
class MyEventLoop(wx.GUIEventLoop): def __init__(self): wx.GUIEventLoop.__init__(self) self.exitCode = 0 self.shouldExit = False def DoMyStuff(self): # Do whatever you want to have done for each iteration of the event # loop. In this example we'll just sleep a bit to si...
# Set this loop as the active one. It will automatically reset to the # original evtloop when the context manager exits. with wx.EventLoopActivator(self): while True: self.DoMyStuff() # Generate and process idles events for as long as there ...
# Set this loop as the active one. It will automatically reset to the # original evtloop when the context manager exits. with wx.EventLoopActivator(self): while True: self.DoMyStuff() # Generate and process idles events for as long as there ...
126
234
345
579
#!/usr/bin/env python """ This demo attempts to override the C++ MainLoop and implement it in Python. """ import time import wx import wx.lib.newevent as ne ##import os; raw_input('PID: %d\nPress enter...' % os.getpid()) GooEvent, EVT_GOO = ne.NewCommandEvent() #---------------------------------------------------...
#!/usr/bin/env python """ This demo attempts to override the C++ MainLoop and implement it in Python. """ import time import wx import wx.lib.newevent as ne ##import os; raw_input('PID: %d\nPress enter...' % os.getpid()) GooEvent, EVT_GOO = ne.NewCommandEvent() #---------------------------------------------------...
42,135
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/mainloop/mainloop.py
60,61
19,83
OnIdle
MyFrame
61,64
61,64
class MyFrame(wx.Frame): def __init__(self, parent, id, title): wx.Frame.__init__(self, parent, id, title, size=(300, 200)) self.Bind(wx.EVT_SIZE, self.OnSize) self.Bind(wx.EVT_MOVE, self.OnMove) self.Bind(wx.EVT_CLOSE, self.OnCloseWindow) self.Bind(wx.EVT_IDLE, self.OnIdle...
class MyFrame(wx.Frame): def __init__(self, parent, id, title): wx.Frame.__init__(self, parent, id, title, size=(300, 200)) self.Bind(wx.EVT_SIZE, self.OnSize) self.Bind(wx.EVT_MOVE, self.OnMove) self.Bind(wx.EVT_CLOSE, self.OnCloseWindow) self.Bind(wx.EVT_IDLE, self.OnIdle...
self.idleCtrl.SetValue(str(self.count)) self.count = self.count + 1
self.idleCtrl.SetValue(str(self.count)) self.count = self.count + 1
6
696
32
728
#!/usr/bin/env python """ This demo attempts to override the C++ MainLoop and implement it in Python. """ import time import wx import wx.lib.newevent as ne ##import os; raw_input('PID: %d\nPress enter...' % os.getpid()) GooEvent, EVT_GOO = ne.NewCommandEvent() #---------------------------------------------------...
#!/usr/bin/env python """ This demo attempts to override the C++ MainLoop and implement it in Python. """ import time import wx import wx.lib.newevent as ne ##import os; raw_input('PID: %d\nPress enter...' % os.getpid()) GooEvent, EVT_GOO = ne.NewCommandEvent() #---------------------------------------------------...
42,136
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/overlay/overlay.py
46,47
8,83
OnMouseMove
TestPanel
47,68
47,68
class TestPanel(wx.Panel): def __init__(self, *args, **kw): wx.Panel.__init__(self, *args, **kw) self.Bind(wx.EVT_PAINT, self.OnPaint) self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown) self.Bind(wx.EVT_LEFT_UP, self.OnLeftUp) self.Bind(wx.EVT_MOTION, self.OnMouseMove) se...
class TestPanel(wx.Panel): def __init__(self, *args, **kw): wx.Panel.__init__(self, *args, **kw) self.Bind(wx.EVT_PAINT, self.OnPaint) self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown) self.Bind(wx.EVT_LEFT_UP, self.OnLeftUp) self.Bind(wx.EVT_MOTION, self.OnMouseMove) se...
if evt.Dragging() and evt.LeftIsDown(): rect = wx.Rect(topLeft=self.startPos, bottomRight=evt.GetPosition()) # Draw the rubber-band rectangle using an overlay so it # will manage keeping the rectangle and the former window # contents separate. dc = wx...
if evt.Dragging() and evt.LeftIsDown(): rect = wx.Rect(topLeft=self.startPos, bottomRight=evt.GetPosition()) # Draw the rubber-band rectangle using an overlay so it # will manage keeping the rectangle and the former window # contents separate. dc = wx...
85
581
289
870
""" A simple sample of using a wx.Overlay to draw a rubberband effect """ import wx print(wx.version()) class TestPanel(wx.Panel): def __init__(self, *args, **kw): wx.Panel.__init__(self, *args, **kw) self.Bind(wx.EVT_PAINT, self.OnPaint) self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown) ...
""" A simple sample of using a wx.Overlay to draw a rubberband effect """ import wx print(wx.version()) class TestPanel(wx.Panel): def __init__(self, *args, **kw): wx.Panel.__init__(self, *args, **kw) self.Bind(wx.EVT_PAINT, self.OnPaint) self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown) ...
42,137
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/printing/printing.py
170,171
106,247
OnPageSetup
PrintFrameworkSample
171,189
171,189
class PrintFrameworkSample(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, size=(640, 480), title="Print Framework Sample") self.CreateStatusBar() # A text widget to display the doc and let it be edited self.tc = wx.TextCtrl(self, -1, "", ...
class PrintFrameworkSample(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, size=(640, 480), title="Print Framework Sample") self.CreateStatusBar() # A text widget to display the doc and let it be edited self.tc = wx.TextCtrl(self, -1, "", ...
data = wx.PageSetupDialogData() data.SetPrintData(self.pdata) data.SetDefaultMinMargins(True) data.SetMarginTopLeft(self.margins[0]) data.SetMarginBottomRight(self.margins[1]) dlg = wx.PageSetupDialog(self, data) if dlg.ShowModal() == wx.ID_OK: data ...
data = wx.PageSetupDialogData() data.SetPrintData(self.pdata) data.SetDefaultMinMargins(True) data.SetMarginTopLeft(self.margins[0]) data.SetMarginBottomRight(self.margins[1]) dlg = wx.PageSetupDialog(self, data) if dlg.ShowModal() == wx.ID_OK: data ...
38
1,551
252
1,803
import wx from six import print_ import os FONTSIZE = 10 class TextDocPrintout(wx.Printout): """ A printout class that is able to print simple text documents. Does not handle page numbers or titles, and it assumes that no lines are longer than what will fit within the page width. Those features a...
import wx from six import print_ import os FONTSIZE = 10 class TextDocPrintout(wx.Printout): """ A printout class that is able to print simple text documents. Does not handle page numbers or titles, and it assumes that no lines are longer than what will fit within the page width. Those features a...
42,138
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/printing/printing.py
27,28
7,106
CalculateScale
TextDocPrintout
28,50
28,50
class TextDocPrintout(wx.Printout): """ A printout class that is able to print simple text documents. Does not handle page numbers or titles, and it assumes that no lines are longer than what will fit within the page width. Those features are left as an exercise for the reader. ;-) """ def ...
class TextDocPrintout(wx.Printout): """ A printout class that is able to print simple text documents. Does not handle page numbers or titles, and it assumes that no lines are longer than what will fit within the page width. Those features are left as an exercise for the reader. ;-) """ def ...
# Scale the DC such that the printout is roughly the same as # the screen scaling. ppiPrinterX, ppiPrinterY = self.GetPPIPrinter() ppiScreenX, ppiScreenY = self.GetPPIScreen() logScale = float(ppiPrinterX)/float(ppiScreenX) # Now adjust if the real page size is reduced (...
# Scale the DC such that the printout is roughly the same as # the screen scaling. ppiPrinterX, ppiPrinterY = self.GetPPIPrinter() ppiScreenX, ppiScreenY = self.GetPPIScreen() logScale = float(ppiPrinterX)/float(ppiScreenX) # Now adjust if the real page size is reduced (...
104
879
284
1,163
import wx from six import print_ import os FONTSIZE = 10 class TextDocPrintout(wx.Printout): """ A printout class that is able to print simple text documents. Does not handle page numbers or titles, and it assumes that no lines are longer than what will fit within the page width. Those features a...
import wx from six import print_ import os FONTSIZE = 10 class TextDocPrintout(wx.Printout): """ A printout class that is able to print simple text documents. Does not handle page numbers or titles, and it assumes that no lines are longer than what will fit within the page width. Those features a...
42,140
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/roses/wxroses.py
219,220
187,252
OnIdle
OptionsPanel
220,229
220,229
class OptionsPanel(wx.Panel): def __init__(self, parent, rose): wx.Panel.__init__(self, parent) self.rose = rose sizer = wx.StaticBoxSizer(wx.StaticBox(self, label='Options'), wx.VERTICAL) self.useGCDC = wx.CheckBox(self, label="Use GCDC") si...
class OptionsPanel(wx.Panel): def __init__(self, parent, rose): wx.Panel.__init__(self, parent) self.rose = rose sizer = wx.StaticBoxSizer(wx.StaticBox(self, label='Options'), wx.VERTICAL) self.useGCDC = wx.CheckBox(self, label="Use GCDC") si...
if self.useGCDC.GetValue() != self.rose.useGCDC: self.useGCDC.SetValue(self.rose.useGCDC) if self.useBuffer.GetValue() != self.rose.useBuffer: self.useBuffer.SetValue(self.rose.useBuffer) if self.fg.GetValue() != self.rose.GetForegroundColour(): self.fg.SetVal...
if self.useGCDC.GetValue() != self.rose.useGCDC: self.useGCDC.SetValue(self.rose.useGCDC) if self.useBuffer.GetValue() != self.rose.useBuffer: self.useBuffer.SetValue(self.rose.useBuffer) if self.fg.GetValue() != self.rose.GetForegroundColour(): self.fg.SetVal...
20
762
172
934
#---------------------------------------------------------------------------- # Name: wxroses.py # Purpose: wxPython GUI using clroses.py to display a classic graphics # hack. # # Author: Ric Werme, Robin Dunn. # WWW: http://WermeNH.com/roses # # Created: June 2007 # CVS-I...
#---------------------------------------------------------------------------- # Name: wxroses.py # Purpose: wxPython GUI using clroses.py to display a classic graphics # hack. # # Author: Ric Werme, Robin Dunn. # WWW: http://WermeNH.com/roses # # Created: June 2007 # CVS-I...
42,141
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/roses/wxroses.py
150,151
120,187
DrawLines
RosePanel
151,161
151,161
class RosePanel(wx.Panel): def __init__(self, *args, **kw): wx.Panel.__init__(self, *args, **kw) self.InitBuffer() self.resizeNeeded = False self.useGCDC = False self.useBuffer = True # set default colors self.SetBackgroundColour((51, 51, 51)) # gray20 ...
class RosePanel(wx.Panel): def __init__(self, *args, **kw): wx.Panel.__init__(self, *args, **kw) self.InitBuffer() self.resizeNeeded = False self.useGCDC = False self.useBuffer = True # set default colors self.SetBackgroundColour((51, 51, 51)) # gray20 ...
if len(lines) <= 1: return dc = self.useBuffer and wx.MemoryDC(self.buffer) or wx.ClientDC(self) if self.useGCDC: dc = wx.GCDC(dc) dc.SetPen(wx.Pen(self.GetForegroundColour(), 1)) dc.DrawLines(lines) if self.useBuffer: self.Refresh(Fals...
if len(lines) <= 1: return dc = self.useBuffer and wx.MemoryDC(self.buffer) or wx.ClientDC(self) if self.useGCDC: dc = wx.GCDC(dc) dc.SetPen(wx.Pen(self.GetForegroundColour(), 1)) dc.DrawLines(lines) if self.useBuffer: self.Refresh(Fals...
23
571
127
698
#---------------------------------------------------------------------------- # Name: wxroses.py # Purpose: wxPython GUI using clroses.py to display a classic graphics # hack. # # Author: Ric Werme, Robin Dunn. # WWW: http://WermeNH.com/roses # # Created: June 2007 # CVS-I...
#---------------------------------------------------------------------------- # Name: wxroses.py # Purpose: wxPython GUI using clroses.py to display a classic graphics # hack. # # Author: Ric Werme, Robin Dunn. # WWW: http://WermeNH.com/roses # # Created: June 2007 # CVS-I...
42,142
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/roses/wxroses.py
108,109
82,120
OnSpin
SpinPanel
109,120
109,120
class SpinPanel(wx.Panel): def __init__(self, parent, name, min_value, value, max_value, callback): wx.Panel.__init__(self, parent, -1) if "wxMac" in wx.PlatformInfo: self.SetWindowVariant(wx.WINDOW_VARIANT_SMALL) self.st = wx.StaticText(self, -1, name) self.sc = wx.SpinC...
class SpinPanel(wx.Panel): def __init__(self, parent, name, min_value, value, max_value, callback): wx.Panel.__init__(self, parent, -1) if "wxMac" in wx.PlatformInfo: self.SetWindowVariant(wx.WINDOW_VARIANT_SMALL) self.st = wx.StaticText(self, -1, name) self.sc = wx.SpinC...
name = self.st.GetLabel() value = self.sc.GetValue() if verbose: print_('OnSpin', name, '=', value) self.callback(name, value) # Call MyFrame.OnSpinback to call clroses # This class is used to display the current rose diagram. It keeps a # buffer bitmap of the current...
name = self.st.GetLabel() value = self.sc.GetValue() if verbose: print_('OnSpin', name, '=', value) self.callback(name, value) # Call MyFrame.OnSpinback to call clroses # This class is used to display the current rose diagram. It keeps a # buffer bitmap of the current...
77
371
150
521
#---------------------------------------------------------------------------- # Name: wxroses.py # Purpose: wxPython GUI using clroses.py to display a classic graphics # hack. # # Author: Ric Werme, Robin Dunn. # WWW: http://WermeNH.com/roses # # Created: June 2007 # CVS-I...
#---------------------------------------------------------------------------- # Name: wxroses.py # Purpose: wxPython GUI using clroses.py to display a classic graphics # hack. # # Author: Ric Werme, Robin Dunn. # WWW: http://WermeNH.com/roses # # Created: June 2007 # CVS-I...
42,143
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/simple/events.py
23,24
22,33
OnInit
MyApp
24,29
24,29
class MyApp(wx.App): def OnInit(self): FILL_FUNC_BODY def OnExit(self): print_('OnExit') return 0
class MyApp(wx.App): def OnInit(self): FILL_FUNC_BODY def OnExit(self): print_('OnExit') return 0
print_('OnInit') frm = MyFrame(None, title="Hello with Events", size=(480,360)) frm.Show() return True
print_('OnInit') frm = MyFrame(None, title="Hello with Events", size=(480,360)) frm.Show() return True
11
49
53
102
import wx from six import print_ print_(wx.version()) #import os; print_('PID:', os.getpid()); raw_input('Ready to start, press enter...') class MyFrame(wx.Frame): def __init__(self, *args, **kw): wx.Frame.__init__(self, *args, **kw) self.Bind(wx.EVT_SIZE, self.onSize) wx.CallAfter(self....
import wx from six import print_ print_(wx.version()) #import os; print_('PID:', os.getpid()); raw_input('Ready to start, press enter...') class MyFrame(wx.Frame): def __init__(self, *args, **kw): wx.Frame.__init__(self, *args, **kw) self.Bind(wx.EVT_SIZE, self.onSize) wx.CallAfter(self....
42,144
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/simple/events.py
15,16
9,22
after
MyFrame
16,18
16,18
class MyFrame(wx.Frame): def __init__(self, *args, **kw): wx.Frame.__init__(self, *args, **kw) self.Bind(wx.EVT_SIZE, self.onSize) wx.CallAfter(self.after, 1, 2, 3) def after(self, a, b, c): FILL_FUNC_BODY def onSize(self, evt): print_(repr(evt.Size)) evt.Skip()
class MyFrame(wx.Frame): def __init__(self, *args, **kw): wx.Frame.__init__(self, *args, **kw) self.Bind(wx.EVT_SIZE, self.onSize) wx.CallAfter(self.after, 1, 2, 3) def after(self, a, b, c): FILL_FUNC_BODY def onSize(self, evt): print_(repr(evt.Size)) evt.Skip()
print_('Called via wx.CallAfter:', a, b, c)
print_('Called via wx.CallAfter:', a, b, c)
6
132
23
155
import wx from six import print_ print_(wx.version()) #import os; print_('PID:', os.getpid()); raw_input('Ready to start, press enter...') class MyFrame(wx.Frame): def __init__(self, *args, **kw): wx.Frame.__init__(self, *args, **kw) self.Bind(wx.EVT_SIZE, self.onSize) wx.CallAfter(self....
import wx from six import print_ print_(wx.version()) #import os; print_('PID:', os.getpid()); raw_input('Ready to start, press enter...') class MyFrame(wx.Frame): def __init__(self, *args, **kw): wx.Frame.__init__(self, *args, **kw) self.Bind(wx.EVT_SIZE, self.onSize) wx.CallAfter(self....
42,145
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/simple/giltest.py
41,42
30,73
onButton
MainFrame
42,47
42,47
class MainFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, title="GIL Test") self.pnl = wx.Panel(self) btn = wx.Button(self.pnl, label='modal dialog', pos=(10,10)) self.Bind(wx.EVT_BUTTON, self.onButton, btn) self.pnl.Bind(wx.EVT_CONTEXT_MENU, self.onShowMen...
class MainFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, title="GIL Test") self.pnl = wx.Panel(self) btn = wx.Button(self.pnl, label='modal dialog', pos=(10,10)) self.Bind(wx.EVT_BUTTON, self.onButton, btn) self.pnl.Bind(wx.EVT_CONTEXT_MENU, self.onShowMen...
dlg = wx.Dialog(self, title='close this dialog', size=(300,150)) dlg.ShowModal() dlg.Destroy()
dlg = wx.Dialog(self, title='close this dialog', size=(300,150)) dlg.ShowModal() dlg.Destroy()
9
452
52
504
# # A simple test to verify that the GIL is released while in long running # wrappers like MainLoop, ShowModal, and PopupMenu so background threads can # be allowed to run at those times. # import wx import threading import time import random print(wx.version()) class ThreadedTask(threading.Thread): def __init_...
# # A simple test to verify that the GIL is released while in long running # wrappers like MainLoop, ShowModal, and PopupMenu so background threads can # be allowed to run at those times. # import wx import threading import time import random print(wx.version()) class ThreadedTask(threading.Thread): def __init_...
42,146
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/simple/giltest.py
22,23
15,30
run
ThreadedTask
23,30
23,30
class ThreadedTask(threading.Thread): def __init__(self, *args, **kw): threading.Thread.__init__(self, *args, **kw) self.counter = 0 self.sleepTime = random.random()/2 self.timeToDie = False def run(self): FILL_FUNC_BODY
class ThreadedTask(threading.Thread): def __init__(self, *args, **kw): threading.Thread.__init__(self, *args, **kw) self.counter = 0 self.sleepTime = random.random()/2 self.timeToDie = False def run(self): FILL_FUNC_BODY
while not self.timeToDie: time.sleep(self.sleepTime) self.counter += 1 print('thread: %5s count: %d' % (self.name, self.counter))
while not self.timeToDie: time.sleep(self.sleepTime) self.counter += 1 print('thread: %5s count: %d' % (self.name, self.counter))
14
90
63
153
# # A simple test to verify that the GIL is released while in long running # wrappers like MainLoop, ShowModal, and PopupMenu so background threads can # be allowed to run at those times. # import wx import threading import time import random print(wx.version()) class ThreadedTask(threading.Thread): def __init_...
# # A simple test to verify that the GIL is released while in long running # wrappers like MainLoop, ShowModal, and PopupMenu so background threads can # be allowed to run at those times. # import wx import threading import time import random print(wx.version()) class ThreadedTask(threading.Thread): def __init_...
42,147
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/simple/simple.py
89,90
88,101
OnInit
MyApp
90,101
90,101
class MyApp(AppBaseClass): def OnInit(self): FILL_FUNC_BODY
class MyApp(AppBaseClass): def OnInit(self): FILL_FUNC_BODY
frame = MyFrame(None, "Simple wxPython App") self.SetTopWindow(frame) print("Print statements go to this stdout window by default.") if USE_WIT: print("Press Ctrl-Alt-I (Cmd-Opt-I on Mac) to launch the WITH.") self.InitInspection() frame.Show(True) ...
frame = MyFrame(None, "Simple wxPython App") self.SetTopWindow(frame) print("Print statements go to this stdout window by default.") if USE_WIT: print("Press Ctrl-Alt-I (Cmd-Opt-I on Mac) to launch the WITH.") self.InitInspection() frame.Show(True) ...
31
27
107
134
#---------------------------------------------------------------------- # A very simple wxPython example. Just a wx.Frame, wx.Panel, # wx.StaticText, wx.Button, and a wx.BoxSizer, but it shows the basic # structure of any wxPython application. #---------------------------------------------------------------------- im...
#---------------------------------------------------------------------- # A very simple wxPython example. Just a wx.Frame, wx.Panel, # wx.StaticText, wx.Button, and a wx.BoxSizer, but it shows the basic # structure of any wxPython application. #---------------------------------------------------------------------- im...
42,148
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/samples/simple/simple.py
78,79
17,88
OnTimeToClose
MyFrame
80,83
79,83
class MyFrame(wx.Frame): """ This is MyFrame. It just shows a few controls on a wxPanel, and has a simple menu. """ def __init__(self, parent, title): wx.Frame.__init__(self, parent, -1, title) # Create the menubar menuBar = wx.MenuBar() # and a menu menu =...
class MyFrame(wx.Frame): """ This is MyFrame. It just shows a few controls on a wxPanel, and has a simple menu. """ def __init__(self, parent, title): wx.Frame.__init__(self, parent, -1, title) # Create the menubar menuBar = wx.MenuBar() # and a menu menu =...
print("See ya later!") self.Close()
"""Event handler for the button click.""" print("See ya later!") self.Close()
4
743
19
762
#---------------------------------------------------------------------- # A very simple wxPython example. Just a wx.Frame, wx.Panel, # wx.StaticText, wx.Button, and a wx.BoxSizer, but it shows the basic # structure of any wxPython application. #---------------------------------------------------------------------- im...
#---------------------------------------------------------------------- # A very simple wxPython example. Just a wx.Frame, wx.Panel, # wx.StaticText, wx.Button, and a wx.BoxSizer, but it shows the basic # structure of any wxPython application. #---------------------------------------------------------------------- im...
42,150
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/setup.py
187,188
186,213
finalize_options
wx_bdist_egg
188,203
188,203
class wx_bdist_egg(orig_bdist_egg): def finalize_options(self): FILL_FUNC_BODY def run(self): # Ensure that there is a basic library build for bdist_egg to pull from. self.run_command("build") _cleanup_symlinks(self) # Run the default bdist_egg command orig_bdist_egg.run...
class wx_bdist_egg(orig_bdist_egg): def finalize_options(self): FILL_FUNC_BODY def run(self): # Ensure that there is a basic library build for bdist_egg to pull from. self.run_command("build") _cleanup_symlinks(self) # Run the default bdist_egg command orig_bdist_egg.run...
orig_bdist_egg.finalize_options(self) # Redo the calculation of the egg's filename since we always have # extension modules, but they are not built by setuptools so it # doesn't know about them. from pkg_resources import Distribution from sysconfig import get_python_vers...
orig_bdist_egg.finalize_options(self) # Redo the calculation of the egg's filename since we always have # extension modules, but they are not built by setuptools so it # doesn't know about them. from pkg_resources import Distribution from sysconfig import get_python_vers...
52
118
187
305
#---------------------------------------------------------------------- # Name: setup.py # Purpose: Distutils build script for wxPython (phoenix) # # Author: Robin Dunn # # Created: 3-Nov-2010 # Copyright: (c) 2010-2020 by Total Control Software # License: wxWindows License #------------------...
#---------------------------------------------------------------------- # Name: setup.py # Purpose: Distutils build script for wxPython (phoenix) # # Author: Robin Dunn # # Created: 3-Nov-2010 # Copyright: (c) 2010-2020 by Total Control Software # License: wxWindows License #------------------...
42,151
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/setup.py
215,216
214,238
finalize_options
wx_bdist_wheel
216,228
216,228
class wx_bdist_wheel(orig_bdist_wheel): def finalize_options(self): FILL_FUNC_BODY def run(self): # Ensure that there is a basic library build for bdist_egg/wheel to pull from. self.run_command("build") _cleanup_symlinks(self) # Run the default bdist_...
class wx_bdist_wheel(orig_bdist_wheel): def finalize_options(self): FILL_FUNC_BODY def run(self): # Ensure that there is a basic library build for bdist_egg/wheel to pull from. self.run_command("build") _cleanup_symlinks(self) # Run the default bdist_...
# Do a bit of monkey-patching to let bdist_wheel know that there # really are extension modules in this build, even though they are # not built here. def _has_ext_modules(self): return True from setuptools.dist import Distribution #...
# Do a bit of monkey-patching to let bdist_wheel know that there # really are extension modules in this build, even though they are # not built here. def _has_ext_modules(self): return True from setuptools.dist import Distribution #...
43
117
131
248
#---------------------------------------------------------------------- # Name: setup.py # Purpose: Distutils build script for wxPython (phoenix) # # Author: Robin Dunn # # Created: 3-Nov-2010 # Copyright: (c) 2010-2020 by Total Control Software # License: wxWindows License #------------------...
#---------------------------------------------------------------------- # Name: setup.py # Purpose: Distutils build script for wxPython (phoenix) # # Author: Robin Dunn # # Created: 3-Nov-2010 # Copyright: (c) 2010-2020 by Total Control Software # License: wxWindows License #------------------...
42,152
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/setup.py
128,129
109,147
run
wx_build
129,147
129,147
class wx_build(orig_build): """ Delegate to build.py for doing the actual build, (including wxWidgets) instead of letting distutils do it all. """ user_options = [ ('skip-build', None, 'skip building the C/C++ code (assumes it has already been done)'), ] boolean_options = ['skip-...
class wx_build(orig_build): """ Delegate to build.py for doing the actual build, (including wxWidgets) instead of letting distutils do it all. """ user_options = [ ('skip-build', None, 'skip building the C/C++ code (assumes it has already been done)'), ] boolean_options = ['skip-...
if not self.skip_build: # Run build.py to do the actual building of the extension modules msg('WARNING: Building this way assumes that all generated files have been \n' 'generated already. If that is not the case then use build.py directly \n' 'to generat...
if not self.skip_build: # Run build.py to do the actual building of the extension modules msg('WARNING: Building this way assumes that all generated files have been \n' 'generated already. If that is not the case then use build.py directly \n' 'to generat...
113
197
240
437
#---------------------------------------------------------------------- # Name: setup.py # Purpose: Distutils build script for wxPython (phoenix) # # Author: Robin Dunn # # Created: 3-Nov-2010 # Copyright: (c) 2010-2020 by Total Control Software # License: wxWindows License #------------------...
#---------------------------------------------------------------------- # Name: setup.py # Purpose: Distutils build script for wxPython (phoenix) # # Author: Robin Dunn # # Created: 3-Nov-2010 # Copyright: (c) 2010-2020 by Total Control Software # License: wxWindows License #------------------...
42,153
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/setup.py
239,240
238,249
finalize_options
wx_install
240,243
240,243
class wx_install(orig_install): def finalize_options(self): FILL_FUNC_BODY def run(self): self.run_command("build") orig_install.run(self)
class wx_install(orig_install): def finalize_options(self): FILL_FUNC_BODY def run(self): self.run_command("build") orig_install.run(self)
orig_install.finalize_options(self) self.install_lib = self.install_platlib
orig_install.finalize_options(self) self.install_lib = self.install_platlib
4
60
32
92
#---------------------------------------------------------------------- # Name: setup.py # Purpose: Distutils build script for wxPython (phoenix) # # Author: Robin Dunn # # Created: 3-Nov-2010 # Copyright: (c) 2010-2020 by Total Control Software # License: wxWindows License #------------------...
#---------------------------------------------------------------------- # Name: setup.py # Purpose: Distutils build script for wxPython (phoenix) # # Author: Robin Dunn # # Created: 3-Nov-2010 # Copyright: (c) 2010-2020 by Total Control Software # License: wxWindows License #------------------...
42,154
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/setup.py
250,251
249,266
run
wx_sdist
251,266
251,266
class wx_sdist(orig_sdist): def run(self): FILL_FUNC_BODY
class wx_sdist(orig_sdist): def run(self): FILL_FUNC_BODY
# Use build.py to perform the sdist cmd = ['"{}"'.format(sys.executable), '-u', 'build.py', 'sdist'] cmd = ' '.join(cmd) runcmd(cmd) # Put the filename in dist_files in case the upload command is used. # On the other hand, PyPI's upload size limit is waaaaaaaaay too ...
# Use build.py to perform the sdist cmd = ['"{}"'.format(sys.executable), '-u', 'build.py', 'sdist'] cmd = ' '.join(cmd) runcmd(cmd) # Put the filename in dist_files in case the upload command is used. # On the other hand, PyPI's upload size limit is waaaaaaaaay too ...
70
29
197
226
#---------------------------------------------------------------------- # Name: setup.py # Purpose: Distutils build script for wxPython (phoenix) # # Author: Robin Dunn # # Created: 3-Nov-2010 # Copyright: (c) 2010-2020 by Total Control Software # License: wxWindows License #------------------...
#---------------------------------------------------------------------- # Name: setup.py # Purpose: Distutils build script for wxPython (phoenix) # # Author: Robin Dunn # # Created: 3-Nov-2010 # Copyright: (c) 2010-2020 by Total Control Software # License: wxWindows License #------------------...
42,155
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/sphinxtools/constants.py
221,222
192,226
whatis
Enumeration
222,226
222,226
class Enumeration(object): def __init__(self, name, enumList): self.__doc__ = name lookup = { } reverseLookup = { } i = 0 uniqueNames = [ ] uniqueValues = [ ] for item in enumList: x = item.upper() uniqueNames.append(x) u...
class Enumeration(object): def __init__(self, name, enumList): self.__doc__ = name lookup = { } reverseLookup = { } i = 0 uniqueNames = [ ] uniqueValues = [ ] for item in enumList: x = item.upper() uniqueNames.append(x) u...
return self.reverseLookup[value]
return self.reverseLookup[value]
2
207
19
226
# -*- coding: utf-8 -*- #--------------------------------------------------------------------------- # Name: sphinxtools/constants.py # Author: Andrea Gavana # # Created: 30-Nov-2010 # Copyright: (c) 2010-2020 by Total Control Software # License: wxWindows License #-------------------------------...
# -*- coding: utf-8 -*- #--------------------------------------------------------------------------- # Name: sphinxtools/constants.py # Author: Andrea Gavana # # Created: 30-Nov-2010 # Copyright: (c) 2010-2020 by Total Control Software # License: wxWindows License #-------------------------------...
42,156
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/activexwrapper.py
42,43
1,154
MakeActiveXClass
67,100
43,100
#---------------------------------------------------------------------- # Name: wx.lib.activexwrapper # Purpose: a wxWindow derived class that can hold an ActiveX control # # Author: Robin Dunn # # Copyright: (c) 2000-2020 by Total Control Software # Licence: wxWindows license #-------------------...
#---------------------------------------------------------------------- # Name: wx.lib.activexwrapper # Purpose: a wxWindow derived class that can hold an ActiveX control # # Author: Robin Dunn # # Copyright: (c) 2000-2020 by Total Control Software # Licence: wxWindows license #-------------------...
if type(CoClass) == type(""): # use the CLSID to get the real class CoClass = win32com.client.CLSIDToClass(CoClass) # determine the base classes axEventClass = CoClass.default_source baseClasses = [pywin.mfc.activex.Control, wx.Window, CoClass, axEventClass] if eventClass: ...
""" Dynamically construct a new class that derives from wxWindow, the ActiveX control and the appropriate COM classes. This new class can be used just like the wxWindow class, but will also respond appropriately to the methods and properties of the COM object. If this class, a derived class or...
97
1,220
347
1,567
#---------------------------------------------------------------------- # Name: wx.lib.activexwrapper # Purpose: a wxWindow derived class that can hold an ActiveX control # # Author: Robin Dunn # # Copyright: (c) 2000-2020 by Total Control Software # Licence: wxWindows license #-------------------...
#---------------------------------------------------------------------- # Name: wx.lib.activexwrapper # Purpose: a wxWindow derived class that can hold an ActiveX control # # Author: Robin Dunn # # Copyright: (c) 2000-2020 by Total Control Software # Licence: wxWindows license #-------------------...
42,159
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/aquabutton.py
135,136
119,155
SetButtonObj
AquaButtonEvent
141,145
136,145
class AquaButtonEvent(wx.PyCommandEvent): """ Event sent from the :class:`AquaButton` buttons when the button is activated. """ def __init__(self, eventType, eventId): """ Default class constructor. :param integer `eventType`: the event type; :param integer `eventId`: the event...
class AquaButtonEvent(wx.PyCommandEvent): """ Event sent from the :class:`AquaButton` buttons when the button is activated. """ def __init__(self, eventType, eventId): """ Default class constructor. :param integer `eventType`: the event type; :param integer `eventId`: the event...
self.theButton = btn
""" Sets the event object for the event. :param `btn`: the button object, an instance of :class:`AquaButton`. """ self.theButton = btn
3
244
15
259
# --------------------------------------------------------------------------------- # # AQUABUTTON wxPython IMPLEMENTATION # # Andrea Gavana, @ 07 October 2008 # Latest Revision: 27 Dec 2012, 21.00 GMT # # # TODO List # # 1) Anything to do? # # # For all kind of problems, requests of enhancements and bug reports, pleas...
# --------------------------------------------------------------------------------- # # AQUABUTTON wxPython IMPLEMENTATION # # Andrea Gavana, @ 07 October 2008 # Latest Revision: 27 Dec 2012, 21.00 GMT # # # TODO List # # 1) Anything to do? # # # For all kind of problems, requests of enhancements and bug reports, pleas...
42,162
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/aui/aui_switcherdialog.py
1175,1176
1059,1228
ColourToHexString
SwitcherDialog
1176,1181
1176,1181
class SwitcherDialog(wx.Dialog): """ SwitcherDialog shows a :class:`Dialog` with a list of panes and tabs for the user to choose. ``Ctrl`` + ``Tab`` cycles through them. """ def __init__(self, items, parent, aui_manager, id=wx.ID_ANY, title=_("Pane Switcher"), pos=wx.DefaultPosition, ...
class SwitcherDialog(wx.Dialog): """ SwitcherDialog shows a :class:`Dialog` with a list of panes and tabs for the user to choose. ``Ctrl`` + ``Tab`` cycles through them. """ def __init__(self, items, parent, aui_manager, id=wx.ID_ANY, title=_("Pane Switcher"), pos=wx.DefaultPosition, ...
hx = '%02x%02x%02x%02x' % tuple([int(c) for c in col]) return hx
hx = '%02x%02x%02x%02x' % tuple([int(c) for c in col]) return hx
11
1,530
47
1,577
# -*- coding: utf-8 -*- #---------------------------------------------------------------------------- # Name: aui_switcherdialog.py # Purpose: # # Author: # # Created: # Version: # Date: # Licence: wxWindows license # Tags: phoenix-port, documented, py3-port #---------------------------------------...
# -*- coding: utf-8 -*- #---------------------------------------------------------------------------- # Name: aui_switcherdialog.py # Purpose: # # Author: # # Created: # Version: # Date: # Licence: wxWindows license # Tags: phoenix-port, documented, py3-port #---------------------------------------...
42,163
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/aui/aui_switcherdialog.py
194,195
172,359
Copy
SwitcherItem
200,216
195,216
class SwitcherItem(object): """ An object containing information about one item. """ def __init__(self, item=None): """ Default class constructor. """ self._id = 0 self._isGroup = False self._breakColumn = False self._rowPos = 0 self._colPos = 0 self._wi...
class SwitcherItem(object): """ An object containing information about one item. """ def __init__(self, item=None): """ Default class constructor. """ self._id = 0 self._isGroup = False self._breakColumn = False self._rowPos = 0 self._colPos = 0 self._wi...
self._id = item._id self._name = item._name self._title = item._title self._isGroup = item._isGroup self._breakColumn = item._breakColumn self._rect = item._rect self._font = item._font self._textColour = item._textColour self._bitmap = item._bitm...
""" Copy operator between 2 :class:`SwitcherItem` instances. :param `item`: another instance of :class:`SwitcherItem`. """ self._id = item._id self._name = item._name self._title = item._title self._isGroup = item._isGroup self._breakColumn = ite...
39
780
150
930
# -*- coding: utf-8 -*- #---------------------------------------------------------------------------- # Name: aui_switcherdialog.py # Purpose: # # Author: # # Created: # Version: # Date: # Licence: wxWindows license # Tags: phoenix-port, documented, py3-port #---------------------------------------...
# -*- coding: utf-8 -*- #---------------------------------------------------------------------------- # Name: aui_switcherdialog.py # Purpose: # # Author: # # Created: # Version: # Date: # Licence: wxWindows license # Tags: phoenix-port, documented, py3-port #---------------------------------------...
42,166
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/aui/aui_utilities.py
407,408
385,475
CreateBitmap
TabDragImage
416,475
408,475
class TabDragImage(wx.DragImage): """ This class handles the creation of a custom image in case of drag and drop of a notebook tab. """ def __init__(self, notebook, page, button_state, tabArt): """ Default class constructor. For internal use: do not call it in your code! ...
class TabDragImage(wx.DragImage): """ This class handles the creation of a custom image in case of drag and drop of a notebook tab. """ def __init__(self, notebook, page, button_state, tabArt): """ Default class constructor. For internal use: do not call it in your code! ...
control = page.control memory = wx.MemoryDC(wx.Bitmap(1, 1)) tab_size, x_extent = tabArt.GetTabSize(memory, notebook, page.caption, page.bitmap, page.active, button_state, control) tab_width, tab_height = tab_size rect = wx.Rect(0...
""" Actually creates the drag and drop bitmap. :param `notebook`: an instance of :class:`~wx.lib.agw.aui.auibook.AuiNotebook`; :param `page`: the dragged :class:`~wx.lib.agw.aui.auibook.AuiNotebookPage` page; :param integer `button_state`: the state of the close button on the ta...
174
474
777
1,251
# -*- coding: utf-8 -*- #---------------------------------------------------------------------------- # Name: aui_utilities.py # Purpose: # # Author: Andrea Gavana <andrea.gavana@gmail.com> # # Created: # Version: # Date: 31 March 2009 # Licence: wxWindows license # Tags: phoenix-port...
# -*- coding: utf-8 -*- #---------------------------------------------------------------------------- # Name: aui_utilities.py # Purpose: # # Author: Andrea Gavana <andrea.gavana@gmail.com> # # Created: # Version: # Date: 31 March 2009 # Licence: wxWindows license # Tags: phoenix-port...
42,169
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/aui/auibar.py
191,192
148,204
Allow
AuiToolBarEvent
198,204
192,204
class AuiToolBarEvent(CommandToolBarEvent): """ A specialized command event class for events sent by :class:`AuiToolBar`. """ def __init__(self, command_type=None, win_id=0): """ Default class constructor. :param `command_type`: the event kind or an instance of :class:`PyCommandEvent`....
class AuiToolBarEvent(CommandToolBarEvent): """ A specialized command event class for events sent by :class:`AuiToolBar`. """ def __init__(self, command_type=None, win_id=0): """ Default class constructor. :param `command_type`: the event kind or an instance of :class:`PyCommandEvent`....
self.notify.Allow() # ----------------------------------------------------------------------
""" This is the opposite of :meth:`Veto`: it explicitly allows the event to be processed. For most events it is not necessary to call this method as the events are allowed anyhow but some are forbidden by default (this will be mentioned in the corresponding event description). ...
3
452
22
474
# -*- coding: utf-8 -*- #---------------------------------------------------------------------------- # Name: auibar.py # Purpose: # # Author: Andrea Gavana <andrea.gavana@gmail.com> # # Created: # Version: # Date: 31 March 2009 # Licence: wxWindows license # Tags: phoenix-port, unitt...
# -*- coding: utf-8 -*- #---------------------------------------------------------------------------- # Name: auibar.py # Purpose: # # Author: Andrea Gavana <andrea.gavana@gmail.com> # # Created: # Version: # Date: 31 March 2009 # Licence: wxWindows license # Tags: phoenix-port, unitt...
42,171
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/aui/auibar.py
130,131
60,148
GetToolId
CommandToolBarEvent
132,136
131,136
class CommandToolBarEvent(wx.PyCommandEvent): """ A specialized command event class for events sent by :class:`AuiToolBar`. """ def __init__(self, command_type, win_id): """ Default class constructor. :param `command_type`: the event kind or an instance of :class:`PyCommandEvent`. ...
class CommandToolBarEvent(wx.PyCommandEvent): """ A specialized command event class for events sent by :class:`AuiToolBar`. """ def __init__(self, command_type, win_id): """ Default class constructor. :param `command_type`: the event kind or an instance of :class:`PyCommandEvent`. ...
return self.tool_id
""" Returns the :class:`AuiToolBarItem` identifier. """ return self.tool_id
2
640
15
655
# -*- coding: utf-8 -*- #---------------------------------------------------------------------------- # Name: auibar.py # Purpose: # # Author: Andrea Gavana <andrea.gavana@gmail.com> # # Created: # Version: # Date: 31 March 2009 # Licence: wxWindows license # Tags: phoenix-port, unitt...
# -*- coding: utf-8 -*- #---------------------------------------------------------------------------- # Name: auibar.py # Purpose: # # Author: Andrea Gavana <andrea.gavana@gmail.com> # # Created: # Version: # Date: 31 March 2009 # Licence: wxWindows license # Tags: phoenix-port, unitt...
42,172
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/aui/auibar.py
220,221
204,270
ProcessEvent
ToolbarCommandCapture
257,270
221,270
class ToolbarCommandCapture(wx.EvtHandler): """ A class to handle the dropdown window menu. """ def __init__(self): """ Default class constructor. """ wx.EvtHandler.__init__(self) self._last_id = 0 def GetCommandId(self): """ Returns the event command identifier. """ ...
class ToolbarCommandCapture(wx.EvtHandler): """ A class to handle the dropdown window menu. """ def __init__(self): """ Default class constructor. """ wx.EvtHandler.__init__(self) self._last_id = 0 def GetCommandId(self): """ Returns the event command identifier. """ ...
if event.GetEventType() == wx.wxEVT_COMMAND_MENU_SELECTED: self._last_id = event.GetId() return True if self.GetNextHandler(): return self.GetNextHandler().ProcessEvent(event) return False # ----------------------------------------------------------------...
""" Processes an event, searching event tables and calling zero or more suitable event handler function(s). :param `event`: the event to process. :note: Normally, your application would not call this function: it is called in the wxPython implementation to dispatch inc...
17
655
93
748
# -*- coding: utf-8 -*- #---------------------------------------------------------------------------- # Name: auibar.py # Purpose: # # Author: Andrea Gavana <andrea.gavana@gmail.com> # # Created: # Version: # Date: 31 March 2009 # Licence: wxWindows license # Tags: phoenix-port, unitt...
# -*- coding: utf-8 -*- #---------------------------------------------------------------------------- # Name: auibar.py # Purpose: # # Author: Andrea Gavana <andrea.gavana@gmail.com> # # Created: # Version: # Date: 31 March 2009 # Licence: wxWindows license # Tags: phoenix-port, unitt...
42,174
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/aui/tabmdi.py
658,659
599,680
OnPageClose
AuiMDIClientWindow
659,669
659,669
class AuiMDIClientWindow(auibook.AuiNotebook): def __init__(self, parent, agwStyle=0): auibook.AuiNotebook.__init__(self, parent, wx.ID_ANY, wx.Point(0, 0), wx.Size(100, 100), agwStyle=AUI_NB_DEFAULT_STYLE|wx.NO_BORDER) caption_icon_size = wx.Size(wx.SystemSet...
class AuiMDIClientWindow(auibook.AuiNotebook): def __init__(self, parent, agwStyle=0): auibook.AuiNotebook.__init__(self, parent, wx.ID_ANY, wx.Point(0, 0), wx.Size(100, 100), agwStyle=AUI_NB_DEFAULT_STYLE|wx.NO_BORDER) caption_icon_size = wx.Size(wx.SystemSet...
wnd = self.GetPage(event.GetSelection()) wnd.Close() # regardless of the result of wnd.Close(), we've # already taken care of the close operations, so # suppress further processing event.Veto()
wnd = self.GetPage(event.GetSelection()) wnd.Close() # regardless of the result of wnd.Close(), we've # already taken care of the close operations, so # suppress further processing event.Veto()
26
864
77
941
# -*- coding: utf-8 -*- #---------------------------------------------------------------------------- # Name: auimdi.py # Purpose: # # Author: Andrea Gavana <andrea.gavana@gmail.com> # # Created: # Version: # Date: 31 March 2009 # Licence: wxWindows license # Tags: phoenix-port, docum...
# -*- coding: utf-8 -*- #---------------------------------------------------------------------------- # Name: auimdi.py # Purpose: # # Author: Andrea Gavana <andrea.gavana@gmail.com> # # Created: # Version: # Date: 31 March 2009 # Licence: wxWindows license # Tags: phoenix-port, docum...
42,175
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/aui/tabmdi.py
129,130
29,279
ProcessEvent
AuiMDIParentFrame
130,159
130,159
class AuiMDIParentFrame(wx.Frame): def __init__(self, parent, id=wx.ID_ANY, title="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE|wx.VSCROLL|wx.HSCROLL, name="AuiMDIParentFrame"): wx.Frame.__init__(self, parent, id, title, pos, size, style, n...
class AuiMDIParentFrame(wx.Frame): def __init__(self, parent, id=wx.ID_ANY, title="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE|wx.VSCROLL|wx.HSCROLL, name="AuiMDIParentFrame"): wx.Frame.__init__(self, parent, id, title, pos, size, style, n...
# stops the same event being processed repeatedly if self._pLastEvt == event: return False self._pLastEvt = event # let the active child (if any) process the event first. res = False if self._pActiveChild and event.IsCommandEvent() and \ event.Ge...
# stops the same event being processed repeatedly if self._pLastEvt == event: return False self._pLastEvt = event # let the active child (if any) process the event first. res = False if self._pActiveChild and event.IsCommandEvent() and \ event.Ge...
93
1,694
313
2,007
# -*- coding: utf-8 -*- #---------------------------------------------------------------------------- # Name: auimdi.py # Purpose: # # Author: Andrea Gavana <andrea.gavana@gmail.com> # # Created: # Version: # Date: 31 March 2009 # Licence: wxWindows license # Tags: phoenix-port, docum...
# -*- coding: utf-8 -*- #---------------------------------------------------------------------------- # Name: auimdi.py # Purpose: # # Author: Andrea Gavana <andrea.gavana@gmail.com> # # Created: # Version: # Date: 31 March 2009 # Licence: wxWindows license # Tags: phoenix-port, docum...
42,177
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/cubecolourdialog.py
2462,2463
2381,2509
TrackPoint
AlphaCtrl
2468,2483
2463,2483
class AlphaCtrl(BaseLineCtrl): """ Implements the drawing, mouse handling and sizing routines for the alpha channel control. """ def __init__(self, parent): """ Default class constructor. Used internally. Do not call it in your code! :param `parent`: the control par...
class AlphaCtrl(BaseLineCtrl): """ Implements the drawing, mouse handling and sizing routines for the alpha channel control. """ def __init__(self, parent): """ Default class constructor. Used internally. Do not call it in your code! :param `parent`: the control par...
alphaRect = self.BuildRect() d = alphaRect.GetBottom() - pt.y d *= 255.0 d /= alphaRect.height if d < 0: d = 0 if d > 255: d = 255 self._mainDialog._colour._alpha = int(d) self.Refresh() self._mainDialog.SetSpinVals()
""" Tracks a mouse action inside the Alpha channel control. :param `pt`: an instance of :class:`wx.Point`. """ alphaRect = self.BuildRect() d = alphaRect.GetBottom() - pt.y d *= 255.0 d /= alphaRect.height if d < 0: d = 0 if d ...
33
1,180
127
1,307
# --------------------------------------------------------------------------- # # CUBECOLOURDIALOG Widget wxPython IMPLEMENTATION # # Python Code By: # # Andrea Gavana, @ 16 Aug 2007 # Latest Revision: 19 Dec 2012, 21.00 GMT # # # TODO List # # 1. Find A Way To Reduce Flickering On The 2 ColourPanels; # # 2. See Why wx...
# --------------------------------------------------------------------------- # # CUBECOLOURDIALOG Widget wxPython IMPLEMENTATION # # Python Code By: # # Andrea Gavana, @ 16 Aug 2007 # Latest Revision: 19 Dec 2012, 21.00 GMT # # # TODO List # # 1. Find A Way To Reduce Flickering On The 2 ColourPanels; # # 2. See Why wx...
42,178
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/cubecolourdialog.py
2240,2241
2128,2269
AcceptsFocusFromKeyboard
BaseLineCtrl
2251,2255
2241,2255
class BaseLineCtrl(wx.Control): """ Base class used to hold common code for the Alpha channel control and the brightness palette control. """ def __init__(self, parent): """ Default class constructor. Used internally. Do not call it in your code! :param `parent`: th...
class BaseLineCtrl(wx.Control): """ Base class used to hold common code for the Alpha channel control and the brightness palette control. """ def __init__(self, parent): """ Default class constructor. Used internally. Do not call it in your code! :param `parent`: th...
return False
""" Can this window be given focus by keyboard navigation? If not, the only way to give it focus (provided it accepts it at all) is to click it. :note: This method always returns ``False`` as we do not accept focus from the keyboard. :note: Overridden from :cla...
2
1,102
11
1,113
# --------------------------------------------------------------------------- # # CUBECOLOURDIALOG Widget wxPython IMPLEMENTATION # # Python Code By: # # Andrea Gavana, @ 16 Aug 2007 # Latest Revision: 19 Dec 2012, 21.00 GMT # # # TODO List # # 1. Find A Way To Reduce Flickering On The 2 ColourPanels; # # 2. See Why wx...
# --------------------------------------------------------------------------- # # CUBECOLOURDIALOG Widget wxPython IMPLEMENTATION # # Python Code By: # # Andrea Gavana, @ 16 Aug 2007 # Latest Revision: 19 Dec 2012, 21.00 GMT # # # TODO List # # 1. Find A Way To Reduce Flickering On The 2 ColourPanels; # # 2. See Why wx...
42,179
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/cubecolourdialog.py
1710,1711
1622,1796
AcceptsFocusFromKeyboard
BasePyControl
1721,1725
1711,1725
class BasePyControl(wx.Control): """ Base class used to hold common code for the HSB colour wheel and the RGB colour cube. """ def __init__(self, parent, bitmap=None): """ Default class constructor. Used internally. Do not call it in your code! :param `parent`: the ...
class BasePyControl(wx.Control): """ Base class used to hold common code for the HSB colour wheel and the RGB colour cube. """ def __init__(self, parent, bitmap=None): """ Default class constructor. Used internally. Do not call it in your code! :param `parent`: the ...
return False
""" Can this window be given focus by keyboard navigation? If not, the only way to give it focus (provided it accepts it at all) is to click it. :note: This method always returns ``False`` as we do not accept focus from the keyboard. :note: Overridden from :cla...
2
1,399
11
1,410
# --------------------------------------------------------------------------- # # CUBECOLOURDIALOG Widget wxPython IMPLEMENTATION # # Python Code By: # # Andrea Gavana, @ 16 Aug 2007 # Latest Revision: 19 Dec 2012, 21.00 GMT # # # TODO List # # 1. Find A Way To Reduce Flickering On The 2 ColourPanels; # # 2. See Why wx...
# --------------------------------------------------------------------------- # # CUBECOLOURDIALOG Widget wxPython IMPLEMENTATION # # Python Code By: # # Andrea Gavana, @ 16 Aug 2007 # Latest Revision: 19 Dec 2012, 21.00 GMT # # # TODO List # # 1. Find A Way To Reduce Flickering On The 2 ColourPanels; # # 2. See Why wx...
42,180
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/cubecolourdialog.py
2355,2356
2269,2381
DrawMarkers
BrightCtrl
2361,2381
2356,2381
class BrightCtrl(BaseLineCtrl): """ Implements the drawing, mouse handling and sizing routines for the brightness palette control. """ def __init__(self, parent): """ Default class constructor. Used internally. Do not call it in your code! :param `parent`: the contr...
class BrightCtrl(BaseLineCtrl): """ Implements the drawing, mouse handling and sizing routines for the brightness palette control. """ def __init__(self, parent): """ Default class constructor. Used internally. Do not call it in your code! :param `parent`: the contr...
if dc is None: dc = wx.ClientDC(self) colour = self._mainDialog._colour brightRect = self.BuildRect() y = int(colour.v/255.0*brightRect.height) y = brightRect.GetBottom() - y brightMark = wx.Rect(brightRect.x-2, y-4, brightRect.width+4, 8) oldPen, ...
""" Draws square markers used with mouse gestures. :param `dc`: an instance of :class:`wx.DC`. """ if dc is None: dc = wx.ClientDC(self) colour = self._mainDialog._colour brightRect = self.BuildRect() y = int(colour.v/255.0*brightRect.heigh...
43
874
257
1,131
# --------------------------------------------------------------------------- # # CUBECOLOURDIALOG Widget wxPython IMPLEMENTATION # # Python Code By: # # Andrea Gavana, @ 16 Aug 2007 # Latest Revision: 19 Dec 2012, 21.00 GMT # # # TODO List # # 1. Find A Way To Reduce Flickering On The 2 ColourPanels; # # 2. See Why wx...
# --------------------------------------------------------------------------- # # CUBECOLOURDIALOG Widget wxPython IMPLEMENTATION # # Python Code By: # # Andrea Gavana, @ 16 Aug 2007 # Latest Revision: 19 Dec 2012, 21.00 GMT # # # TODO List # # 1. Find A Way To Reduce Flickering On The 2 ColourPanels; # # 2. See Why wx...
42,181
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/cubecolourdialog.py
1493,1494
1469,1601
ToRGB
Colour
1495,1552
1494,1552
class Colour(wx.Colour): """ This is a subclass of :class:`wx.Colour`, which adds Hue, Saturation and Brightness capability to the base class. It contains also methods to convert RGB triplets into HSB triplets and vice-versa. """ def __init__(self, colour): """ Default class con...
class Colour(wx.Colour): """ This is a subclass of :class:`wx.Colour`, which adds Hue, Saturation and Brightness capability to the base class. It contains also methods to convert RGB triplets into HSB triplets and vice-versa. """ def __init__(self, colour): """ Default class con...
maxVal = self.v delta = (maxVal*self.s)/255.0 minVal = maxVal - delta hue = float(self.h) if self.h > 300 or self.h <= 60: self.r = maxVal if self.h > 300: self.g = int(minVal) hue = (hue - 360.0)/60.0 ...
""" Converts a HSV triplet into a RGB triplet. """ maxVal = self.v delta = (maxVal*self.s)/255.0 minVal = maxVal - delta hue = float(self.h) if self.h > 300 or self.h <= 60: self.r = maxVal if self.h > 300: self.g = int(minVal...
131
580
507
1,087
# --------------------------------------------------------------------------- # # CUBECOLOURDIALOG Widget wxPython IMPLEMENTATION # # Python Code By: # # Andrea Gavana, @ 16 Aug 2007 # Latest Revision: 19 Dec 2012, 21.00 GMT # # # TODO List # # 1. Find A Way To Reduce Flickering On The 2 ColourPanels; # # 2. See Why wx...
# --------------------------------------------------------------------------- # # CUBECOLOURDIALOG Widget wxPython IMPLEMENTATION # # Python Code By: # # Andrea Gavana, @ 16 Aug 2007 # Latest Revision: 19 Dec 2012, 21.00 GMT # # # TODO List # # 1. Find A Way To Reduce Flickering On The 2 ColourPanels; # # 2. See Why wx...
42,182
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/cubecolourdialog.py
2590,2591
2509,2629
RefreshColour
ColourPanel
2596,2601
2591,2601
class ColourPanel(wx.Panel): """ Simple custom class used to display "old" and "new" colour panels, with alpha blending capabilities. """ def __init__(self, parent, style=wx.SIMPLE_BORDER): """ Default class constructor. Used internally. Do not call it in your code! ...
class ColourPanel(wx.Panel): """ Simple custom class used to display "old" and "new" colour panels, with alpha blending capabilities. """ def __init__(self, parent, style=wx.SIMPLE_BORDER): """ Default class constructor. Used internally. Do not call it in your code! ...
self._colour = colour self.Refresh()
""" Refresh the panel after a colour/alpha change. :param `colour`: the new background colour of :class:`wx.ColourPanel`. """ self._colour = colour self.Refresh()
4
1,058
23
1,081
# --------------------------------------------------------------------------- # # CUBECOLOURDIALOG Widget wxPython IMPLEMENTATION # # Python Code By: # # Andrea Gavana, @ 16 Aug 2007 # Latest Revision: 19 Dec 2012, 21.00 GMT # # # TODO List # # 1. Find A Way To Reduce Flickering On The 2 ColourPanels; # # 2. See Why wx...
# --------------------------------------------------------------------------- # # CUBECOLOURDIALOG Widget wxPython IMPLEMENTATION # # Python Code By: # # Andrea Gavana, @ 16 Aug 2007 # Latest Revision: 19 Dec 2012, 21.00 GMT # # # TODO List # # 1. Find A Way To Reduce Flickering On The 2 ColourPanels; # # 2. See Why wx...
42,185
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/cubecolourdialog.py
2071,2072
2004,2128
OnMotion
HSVWheel
2077,2084
2072,2084
class HSVWheel(BasePyControl): """ Implements the drawing, mouse handling and sizing routines for the HSV colour wheel. """ def __init__(self, parent): """ Default class constructor. Used internally. Do not call it in your code! :param `parent`: the control parent w...
class HSVWheel(BasePyControl): """ Implements the drawing, mouse handling and sizing routines for the HSV colour wheel. """ def __init__(self, parent): """ Default class constructor. Used internally. Do not call it in your code! :param `parent`: the control parent w...
point = wx.Point(event.GetX(), event.GetY()) if self.GetCapture() and self._mouseIn: self.TrackPoint(point)
""" Handles the ``wx.EVT_MOTION`` for :class:`HSVWheel`. :param `event`: a :class:`MouseEvent` event to be processed. """ point = wx.Point(event.GetX(), event.GetY()) if self.GetCapture() and self._mouseIn: self.TrackPoint(point)
9
999
53
1,052
# --------------------------------------------------------------------------- # # CUBECOLOURDIALOG Widget wxPython IMPLEMENTATION # # Python Code By: # # Andrea Gavana, @ 16 Aug 2007 # Latest Revision: 19 Dec 2012, 21.00 GMT # # # TODO List # # 1. Find A Way To Reduce Flickering On The 2 ColourPanels; # # 2. See Why wx...
# --------------------------------------------------------------------------- # # CUBECOLOURDIALOG Widget wxPython IMPLEMENTATION # # Python Code By: # # Andrea Gavana, @ 16 Aug 2007 # Latest Revision: 19 Dec 2012, 21.00 GMT # # # TODO List # # 1. Find A Way To Reduce Flickering On The 2 ColourPanels; # # 2. See Why wx...
42,190
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/floatspin.py
237,238
210,248
GetPosition
FloatSpinEvent
239,248
238,248
class FloatSpinEvent(wx.CommandEvent): """ This event will be sent when a ``EVT_FLOATSPIN`` event is mapped in the parent. """ def __init__(self, eventType, eventId=1, nSel=-1, nOldSel=-1): """ Default class constructor. :param `eventType`: the event type; :param `eventId`: the...
class FloatSpinEvent(wx.CommandEvent): """ This event will be sent when a ``EVT_FLOATSPIN`` event is mapped in the parent. """ def __init__(self, eventType, eventId=1, nSel=-1, nOldSel=-1): """ Default class constructor. :param `eventType`: the event type; :param `eventId`: the...
return self._position #---------------------------------------------------------------------------- # FloatTextCtrl #----------------------------------------------------------------------------
""" Returns event position. """ return self._position #---------------------------------------------------------------------------- # FloatTextCtrl #----------------------------------------------------------------------------
6
247
34
281
# --------------------------------------------------------------------------- # # FLOATSPIN Control wxPython IMPLEMENTATION # Python Code By: # # Andrea Gavana, @ 16 Nov 2005 # Latest Revision: 03 Jan 2014, 23.00 GMT # # # TODO List/Caveats # # 1. Ay Idea? # # For All Kind Of Problems, Requests Of Enhancements And Bug ...
# --------------------------------------------------------------------------- # # FLOATSPIN Control wxPython IMPLEMENTATION # Python Code By: # # Andrea Gavana, @ 16 Nov 2005 # Latest Revision: 03 Jan 2014, 23.00 GMT # # # TODO List/Caveats # # 1. Ay Idea? # # For All Kind Of Problems, Requests Of Enhancements And Bug ...
42,191
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/floatspin.py
283,284
248,329
OnDestroy
FloatTextCtrl
291,297
284,297
class FloatTextCtrl(wx.TextCtrl): """ A class which holds a :class:`TextCtrl`, one of the two building blocks of :class:`FloatSpin`. """ def __init__(self, parent, id=wx.ID_ANY, value="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.TE_NOHIDESEL | wx.TE_PROCESS_ENTER, ...
class FloatTextCtrl(wx.TextCtrl): """ A class which holds a :class:`TextCtrl`, one of the two building blocks of :class:`FloatSpin`. """ def __init__(self, parent, id=wx.ID_ANY, value="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.TE_NOHIDESEL | wx.TE_PROCESS_ENTER, ...
if self._parent: self._parent._textctrl = None self._parent = None
""" Handles the ``wx.EVT_WINDOW_DESTROY`` event for :class:`FloatTextCtrl`. :param `event`: a :class:`wx.WindowDestroyEvent` event to be processed. :note: This method tries to correctly handle the control destruction under MSW. """ if self._parent: self._pa...
8
800
33
833
# --------------------------------------------------------------------------- # # FLOATSPIN Control wxPython IMPLEMENTATION # Python Code By: # # Andrea Gavana, @ 16 Nov 2005 # Latest Revision: 03 Jan 2014, 23.00 GMT # # # TODO List/Caveats # # 1. Ay Idea? # # For All Kind Of Problems, Requests Of Enhancements And Bug ...
# --------------------------------------------------------------------------- # # FLOATSPIN Control wxPython IMPLEMENTATION # Python Code By: # # Andrea Gavana, @ 16 Nov 2005 # Latest Revision: 03 Jan 2014, 23.00 GMT # # # TODO List/Caveats # # 1. Ay Idea? # # For All Kind Of Problems, Requests Of Enhancements And Bug ...
42,193
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/fmcustomizedlg.py
142,143
96,168
OnPaint
FMTitlePanel
148,168
143,168
class FMTitlePanel(wx.Panel): """ Helper class to draw gradient shadings on the dialog. """ def __init__(self, parent, title): """ Default class constructor. :param `parent`: the :class:`FMTitlePanel` parent; :param `title`: the string to use as a dialog title. ...
class FMTitlePanel(wx.Panel): """ Helper class to draw gradient shadings on the dialog. """ def __init__(self, parent, title): """ Default class constructor. :param `parent`: the :class:`FMTitlePanel` parent; :param `title`: the string to use as a dialog title. ...
dc = wx.BufferedPaintDC(self) # Draw the background colour1 = wx.SystemSettings.GetColour(wx.SYS_COLOUR_3DFACE) colour2 = ArtManager.Get().LightColour(colour1, 70) ArtManager.Get().PaintStraightGradientBox(dc, self.GetClientRect(), colour1, colour2, False) # Draw the t...
""" Handles the ``wx.EVT_PAINT`` event for :class:`FMTitlePanel`. :param `event`: a :class:`PaintEvent` event to be processed. """ dc = wx.BufferedPaintDC(self) # Draw the background colour1 = wx.SystemSettings.GetColour(wx.SYS_COLOUR_3DFACE) colour2 = ...
41
476
236
712
#---------------------------------------------------------------------------- # Name: fmcustomizeddlg.py # Purpose: # # Author: # # Created: # Version: # Date: # Licence: wxWindows license # Tags: phoenix-port, py3-port #---------------------------------------------------------------------------- "...
#---------------------------------------------------------------------------- # Name: fmcustomizeddlg.py # Purpose: # # Author: # # Created: # Version: # Date: # Licence: wxWindows license # Tags: phoenix-port, py3-port #---------------------------------------------------------------------------- "...
42,194
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/fmcustomizedlg.py
83,84
36,96
update
OrderedDict
84,88
84,88
class OrderedDict(UserDict): """ An ordered dictionary implementation. """ def __init__(self, dict = None): self._keys = [] UserDict.__init__(self, dict) def __delitem__(self, key): UserDict.__delitem__(self, key) self._keys.remove(key) def __setitem__(self, ke...
class OrderedDict(UserDict): """ An ordered dictionary implementation. """ def __init__(self, dict = None): self._keys = [] UserDict.__init__(self, dict) def __delitem__(self, key): UserDict.__delitem__(self, key) self._keys.remove(key) def __setitem__(self, ke...
UserDict.update(self, dict) for key in dict: if key not in self._keys: self._keys.append(key)
UserDict.update(self, dict) for key in dict: if key not in self._keys: self._keys.append(key)
12
414
42
456
#---------------------------------------------------------------------------- # Name: fmcustomizeddlg.py # Purpose: # # Author: # # Created: # Version: # Date: # Licence: wxWindows license # Tags: phoenix-port, py3-port #---------------------------------------------------------------------------- "...
#---------------------------------------------------------------------------- # Name: fmcustomizeddlg.py # Purpose: # # Author: # # Created: # Version: # Date: # Licence: wxWindows license # Tags: phoenix-port, py3-port #---------------------------------------------------------------------------- "...
42,197
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/foldpanelbar.py
575,576
527,591
SetBar
CaptionBarEvent
583,591
576,591
class CaptionBarEvent(wx.CommandEvent): """ This event will be sent when a ``EVT_CAPTIONBAR`` is mapped in the parent. It is to notify the parent that the bar is now in collapsed or expanded state. The parent should re-arrange the associated windows accordingly """ def __init__(self, evtType): ...
class CaptionBarEvent(wx.CommandEvent): """ This event will be sent when a ``EVT_CAPTIONBAR`` is mapped in the parent. It is to notify the parent that the bar is now in collapsed or expanded state. The parent should re-arrange the associated windows accordingly """ def __init__(self, evtType): ...
self._bar = bar # -------------------------------------------------------------------------------- # # class CaptionBar # -------------------------------------------------------------------------------- #
""" Sets the bar associated with this event. :param `bar`: an instance of :class:`CaptionBar`. :note: Should not be used by any other than the originator of the event. """ self._bar = bar # -----------------------------------------------------------------------------...
12
404
36
440
# --------------------------------------------------------------------------- # # FOLDPANELBAR wxPython IMPLEMENTATION # Ported From Jorgen Bodde & Julian Smart (Extended Demo) C++ Code By: # # Andrea Gavana, @ 23 Mar 2005 # Latest Revision: 16 Jul 2012, 15.00 GMT # # # TODO List # # All The C++ TODOs Are Still Alive. ...
# --------------------------------------------------------------------------- # # FOLDPANELBAR wxPython IMPLEMENTATION # Ported From Jorgen Bodde & Julian Smart (Extended Demo) C++ Code By: # # Andrea Gavana, @ 23 Mar 2005 # Latest Revision: 16 Jul 2012, 15.00 GMT # # # TODO List # # All The C++ TODOs Are Still Alive. ...
42,198
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/foldpanelbar.py
434,435
297,515
SetCaptionColour
CaptionBarStyle
443,448
435,448
class CaptionBarStyle(object): """ This class encapsulates the styles you wish to set for the :class:`CaptionBar` (this is the part of the `FoldPanel` where the caption is displayed). It can either be applied at creation time be reapplied when styles need to be changed. At construction time, al...
class CaptionBarStyle(object): """ This class encapsulates the styles you wish to set for the :class:`CaptionBar` (this is the part of the `FoldPanel` where the caption is displayed). It can either be applied at creation time be reapplied when styles need to be changed. At construction time, al...
self._textColour = colour self._textColourUsed = True
""" Sets caption colour for the caption bar. :param `colour`: a valid :class:`wx.Colour` object. :note: If this is not set, the colour property is undefined and will not be used. Use :meth:`~CaptionBarStyle.CaptionColourUsed` to check if this style is used. """ ...
6
1,889
27
1,916
# --------------------------------------------------------------------------- # # FOLDPANELBAR wxPython IMPLEMENTATION # Ported From Jorgen Bodde & Julian Smart (Extended Demo) C++ Code By: # # Andrea Gavana, @ 23 Mar 2005 # Latest Revision: 16 Jul 2012, 15.00 GMT # # # TODO List # # All The C++ TODOs Are Still Alive. ...
# --------------------------------------------------------------------------- # # FOLDPANELBAR wxPython IMPLEMENTATION # Ported From Jorgen Bodde & Julian Smart (Extended Demo) C++ Code By: # # Andrea Gavana, @ 23 Mar 2005 # Latest Revision: 16 Jul 2012, 15.00 GMT # # # TODO List # # All The C++ TODOs Are Still Alive. ...
42,201
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/foldpanelbar.py
2200,2201
2066,2249
GetWindowLength
FoldWindowItem
2208,2221
2201,2221
class FoldWindowItem(object): """ This class is a child sibling of the :class:`FoldPanelItem` class. It will contain :class:`wx.Window` that can be either a separator (a coloured line simulated by a :class:`wx.Window`) or a wxPython controls (such as a :class:`Button`, a :class:`ListCtrl` etc...). ...
class FoldWindowItem(object): """ This class is a child sibling of the :class:`FoldPanelItem` class. It will contain :class:`wx.Window` that can be either a separator (a coloured line simulated by a :class:`wx.Window`) or a wxPython controls (such as a :class:`Button`, a :class:`ListCtrl` etc...). ...
value = 0 if self._type == "WINDOW": size = self._wnd.GetSize() value = (vertical and [size.GetHeight()] or [size.GetWidth()])[0] + \ self._spacing elif self._type == "SEPARATOR": value = 1 + self._spacing return value
""" Returns space needed by the window if type is :class:`FoldWindowItem` "WINDOW" and returns the total size plus the extra spacing. :param `vertical`: ``True`` if the parent :class:`FoldPanelBar` is in vertical mode. """ value = 0 if self._type == "WI...
31
1,639
104
1,743
# --------------------------------------------------------------------------- # # FOLDPANELBAR wxPython IMPLEMENTATION # Ported From Jorgen Bodde & Julian Smart (Extended Demo) C++ Code By: # # Andrea Gavana, @ 23 Mar 2005 # Latest Revision: 16 Jul 2012, 15.00 GMT # # # TODO List # # All The C++ TODOs Are Still Alive. ...
# --------------------------------------------------------------------------- # # FOLDPANELBAR wxPython IMPLEMENTATION # Ported From Jorgen Bodde & Julian Smart (Extended Demo) C++ Code By: # # Andrea Gavana, @ 23 Mar 2005 # Latest Revision: 16 Jul 2012, 15.00 GMT # # # TODO List # # All The C++ TODOs Are Still Alive. ...
42,203
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/fourwaysplitter.py
270,271
174,283
IsAllowed
FourWaySplitterEvent
275,283
271,283
class FourWaySplitterEvent(wx.CommandEvent): """ This event class is almost the same as :class:`SplitterEvent` except it adds an accessor for the sash index that is being changed. The same event type IDs and event binders are used as with :class:`SplitterEvent`. """ def __init__(self, evtT...
class FourWaySplitterEvent(wx.CommandEvent): """ This event class is almost the same as :class:`SplitterEvent` except it adds an accessor for the sash index that is being changed. The same event type IDs and event binders are used as with :class:`SplitterEvent`. """ def __init__(self, evtT...
return self.isAllowed # ---------------------------------------------------------------------------- # # Class FourWaySplitter # ---------------------------------------------------------------------------- #
""" Returns ``True`` if the change is allowed (:meth:`~FourWaySplitterEvent.Veto` hasn't been called) or ``False`` otherwise (if it was). """ return self.isAllowed # ---------------------------------------------------------------------------- # # Class FourWaySplitter # ------...
11
921
38
959
# --------------------------------------------------------------------------------- # # FOURWAYSPLITTER wxPython IMPLEMENTATION # # Andrea Gavana, @ 03 Nov 2006 # Latest Revision: 16 Jul 2012, 15.00 GMT # # # TODO List # # 1. Any idea? # # For All Kind Of Problems, Requests Of Enhancements And Bug Reports, Please # Wri...
# --------------------------------------------------------------------------------- # # FOURWAYSPLITTER wxPython IMPLEMENTATION # # Andrea Gavana, @ 03 Nov 2006 # Latest Revision: 16 Jul 2012, 15.00 GMT # # # TODO List # # 1. Any idea? # # For All Kind Of Problems, Requests Of Enhancements And Bug Reports, Please # Wri...
42,207
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/gradientbutton.py
143,144
127,159
SetButtonObj
GradientButtonEvent
149,153
144,153
class GradientButtonEvent(wx.PyCommandEvent): """ Event sent from :class:`GradientButton` when the button is activated. """ def __init__(self, eventType, eventId): """ Default class constructor. :param `eventType`: the event type; :param `eventId`: the event identifier. ...
class GradientButtonEvent(wx.PyCommandEvent): """ Event sent from :class:`GradientButton` when the button is activated. """ def __init__(self, eventType, eventId): """ Default class constructor. :param `eventType`: the event type; :param `eventId`: the event identifier. ...
self.theButton = btn
""" Sets the event object for the event. :param `btn`: the button object, an instance of :class:`GradientButton`. """ self.theButton = btn
3
218
15
233
# --------------------------------------------------------------------------------- # # GRADIENTBUTTON wxPython IMPLEMENTATION # # Andrea Gavana, @ 07 October 2008 # Latest Revision: 27 Dec 2012, 21.00 GMT # # # TODO List # # 1) Anything to do? # # # For all kind of problems, requests of enhancements and bug reports, p...
# --------------------------------------------------------------------------------- # # GRADIENTBUTTON wxPython IMPLEMENTATION # # Andrea Gavana, @ 07 October 2008 # Latest Revision: 27 Dec 2012, 21.00 GMT # # # TODO List # # 1) Anything to do? # # # For all kind of problems, requests of enhancements and bug reports, p...
42,209
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/hyperlink.py
191,192
164,203
GetPosition
HyperLinkEvent
193,203
192,203
class HyperLinkEvent(wx.CommandEvent): """ Event object sent in response to clicking on a :class:`HyperLinkCtrl`. """ def __init__(self, eventType, eventId): """ Default class constructor. :param `eventType`: the event type; :param `eventId`: the event identifier. ...
class HyperLinkEvent(wx.CommandEvent): """ Event object sent in response to clicking on a :class:`HyperLinkCtrl`. """ def __init__(self, eventType, eventId): """ Default class constructor. :param `eventType`: the event type; :param `eventId`: the event identifier. ...
return self._pos # ------------------------------------------------- # This is the main HyperLinkCtrl implementation # it user the StatiText from wx.lib.stattext # because of its "quasi-dynamic" behavior # -------------------------------------------------
""" Returns the event position. """ return self._pos # ------------------------------------------------- # This is the main HyperLinkCtrl implementation # it user the StatiText from wx.lib.stattext # because of its "quasi-dynamic" behavior # -------------------------------------------------
26
203
68
271
# --------------------------------------------------------------------------- # # HYPERLINKSCTRL wxPython IMPLEMENTATION # Ported From Angelo Mandato C++ Code By: # # Andrea Gavana, @ 27 Mar 2005 # Latest Revision: 16 Jul 2012, 15.00 GMT # # # Original Web Site (For The C++ Code): # # http://www.spaceblue.com/codedetai...
# --------------------------------------------------------------------------- # # HYPERLINKSCTRL wxPython IMPLEMENTATION # Ported From Angelo Mandato C++ Code By: # # Andrea Gavana, @ 27 Mar 2005 # Latest Revision: 16 Jul 2012, 15.00 GMT # # # Original Web Site (For The C++ Code): # # http://www.spaceblue.com/codedetai...
42,211
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/infobar.py
274,275
236,327
Wrap
AutoWrapStaticText
287,301
275,301
class AutoWrapStaticText(StaticText): """ A simple class derived from :mod:`lib.stattext` that implements auto-wrapping behaviour depending on the parent size. .. versionadded:: 0.9.5 """ def __init__(self, parent, label): """ Defsult class constructor. :param wx.Windo...
class AutoWrapStaticText(StaticText): """ A simple class derived from :mod:`lib.stattext` that implements auto-wrapping behaviour depending on the parent size. .. versionadded:: 0.9.5 """ def __init__(self, parent, label): """ Defsult class constructor. :param wx.Windo...
if width < 0: return self.Freeze() dc = wx.ClientDC(self) dc.SetFont(self.GetFont()) text = wordwrap(self.label, width, dc) self.SetLabel(text, wrapped=True) self.Thaw()
""" This functions wraps the controls label so that each of its lines becomes at most `width` pixels wide if possible (the lines are broken at words boundaries so it might not be the case if words are too long). If `width` is negative, no wrapping is done. :param intege...
18
813
98
911
# --------------------------------------------------------------------------- # # INFOBAR Control wxPython IMPLEMENTATION # Inspired By And Heavily Based On wxInfoBar. # # Python Code By: # # Andrea Gavana, @ 12 March 2012 # Latest Revision: 27 Dec 2012, 21.00 GMT # # # TODO List/Caveats # # 1. ? # # # For All Kind Of ...
# --------------------------------------------------------------------------- # # INFOBAR Control wxPython IMPLEMENTATION # Inspired By And Heavily Based On wxInfoBar. # # Python Code By: # # Andrea Gavana, @ 12 March 2012 # Latest Revision: 27 Dec 2012, 21.00 GMT # # # TODO List/Caveats # # 1. ? # # # For All Kind Of ...
42,213
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/infobar.py
871,872
851,878
SomeMethod
MyFrame
872,878
872,878
class MyFrame(wx.Frame): def __init__(self, parent): wx.Frame.__init__(self, parent, -1, 'InfoBar Demo') self._infoBar = InfoBar(self) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self._infoBar, wx.SizerFlags().Expand()) panel = wx.Panel(self) ...
class MyFrame(wx.Frame): def __init__(self, parent): wx.Frame.__init__(self, parent, -1, 'InfoBar Demo') self._infoBar = InfoBar(self) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self._infoBar, wx.SizerFlags().Expand()) panel = wx.Panel(self) ...
self._infoBar.ShowMessage("Something happened", wx.ICON_INFORMATION) # our normal wxApp-derived class, as usual
self._infoBar.ShowMessage("Something happened", wx.ICON_INFORMATION) # our normal wxApp-derived class, as usual
10
188
46
234
# --------------------------------------------------------------------------- # # INFOBAR Control wxPython IMPLEMENTATION # Inspired By And Heavily Based On wxInfoBar. # # Python Code By: # # Andrea Gavana, @ 12 March 2012 # Latest Revision: 27 Dec 2012, 21.00 GMT # # # TODO List/Caveats # # 1. ? # # # For All Kind Of ...
# --------------------------------------------------------------------------- # # INFOBAR Control wxPython IMPLEMENTATION # Inspired By And Heavily Based On wxInfoBar. # # Python Code By: # # Andrea Gavana, @ 12 March 2012 # Latest Revision: 27 Dec 2012, 21.00 GMT # # # TODO List/Caveats # # 1. ? # # # For All Kind Of ...
42,214
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/knobctrl.py
336,337
226,362
UpdateDrawing
BufferedWindow
344,362
337,362
class BufferedWindow(wx.Window): """ A Buffered window class. To use it, subclass it and define a `Draw(dc)` method that takes a `dc` to draw to. In that method, put the code needed to draw the picture you want. The window will automatically be double buffered, and the screen will be automatica...
class BufferedWindow(wx.Window): """ A Buffered window class. To use it, subclass it and define a `Draw(dc)` method that takes a `dc` to draw to. In that method, put the code needed to draw the picture you want. The window will automatically be double buffered, and the screen will be automatica...
if self._agwStyle == KC_BUFFERED_DC: dc = wx.BufferedDC(wx.ClientDC(self), self._Buffer) self.Draw(dc) else: # update the buffer dc = wx.MemoryDC() dc.SelectObject(self._Buffer) self.Draw(dc) # update the screen ...
""" This would get called if the drawing needed to change, for whatever reason. The idea here is that the drawing is based on some data generated elsewhere in the system. If that data changes, the drawing needs to be updated. """ if self._agwStyle == KC_BUFFERED...
39
1,299
167
1,466
# --------------------------------------------------------------------------------- # # KNOBCTRL wxPython IMPLEMENTATION # # Andrea Gavana, @ 03 Nov 2006 # Latest Revision: 27 Dec 2012, 21.00 GMT # # # TODO List # # 1. Any idea? # # For All Kind Of Problems, Requests Of Enhancements And Bug Reports, Please # Write To M...
# --------------------------------------------------------------------------------- # # KNOBCTRL wxPython IMPLEMENTATION # # Andrea Gavana, @ 03 Nov 2006 # Latest Revision: 27 Dec 2012, 21.00 GMT # # # TODO List # # 1. Any idea? # # For All Kind Of Problems, Requests Of Enhancements And Bug Reports, Please # Write To M...
42,216
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/knobctrl.py
210,211
167,226
GetValue
KnobCtrlEvent
212,226
211,226
class KnobCtrlEvent(wx.CommandEvent): """ Represent details of the events that the :class:`KnobCtrl` object sends. """ def __init__(self, eventType, eventId=1): """ Default class constructor. For internal use: do not call it in your code! :param `eventType`: the event t...
class KnobCtrlEvent(wx.CommandEvent): """ Represent details of the events that the :class:`KnobCtrl` object sends. """ def __init__(self, eventType, eventId=1): """ Default class constructor. For internal use: do not call it in your code! :param `eventType`: the event t...
return self._value #---------------------------------------------------------------------- # BUFFERENDWINDOW Class # This Class Has Been Taken From The wxPython Wiki, And Slightly # Adapted To Fill My Needs. See: # # http://wiki.wxpython.org/index.cgi/DoubleBufferedDrawing # # For More Info About DC And Doub...
""" Returns the new :class:`KnobCtrl` value for this event. """ return self._value #---------------------------------------------------------------------- # BUFFERENDWINDOW Class # This Class Has Been Taken From The wxPython Wiki, And Slightly # Adapted To Fill My Needs. See: # # http://wiki.wxpython...
40
330
113
443
# --------------------------------------------------------------------------------- # # KNOBCTRL wxPython IMPLEMENTATION # # Andrea Gavana, @ 03 Nov 2006 # Latest Revision: 27 Dec 2012, 21.00 GMT # # # TODO List # # 1. Any idea? # # For All Kind Of Problems, Requests Of Enhancements And Bug Reports, Please # Write To M...
# --------------------------------------------------------------------------------- # # KNOBCTRL wxPython IMPLEMENTATION # # Andrea Gavana, @ 03 Nov 2006 # Latest Revision: 27 Dec 2012, 21.00 GMT # # # TODO List # # 1. Any idea? # # For All Kind Of Problems, Requests Of Enhancements And Bug Reports, Please # Write To M...
42,219
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/peakmeter.py
1001,1002
962,1022
OnTimer
MyFrame
1007,1022
1002,1022
class MyFrame(wx.Frame): def __init__(self, parent): wx.Frame.__init__(self, parent, -1, "PeakMeterCtrl Demo") panel = wx.Panel(self) # Initialize Peak Meter control 1 self.vertPeak = PeakMeterCtrl(panel, -1, style=wx.SIMPLE_BORDER, agwStyle=PM_VERTICAL) ...
class MyFrame(wx.Frame): def __init__(self, parent): wx.Frame.__init__(self, parent, -1, "PeakMeterCtrl Demo") panel = wx.Panel(self) # Initialize Peak Meter control 1 self.vertPeak = PeakMeterCtrl(panel, -1, style=wx.SIMPLE_BORDER, agwStyle=PM_VERTICAL) ...
# Generate 15 random number and set them as data for the meter nElements = 15 arrayData = [] for i in range(nElements): nRandom = random.randint(0, 100) arrayData.append(nRandom) self.vertPeak.SetData(arrayData, 0, nElements)...
''' Handles the ``wx.EVT_TIMER`` event for :class:`PeakMeterCtrl`. :param `event`: a :class:`TimerEvent` event to be processed. ''' # Generate 15 random number and set them as data for the meter nElements = 15 arrayData = [] ...
41
545
144
689
# --------------------------------------------------------------------------------- # # PEAKMETERCTRL wxPython IMPLEMENTATION # # Andrea Gavana, @ 07 October 2008 # Latest Revision: 31 Jul 2014, 21.00 GMT # # # TODO List # # 1) Possibly some nicer drawing of bands and leds (using GraphicsContext). # # # For all kind of...
# --------------------------------------------------------------------------------- # # PEAKMETERCTRL wxPython IMPLEMENTATION # # Andrea Gavana, @ 07 October 2008 # Latest Revision: 31 Jul 2014, 21.00 GMT # # # TODO List # # 1) Possibly some nicer drawing of bands and leds (using GraphicsContext). # # # For all kind of...
42,221
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/peakmeter.py
279,280
241,289
IsLower
PeakMeterData
285,289
280,289
class PeakMeterData(object): """ A simple class which holds data for our :class:`PeakMeterCtrl`. """ def __init__(self, value=0, falloff=0, peak=0): """ Default class constructor. :param `value`: the current :class:`PeakMeterCtrl` value; :param `falloff`: the falloff effect. ``...
class PeakMeterData(object): """ A simple class which holds data for our :class:`PeakMeterCtrl`. """ def __init__(self, value=0, falloff=0, peak=0): """ Default class constructor. :param `value`: the current :class:`PeakMeterCtrl` value; :param `falloff`: the falloff effect. ``...
return self._value < pm._value
""" Returns whether one :class:`PeakMeterData` is smaller than another. :param `pm`: another instance of :class:`PeakMeterData`. """ return self._value < pm._value
4
373
17
390
# --------------------------------------------------------------------------------- # # PEAKMETERCTRL wxPython IMPLEMENTATION # # Andrea Gavana, @ 07 October 2008 # Latest Revision: 31 Jul 2014, 21.00 GMT # # # TODO List # # 1) Possibly some nicer drawing of bands and leds (using GraphicsContext). # # # For all kind of...
# --------------------------------------------------------------------------------- # # PEAKMETERCTRL wxPython IMPLEMENTATION # # Andrea Gavana, @ 07 October 2008 # Latest Revision: 31 Jul 2014, 21.00 GMT # # # TODO List # # 1) Possibly some nicer drawing of bands and leds (using GraphicsContext). # # # For all kind of...
42,223
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix
/home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/wx/lib/agw/piectrl.py
330,331
167,390
OnPaint
PieCtrlLegend
336,390
331,390
class PieCtrlLegend(wx.Window): """ This class displays a legend window for the classic :class:`PieCtrl`. """ def __init__(self, parent, title, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0): """ Default class constructor. :param `parent`: ...
class PieCtrlLegend(wx.Window): """ This class displays a legend window for the classic :class:`PieCtrl`. """ def __init__(self, parent, title, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0): """ Default class constructor. :param `parent`: ...
pdc = wx.PaintDC(self) w, h = self.GetSize() bmp = wx.Bitmap(w, h) mdc = wx.MemoryDC() mdc.SelectObject(bmp) if self.IsTransparent(): parentdc = wx.ClientDC(self.GetParent()) mdc.Blit(0, 0, w, h, self._backgroundDC, 0, 0) else: ...
""" Handles the ``wx.EVT_PAINT`` event for :class:`PieCtrlLegend`. :param `event`: a :class:`PaintEvent` event to be processed. """ pdc = wx.PaintDC(self) w, h = self.GetSize() bmp = wx.Bitmap(w, h) mdc = wx.MemoryDC() mdc.SelectObject(bmp) ...
130
1,305
591
1,896
# --------------------------------------------------------------------------- # # PIECTRL Control wxPython IMPLEMENTATION # Python Code By: # # Andrea Gavana, @ 31 Oct 2005 # Latest Revision: 16 Jul 2012, 15.00 GMT # # # TODO List/Caveats # # 1. Maybe Integrate The Very Nice PyOpenGL Implementation Of A PieChart Coded ...
# --------------------------------------------------------------------------- # # PIECTRL Control wxPython IMPLEMENTATION # Python Code By: # # Andrea Gavana, @ 31 Oct 2005 # Latest Revision: 16 Jul 2012, 15.00 GMT # # # TODO List/Caveats # # 1. Maybe Integrate The Very Nice PyOpenGL Implementation Of A PieChart Coded ...