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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
41,495 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/EventManager.py | 162,163 | 134,202 | toggleOnOff | InnerTile | 163,173 | 163,173 | class InnerTile(wx.Window):
IDLE_COLOR = wx.Colour( 80, 10, 10)
START_COLOR = wx.Colour(200, 70, 50)
FINAL_COLOR = wx.Colour( 20, 80,240)
OFF_COLOR = wx.Colour(185,190,185)
# Some pre-computation.
DELTAS = list(map(lambda a,b: b-a, START_COLOR.Get(), FINAL_COLOR.Get()))
START_C... | class InnerTile(wx.Window):
IDLE_COLOR = wx.Colour( 80, 10, 10)
START_COLOR = wx.Colour(200, 70, 50)
FINAL_COLOR = wx.Colour( 20, 80,240)
OFF_COLOR = wx.Colour(185,190,185)
# Some pre-computation.
DELTAS = list(map(lambda a,b: b-a, START_COLOR.Get(), FINAL_COLOR.Get()))
START_C... | # Implement being on or off by registering and
# de-registering self.makeColor() from the event manager.
if self.state:
em.eventManager.DeregisterListener(self.makeColor)
else:
em.eventManager.Register(self.makeColor, wx.EVT_MOTION, self.thingToWatch)
self... | # Implement being on or off by registering and
# de-registering self.makeColor() from the event manager.
if self.state:
em.eventManager.DeregisterListener(self.makeColor)
else:
em.eventManager.Register(self.makeColor, wx.EVT_MOTION, self.thingToWatch)
self... | 29 | 685 | 118 | 803 | #!/usr/bin/env python
#---------------------------------------------------------------------------
# Name: EventManager.py
# Purpose: A module to demonstrate wx.lib.evtmgr.EventManager.
#
# Author: Robb Shecter (robb@acm.org)
#
# Created: 16-December-2002
# Copyright: (c) 2002-2020 by Robb Shecte... | #!/usr/bin/env python
#---------------------------------------------------------------------------
# Name: EventManager.py
# Purpose: A module to demonstrate wx.lib.evtmgr.EventManager.
#
# Author: Robb Shecter (robb@acm.org)
#
# Created: 16-December-2002
# Copyright: (c) 2002-2020 by Robb Shecte... |
41,496 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/EventManager.py | 119,120 | 86,134 | setHover | Tile | 120,124 | 120,124 | class Tile(wx.Window):
"""
This outer class is responsible for changing
its border color in response to certain mouse
events over its contained 'InnerTile'.
"""
normal = wx.Colour(150,150,150)
active = wx.Colour(250,245,245)
hover = wx.Colour(210,220,210)
def __init__(self, parent,... | class Tile(wx.Window):
"""
This outer class is responsible for changing
its border color in response to certain mouse
events over its contained 'InnerTile'.
"""
normal = wx.Colour(150,150,150)
active = wx.Colour(250,245,245)
hover = wx.Colour(210,220,210)
def __init__(self, parent,... | self.SetBackgroundColour(Tile.hover)
self.Refresh()
| self.SetBackgroundColour(Tile.hover)
self.Refresh()
| 2 | 581 | 26 | 607 | #!/usr/bin/env python
#---------------------------------------------------------------------------
# Name: EventManager.py
# Purpose: A module to demonstrate wx.lib.evtmgr.EventManager.
#
# Author: Robb Shecter (robb@acm.org)
#
# Created: 16-December-2002
# Copyright: (c) 2002-2020 by Robb Shecte... | #!/usr/bin/env python
#---------------------------------------------------------------------------
# Name: EventManager.py
# Purpose: A module to demonstrate wx.lib.evtmgr.EventManager.
#
# Author: Robb Shecter (robb@acm.org)
#
# Created: 16-December-2002
# Copyright: (c) 2002-2020 by Robb Shecte... |
41,497 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/ExpandoTextCtrl.py | 136,137 | 1,165 | runTest | 137,144 | 137,144 | #!/usr/bin/env python
import wx
from wx.lib.expando import ExpandoTextCtrl, EVT_ETC_LAYOUT_NEEDED
#----------------------------------------------------------------------
class TestFrame(wx.Frame):
def __init__(self, parent, log):
wx.Frame.__init__(self, parent, title="Test ExpandoTextCtrl")
self.... | #!/usr/bin/env python
import wx
from wx.lib.expando import ExpandoTextCtrl, EVT_ETC_LAYOUT_NEEDED
#----------------------------------------------------------------------
class TestFrame(wx.Frame):
def __init__(self, parent, log):
wx.Frame.__init__(self, parent, title="Test ExpandoTextCtrl")
self.... | win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| 7 | 1,873 | 30 | 1,903 | #!/usr/bin/env python
import wx
from wx.lib.expando import ExpandoTextCtrl, EVT_ETC_LAYOUT_NEEDED
#----------------------------------------------------------------------
class TestFrame(wx.Frame):
def __init__(self, parent, log):
wx.Frame.__init__(self, parent, title="Test ExpandoTextCtrl")
self.... | #!/usr/bin/env python
import wx
from wx.lib.expando import ExpandoTextCtrl, EVT_ETC_LAYOUT_NEEDED
#----------------------------------------------------------------------
class TestFrame(wx.Frame):
def __init__(self, parent, log):
wx.Frame.__init__(self, parent, title="Test ExpandoTextCtrl")
self.... | |
41,498 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/ExpandoTextCtrl.py | 81,82 | 8,120 | OnSetMaxHeight | TestFrame | 82,90 | 82,90 | class TestFrame(wx.Frame):
def __init__(self, parent, log):
wx.Frame.__init__(self, parent, title="Test ExpandoTextCtrl")
self.log = log
self.pnl = p = wx.Panel(self)
self.eom = ExpandoTextCtrl(p, size=(250,-1),
value="This control will expand as yo... | class TestFrame(wx.Frame):
def __init__(self, parent, log):
wx.Frame.__init__(self, parent, title="Test ExpandoTextCtrl")
self.log = log
self.pnl = p = wx.Panel(self)
self.eom = ExpandoTextCtrl(p, size=(250,-1),
value="This control will expand as yo... | mh = self.eom.GetMaxHeight()
dlg = wx.NumberEntryDialog(self, "", "Enter new max height:",
"MaxHeight", mh, -1, 1000)
if dlg.ShowModal() == wx.ID_OK:
self.eom.SetMaxHeight(dlg.GetValue())
dlg.Destroy()
| mh = self.eom.GetMaxHeight()
dlg = wx.NumberEntryDialog(self, "", "Enter new max height:",
"MaxHeight", mh, -1, 1000)
if dlg.ShowModal() == wx.ID_OK:
self.eom.SetMaxHeight(dlg.GetValue())
dlg.Destroy()
| 21 | 1,384 | 104 | 1,488 | #!/usr/bin/env python
import wx
from wx.lib.expando import ExpandoTextCtrl, EVT_ETC_LAYOUT_NEEDED
#----------------------------------------------------------------------
class TestFrame(wx.Frame):
def __init__(self, parent, log):
wx.Frame.__init__(self, parent, title="Test ExpandoTextCtrl")
self.... | #!/usr/bin/env python
import wx
from wx.lib.expando import ExpandoTextCtrl, EVT_ETC_LAYOUT_NEEDED
#----------------------------------------------------------------------
class TestFrame(wx.Frame):
def __init__(self, parent, log):
wx.Frame.__init__(self, parent, title="Test ExpandoTextCtrl")
self.... |
41,499 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/ExpandoTextCtrl.py | 129,130 | 120,136 | OnButton | TestPanel | 130,136 | 130,136 | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, " Test ExpandoTextCtrl ", (50,50))
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
def OnButton(self, evt):
FILL_FUNC_BODY | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, " Test ExpandoTextCtrl ", (50,50))
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
def OnButton(self, evt):
FILL_FUNC_BODY | self.win = TestFrame(self, self.log)
self.win.Show(True)
#----------------------------------------------------------------------
| self.win = TestFrame(self, self.log)
self.win.Show(True)
#----------------------------------------------------------------------
| 6 | 116 | 38 | 154 | #!/usr/bin/env python
import wx
from wx.lib.expando import ExpandoTextCtrl, EVT_ETC_LAYOUT_NEEDED
#----------------------------------------------------------------------
class TestFrame(wx.Frame):
def __init__(self, parent, log):
wx.Frame.__init__(self, parent, title="Test ExpandoTextCtrl")
self.... | #!/usr/bin/env python
import wx
from wx.lib.expando import ExpandoTextCtrl, EVT_ETC_LAYOUT_NEEDED
#----------------------------------------------------------------------
class TestFrame(wx.Frame):
def __init__(self, parent, log):
wx.Frame.__init__(self, parent, title="Test ExpandoTextCtrl")
self.... |
41,500 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/FancyText.py | 31,32 | 1,84 | runTest | 32,39 | 32,39 | #!/usr/bin/env python
import wx
import wx.lib.fancytext as fancytext
#----------------------------------------------------------------------
test_str = ('<font style="italic" family="swiss" color="red" weight="bold" >'
'some |<sup>23</sup> <angle/>text<sub>with <angle/> subscript</sub>'
'</f... | #!/usr/bin/env python
import wx
import wx.lib.fancytext as fancytext
#----------------------------------------------------------------------
test_str = ('<font style="italic" family="swiss" color="red" weight="bold" >'
'some |<sup>23</sup> <angle/>text<sub>with <angle/> subscript</sub>'
'</f... | win = TestPanel(nb)
return win
#----------------------------------------------------------------------
| win = TestPanel(nb)
return win
#----------------------------------------------------------------------
| 6 | 841 | 28 | 869 | #!/usr/bin/env python
import wx
import wx.lib.fancytext as fancytext
#----------------------------------------------------------------------
test_str = ('<font style="italic" family="swiss" color="red" weight="bold" >'
'some |<sup>23</sup> <angle/>text<sub>with <angle/> subscript</sub>'
'</f... | #!/usr/bin/env python
import wx
import wx.lib.fancytext as fancytext
#----------------------------------------------------------------------
test_str = ('<font style="italic" family="swiss" color="red" weight="bold" >'
'some |<sup>23</sup> <angle/>text<sub>with <angle/> subscript</sub>'
'</f... | |
41,501 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/FancyText.py | 20,21 | 15,31 | OnPaint | TestPanel | 21,31 | 21,31 | class TestPanel(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent, -1)
self.Bind(wx.EVT_PAINT, self.OnPaint)
def OnPaint(self, evt):
FILL_FUNC_BODY | class TestPanel(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent, -1)
self.Bind(wx.EVT_PAINT, self.OnPaint)
def OnPaint(self, evt):
FILL_FUNC_BODY | dc = wx.PaintDC(self)
w, h = fancytext.GetExtent(test_str, dc)
fancytext.RenderToDC(test_str, dc, 20, 20)
fancytext.RenderToDC(test_str2, dc, 20, 20 + h + 10)
#----------------------------------------------------------------------
| dc = wx.PaintDC(self)
w, h = fancytext.GetExtent(test_str, dc)
fancytext.RenderToDC(test_str, dc, 20, 20)
fancytext.RenderToDC(test_str2, dc, 20, 20 + h + 10)
#----------------------------------------------------------------------
| 21 | 77 | 106 | 183 | #!/usr/bin/env python
import wx
import wx.lib.fancytext as fancytext
#----------------------------------------------------------------------
test_str = ('<font style="italic" family="swiss" color="red" weight="bold" >'
'some |<sup>23</sup> <angle/>text<sub>with <angle/> subscript</sub>'
'</f... | #!/usr/bin/env python
import wx
import wx.lib.fancytext as fancytext
#----------------------------------------------------------------------
test_str = ('<font style="italic" family="swiss" color="red" weight="bold" >'
'some |<sup>23</sup> <angle/>text<sub>with <angle/> subscript</sub>'
'</f... |
41,502 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/FileBrowseButton.py | 66,67 | 1,101 | runTest | 67,73 | 67,73 | #!/usr/bin/env python
""" Demonstrate filebrowsebutton module of the wxPython.lib Library.
14.1.2001 Bernhard Reiter <bernhard@intevation.de>
Added demo for DirBrowseButton and improved overview text.
"""
import wx
import wx.lib.filebrowsebutton as filebrowse
#---------------------------------------------------... | #!/usr/bin/env python
""" Demonstrate filebrowsebutton module of the wxPython.lib Library.
14.1.2001 Bernhard Reiter <bernhard@intevation.de>
Added demo for DirBrowseButton and improved overview text.
"""
import wx
import wx.lib.filebrowsebutton as filebrowse
#---------------------------------------------------... | win = TestPanel(nb, -1, log)
return win
#----------------------------------------------------------------------
| win = TestPanel(nb, -1, log)
return win
#----------------------------------------------------------------------
| 8 | 922 | 31 | 953 | #!/usr/bin/env python
""" Demonstrate filebrowsebutton module of the wxPython.lib Library.
14.1.2001 Bernhard Reiter <bernhard@intevation.de>
Added demo for DirBrowseButton and improved overview text.
"""
import wx
import wx.lib.filebrowsebutton as filebrowse
#---------------------------------------------------... | #!/usr/bin/env python
""" Demonstrate filebrowsebutton module of the wxPython.lib Library.
14.1.2001 Bernhard Reiter <bernhard@intevation.de>
Added demo for DirBrowseButton and improved overview text.
"""
import wx
import wx.lib.filebrowsebutton as filebrowse
#---------------------------------------------------... | |
41,503 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/FileBrowseButton.py | 47,48 | 14,66 | fbbhCallback | TestPanel | 48,60 | 48,60 | class TestPanel(wx.Panel):
def __init__(self, parent, ID, log):
wx.Panel.__init__(self, parent, ID)
self.log = log
self.fbb = filebrowse.FileBrowseButton(
self, -1, size=(450, -1), changeCallback = self.fbbCallback
)
self.fbbh = filebrowse.FileBrowseButtonWi... | class TestPanel(wx.Panel):
def __init__(self, parent, ID, log):
wx.Panel.__init__(self, parent, ID)
self.log = log
self.fbb = filebrowse.FileBrowseButton(
self, -1, size=(450, -1), changeCallback = self.fbbCallback
)
self.fbbh = filebrowse.FileBrowseButtonWi... | if hasattr(self, 'fbbh'):
value = evt.GetString()
if not value:
return
self.log.write('FileBrowseButtonWithHistory: %s\n' % value)
history = self.fbbh.GetHistory()
if value not in history:
history.append(value)
... | if hasattr(self, 'fbbh'):
value = evt.GetString()
if not value:
return
self.log.write('FileBrowseButtonWithHistory: %s\n' % value)
history = self.fbbh.GetHistory()
if value not in history:
history.append(value)
... | 25 | 463 | 130 | 593 | #!/usr/bin/env python
""" Demonstrate filebrowsebutton module of the wxPython.lib Library.
14.1.2001 Bernhard Reiter <bernhard@intevation.de>
Added demo for DirBrowseButton and improved overview text.
"""
import wx
import wx.lib.filebrowsebutton as filebrowse
#---------------------------------------------------... | #!/usr/bin/env python
""" Demonstrate filebrowsebutton module of the wxPython.lib Library.
14.1.2001 Bernhard Reiter <bernhard@intevation.de>
Added demo for DirBrowseButton and improved overview text.
"""
import wx
import wx.lib.filebrowsebutton as filebrowse
#---------------------------------------------------... |
41,504 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/FileCtrl.py | 61,62 | 1,98 | runTest | 62,69 | 62,69 | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class FileCtrl(wx.FileCtrl):
def __init__(self, parent, id=wx.ID_ANY, defaultDirectory="",
defaultFilename="",
wildCard=wx.FileSelectorDefaultWildcardStr,
... | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class FileCtrl(wx.FileCtrl):
def __init__(self, parent, id=wx.ID_ANY, defaultDirectory="",
defaultFilename="",
wildCard=wx.FileSelectorDefaultWildcardStr,
... | win = TestPanel(nb, log)
return win
#---------------------------------------------------------------------------
| win = TestPanel(nb, log)
return win
#---------------------------------------------------------------------------
| 7 | 990 | 30 | 1,020 | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class FileCtrl(wx.FileCtrl):
def __init__(self, parent, id=wx.ID_ANY, defaultDirectory="",
defaultFilename="",
wildCard=wx.FileSelectorDefaultWildcardStr,
... | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class FileCtrl(wx.FileCtrl):
def __init__(self, parent, id=wx.ID_ANY, defaultDirectory="",
defaultFilename="",
wildCard=wx.FileSelectorDefaultWildcardStr,
... | |
41,505 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/FileCtrl.py | 37,38 | 9,45 | OnFilterChanged | FileCtrl | 38,45 | 38,45 | class FileCtrl(wx.FileCtrl):
def __init__(self, parent, id=wx.ID_ANY, defaultDirectory="",
defaultFilename="",
wildCard=wx.FileSelectorDefaultWildcardStr,
style=wx.FC_DEFAULT_STYLE,
# | wx.FC_OPEN
# | wx.FC_SAVE
# ... | class FileCtrl(wx.FileCtrl):
def __init__(self, parent, id=wx.ID_ANY, defaultDirectory="",
defaultFilename="",
wildCard=wx.FileSelectorDefaultWildcardStr,
style=wx.FC_DEFAULT_STYLE,
# | wx.FC_OPEN
# | wx.FC_SAVE
# ... | self.log.write('Filter Changed: %s\n' % self.GetFilterIndex())
#---------------------------------------------------------------------------
| self.log.write('Filter Changed: %s\n' % self.GetFilterIndex())
#---------------------------------------------------------------------------
| 6 | 427 | 40 | 467 | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class FileCtrl(wx.FileCtrl):
def __init__(self, parent, id=wx.ID_ANY, defaultDirectory="",
defaultFilename="",
wildCard=wx.FileSelectorDefaultWildcardStr,
... | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class FileCtrl(wx.FileCtrl):
def __init__(self, parent, id=wx.ID_ANY, defaultDirectory="",
defaultFilename="",
wildCard=wx.FileSelectorDefaultWildcardStr,
... |
41,506 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/FileDialog.py | 120,121 | 1,145 | runTest | 121,127 | 121,127 | #!/usr/bin/env python
import os
import wx
#---------------------------------------------------------------------------
# This is how you pre-establish a file filter so that the dialog
# only shows the extension(s) you want it to.
wildcard = "Python source (*.py)|*.py|" \
"Compiled Python (*.pyc)|*.pyc... | #!/usr/bin/env python
import os
import wx
#---------------------------------------------------------------------------
# This is how you pre-establish a file filter so that the dialog
# only shows the extension(s) you want it to.
wildcard = "Python source (*.py)|*.py|" \
"Compiled Python (*.pyc)|*.pyc... | win = TestPanel(nb, log)
return win
#---------------------------------------------------------------------------
| win = TestPanel(nb, log)
return win
#---------------------------------------------------------------------------
| 7 | 1,514 | 28 | 1,542 | #!/usr/bin/env python
import os
import wx
#---------------------------------------------------------------------------
# This is how you pre-establish a file filter so that the dialog
# only shows the extension(s) you want it to.
wildcard = "Python source (*.py)|*.py|" \
"Compiled Python (*.pyc)|*.pyc... | #!/usr/bin/env python
import os
import wx
#---------------------------------------------------------------------------
# This is how you pre-establish a file filter so that the dialog
# only shows the extension(s) you want it to.
wildcard = "Python source (*.py)|*.py|" \
"Compiled Python (*.pyc)|*.pyc... | |
41,507 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/FileDialog.py | 69,70 | 18,120 | OnButton2 | TestPanel | 70,120 | 70,120 | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show an OPEN FileDialog", (50,50))
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
b = wx.Button(self, -1, "Create and Show a SAVE F... | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show an OPEN FileDialog", (50,50))
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
b = wx.Button(self, -1, "Create and Show a SAVE F... | self.log.WriteText("CWD: %s\n" % os.getcwd())
# Create the dialog. In this case the current directory is forced as the starting
# directory for the dialog, and no default file name is forced. This can easily
# be changed in your program. This is an 'save' dialog.
#
# Unl... | self.log.WriteText("CWD: %s\n" % os.getcwd())
# Create the dialog. In this case the current directory is forced as the starting
# directory for the dialog, and no default file name is forced. This can easily
# be changed in your program. This is an 'save' dialog.
#
# Unl... | 285 | 617 | 605 | 1,222 | #!/usr/bin/env python
import os
import wx
#---------------------------------------------------------------------------
# This is how you pre-establish a file filter so that the dialog
# only shows the extension(s) you want it to.
wildcard = "Python source (*.py)|*.py|" \
"Compiled Python (*.pyc)|*.pyc... | #!/usr/bin/env python
import os
import wx
#---------------------------------------------------------------------------
# This is how you pre-establish a file filter so that the dialog
# only shows the extension(s) you want it to.
wildcard = "Python source (*.py)|*.py|" \
"Compiled Python (*.pyc)|*.pyc... |
41,508 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/FileHistory.py | 111,112 | 1,141 | runTest | 112,119 | 112,119 | #!/usr/bin/env python
import os
import wx
#----------------------------------------------------------------------
text = """\
Right-click on this panel to get a menu. This menu will be managed by a
FileHistory object and so the files you select will automatically be added to
the end of the menu and will be selectab... | #!/usr/bin/env python
import os
import wx
#----------------------------------------------------------------------
text = """\
Right-click on this panel to get a menu. This menu will be managed by a
FileHistory object and so the files you select will automatically be added to
the end of the menu and will be selectab... | win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| 7 | 1,412 | 30 | 1,442 | #!/usr/bin/env python
import os
import wx
#----------------------------------------------------------------------
text = """\
Right-click on this panel to get a menu. This menu will be managed by a
FileHistory object and so the files you select will automatically be added to
the end of the menu and will be selectab... | #!/usr/bin/env python
import os
import wx
#----------------------------------------------------------------------
text = """\
Right-click on this panel to get a menu. This menu will be managed by a
FileHistory object and so the files you select will automatically be added to
the end of the menu and will be selectab... | |
41,509 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/FileHistory.py | 83,84 | 18,111 | OnFileOpenDialog | TestPanel | 84,98 | 84,98 | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
box = wx.BoxSizer(wx.VERTICAL)
# Make and layout the controls
fs = self.GetFont().GetPointSize()
bf = wx.Font(fs+4, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL... | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
box = wx.BoxSizer(wx.VERTICAL)
# Make and layout the controls
fs = self.GetFont().GetPointSize()
bf = wx.Font(fs+4, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL... | dlg = wx.FileDialog(self,
defaultDir = os.getcwd(),
wildcard = "All Files|*",
style = wx.FD_OPEN | wx.FD_CHANGE_DIR)
if dlg.ShowModal() == wx.ID_OK:
path = dlg.GetPath()
self.log.write("You selected... | dlg = wx.FileDialog(self,
defaultDir = os.getcwd(),
wildcard = "All Files|*",
style = wx.FD_OPEN | wx.FD_CHANGE_DIR)
if dlg.ShowModal() == wx.ID_OK:
path = dlg.GetPath()
self.log.write("You selected... | 35 | 940 | 146 | 1,086 | #!/usr/bin/env python
import os
import wx
#----------------------------------------------------------------------
text = """\
Right-click on this panel to get a menu. This menu will be managed by a
FileHistory object and so the files you select will automatically be added to
the end of the menu and will be selectab... | #!/usr/bin/env python
import os
import wx
#----------------------------------------------------------------------
text = """\
Right-click on this panel to get a menu. This menu will be managed by a
FileHistory object and so the files you select will automatically be added to
the end of the menu and will be selectab... |
41,510 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/FindReplaceDialog.py | 90,91 | 1,124 | runTest | 91,99 | 91,99 | #!/usr/bin/env python
# 11/17/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 11/28/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Changed the event binding slightly.
import wx
#---------------------------------------------------------------------------
class TestPanel(wx.Pa... | #!/usr/bin/env python
# 11/17/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 11/28/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Changed the event binding slightly.
import wx
#---------------------------------------------------------------------------
class TestPanel(wx.Pa... | win = TestPanel(nb, log)
return win
#---------------------------------------------------------------------------
| win = TestPanel(nb, log)
return win
#---------------------------------------------------------------------------
| 7 | 1,312 | 32 | 1,344 | #!/usr/bin/env python
# 11/17/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 11/28/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Changed the event binding slightly.
import wx
#---------------------------------------------------------------------------
class TestPanel(wx.Pa... | #!/usr/bin/env python
# 11/17/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 11/28/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Changed the event binding slightly.
import wx
#---------------------------------------------------------------------------
class TestPanel(wx.Pa... | |
41,511 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/FindReplaceDialog.py | 57,58 | 16,90 | OnFind | TestPanel | 58,82 | 58,82 | class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
self.findData = wx.FindReplaceData()
self.fbtn = wx.Button(self, -1, "Show Find Dialog", (25, 50))
self.Bind(wx.EVT_BUTTON, self.OnShowFind, self.fbtn)
sel... | class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
self.findData = wx.FindReplaceData()
self.fbtn = wx.Button(self, -1, "Show Find Dialog", (25, 50))
self.Bind(wx.EVT_BUTTON, self.OnShowFind, self.fbtn)
sel... | #print(repr(evt.GetFindString()), repr(self.findData.GetFindString()))
map = {
wx.wxEVT_COMMAND_FIND : "FIND",
wx.wxEVT_COMMAND_FIND_NEXT : "FIND_NEXT",
wx.wxEVT_COMMAND_FIND_REPLACE : "REPLACE",
wx.wxEVT_COMMAND_FIND_REPLACE_ALL : "REPLACE_ALL",
... | #print(repr(evt.GetFindString()), repr(self.findData.GetFindString()))
map = {
wx.wxEVT_COMMAND_FIND : "FIND",
wx.wxEVT_COMMAND_FIND_NEXT : "FIND_NEXT",
wx.wxEVT_COMMAND_FIND_REPLACE : "REPLACE",
wx.wxEVT_COMMAND_FIND_REPLACE_ALL : "REPLACE_ALL",
... | 66 | 579 | 331 | 910 | #!/usr/bin/env python
# 11/17/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 11/28/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Changed the event binding slightly.
import wx
#---------------------------------------------------------------------------
class TestPanel(wx.Pa... | #!/usr/bin/env python
# 11/17/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 11/28/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Changed the event binding slightly.
import wx
#---------------------------------------------------------------------------
class TestPanel(wx.Pa... |
41,512 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/FontDialog.py | 113,114 | 1,143 | runTest | 114,120 | 114,120 | #!/usr/bin/env python
import wx
from wx.lib import stattext
#---------------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
btn = wx.Button(self, -1, "Select Font")... | #!/usr/bin/env python
import wx
from wx.lib import stattext
#---------------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
btn = wx.Button(self, -1, "Select Font")... | win = TestPanel(nb, log)
return win
#---------------------------------------------------------------------------
| win = TestPanel(nb, log)
return win
#---------------------------------------------------------------------------
| 7 | 1,551 | 28 | 1,579 | #!/usr/bin/env python
import wx
from wx.lib import stattext
#---------------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
btn = wx.Button(self, -1, "Select Font")... | #!/usr/bin/env python
import wx
from wx.lib import stattext
#---------------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
btn = wx.Button(self, -1, "Select Font")... | |
41,513 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/FontDialog.py | 73,74 | 8,113 | UpdateUI | TestPanel | 74,85 | 74,85 | class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
btn = wx.Button(self, -1, "Select Font")
self.Bind(wx.EVT_BUTTON, self.OnSelectFont, btn)
self.sampleText = stattext.GenStaticText(self, -1, "Sample Text")
... | class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
btn = wx.Button(self, -1, "Select Font")
self.Bind(wx.EVT_BUTTON, self.OnSelectFont, btn)
self.sampleText = stattext.GenStaticText(self, -1, "Sample Text")
... | self.sampleText.SetFont(self.curFont)
self.sampleText.SetForegroundColour(self.curClr)
self.ps.SetLabel(str(self.curFont.GetPointSize()))
self.family.SetLabel('%s' %self.curFont.GetFamily())
self.style.SetLabel('%s' %self.curFont.GetStyle())
self.weight.SetLabel('%s' %sel... | self.sampleText.SetFont(self.curFont)
self.sampleText.SetForegroundColour(self.curClr)
self.ps.SetLabel(str(self.curFont.GetPointSize()))
self.family.SetLabel('%s' %self.curFont.GetFamily())
self.style.SetLabel('%s' %self.curFont.GetStyle())
self.weight.SetLabel('%s' %sel... | 12 | 1,123 | 176 | 1,299 | #!/usr/bin/env python
import wx
from wx.lib import stattext
#---------------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
btn = wx.Button(self, -1, "Select Font")... | #!/usr/bin/env python
import wx
from wx.lib import stattext
#---------------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
btn = wx.Button(self, -1, "Select Font")... |
41,514 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/FontEnumerator.py | 61,62 | 1,83 | runTest | 62,69 | 62,69 | #!/usr/bin/env python
# Tags: phoenix-port, py3-port
import wx
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
# The FontEnumerator handles fonts installed on the user's opera... | #!/usr/bin/env python
# Tags: phoenix-port, py3-port
import wx
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
# The FontEnumerator handles fonts installed on the user's opera... | win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| 7 | 795 | 30 | 825 | #!/usr/bin/env python
# Tags: phoenix-port, py3-port
import wx
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
# The FontEnumerator handles fonts installed on the user's opera... | #!/usr/bin/env python
# Tags: phoenix-port, py3-port
import wx
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
# The FontEnumerator handles fonts installed on the user's opera... | |
41,515 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/FontEnumerator.py | 47,48 | 9,61 | OnSelect | TestPanel | 48,61 | 48,61 | class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
# The FontEnumerator handles fonts installed on the user's operating system.
e = wx.FontEnumerator()
e.EnumerateFacenames()
list = e.GetFacenames()
list.sort()
s... | class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
# The FontEnumerator handles fonts installed on the user's operating system.
e = wx.FontEnumerator()
e.EnumerateFacenames()
list = e.GetFacenames()
list.sort()
s... | face = self.lb1.GetStringSelection()
font = wx.Font(28, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, face)
self.txt.SetLabel(face)
self.txt.SetFont(font)
if wx.Platform == "__WXMAC__": self.Refresh()
## st = font.GetNativeFontInfo().ToString()... | face = self.lb1.GetStringSelection()
font = wx.Font(28, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, face)
self.txt.SetLabel(face)
self.txt.SetFont(font)
if wx.Platform == "__WXMAC__": self.Refresh()
## st = font.GetNativeFontInfo().ToString()... | 33 | 457 | 173 | 630 | #!/usr/bin/env python
# Tags: phoenix-port, py3-port
import wx
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
# The FontEnumerator handles fonts installed on the user's opera... | #!/usr/bin/env python
# Tags: phoenix-port, py3-port
import wx
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
# The FontEnumerator handles fonts installed on the user's opera... |
41,516 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/Frame.py | 49,50 | 1,86 | runTest | 50,57 | 50,57 | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class MyFrame(wx.Frame):
def __init__(
self, parent, ID, title, pos=wx.DefaultPosition,
size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE
):
wx.Frame.__init__(... | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class MyFrame(wx.Frame):
def __init__(
self, parent, ID, title, pos=wx.DefaultPosition,
size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE
):
wx.Frame.__init__(... | win = TestPanel(nb, log)
return win
#---------------------------------------------------------------------------
| win = TestPanel(nb, log)
return win
#---------------------------------------------------------------------------
| 7 | 749 | 30 | 779 | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class MyFrame(wx.Frame):
def __init__(
self, parent, ID, title, pos=wx.DefaultPosition,
size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE
):
wx.Frame.__init__(... | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class MyFrame(wx.Frame):
def __init__(
self, parent, ID, title, pos=wx.DefaultPosition,
size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE
):
wx.Frame.__init__(... | |
41,517 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/Frame.py | 25,26 | 7,30 | OnCloseWindow | MyFrame | 26,30 | 26,30 | class MyFrame(wx.Frame):
def __init__(
self, parent, ID, title, pos=wx.DefaultPosition,
size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE
):
wx.Frame.__init__(self, parent, ID, title, pos, size, style)
panel = wx.Panel(self, -1)
button = wx.Button(panel,... | class MyFrame(wx.Frame):
def __init__(
self, parent, ID, title, pos=wx.DefaultPosition,
size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE
):
wx.Frame.__init__(self, parent, ID, title, pos, size, style)
panel = wx.Panel(self, -1)
button = wx.Button(panel,... | self.Destroy()
#---------------------------------------------------------------------------
| self.Destroy()
#---------------------------------------------------------------------------
| 2 | 215 | 17 | 232 | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class MyFrame(wx.Frame):
def __init__(
self, parent, ID, title, pos=wx.DefaultPosition,
size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE
):
wx.Frame.__init__(... | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class MyFrame(wx.Frame):
def __init__(
self, parent, ID, title, pos=wx.DefaultPosition,
size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE
):
wx.Frame.__init__(... |
41,518 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/Frame.py | 39,40 | 30,49 | OnButton | TestPanel | 40,49 | 40,49 | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a Frame", (50,50))
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
def OnButton(self, evt):
FILL_FUNC_BODY | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a Frame", (50,50))
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
def OnButton(self, evt):
FILL_FUNC_BODY | win = MyFrame(self, -1, "This is a wx.Frame", size=(350, 200),
style = wx.DEFAULT_FRAME_STYLE)
win.Show(True)
#---------------------------------------------------------------------------
| win = MyFrame(self, -1, "This is a wx.Frame", size=(350, 200),
style = wx.DEFAULT_FRAME_STYLE)
win.Show(True)
#---------------------------------------------------------------------------
| 15 | 116 | 73 | 189 | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class MyFrame(wx.Frame):
def __init__(
self, parent, ID, title, pos=wx.DefaultPosition,
size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE
):
wx.Frame.__init__(... | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class MyFrame(wx.Frame):
def __init__(
self, parent, ID, title, pos=wx.DefaultPosition,
size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE
):
wx.Frame.__init__(... |
41,519 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/Gauge.py | 42,43 | 1,67 | runTest | 43,49 | 43,49 | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
self.count = 0
wx.StaticText(self, -1, "This example shows the wx... | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
self.count = 0
wx.StaticText(self, -1, "This example shows the wx... | win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| 7 | 623 | 28 | 651 | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
self.count = 0
wx.StaticText(self, -1, "This example shows the wx... | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
self.count = 0
wx.StaticText(self, -1, "This example shows the wx... | |
41,520 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/Gauge.py | 28,29 | 7,42 | TimerHandler | TestPanel | 29,42 | 29,42 | class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
self.count = 0
wx.StaticText(self, -1, "This example shows the wx.Gauge control.", (45, 15))
self.g1 = wx.Gauge(self, -1, 50, (110, 50), (250, -1))
self.g2... | class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
self.count = 0
wx.StaticText(self, -1, "This example shows the wx.Gauge control.", (45, 15))
self.g1 = wx.Gauge(self, -1, 50, (110, 50), (250, -1))
self.g2... | self.count = self.count + 1
if self.count >= 50:
self.count = 0
self.g1.SetValue(self.count)
self.g2.Pulse()
if 'wxMac' not in wx.PlatformInfo:
self.g3.Pulse()
#----------------------------------------------------------------------
| self.count = self.count + 1
if self.count >= 50:
self.count = 0
self.g1.SetValue(self.count)
self.g2.Pulse()
if 'wxMac' not in wx.PlatformInfo:
self.g3.Pulse()
#----------------------------------------------------------------------
| 21 | 306 | 98 | 404 | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
self.count = 0
wx.StaticText(self, -1, "This example shows the wx... | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
self.count = 0
wx.StaticText(self, -1, "This example shows the wx... |
41,522 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/GenericButtons.py | 162,163 | 10,171 | OnToggleButton | TestPanel | 163,171 | 163,171 | class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
##self.SetBackgroundColour("sky blue")
sizer = wx.FlexGridSizer(cols=3, hgap=20, vgap=20)
# A regular button, selected as the default button
b = wx.Button(... | class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
##self.SetBackgroundColour("sky blue")
sizer = wx.FlexGridSizer(cols=3, hgap=20, vgap=20)
# A regular button, selected as the default button
b = wx.Button(... | msg = (event.GetIsDown() and "on") or "off"
self.log.WriteText("Button %d Toggled: %s\n" % (event.GetId(), msg))
#----------------------------------------------------------------------
| msg = (event.GetIsDown() and "on") or "off"
self.log.WriteText("Button %d Toggled: %s\n" % (event.GetId(), msg))
#----------------------------------------------------------------------
| 15 | 1,949 | 66 | 2,015 | #!/usr/bin/env python
import wx
import wx.lib.buttons as buttons
import images
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
##self.SetBackgroundColo... | #!/usr/bin/env python
import wx
import wx.lib.buttons as buttons
import images
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
##self.SetBackgroundColo... |
41,523 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/GenericCheckBox.py | 51,52 | 1,66 | runTest | 52,59 | 52,59 | #!/usr/bin/env python
import wx
import wx.lib.checkbox as CB
#----------------------------------------------------------------------
class TestPanel(wx.Panel, CB.DefineNativeCheckBoxBitmapsMixin):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
# Make ... | #!/usr/bin/env python
import wx
import wx.lib.checkbox as CB
#----------------------------------------------------------------------
class TestPanel(wx.Panel, CB.DefineNativeCheckBoxBitmapsMixin):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
# Make ... | win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| 7 | 645 | 30 | 675 | #!/usr/bin/env python
import wx
import wx.lib.checkbox as CB
#----------------------------------------------------------------------
class TestPanel(wx.Panel, CB.DefineNativeCheckBoxBitmapsMixin):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
# Make ... | #!/usr/bin/env python
import wx
import wx.lib.checkbox as CB
#----------------------------------------------------------------------
class TestPanel(wx.Panel, CB.DefineNativeCheckBoxBitmapsMixin):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
# Make ... | |
41,524 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/GenericCheckBox.py | 41,42 | 8,51 | OnCheckBox | TestPanel | 42,51 | 42,51 | class TestPanel(wx.Panel, CB.DefineNativeCheckBoxBitmapsMixin):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
# Make a couple Generic CheckBoxes.
cb1 = CB.GenCheckBox(self, label="PurePython Checkbox1", pos=(10, 10))
cb2 = CB.GenCheckBox... | class TestPanel(wx.Panel, CB.DefineNativeCheckBoxBitmapsMixin):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
# Make a couple Generic CheckBoxes.
cb1 = CB.GenCheckBox(self, label="PurePython Checkbox1", pos=(10, 10))
cb2 = CB.GenCheckBox... | evtObj = event.GetEventObject()
label = evtObj.GetLabel()
checked = evtObj.IsChecked()
self.log.WriteText("GenCheckBox Clicked: %s %s\n" % (label, checked))
#----------------------------------------------------------------------
| evtObj = event.GetEventObject()
label = evtObj.GetLabel()
checked = evtObj.IsChecked()
self.log.WriteText("GenCheckBox Clicked: %s %s\n" % (label, checked))
#----------------------------------------------------------------------
| 17 | 472 | 80 | 552 | #!/usr/bin/env python
import wx
import wx.lib.checkbox as CB
#----------------------------------------------------------------------
class TestPanel(wx.Panel, CB.DefineNativeCheckBoxBitmapsMixin):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
# Make ... | #!/usr/bin/env python
import wx
import wx.lib.checkbox as CB
#----------------------------------------------------------------------
class TestPanel(wx.Panel, CB.DefineNativeCheckBoxBitmapsMixin):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
# Make ... |
41,525 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/GenericDirCtrl.py | 52,53 | 1,75 | runTest | 53,59 | 53,59 | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
txt1 = wx.StaticText(self, -1, "style=0")
dir1 = wx.GenericDirCt... | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
txt1 = wx.StaticText(self, -1, "style=0")
dir1 = wx.GenericDirCt... | win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| 7 | 751 | 28 | 779 | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
txt1 = wx.StaticText(self, -1, "style=0")
dir1 = wx.GenericDirCt... | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
txt1 = wx.StaticText(self, -1, "style=0")
dir1 = wx.GenericDirCt... | |
41,526 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/GetMouseState.py | 132,133 | 1,160 | runTest | 133,140 | 133,140 | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
class StaticText(wx.StaticText):
"""
A StaticText that only updates the label if it has changed, to
help reduce potential flicker since these controls would be
updated very frequently otherwise.
... | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
class StaticText(wx.StaticText):
"""
A StaticText that only updates the label if it has changed, to
help reduce potential flicker since these controls would be
updated very frequently otherwise.
... | win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| 7 | 1,665 | 30 | 1,695 | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
class StaticText(wx.StaticText):
"""
A StaticText that only updates the label if it has changed, to
help reduce potential flicker since these controls would be
updated very frequently otherwise.
... | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
class StaticText(wx.StaticText):
"""
A StaticText that only updates the label if it has changed, to
help reduce potential flicker since these controls would be
updated very frequently otherwise.
... | |
41,527 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/GetMouseState.py | 13,14 | 7,19 | SetLabel | StaticText | 14,19 | 14,19 | class StaticText(wx.StaticText):
"""
A StaticText that only updates the label if it has changed, to
help reduce potential flicker since these controls would be
updated very frequently otherwise.
"""
def SetLabel(self, label):
FILL_FUNC_BODY | class StaticText(wx.StaticText):
"""
A StaticText that only updates the label if it has changed, to
help reduce potential flicker since these controls would be
updated very frequently otherwise.
"""
def SetLabel(self, label):
FILL_FUNC_BODY | if label != self.GetLabel():
wx.StaticText.SetLabel(self, label)
#----------------------------------------------------------------------
| if label != self.GetLabel():
wx.StaticText.SetLabel(self, label)
#----------------------------------------------------------------------
| 7 | 73 | 36 | 109 | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
class StaticText(wx.StaticText):
"""
A StaticText that only updates the label if it has changed, to
help reduce potential flicker since these controls would be
updated very frequently otherwise.
... | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
class StaticText(wx.StaticText):
"""
A StaticText that only updates the label if it has changed, to
help reduce potential flicker since these controls would be
updated very frequently otherwise.
... |
41,528 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/GetMouseState.py | 108,109 | 19,132 | OnTimer | TestPanel | 109,126 | 109,126 | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
sizer = wx.BoxSizer(wx.VERTICAL)
self.SetSizer(sizer)
sizer.Add((25,25))
sizer.Add(wx.StaticText(
self, -1,
"Mou... | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
sizer = wx.BoxSizer(wx.VERTICAL)
self.SetSizer(sizer)
sizer.Add((25,25))
sizer.Add(wx.StaticText(
self, -1,
"Mou... | ms = wx.GetMouseState()
self.x.SetLabel( str(ms.x) )
self.y.SetLabel( str(ms.y) )
self.lft.SetLabel( str(ms.leftIsDown) )
self.mid.SetLabel( str(ms.middleIsDown) )
self.rgt.SetLabel( str(ms.rightIsDown) )
self.aux1.SetLabel( str(ms.aux1IsDown) )
self.aux2... | ms = wx.GetMouseState()
self.x.SetLabel( str(ms.x) )
self.y.SetLabel( str(ms.y) )
self.lft.SetLabel( str(ms.leftIsDown) )
self.mid.SetLabel( str(ms.middleIsDown) )
self.rgt.SetLabel( str(ms.rightIsDown) )
self.aux1.SetLabel( str(ms.aux1IsDown) )
self.aux2... | 39 | 1,144 | 245 | 1,389 | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
class StaticText(wx.StaticText):
"""
A StaticText that only updates the label if it has changed, to
help reduce potential flicker since these controls would be
updated very frequently otherwise.
... | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
class StaticText(wx.StaticText):
"""
A StaticText that only updates the label if it has changed, to
help reduce potential flicker since these controls would be
updated very frequently otherwise.
... |
41,532 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/GraphicsGradient.py | 35,36 | 14,45 | OnPaint | GradientPanel | 36,45 | 36,45 | class GradientPanel(wx.Panel):
"""
This panel will be painted with the gradient brush created by the
rest of the sample.
"""
def __init__(self, parent):
wx.Panel.__init__(self, parent, -1)
# Create a simple default brush we can use until a gradient
# brush is given to us
... | class GradientPanel(wx.Panel):
"""
This panel will be painted with the gradient brush created by the
rest of the sample.
"""
def __init__(self, parent):
wx.Panel.__init__(self, parent, -1)
# Create a simple default brush we can use until a gradient
# brush is given to us
... | dc = wx.PaintDC(self)
gc = g.GraphicsContext.Create(dc)
gc.SetBrush(self.brush)
gc.SetPen(wx.Pen('black', 1))
w, h = gc.GetSize()
gc.DrawRectangle(0,0,w,h)
| dc = wx.PaintDC(self)
gc = g.GraphicsContext.Create(dc)
gc.SetBrush(self.brush)
gc.SetPen(wx.Pen('black', 1))
w, h = gc.GetSize()
gc.DrawRectangle(0,0,w,h)
| 14 | 209 | 101 | 310 | #!/usr/bin/env python
import wx
g = wx
import wx.lib.scrolledpanel as scrolled
# To test compatibility of gradients with the generic GraphicsContext classes
# uncomment this line
#import wx.lib.graphics as g
#----------------------------------------------------------------------
class GradientPanel(wx.Panel):
... | #!/usr/bin/env python
import wx
g = wx
import wx.lib.scrolledpanel as scrolled
# To test compatibility of gradients with the generic GraphicsContext classes
# uncomment this line
#import wx.lib.graphics as g
#----------------------------------------------------------------------
class GradientPanel(wx.Panel):
... |
41,533 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/GraphicsGradient.py | 85,86 | 45,90 | OnMinusButton | GradientStopPanel | 86,90 | 86,90 | class GradientStopPanel(wx.Panel):
"""
Contains the controls for editing each gradient stop. (Colour,
alpha and relative position.)
"""
def __init__(self, parent, posVal, colour=wx.BLACK, alpha=wx.ALPHA_OPAQUE):
wx.Panel.__init__(self, parent)
# make some widgets
self.pos = ... | class GradientStopPanel(wx.Panel):
"""
Contains the controls for editing each gradient stop. (Colour,
alpha and relative position.)
"""
def __init__(self, parent, posVal, colour=wx.BLACK, alpha=wx.ALPHA_OPAQUE):
wx.Panel.__init__(self, parent)
# make some widgets
self.pos = ... | wx.CallAfter(self.Parent.RemoveStop, self)
| wx.CallAfter(self.Parent.RemoveStop, self)
| 2 | 574 | 23 | 597 | #!/usr/bin/env python
import wx
g = wx
import wx.lib.scrolledpanel as scrolled
# To test compatibility of gradients with the generic GraphicsContext classes
# uncomment this line
#import wx.lib.graphics as g
#----------------------------------------------------------------------
class GradientPanel(wx.Panel):
... | #!/usr/bin/env python
import wx
g = wx
import wx.lib.scrolledpanel as scrolled
# To test compatibility of gradients with the generic GraphicsContext classes
# uncomment this line
#import wx.lib.graphics as g
#----------------------------------------------------------------------
class GradientPanel(wx.Panel):
... |
41,534 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/GraphicsGradient.py | 201,202 | 90,257 | SetLimits | TestPanel | 202,224 | 202,224 | class TestPanel(scrolled.ScrolledPanel):
"""
The main panel for this sample
"""
def __init__(self, parent, log):
self.log = log
scrolled.ScrolledPanel.__init__(self, parent, -1)
# make the panel that will display the gradient
self.gpanel = GradientPanel(self)
# ... | class TestPanel(scrolled.ScrolledPanel):
"""
The main panel for this sample
"""
def __init__(self, parent, log):
self.log = log
scrolled.ScrolledPanel.__init__(self, parent, -1)
# make the panel that will display the gradient
self.gpanel = GradientPanel(self)
# ... | # Tweak the panels in self.stops to set limits on the allowed
# positions, and to disable those that should not be changed or
# removed.
first = self.stops[0]
last = self.stops[-1]
first.pos.Disable()
first.minusBtn.Disable()
last.pos.Disable()
la... | # Tweak the panels in self.stops to set limits on the allowed
# positions, and to disable those that should not be changed or
# removed.
first = self.stops[0]
last = self.stops[-1]
first.pos.Disable()
first.minusBtn.Disable()
last.pos.Disable()
la... | 54 | 1,720 | 226 | 1,946 | #!/usr/bin/env python
import wx
g = wx
import wx.lib.scrolledpanel as scrolled
# To test compatibility of gradients with the generic GraphicsContext classes
# uncomment this line
#import wx.lib.graphics as g
#----------------------------------------------------------------------
class GradientPanel(wx.Panel):
... | #!/usr/bin/env python
import wx
g = wx
import wx.lib.scrolledpanel as scrolled
# To test compatibility of gradients with the generic GraphicsContext classes
# uncomment this line
#import wx.lib.graphics as g
#----------------------------------------------------------------------
class GradientPanel(wx.Panel):
... |
41,535 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/Grid.py | 46,47 | 1,96 | runTest | 47,54 | 47,54 | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
buttonDefs = {
814 : ('GridSimple', ' Simple wx.Grid, catching all events '),
815 : ('GridStdEdRend', ' wx.Grid showing Editors and Renderers '),
818 : ('GridHugeTable', ' A wx.Grid with ... | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
buttonDefs = {
814 : ('GridSimple', ' Simple wx.Grid, catching all events '),
815 : ('GridStdEdRend', ' wx.Grid showing Editors and Renderers '),
818 : ('GridHugeTable', ' A wx.Grid with ... | win = ButtonPanel(nb, log)
return win
#---------------------------------------------------------------------------
| win = ButtonPanel(nb, log)
return win
#---------------------------------------------------------------------------
| 7 | 936 | 30 | 966 | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
buttonDefs = {
814 : ('GridSimple', ' Simple wx.Grid, catching all events '),
815 : ('GridStdEdRend', ' wx.Grid showing Editors and Renderers '),
818 : ('GridHugeTable', ' A wx.Grid with ... | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
buttonDefs = {
814 : ('GridSimple', ' Simple wx.Grid, catching all events '),
815 : ('GridStdEdRend', ' wx.Grid showing Editors and Renderers '),
818 : ('GridHugeTable', ' A wx.Grid with ... | |
41,536 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/Grid.py | 37,38 | 19,46 | OnButton | ButtonPanel | 38,46 | 38,46 | class ButtonPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
box = wx.BoxSizer(wx.VERTICAL)
box.Add((20, 20))
for k in sorted(buttonDefs):
text = buttonDefs[k][1]
btn = wx.Button(self, k, text)
... | class ButtonPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
box = wx.BoxSizer(wx.VERTICAL)
box.Add((20, 20))
for k in sorted(buttonDefs):
text = buttonDefs[k][1]
btn = wx.Button(self, k, text)
... | modName = buttonDefs[evt.GetId()][0]
module = __import__(modName)
frame = module.TestFrame(None, self.log)
frame.Show(True)
#---------------------------------------------------------------------------
| modName = buttonDefs[evt.GetId()][0]
module = __import__(modName)
frame = module.TestFrame(None, self.log)
frame.Show(True)
#---------------------------------------------------------------------------
| 12 | 204 | 66 | 270 | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
buttonDefs = {
814 : ('GridSimple', ' Simple wx.Grid, catching all events '),
815 : ('GridStdEdRend', ' wx.Grid showing Editors and Renderers '),
818 : ('GridHugeTable', ' A wx.Grid with ... | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
buttonDefs = {
814 : ('GridSimple', ' Simple wx.Grid, catching all events '),
815 : ('GridStdEdRend', ' wx.Grid showing Editors and Renderers '),
818 : ('GridHugeTable', ' A wx.Grid with ... |
41,539 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/ImageAlpha.py | 59,60 | 1,88 | runTest | 60,67 | 60,67 | #!/usr/bin/env python
import wx
from Main import opj
#----------------------------------------------------------------------
msg = "Some text will appear mixed in the image's shadow..."
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1... | #!/usr/bin/env python
import wx
from Main import opj
#----------------------------------------------------------------------
msg = "Some text will appear mixed in the image's shadow..."
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1... | win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| 7 | 735 | 30 | 765 | #!/usr/bin/env python
import wx
from Main import opj
#----------------------------------------------------------------------
msg = "Some text will appear mixed in the image's shadow..."
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1... | #!/usr/bin/env python
import wx
from Main import opj
#----------------------------------------------------------------------
msg = "Some text will appear mixed in the image's shadow..."
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1... | |
41,540 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/ImageAlpha.py | 19,20 | 11,59 | OnPaint | TestPanel | 20,59 | 20,59 | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
self.Bind(wx.EVT_PAINT, self.OnPaint)
def OnPaint(self, evt):
FILL_FUNC_BODY | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
self.Bind(wx.EVT_PAINT, self.OnPaint)
def OnPaint(self, evt):
FILL_FUNC_BODY | dc = wx.PaintDC(self)
dc.SetBackground(wx.Brush("WHITE"))
dc.Clear()
dc.SetFont(wx.Font(16, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, True))
dc.DrawText("Bitmap alpha blending (on all ports but gtk+ 1.2)",
25,25)
bmp = wx.Bitmap(o... | dc = wx.PaintDC(self)
dc.SetBackground(wx.Brush("WHITE"))
dc.Clear()
dc.SetFont(wx.Font(16, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, True))
dc.DrawText("Bitmap alpha blending (on all ports but gtk+ 1.2)",
25,25)
bmp = wx.Bitmap(o... | 116 | 88 | 441 | 529 | #!/usr/bin/env python
import wx
from Main import opj
#----------------------------------------------------------------------
msg = "Some text will appear mixed in the image's shadow..."
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1... | #!/usr/bin/env python
import wx
from Main import opj
#----------------------------------------------------------------------
msg = "Some text will appear mixed in the image's shadow..."
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1... |
41,541 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/ImageBrowser.py | 55,56 | 1,71 | runTest | 56,63 | 56,63 | #!/usr/bin/env python
#----------------------------------------------------------------------------
# Name: ImageBrowser.py
# Purpose: Image Selection dialog for wxPython demo
#
# Author: Lorne White (email: lorne.white@telusplanet.net)
#
# Version 0.5
# Date: Feb 26, 2001
# Licence: ... | #!/usr/bin/env python
#----------------------------------------------------------------------------
# Name: ImageBrowser.py
# Purpose: Image Selection dialog for wxPython demo
#
# Author: Lorne White (email: lorne.white@telusplanet.net)
#
# Version 0.5
# Date: Feb 26, 2001
# Licence: ... | win = TestPanel(nb, log)
return win
#---------------------------------------------------------------------------
| win = TestPanel(nb, log)
return win
#---------------------------------------------------------------------------
| 7 | 481 | 30 | 511 | #!/usr/bin/env python
#----------------------------------------------------------------------------
# Name: ImageBrowser.py
# Purpose: Image Selection dialog for wxPython demo
#
# Author: Lorne White (email: lorne.white@telusplanet.net)
#
# Version 0.5
# Date: Feb 26, 2001
# Licence: ... | #!/usr/bin/env python
#----------------------------------------------------------------------------
# Name: ImageBrowser.py
# Purpose: Image Selection dialog for wxPython demo
#
# Author: Lorne White (email: lorne.white@telusplanet.net)
#
# Version 0.5
# Date: Feb 26, 2001
# Licence: ... | |
41,542 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/ImageBrowser.py | 31,32 | 22,55 | OnButton | TestPanel | 32,55 | 32,55 | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show an ImageDialog", (50,50))
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
def OnButton(self, evt):
FILL_FUNC_BODY | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show an ImageDialog", (50,50))
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
def OnButton(self, evt):
FILL_FUNC_BODY | # get current working directory
dir = os.getcwd()
# set the initial directory for the demo bitmaps
initial_dir = os.path.join(dir, 'bitmaps')
# open the image browser dialog
dlg = ib.ImageDialog(self, initial_dir)
dlg.Centre()
if dlg.ShowModal() == wx.... | # get current working directory
dir = os.getcwd()
# set the initial directory for the demo bitmaps
initial_dir = os.path.join(dir, 'bitmaps')
# open the image browser dialog
dlg = ib.ImageDialog(self, initial_dir)
dlg.Centre()
if dlg.ShowModal() == wx.... | 53 | 117 | 189 | 306 | #!/usr/bin/env python
#----------------------------------------------------------------------------
# Name: ImageBrowser.py
# Purpose: Image Selection dialog for wxPython demo
#
# Author: Lorne White (email: lorne.white@telusplanet.net)
#
# Version 0.5
# Date: Feb 26, 2001
# Licence: ... | #!/usr/bin/env python
#----------------------------------------------------------------------------
# Name: ImageBrowser.py
# Purpose: Image Selection dialog for wxPython demo
#
# Author: Lorne White (email: lorne.white@telusplanet.net)
#
# Version 0.5
# Date: Feb 26, 2001
# Licence: ... |
41,543 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/ImageFromStream.py | 33,34 | 1,50 | runTest | 34,40 | 34,40 | #!/usr/bin/env python
# Tags: phoenix-port, py3-port
from six import BytesIO
import wx
from Main import opj
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
with open(opj('bit... | #!/usr/bin/env python
# Tags: phoenix-port, py3-port
from six import BytesIO
import wx
from Main import opj
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
with open(opj('bit... | win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| 7 | 352 | 28 | 380 | #!/usr/bin/env python
# Tags: phoenix-port, py3-port
from six import BytesIO
import wx
from Main import opj
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
with open(opj('bit... | #!/usr/bin/env python
# Tags: phoenix-port, py3-port
from six import BytesIO
import wx
from Main import opj
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
with open(opj('bit... | |
41,544 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/Img2PyArtProvider.py | 71,72 | 1,100 | runTest | 72,79 | 72,79 | #!/usr/bin/env python
import wx
from wx.lib.art import flagart, img2pyartprov
FlagArtProvider = None
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
siz... | #!/usr/bin/env python
import wx
from wx.lib.art import flagart, img2pyartprov
FlagArtProvider = None
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
siz... | win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| 7 | 978 | 30 | 1,008 | #!/usr/bin/env python
import wx
from wx.lib.art import flagart, img2pyartprov
FlagArtProvider = None
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
siz... | #!/usr/bin/env python
import wx
from wx.lib.art import flagart, img2pyartprov
FlagArtProvider = None
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
siz... | |
41,545 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/Img2PyArtProvider.py | 49,50 | 10,71 | OnSelectCountry | TestPanel | 50,55 | 50,55 | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
sizer = wx.BoxSizer(wx.VERTICAL)
self.SetSizer(sizer)
title = wx.StaticText(self, -1, "Img2PyArtProvider")
title.SetFont(wx.Font(18, wx.FONTFAMILY_SWISS, w... | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
sizer = wx.BoxSizer(wx.VERTICAL)
self.SetSizer(sizer)
title = wx.StaticText(self, -1, "Img2PyArtProvider")
title.SetFont(wx.Font(18, wx.FONTFAMILY_SWISS, w... | self.log.write("OnSelectCountry\n")
self.country = evt.GetString()
self.getArt()
| self.log.write("OnSelectCountry\n")
self.country = evt.GetString()
self.getArt()
| 5 | 735 | 40 | 775 | #!/usr/bin/env python
import wx
from wx.lib.art import flagart, img2pyartprov
FlagArtProvider = None
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
siz... | #!/usr/bin/env python
import wx
from wx.lib.art import flagart, img2pyartprov
FlagArtProvider = None
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
siz... |
41,546 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/InfoBar.py | 91,92 | 1,128 | runTest | 92,99 | 92,99 | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
flags = [ (wx.ICON_NONE, "ICON_NONE"),
(wx.ICON_INFORMATION, "ICON_INFORMATION"),
(wx.ICON_QUESTION, "ICON_QUESTION"),
(wx.ICON_WARNING, "ICON_WARNING"),
(wx.I... | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
flags = [ (wx.ICON_NONE, "ICON_NONE"),
(wx.ICON_INFORMATION, "ICON_INFORMATION"),
(wx.ICON_QUESTION, "ICON_QUESTION"),
(wx.ICON_WARNING, "ICON_WARNING"),
(wx.I... | win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| 7 | 1,379 | 30 | 1,409 | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
flags = [ (wx.ICON_NONE, "ICON_NONE"),
(wx.ICON_INFORMATION, "ICON_INFORMATION"),
(wx.ICON_QUESTION, "ICON_QUESTION"),
(wx.ICON_WARNING, "ICON_WARNING"),
(wx.I... | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
flags = [ (wx.ICON_NONE, "ICON_NONE"),
(wx.ICON_INFORMATION, "ICON_INFORMATION"),
(wx.ICON_QUESTION, "ICON_QUESTION"),
(wx.ICON_WARNING, "ICON_WARNING"),
(wx.I... | |
41,547 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/InfoBar.py | 80,81 | 15,91 | OnButtonClicked | TestPanel | 81,91 | 81,91 | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
# Create the InfoBar. It starts out in a hidden state so it
# won't be visible until we need it.
self.info = wx.InfoBar(self)
panel = wx.Panel(self)
... | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
# Create the InfoBar. It starts out in a hidden state so it
# won't be visible until we need it.
self.info = wx.InfoBar(self)
panel = wx.Panel(self)
... | wx.MessageBox("New button clicked")
# Calling evt.Skip() will allow the default handler to run
# which will dismiss the info bar. If you don't want it to be
# dismissed for a particular button then then don't call
# Skip().
evt.Skip()
#---------------------------------... | wx.MessageBox("New button clicked")
# Calling evt.Skip() will allow the default handler to run
# which will dismiss the info bar. If you don't want it to be
# dismissed for a particular button then then don't call
# Skip().
evt.Skip()
#---------------------------------... | 41 | 878 | 92 | 970 | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
flags = [ (wx.ICON_NONE, "ICON_NONE"),
(wx.ICON_INFORMATION, "ICON_INFORMATION"),
(wx.ICON_QUESTION, "ICON_QUESTION"),
(wx.ICON_WARNING, "ICON_WARNING"),
(wx.I... | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
flags = [ (wx.ICON_NONE, "ICON_NONE"),
(wx.ICON_INFORMATION, "ICON_INFORMATION"),
(wx.ICON_QUESTION, "ICON_QUESTION"),
(wx.ICON_WARNING, "ICON_WARNING"),
(wx.I... |
41,549 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/IntCtrl.py | 79,80 | 8,129 | SetTargetMinMax | TestPanel | 80,112 | 80,112 | class TestPanel( wx.Panel ):
def __init__( self, parent, log ):
wx.Panel.__init__( self, parent, -1 )
self.log = log
panel = wx.Panel( self, -1 )
self.set_min = wx.CheckBox( panel, -1, "Set minimum value:" )
self.min = wx.lib.intctrl.IntCtrl( panel, size=( 50, -1 ) )
... | class TestPanel( wx.Panel ):
def __init__( self, parent, log ):
wx.Panel.__init__( self, parent, -1 )
self.log = log
panel = wx.Panel( self, -1 )
self.set_min = wx.CheckBox( panel, -1, "Set minimum value:" )
self.min = wx.lib.intctrl.IntCtrl( panel, size=( 50, -1 ) )
... | min = max = None
self.target_ctl.SetLimited( self.limit_target.GetValue() )
if self.set_min.GetValue():
min = self.min.GetValue()
if self.set_max.GetValue():
max = self.max.GetValue()
cur_min, cur_max = self.target_ctl.GetBounds()
if min != cur... | min = max = None
self.target_ctl.SetLimited( self.limit_target.GetValue() )
if self.set_min.GetValue():
min = self.min.GetValue()
if self.set_max.GetValue():
max = self.max.GetValue()
cur_min, cur_max = self.target_ctl.GetBounds()
if min != cur... | 114 | 1,394 | 437 | 1,831 | #!/usr/bin/env python
import wx
import wx.lib.intctrl
#----------------------------------------------------------------------
class TestPanel( wx.Panel ):
def __init__( self, parent, log ):
wx.Panel.__init__( self, parent, -1 )
self.log = log
panel = wx.Panel( self, -1 )
self.se... | #!/usr/bin/env python
import wx
import wx.lib.intctrl
#----------------------------------------------------------------------
class TestPanel( wx.Panel ):
def __init__( self, parent, log ):
wx.Panel.__init__( self, parent, -1 )
self.log = log
panel = wx.Panel( self, -1 )
self.se... |
41,550 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/ItemsPicker.py | 86,87 | 1,109 | runTest | 87,94 | 87,94 | #!/usr/bin/env python
import wx
from wx.lib.itemspicker import ItemsPicker, \
EVT_IP_SELECTION_CHANGED, \
IP_SORT_CHOICES, IP_SORT_SELECTED,\
IP_REMOVE_FROM_CHOICES
from images import _bp_btn1, _bp_btn2
#---------------------... | #!/usr/bin/env python
import wx
from wx.lib.itemspicker import ItemsPicker, \
EVT_IP_SELECTION_CHANGED, \
IP_SORT_CHOICES, IP_SORT_SELECTED,\
IP_REMOVE_FROM_CHOICES
from images import _bp_btn1, _bp_btn2
#---------------------... | win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| 7 | 1,217 | 30 | 1,247 | #!/usr/bin/env python
import wx
from wx.lib.itemspicker import ItemsPicker, \
EVT_IP_SELECTION_CHANGED, \
IP_SORT_CHOICES, IP_SORT_SELECTED,\
IP_REMOVE_FROM_CHOICES
from images import _bp_btn1, _bp_btn2
#---------------------... | #!/usr/bin/env python
import wx
from wx.lib.itemspicker import ItemsPicker, \
EVT_IP_SELECTION_CHANGED, \
IP_SORT_CHOICES, IP_SORT_SELECTED,\
IP_REMOVE_FROM_CHOICES
from images import _bp_btn1, _bp_btn2
#---------------------... | |
41,551 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/ItemsPicker.py | 73,74 | 43,86 | OnAdd | ItemsPickerDialog | 74,80 | 74,80 | class ItemsPickerDialog(wx.Dialog):
def __init__(self,parent, style, log):
wx.Dialog.__init__(self,parent)
self.log = log
sizer = wx.BoxSizer(wx.VERTICAL)
b = wx.Button(self, -1, "Add Item")
b.Bind(wx.EVT_BUTTON, self.OnAdd)
sizer.Add(b, 0, wx.ALL, 5)
self.ip ... | class ItemsPickerDialog(wx.Dialog):
def __init__(self,parent, style, log):
wx.Dialog.__init__(self,parent)
self.log = log
sizer = wx.BoxSizer(wx.VERTICAL)
b = wx.Button(self, -1, "Add Item")
b.Bind(wx.EVT_BUTTON, self.OnAdd)
sizer.Add(b, 0, wx.ALL, 5)
self.ip ... | items = self.ip.GetItems()
self.itemCount += 1
newItem = "item%d" % self.itemCount
self.ip.SetItems(items + [newItem])
| items = self.ip.GetItems()
self.itemCount += 1
newItem = "item%d" % self.itemCount
self.ip.SetItems(items + [newItem])
| 14 | 513 | 57 | 570 | #!/usr/bin/env python
import wx
from wx.lib.itemspicker import ItemsPicker, \
EVT_IP_SELECTION_CHANGED, \
IP_SORT_CHOICES, IP_SORT_SELECTED,\
IP_REMOVE_FROM_CHOICES
from images import _bp_btn1, _bp_btn2
#---------------------... | #!/usr/bin/env python
import wx
from wx.lib.itemspicker import ItemsPicker, \
EVT_IP_SELECTION_CHANGED, \
IP_SORT_CHOICES, IP_SORT_SELECTED,\
IP_REMOVE_FROM_CHOICES
from images import _bp_btn1, _bp_btn2
#---------------------... |
41,552 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/ItemsPicker.py | 31,32 | 12,43 | Go | TestPanel | 32,43 | 32,43 | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
sizer = wx.BoxSizer(wx.HORIZONTAL)
box = wx.StaticBox(self,-1,"ItemPicker styles")
boxSizer = wx.StaticBoxSizer(box,wx.VERTICAL)
self.sortChoices = wx.CheckB... | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
sizer = wx.BoxSizer(wx.HORIZONTAL)
box = wx.StaticBox(self,-1,"ItemPicker styles")
boxSizer = wx.StaticBoxSizer(box,wx.VERTICAL)
self.sortChoices = wx.CheckB... | style = 0
if self.sortChoices.GetValue():
style |= IP_SORT_CHOICES
if self.sortSelected.GetValue():
style |= IP_SORT_SELECTED
if self.removeFromChoices.GetValue():
style |= IP_REMOVE_FROM_CHOICES
d = ItemsPickerDialog(self, style, self.log)
... | style = 0
if self.sortChoices.GetValue():
style |= IP_SORT_CHOICES
if self.sortSelected.GetValue():
style |= IP_SORT_SELECTED
if self.removeFromChoices.GetValue():
style |= IP_REMOVE_FROM_CHOICES
d = ItemsPickerDialog(self, style, self.log)
... | 24 | 327 | 119 | 446 | #!/usr/bin/env python
import wx
from wx.lib.itemspicker import ItemsPicker, \
EVT_IP_SELECTION_CHANGED, \
IP_SORT_CHOICES, IP_SORT_SELECTED,\
IP_REMOVE_FROM_CHOICES
from images import _bp_btn1, _bp_btn2
#---------------------... | #!/usr/bin/env python
import wx
from wx.lib.itemspicker import ItemsPicker, \
EVT_IP_SELECTION_CHANGED, \
IP_SORT_CHOICES, IP_SORT_SELECTED,\
IP_REMOVE_FROM_CHOICES
from images import _bp_btn1, _bp_btn2
#---------------------... |
41,554 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/KeyEvents.py | 304,305 | 232,334 | CopyLog | KeyLog | 305,334 | 305,334 | class KeyLog(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin):
colHeaders = [ "Event Type",
"Key Name",
"Key Code",
"Modifiers",
"Unicode",
"UniChr",
"RawKeyCode",
"RawKeyFlags",
... | class KeyLog(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin):
colHeaders = [ "Event Type",
"Key Name",
"Key Code",
"Modifiers",
"Unicode",
"UniChr",
"RawKeyCode",
"RawKeyFlags",
... | # build a newline and tab delimited string to put into the clipboard
if "unicode" in wx.PlatformInfo:
st = u""
else:
st = ""
for h in self.colHeaders:
st += h + "\t"
st += "\n"
for idx in range(self.GetItemCount()):
for col... | # build a newline and tab delimited string to put into the clipboard
if "unicode" in wx.PlatformInfo:
st = u""
else:
st = ""
for h in self.colHeaders:
st += h + "\t"
st += "\n"
for idx in range(self.GetItemCount()):
for col... | 72 | 744 | 253 | 997 | #!/usr/bin/env python
import wx
import wx.lib.mixins.listctrl as listmix
from six import unichr
#----------------------------------------------------------------------
keyMap = {
wx.WXK_BACK : "WXK_BACK",
wx.WXK_TAB : "WXK_TAB",
wx.WXK_RETURN : "WXK_RETURN",
wx.WXK_ESCAPE : "WXK_ESCAPE",
wx.WXK_S... | #!/usr/bin/env python
import wx
import wx.lib.mixins.listctrl as listmix
from six import unichr
#----------------------------------------------------------------------
keyMap = {
wx.WXK_BACK : "WXK_BACK",
wx.WXK_TAB : "WXK_TAB",
wx.WXK_RETURN : "WXK_RETURN",
wx.WXK_ESCAPE : "WXK_ESCAPE",
wx.WXK_S... |
41,555 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/KeyEvents.py | 200,201 | 149,232 | OnSetFocus | KeySink | 201,204 | 201,204 | class KeySink(wx.Window):
def __init__(self, parent):
wx.Window.__init__(self, parent, -1, style=wx.WANTS_CHARS
#| wx.RAISED_BORDER
#| wx.SUNKEN_BORDER
, name="sink")
self.SetBackgroundColour(wx.BLUE)
self.haveFo... | class KeySink(wx.Window):
def __init__(self, parent):
wx.Window.__init__(self, parent, -1, style=wx.WANTS_CHARS
#| wx.RAISED_BORDER
#| wx.SUNKEN_BORDER
, name="sink")
self.SetBackgroundColour(wx.BLUE)
self.haveFo... | self.haveFocus = True
self.Refresh()
| self.haveFocus = True
self.Refresh()
| 4 | 811 | 19 | 830 | #!/usr/bin/env python
import wx
import wx.lib.mixins.listctrl as listmix
from six import unichr
#----------------------------------------------------------------------
keyMap = {
wx.WXK_BACK : "WXK_BACK",
wx.WXK_TAB : "WXK_TAB",
wx.WXK_RETURN : "WXK_RETURN",
wx.WXK_ESCAPE : "WXK_ESCAPE",
wx.WXK_S... | #!/usr/bin/env python
import wx
import wx.lib.mixins.listctrl as listmix
from six import unichr
#----------------------------------------------------------------------
keyMap = {
wx.WXK_BACK : "WXK_BACK",
wx.WXK_TAB : "WXK_TAB",
wx.WXK_RETURN : "WXK_RETURN",
wx.WXK_ESCAPE : "WXK_ESCAPE",
wx.WXK_S... |
41,556 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/KeyEvents.py | 399,400 | 334,405 | OnCharCB | TestPanel | 400,405 | 400,405 | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1, style=0)
self.keysink = KeySink(self)
self.keysink.SetMinSize((100, 65))
self.keylog = KeyLog(self)
btn = wx.Button(self, -1, "Clear", style=wx.BU_EXACTFIT)... | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1, style=0)
self.keysink = KeySink(self)
self.keysink.SetMinSize((100, 65))
self.keylog = KeyLog(self)
btn = wx.Button(self, -1, "Clear", style=wx.BU_EXACTFIT)... | self.keysink.SetLogChar(evt.GetInt())
#----------------------------------------------------------------------
| self.keysink.SetLogChar(evt.GetInt())
#----------------------------------------------------------------------
| 2 | 909 | 29 | 938 | #!/usr/bin/env python
import wx
import wx.lib.mixins.listctrl as listmix
from six import unichr
#----------------------------------------------------------------------
keyMap = {
wx.WXK_BACK : "WXK_BACK",
wx.WXK_TAB : "WXK_TAB",
wx.WXK_RETURN : "WXK_RETURN",
wx.WXK_ESCAPE : "WXK_ESCAPE",
wx.WXK_S... | #!/usr/bin/env python
import wx
import wx.lib.mixins.listctrl as listmix
from six import unichr
#----------------------------------------------------------------------
keyMap = {
wx.WXK_BACK : "WXK_BACK",
wx.WXK_TAB : "WXK_TAB",
wx.WXK_RETURN : "WXK_RETURN",
wx.WXK_ESCAPE : "WXK_ESCAPE",
wx.WXK_S... |
41,557 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/LEDNumberCtrl.py | 50,51 | 1,122 | runTest | 51,56 | 51,56 | #!/usr/bin/env python
import time
import wx
import wx.lib.gizmos as gizmos # Formerly wx.gizmos in Classic
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
... | #!/usr/bin/env python
import time
import wx
import wx.lib.gizmos as gizmos # Formerly wx.gizmos in Classic
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
... | win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| 7 | 1,082 | 26 | 1,108 | #!/usr/bin/env python
import time
import wx
import wx.lib.gizmos as gizmos # Formerly wx.gizmos in Classic
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
... | #!/usr/bin/env python
import time
import wx
import wx.lib.gizmos as gizmos # Formerly wx.gizmos in Classic
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
... | |
41,558 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/LEDNumberCtrl.py | 37,38 | 10,50 | OnTimer | TestPanel | 38,43 | 38,43 | class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
led = gizmos.LEDNumberCtrl(self, -1, (25,25), (280, 50))
led.SetValue("012.34")
led = gizmos.LEDNumberCtrl(self, -1, (25,100), (280, 50))
led.SetValue("567... | class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
led = gizmos.LEDNumberCtrl(self, -1, (25,25), (280, 50))
led.SetValue("012.34")
led = gizmos.LEDNumberCtrl(self, -1, (25,100), (280, 50))
led.SetValue("567... | t = time.localtime(time.time())
st = time.strftime("%H:%M:%S", t)
self.clock.SetValue(st)
| t = time.localtime(time.time())
st = time.strftime("%H:%M:%S", t)
self.clock.SetValue(st)
| 8 | 388 | 52 | 440 | #!/usr/bin/env python
import time
import wx
import wx.lib.gizmos as gizmos # Formerly wx.gizmos in Classic
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
... | #!/usr/bin/env python
import time
import wx
import wx.lib.gizmos as gizmos # Formerly wx.gizmos in Classic
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1)
self.log = log
... |
41,560 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/LayoutAnchors.py | 31,32 | 27,179 | _init_ctrls | AnchorsDemoFrame | 32,161 | 32,161 | class AnchorsDemoFrame(wx.Frame):
def _init_utils(self):
pass
def _init_ctrls(self, prnt):
FILL_FUNC_BODY def __init__(self, parent):
self._init_ctrls(parent)
# Based on the values of the above checkboxes, we will adjust the layout constraints
# on the sample window whenever one of ... | class AnchorsDemoFrame(wx.Frame):
def _init_utils(self):
pass
def _init_ctrls(self, prnt):
FILL_FUNC_BODY def __init__(self, parent):
self._init_ctrls(parent)
# Based on the values of the above checkboxes, we will adjust the layout constraints
# on the sample window whenever one of ... | wx.Frame.__init__(
self, size=(328, 187), id=ID_ANCHORSDEMOFRAME,
title='LayoutAnchors Demonstration', parent=prnt,
name='AnchorsDemoFrame',
style = wx.DEFAULT_FRAME_STYLE | wx.CLIP_CHILDREN, pos=(261, 123)
)
self._init_utils()
self.m... | wx.Frame.__init__(
self, size=(328, 187), id=ID_ANCHORSDEMOFRAME,
title='LayoutAnchors Demonstration', parent=prnt,
name='AnchorsDemoFrame',
style = wx.DEFAULT_FRAME_STYLE | wx.CLIP_CHILDREN, pos=(261, 123)
)
self._init_utils()
self.m... | 232 | 222 | 1,659 | 1,881 | #!/usr/bin/env python
import wx
import wx.lib.anchors as anchors
#----------------------------------------------------------------------
# Nifty little trick here; apply wx.NewIdRef() to generate a series of
# IDs used later on in the app.
[ ID_ANCHORSDEMOFRAMEANCHOREDPANEL,
ID_ANCHORSDEMOFRAMEHELPSTATICTEXT,... | #!/usr/bin/env python
import wx
import wx.lib.anchors as anchors
#----------------------------------------------------------------------
# Nifty little trick here; apply wx.NewIdRef() to generate a series of
# IDs used later on in the app.
[ ID_ANCHORSDEMOFRAMEANCHOREDPANEL,
ID_ANCHORSDEMOFRAMEHELPSTATICTEXT,... |
41,561 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/LayoutAnchors.py | 188,189 | 179,196 | OnButton | TestPanel | 189,196 | 189,196 | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Show the LayoutAnchors sample", (50,50))
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
def OnButton(self, evt):
FILL_FUNC_BODY | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Show the LayoutAnchors sample", (50,50))
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
def OnButton(self, evt):
FILL_FUNC_BODY | win = AnchorsDemoFrame(self)
win.Show(True)
#---------------------------------------------------------------------------
| win = AnchorsDemoFrame(self)
win.Show(True)
#---------------------------------------------------------------------------
| 5 | 119 | 36 | 155 | #!/usr/bin/env python
import wx
import wx.lib.anchors as anchors
#----------------------------------------------------------------------
# Nifty little trick here; apply wx.NewIdRef() to generate a series of
# IDs used later on in the app.
[ ID_ANCHORSDEMOFRAMEANCHOREDPANEL,
ID_ANCHORSDEMOFRAMEHELPSTATICTEXT,... | #!/usr/bin/env python
import wx
import wx.lib.anchors as anchors
#----------------------------------------------------------------------
# Nifty little trick here; apply wx.NewIdRef() to generate a series of
# IDs used later on in the app.
[ ID_ANCHORSDEMOFRAMEANCHOREDPANEL,
ID_ANCHORSDEMOFRAMEHELPSTATICTEXT,... |
41,562 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/LayoutConstraints.py | 98,99 | 1,150 | runTest | 99,106 | 99,106 | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class TestLayoutConstraints(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent, -1)
self.SetAutoLayout(True)
self.Bind(wx.EVT_BUTTON, self.OnButton, id=100)
... | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class TestLayoutConstraints(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent, -1)
self.SetAutoLayout(True)
self.Bind(wx.EVT_BUTTON, self.OnButton, id=100)
... | win = TestLayoutConstraints(nb)
return win
#---------------------------------------------------------------------------
| win = TestLayoutConstraints(nb)
return win
#---------------------------------------------------------------------------
| 6 | 1,613 | 30 | 1,643 | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class TestLayoutConstraints(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent, -1)
self.SetAutoLayout(True)
self.Bind(wx.EVT_BUTTON, self.OnButton, id=100)
... | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class TestLayoutConstraints(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent, -1)
self.SetAutoLayout(True)
self.Bind(wx.EVT_BUTTON, self.OnButton, id=100)
... | |
41,563 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/LayoutConstraints.py | 92,93 | 7,98 | OnButton | TestLayoutConstraints | 93,98 | 93,98 | class TestLayoutConstraints(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent, -1)
self.SetAutoLayout(True)
self.Bind(wx.EVT_BUTTON, self.OnButton, id=100)
self.SetBackgroundColour(wx.Colour("MEDIUM ORCHID"))
self.panelA = wx.Window(self, -1, style=wx.SI... | class TestLayoutConstraints(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent, -1)
self.SetAutoLayout(True)
self.Bind(wx.EVT_BUTTON, self.OnButton, id=100)
self.SetBackgroundColour(wx.Colour("MEDIUM ORCHID"))
self.panelA = wx.Window(self, -1, style=wx.SI... | wx.Bell()
#---------------------------------------------------------------------------
| wx.Bell()
#---------------------------------------------------------------------------
| 2 | 1,201 | 19 | 1,220 | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class TestLayoutConstraints(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent, -1)
self.SetAutoLayout(True)
self.Bind(wx.EVT_BUTTON, self.OnButton, id=100)
... | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class TestLayoutConstraints(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent, -1)
self.SetAutoLayout(True)
self.Bind(wx.EVT_BUTTON, self.OnButton, id=100)
... |
41,564 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/Layoutf.py | 57,58 | 1,70 | runTest | 58,63 | 58,63 | #!/usr/bin/env python
import wx
import wx.lib.layoutf as layoutf
#---------------------------------------------------------------------------
class TestLayoutf(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent, -1)
self.SetAutoLayout(True)
self.Bind(wx.EVT_BUTTON, sel... | #!/usr/bin/env python
import wx
import wx.lib.layoutf as layoutf
#---------------------------------------------------------------------------
class TestLayoutf(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent, -1)
self.SetAutoLayout(True)
self.Bind(wx.EVT_BUTTON, sel... | win = TestLayoutf(nb)
return win
#---------------------------------------------------------------------------
| win = TestLayoutf(nb)
return win
#---------------------------------------------------------------------------
| 6 | 858 | 25 | 883 | #!/usr/bin/env python
import wx
import wx.lib.layoutf as layoutf
#---------------------------------------------------------------------------
class TestLayoutf(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent, -1)
self.SetAutoLayout(True)
self.Bind(wx.EVT_BUTTON, sel... | #!/usr/bin/env python
import wx
import wx.lib.layoutf as layoutf
#---------------------------------------------------------------------------
class TestLayoutf(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent, -1)
self.SetAutoLayout(True)
self.Bind(wx.EVT_BUTTON, sel... | |
41,565 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/Layoutf.py | 50,51 | 8,57 | OnButton | TestLayoutf | 51,57 | 51,57 | class TestLayoutf(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent, -1)
self.SetAutoLayout(True)
self.Bind(wx.EVT_BUTTON, self.OnButton)
self.panelA = wx.Window(self, -1, style=wx.SIMPLE_BORDER)
self.panelA.SetBackgroundColour(wx.BLUE)
self.pane... | class TestLayoutf(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent, -1)
self.SetAutoLayout(True)
self.Bind(wx.EVT_BUTTON, self.OnButton)
self.panelA = wx.Window(self, -1, style=wx.SIMPLE_BORDER)
self.panelA.SetBackgroundColour(wx.BLUE)
self.pane... | wx.Bell()
#---------------------------------------------------------------------------
| wx.Bell()
#---------------------------------------------------------------------------
| 2 | 737 | 21 | 758 | #!/usr/bin/env python
import wx
import wx.lib.layoutf as layoutf
#---------------------------------------------------------------------------
class TestLayoutf(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent, -1)
self.SetAutoLayout(True)
self.Bind(wx.EVT_BUTTON, sel... | #!/usr/bin/env python
import wx
import wx.lib.layoutf as layoutf
#---------------------------------------------------------------------------
class TestLayoutf(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent, -1)
self.SetAutoLayout(True)
self.Bind(wx.EVT_BUTTON, sel... |
41,566 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/ListBox.py | 141,142 | 1,165 | runTest | 142,149 | 142,149 | #!/usr/bin/env python
# Tags: phoenix-port, py3-port
import wx
#---------------------------------------------------------------------------
# This listbox subclass lets you type the starting letters of what you want to
# select, and scrolls the list to the match if it is found.
class FindPrefixListBox(wx.ListBox):
... | #!/usr/bin/env python
# Tags: phoenix-port, py3-port
import wx
#---------------------------------------------------------------------------
# This listbox subclass lets you type the starting letters of what you want to
# select, and scrolls the list to the match if it is found.
class FindPrefixListBox(wx.ListBox):
... | win = TestListBox(nb, log)
return win
#---------------------------------------------------------------------------
| win = TestListBox(nb, log)
return win
#---------------------------------------------------------------------------
| 7 | 1,815 | 31 | 1,846 | #!/usr/bin/env python
# Tags: phoenix-port, py3-port
import wx
#---------------------------------------------------------------------------
# This listbox subclass lets you type the starting letters of what you want to
# select, and scrolls the list to the match if it is found.
class FindPrefixListBox(wx.ListBox):
... | #!/usr/bin/env python
# Tags: phoenix-port, py3-port
import wx
#---------------------------------------------------------------------------
# This listbox subclass lets you type the starting letters of what you want to
# select, and scrolls the list to the match if it is found.
class FindPrefixListBox(wx.ListBox):
... | |
41,567 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/ListBox.py | 19,20 | 10,69 | FindPrefix | FindPrefixListBox | 20,39 | 20,39 | class FindPrefixListBox(wx.ListBox):
def __init__(self, parent, id, pos=wx.DefaultPosition, size=wx.DefaultSize,
choices=[], style=0, validator=wx.DefaultValidator):
wx.ListBox.__init__(self, parent, id, pos, size, choices, style, validator)
self.typedText = ''
self.log = pa... | class FindPrefixListBox(wx.ListBox):
def __init__(self, parent, id, pos=wx.DefaultPosition, size=wx.DefaultSize,
choices=[], style=0, validator=wx.DefaultValidator):
wx.ListBox.__init__(self, parent, id, pos, size, choices, style, validator)
self.typedText = ''
self.log = pa... | self.log.WriteText('Looking for prefix: %s\n' % prefix)
if prefix:
prefix = prefix.lower()
length = len(prefix)
# Changed in 2.5 because ListBox.Number() is no longer supported.
# ListBox.GetCount() is now the appropriate way to go.
for x in ... | self.log.WriteText('Looking for prefix: %s\n' % prefix)
if prefix:
prefix = prefix.lower()
length = len(prefix)
# Changed in 2.5 because ListBox.Number() is no longer supported.
# ListBox.GetCount() is now the appropriate way to go.
for x in ... | 64 | 366 | 196 | 562 | #!/usr/bin/env python
# Tags: phoenix-port, py3-port
import wx
#---------------------------------------------------------------------------
# This listbox subclass lets you type the starting letters of what you want to
# select, and scrolls the list to the match if it is found.
class FindPrefixListBox(wx.ListBox):
... | #!/usr/bin/env python
# Tags: phoenix-port, py3-port
import wx
#---------------------------------------------------------------------------
# This listbox subclass lets you type the starting letters of what you want to
# select, and scrolls the list to the match if it is found.
class FindPrefixListBox(wx.ListBox):
... |
41,568 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/ListBox.py | 107,108 | 69,141 | EvtListBox | TestListBox | 108,121 | 108,121 | class TestListBox(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
sampleList = ['zero', 'one', 'two', 'three', 'four', 'five',
'six', 'seven', 'eight', 'nine', 'ten', 'eleven',
'twelve', 'thirteen', '... | class TestListBox(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
sampleList = ['zero', 'one', 'two', 'three', 'four', 'five',
'six', 'seven', 'eight', 'nine', 'ten', 'eleven',
'twelve', 'thirteen', '... | self.log.WriteText('EvtListBox: %s, %s, %s\n' %
(event.GetString(),
event.IsSelection(),
event.GetSelection()
# event.GetClientData()
))
lb = event.GetEventObject()... | self.log.WriteText('EvtListBox: %s, %s, %s\n' %
(event.GetString(),
event.IsSelection(),
event.GetSelection()
# event.GetClientData()
))
lb = event.GetEventObject()... | 29 | 918 | 136 | 1,054 | #!/usr/bin/env python
# Tags: phoenix-port, py3-port
import wx
#---------------------------------------------------------------------------
# This listbox subclass lets you type the starting letters of what you want to
# select, and scrolls the list to the match if it is found.
class FindPrefixListBox(wx.ListBox):
... | #!/usr/bin/env python
# Tags: phoenix-port, py3-port
import wx
#---------------------------------------------------------------------------
# This listbox subclass lets you type the starting letters of what you want to
# select, and scrolls the list to the match if it is found.
class FindPrefixListBox(wx.ListBox):
... |
41,571 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/ListCtrl_edit.py | 121,122 | 1,156 | runTest | 122,128 | 122,128 | #!/usr/bin/env python
#----------------------------------------------------------------------------
# Name: ListCtrl_edit.py
# Purpose: Testing editing a ListCtrl
#
# Author: Pim van Heuven
#
# Created: 2004/10/15
# Copyright: (c) Pim Van Heuven
# Licence: wxWindows license
#-----------... | #!/usr/bin/env python
#----------------------------------------------------------------------------
# Name: ListCtrl_edit.py
# Purpose: Testing editing a ListCtrl
#
# Author: Pim van Heuven
#
# Created: 2004/10/15
# Copyright: (c) Pim Van Heuven
# Licence: wxWindows license
#-----------... | win = TestListCtrlPanel(nb, log)
return win
#---------------------------------------------------------------------------
| win = TestListCtrlPanel(nb, log)
return win
#---------------------------------------------------------------------------
| 7 | 1,528 | 30 | 1,558 | #!/usr/bin/env python
#----------------------------------------------------------------------------
# Name: ListCtrl_edit.py
# Purpose: Testing editing a ListCtrl
#
# Author: Pim van Heuven
#
# Created: 2004/10/15
# Copyright: (c) Pim Van Heuven
# Licence: wxWindows license
#-----------... | #!/usr/bin/env python
#----------------------------------------------------------------------------
# Name: ListCtrl_edit.py
# Purpose: Testing editing a ListCtrl
#
# Author: Pim van Heuven
#
# Created: 2004/10/15
# Copyright: (c) Pim Van Heuven
# Licence: wxWindows license
#-----------... | |
41,572 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/ListCtrl_edit.py | 67,68 | 31,84 | SetStringItem | TestListCtrl | 68,84 | 68,84 | class TestListCtrl(wx.ListCtrl,
listmix.ListCtrlAutoWidthMixin,
listmix.TextEditMixin):
def __init__(self, parent, ID, pos=wx.DefaultPosition,
size=wx.DefaultSize, style=0):
wx.ListCtrl.__init__(self, parent, ID, pos, size, style)
listmix.List... | class TestListCtrl(wx.ListCtrl,
listmix.ListCtrlAutoWidthMixin,
listmix.TextEditMixin):
def __init__(self, parent, ID, pos=wx.DefaultPosition,
size=wx.DefaultSize, style=0):
wx.ListCtrl.__init__(self, parent, ID, pos, size, style)
listmix.List... | if col in range(3):
wx.ListCtrl.SetItem(self, index, col, data)
wx.ListCtrl.SetItem(self, index, 3+col, str(len(data)))
else:
try:
datalen = int(data)
except:
return
wx.ListCtrl.SetItem(self, index, col, data)
... | if col in range(3):
wx.ListCtrl.SetItem(self, index, col, data)
wx.ListCtrl.SetItem(self, index, 3+col, str(len(data)))
else:
try:
datalen = int(data)
except:
return
wx.ListCtrl.SetItem(self, index, col, data)
... | 31 | 438 | 160 | 598 | #!/usr/bin/env python
#----------------------------------------------------------------------------
# Name: ListCtrl_edit.py
# Purpose: Testing editing a ListCtrl
#
# Author: Pim van Heuven
#
# Created: 2004/10/15
# Copyright: (c) Pim Van Heuven
# Licence: wxWindows license
#-----------... | #!/usr/bin/env python
#----------------------------------------------------------------------------
# Name: ListCtrl_edit.py
# Purpose: Testing editing a ListCtrl
#
# Author: Pim van Heuven
#
# Created: 2004/10/15
# Copyright: (c) Pim Van Heuven
# Licence: wxWindows license
#-----------... |
41,573 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/ListCtrl_edit.py | 113,114 | 84,121 | OnUseNative | TestListCtrlPanel | 114,121 | 114,121 | class TestListCtrlPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1, style=wx.WANTS_CHARS)
self.log = log
tID = wx.NewIdRef()
sizer = wx.BoxSizer(wx.VERTICAL)
if wx.Platform == "__WXMAC__" and \
hasattr(wx.GetApp().GetTopWi... | class TestListCtrlPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1, style=wx.WANTS_CHARS)
self.log = log
tID = wx.NewIdRef()
sizer = wx.BoxSizer(wx.VERTICAL)
if wx.Platform == "__WXMAC__" and \
hasattr(wx.GetApp().GetTopWi... | wx.SystemOptions.SetOption("mac.listctrl.always_use_generic", not event.IsChecked())
wx.GetApp().GetTopWindow().LoadDemo("ListCtrl_edit")
#---------------------------------------------------------------------------
| wx.SystemOptions.SetOption("mac.listctrl.always_use_generic", not event.IsChecked())
wx.GetApp().GetTopWindow().LoadDemo("ListCtrl_edit")
#---------------------------------------------------------------------------
| 5 | 390 | 63 | 453 | #!/usr/bin/env python
#----------------------------------------------------------------------------
# Name: ListCtrl_edit.py
# Purpose: Testing editing a ListCtrl
#
# Author: Pim van Heuven
#
# Created: 2004/10/15
# Copyright: (c) Pim Van Heuven
# Licence: wxWindows license
#-----------... | #!/usr/bin/env python
#----------------------------------------------------------------------------
# Name: ListCtrl_edit.py
# Purpose: Testing editing a ListCtrl
#
# Author: Pim van Heuven
#
# Created: 2004/10/15
# Copyright: (c) Pim Van Heuven
# Licence: wxWindows license
#-----------... |
41,574 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/ListCtrl_virtual.py | 124,125 | 1,146 | runTest | 125,131 | 125,131 | #!/usr/bin/env python
import wx
import images
#----------------------------------------------------------------------
class TestVirtualList(wx.ListCtrl):
def __init__(self, parent, log):
wx.ListCtrl.__init__(
self, parent, -1,
style=wx.LC_REPORT|wx.LC_VIRTUAL|wx.LC_HRULES|wx.LC_VR... | #!/usr/bin/env python
import wx
import images
#----------------------------------------------------------------------
class TestVirtualList(wx.ListCtrl):
def __init__(self, parent, log):
wx.ListCtrl.__init__(
self, parent, -1,
style=wx.LC_REPORT|wx.LC_VIRTUAL|wx.LC_HRULES|wx.LC_VR... | win = TestVirtualListPanel(nb, log)
return win
#----------------------------------------------------------------------
| win = TestVirtualListPanel(nb, log)
return win
#----------------------------------------------------------------------
| 7 | 1,505 | 30 | 1,535 | #!/usr/bin/env python
import wx
import images
#----------------------------------------------------------------------
class TestVirtualList(wx.ListCtrl):
def __init__(self, parent, log):
wx.ListCtrl.__init__(
self, parent, -1,
style=wx.LC_REPORT|wx.LC_VIRTUAL|wx.LC_HRULES|wx.LC_VR... | #!/usr/bin/env python
import wx
import images
#----------------------------------------------------------------------
class TestVirtualList(wx.ListCtrl):
def __init__(self, parent, log):
wx.ListCtrl.__init__(
self, parent, -1,
style=wx.LC_REPORT|wx.LC_VIRTUAL|wx.LC_HRULES|wx.LC_VR... | |
41,575 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/ListCtrl_virtual.py | 82,83 | 8,97 | OnGetItemImage | TestVirtualList | 83,88 | 83,88 | class TestVirtualList(wx.ListCtrl):
def __init__(self, parent, log):
wx.ListCtrl.__init__(
self, parent, -1,
style=wx.LC_REPORT|wx.LC_VIRTUAL|wx.LC_HRULES|wx.LC_VRULES
)
self.log = log
self.il = wx.ImageList(16, 16)
self.idx1 = self.il.Add(images... | class TestVirtualList(wx.ListCtrl):
def __init__(self, parent, log):
wx.ListCtrl.__init__(
self, parent, -1,
style=wx.LC_REPORT|wx.LC_VIRTUAL|wx.LC_HRULES|wx.LC_VRULES
)
self.log = log
self.il = wx.ImageList(16, 16)
self.idx1 = self.il.Add(images... | if item % 3 == 0:
return self.idx1
else:
return self.idx2
| if item % 3 == 0:
return self.idx1
else:
return self.idx2
| 11 | 933 | 34 | 967 | #!/usr/bin/env python
import wx
import images
#----------------------------------------------------------------------
class TestVirtualList(wx.ListCtrl):
def __init__(self, parent, log):
wx.ListCtrl.__init__(
self, parent, -1,
style=wx.LC_REPORT|wx.LC_VIRTUAL|wx.LC_HRULES|wx.LC_VR... | #!/usr/bin/env python
import wx
import images
#----------------------------------------------------------------------
class TestVirtualList(wx.ListCtrl):
def __init__(self, parent, log):
wx.ListCtrl.__init__(
self, parent, -1,
style=wx.LC_REPORT|wx.LC_VIRTUAL|wx.LC_HRULES|wx.LC_VR... |
41,576 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/ListCtrl_virtual.py | 118,119 | 97,124 | OnUseNative | TestVirtualListPanel | 119,124 | 119,124 | class TestVirtualListPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1, style=wx.WANTS_CHARS)
self.log = log
sizer = wx.BoxSizer(wx.VERTICAL)
if wx.Platform == "__WXMAC__" and \
hasattr(wx.GetApp().GetTopWindow(), "LoadDemo"):
... | class TestVirtualListPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1, style=wx.WANTS_CHARS)
self.log = log
sizer = wx.BoxSizer(wx.VERTICAL)
if wx.Platform == "__WXMAC__" and \
hasattr(wx.GetApp().GetTopWindow(), "LoadDemo"):
... | wx.SystemOptions.SetOptionInt("mac.listctrl.always_use_generic", not event.IsChecked())
wx.GetApp().GetTopWindow().LoadDemo("ListCtrl_virtual")
#----------------------------------------------------------------------
| wx.SystemOptions.SetOptionInt("mac.listctrl.always_use_generic", not event.IsChecked())
wx.GetApp().GetTopWindow().LoadDemo("ListCtrl_virtual")
#----------------------------------------------------------------------
| 5 | 305 | 60 | 365 | #!/usr/bin/env python
import wx
import images
#----------------------------------------------------------------------
class TestVirtualList(wx.ListCtrl):
def __init__(self, parent, log):
wx.ListCtrl.__init__(
self, parent, -1,
style=wx.LC_REPORT|wx.LC_VIRTUAL|wx.LC_HRULES|wx.LC_VR... | #!/usr/bin/env python
import wx
import images
#----------------------------------------------------------------------
class TestVirtualList(wx.ListCtrl):
def __init__(self, parent, log):
wx.ListCtrl.__init__(
self, parent, -1,
style=wx.LC_REPORT|wx.LC_VIRTUAL|wx.LC_HRULES|wx.LC_VR... |
41,577 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/Listbook.py | 80,81 | 1,105 | runTest | 81,87 | 81,87 | #!/usr/bin/env python
import wx
import ColorPanel
import images
colourList = [ "Aquamarine", "Black", "Blue", "Blue Violet", "Brown", "Cadet Blue",
"Coral", "Cornflower Blue", "Cyan", "Dark Grey", "Dark Green",
"Dark Olive Green",
]
#-------------------------------------... | #!/usr/bin/env python
import wx
import ColorPanel
import images
colourList = [ "Aquamarine", "Black", "Blue", "Blue Violet", "Brown", "Cadet Blue",
"Coral", "Cornflower Blue", "Cyan", "Dark Grey", "Dark Green",
"Dark Olive Green",
]
#-------------------------------------... | testWin = TestLB(nb, -1, log)
return testWin
#----------------------------------------------------------------------------
| testWin = TestLB(nb, -1, log)
return testWin
#----------------------------------------------------------------------------
| 8 | 931 | 34 | 965 | #!/usr/bin/env python
import wx
import ColorPanel
import images
colourList = [ "Aquamarine", "Black", "Blue", "Blue Violet", "Brown", "Cadet Blue",
"Coral", "Cornflower Blue", "Cyan", "Dark Grey", "Dark Green",
"Dark Olive Green",
]
#-------------------------------------... | #!/usr/bin/env python
import wx
import ColorPanel
import images
colourList = [ "Aquamarine", "Black", "Blue", "Blue Violet", "Brown", "Cadet Blue",
"Coral", "Cornflower Blue", "Cyan", "Dark Grey", "Dark Green",
"Dark Olive Green",
]
#-------------------------------------... | |
41,578 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/Listbook.py | 57,58 | 15,80 | OnCPSize | TestLB | 58,60 | 58,60 | class TestLB(wx.Listbook):
def __init__(self, parent, id, log):
wx.Listbook.__init__(self, parent, id, style=
wx.BK_DEFAULT
#wx.BK_TOP
#wx.BK_BOTTOM
#wx.BK_LEFT
#wx.BK_... | class TestLB(wx.Listbook):
def __init__(self, parent, id, log):
wx.Listbook.__init__(self, parent, id, style=
wx.BK_DEFAULT
#wx.BK_TOP
#wx.BK_BOTTOM
#wx.BK_LEFT
#wx.BK_... | win.SetPosition((0,0))
win.SetSize(evt.GetSize())
| win.SetPosition((0,0))
win.SetSize(evt.GetSize())
| 2 | 679 | 26 | 705 | #!/usr/bin/env python
import wx
import ColorPanel
import images
colourList = [ "Aquamarine", "Black", "Blue", "Blue Violet", "Brown", "Cadet Blue",
"Coral", "Cornflower Blue", "Cyan", "Dark Grey", "Dark Green",
"Dark Olive Green",
]
#-------------------------------------... | #!/usr/bin/env python
import wx
import ColorPanel
import images
colourList = [ "Aquamarine", "Black", "Blue", "Blue Violet", "Brown", "Cadet Blue",
"Coral", "Cornflower Blue", "Cyan", "Dark Grey", "Dark Green",
"Dark Olive Green",
]
#-------------------------------------... |
41,579 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/MDIDemo.py | 78,79 | 77,84 | OnInit | MyApp | 79,84 | 79,84 | class MyApp(wx.App):
def OnInit(self):
FILL_FUNC_BODY | class MyApp(wx.App):
def OnInit(self):
FILL_FUNC_BODY | frame = MyParentFrame()
frame.Show(True)
self.SetTopWindow(frame)
return True
| frame = MyParentFrame()
frame.Show(True)
self.SetTopWindow(frame)
return True
| 7 | 28 | 36 | 64 | #!/usr/bin/env python
import wx
# Importing ScrolledWindow demo to make use of the MyCanvas
# class defined within.
import ScrolledWindow
import images
SHOW_BACKGROUND = 1
#----------------------------------------------------------------------
ID_New = wx.NewIdRef()
ID_Exit = wx.NewIdRef()
#-----------------------... | #!/usr/bin/env python
import wx
# Importing ScrolledWindow demo to make use of the MyCanvas
# class defined within.
import ScrolledWindow
import images
SHOW_BACKGROUND = 1
#----------------------------------------------------------------------
ID_New = wx.NewIdRef()
ID_Exit = wx.NewIdRef()
#-----------------------... |
41,580 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/MDIDemo.py | 52,53 | 17,76 | OnEraseBackground | MyParentFrame | 53,76 | 53,76 | class MyParentFrame(wx.MDIParentFrame):
def __init__(self):
wx.MDIParentFrame.__init__(self, None, -1, "MDI Parent", size=(600,400))
self.winCount = 0
menu = wx.Menu()
menu.Append(ID_New, "&New Window")
menu.AppendSeparator()
menu.Append(ID_Exit, "E&xit")
me... | class MyParentFrame(wx.MDIParentFrame):
def __init__(self):
wx.MDIParentFrame.__init__(self, None, -1, "MDI Parent", size=(600,400))
self.winCount = 0
menu = wx.Menu()
menu.Append(ID_New, "&New Window")
menu.AppendSeparator()
menu.Append(ID_Exit, "E&xit")
me... | dc = evt.GetDC()
# tile the background bitmap
try:
sz = self.GetClientSize()
except RuntimeError:#closing demo
return
w = self.bg_bmp.GetWidth()
h = self.bg_bmp.GetHeight()
x = 0
while x < sz.width:
y = 0
... | dc = evt.GetDC()
# tile the background bitmap
try:
sz = self.GetClientSize()
except RuntimeError:#closing demo
return
w = self.bg_bmp.GetWidth()
h = self.bg_bmp.GetHeight()
x = 0
while x < sz.width:
y = 0
... | 50 | 398 | 172 | 570 | #!/usr/bin/env python
import wx
# Importing ScrolledWindow demo to make use of the MyCanvas
# class defined within.
import ScrolledWindow
import images
SHOW_BACKGROUND = 1
#----------------------------------------------------------------------
ID_New = wx.NewIdRef()
ID_Exit = wx.NewIdRef()
#-----------------------... | #!/usr/bin/env python
import wx
# Importing ScrolledWindow demo to make use of the MyCanvas
# class defined within.
import ScrolledWindow
import images
SHOW_BACKGROUND = 1
#----------------------------------------------------------------------
ID_New = wx.NewIdRef()
ID_Exit = wx.NewIdRef()
#-----------------------... |
41,581 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/MDIWindows.py | 44,45 | 1,67 | runTest | 45,52 | 45,52 | #!/usr/bin/env python
import wx
import os
import sys
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b1 = wx.Button(self, -1, "MDI demo")
self.Bi... | #!/usr/bin/env python
import wx
import os
import sys
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b1 = wx.Button(self, -1, "MDI demo")
self.Bi... | win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| 7 | 624 | 30 | 654 | #!/usr/bin/env python
import wx
import os
import sys
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b1 = wx.Button(self, -1, "MDI demo")
self.Bi... | #!/usr/bin/env python
import wx
import os
import sys
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b1 = wx.Button(self, -1, "MDI demo")
self.Bi... | |
41,582 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/MDIWindows.py | 35,36 | 9,44 | ShowMDISashDemo | TestPanel | 36,39 | 36,39 | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b1 = wx.Button(self, -1, "MDI demo")
self.Bind(wx.EVT_BUTTON, self.ShowMDIDemo, b1)
b2 = wx.Button(self, -1, "MDI with SashWindows demo")
self.Bind(wx.EVT_... | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b1 = wx.Button(self, -1, "MDI demo")
self.Bind(wx.EVT_BUTTON, self.ShowMDIDemo, b1)
b2 = wx.Button(self, -1, "MDI with SashWindows demo")
self.Bind(wx.EVT_... | exe, spawn = self.GetPyExecutable()
spawn(os.P_NOWAIT, exe, exe, "MDISashDemo.py")
| exe, spawn = self.GetPyExecutable()
spawn(os.P_NOWAIT, exe, exe, "MDISashDemo.py")
| 8 | 398 | 46 | 444 | #!/usr/bin/env python
import wx
import os
import sys
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b1 = wx.Button(self, -1, "MDI demo")
self.Bi... | #!/usr/bin/env python
import wx
import os
import sys
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b1 = wx.Button(self, -1, "MDI demo")
self.Bi... |
41,583 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/Mask.py | 113,114 | 1,137 | runTest | 114,120 | 114,120 | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
logicList = [
('wx.AND', wx.AND),
('wx.AND_INVERT', wx.AND_INVERT),
('wx.AND_REVERSE', wx.AND_REVERSE),
('wx.CLEAR', wx.CLEAR),
('wx.COPY', wx.COPY),
('wx.EQUIV', wx.EQUIV),
('wx.INVERT... | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
logicList = [
('wx.AND', wx.AND),
('wx.AND_INVERT', wx.AND_INVERT),
('wx.AND_REVERSE', wx.AND_REVERSE),
('wx.CLEAR', wx.CLEAR),
('wx.COPY', wx.COPY),
('wx.EQUIV', wx.EQUIV),
('wx.INVERT... | win = TestPanel(nb, -1)
return win
#----------------------------------------------------------------------
| win = TestPanel(nb, -1)
return win
#----------------------------------------------------------------------
| 7 | 1,528 | 29 | 1,557 | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
logicList = [
('wx.AND', wx.AND),
('wx.AND_INVERT', wx.AND_INVERT),
('wx.AND_REVERSE', wx.AND_REVERSE),
('wx.CLEAR', wx.CLEAR),
('wx.COPY', wx.COPY),
('wx.EQUIV', wx.EQUIV),
('wx.INVERT... | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
logicList = [
('wx.AND', wx.AND),
('wx.AND_INVERT', wx.AND_INVERT),
('wx.AND_REVERSE', wx.AND_REVERSE),
('wx.CLEAR', wx.CLEAR),
('wx.COPY', wx.COPY),
('wx.EQUIV', wx.EQUIV),
('wx.INVERT... | |
41,584 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/Mask.py | 64,65 | 35,101 | OnPaint | TestMaskWindow | 65,101 | 65,101 | class TestMaskWindow(wx.ScrolledWindow):
def __init__(self, parent):
wx.ScrolledWindow.__init__(self, parent, -1)
self.SetBackgroundColour(wx.Colour(0,128,0))
# A reference bitmap that we won't mask
self.bmp_nomask = images.TestStar2.GetBitmap()
# One that we will
... | class TestMaskWindow(wx.ScrolledWindow):
def __init__(self, parent):
wx.ScrolledWindow.__init__(self, parent, -1)
self.SetBackgroundColour(wx.Colour(0,128,0))
# A reference bitmap that we won't mask
self.bmp_nomask = images.TestStar2.GetBitmap()
# One that we will
... | self.SetBackgroundColour(wx.Colour(0,128,0))
dc = wx.PaintDC(self)
self.PrepareDC(dc)
dc.SetTextForeground(wx.WHITE)
# Make an interesting background...
dc.SetPen(wx.MEDIUM_GREY_PEN)
for i in range(100):
dc.DrawLine(0,i*10, i*10,0)
# Draw raw... | self.SetBackgroundColour(wx.Colour(0,128,0))
dc = wx.PaintDC(self)
self.PrepareDC(dc)
dc.SetTextForeground(wx.WHITE)
# Make an interesting background...
dc.SetPen(wx.MEDIUM_GREY_PEN)
for i in range(100):
dc.DrawLine(0,i*10, i*10,0)
# Draw raw... | 114 | 397 | 565 | 962 | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
logicList = [
('wx.AND', wx.AND),
('wx.AND_INVERT', wx.AND_INVERT),
('wx.AND_REVERSE', wx.AND_REVERSE),
('wx.CLEAR', wx.CLEAR),
('wx.COPY', wx.COPY),
('wx.EQUIV', wx.EQUIV),
('wx.INVERT... | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
logicList = [
('wx.AND', wx.AND),
('wx.AND_INVERT', wx.AND_INVERT),
('wx.AND_REVERSE', wx.AND_REVERSE),
('wx.CLEAR', wx.CLEAR),
('wx.COPY', wx.COPY),
('wx.EQUIV', wx.EQUIV),
('wx.INVERT... |
41,585 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/Mask.py | 107,108 | 101,113 | OnSize | TestPanel | 108,113 | 108,113 | class TestPanel(wx.Panel):
def __init__(self, parent, ID):
wx.Panel.__init__(self, parent, ID)
self.win = TestMaskWindow(self)
self.Bind(wx.EVT_SIZE, self.OnSize)
def OnSize(self, evt):
FILL_FUNC_BODY | class TestPanel(wx.Panel):
def __init__(self, parent, ID):
wx.Panel.__init__(self, parent, ID)
self.win = TestMaskWindow(self)
self.Bind(wx.EVT_SIZE, self.OnSize)
def OnSize(self, evt):
FILL_FUNC_BODY | self.win.SetSize(evt.GetSize())
#----------------------------------------------------------------------
| self.win.SetSize(evt.GetSize())
#----------------------------------------------------------------------
| 2 | 87 | 27 | 114 | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
logicList = [
('wx.AND', wx.AND),
('wx.AND_INVERT', wx.AND_INVERT),
('wx.AND_REVERSE', wx.AND_REVERSE),
('wx.CLEAR', wx.CLEAR),
('wx.COPY', wx.COPY),
('wx.EQUIV', wx.EQUIV),
('wx.INVERT... | #!/usr/bin/env python
import wx
#----------------------------------------------------------------------
logicList = [
('wx.AND', wx.AND),
('wx.AND_INVERT', wx.AND_INVERT),
('wx.AND_REVERSE', wx.AND_REVERSE),
('wx.CLEAR', wx.CLEAR),
('wx.COPY', wx.COPY),
('wx.EQUIV', wx.EQUIV),
('wx.INVERT... |
41,590 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/Menu.py | 272,273 | 263,280 | OnButton | TestPanel | 273,280 | 273,280 | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Show the Menu sample", (50,50))
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
def OnButton(self, evt):
FILL_FUNC_BODY | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Show the Menu sample", (50,50))
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
def OnButton(self, evt):
FILL_FUNC_BODY | win = MyFrame(self, -1, self.log)
win.Show(True)
#---------------------------------------------------------------------------
| win = MyFrame(self, -1, self.log)
win.Show(True)
#---------------------------------------------------------------------------
| 7 | 115 | 39 | 154 | #!/usr/bin/env python
import time
import wx
import images
#-------------------------------------------------------------------
class MyFrame(wx.Frame):
def __init__(self, parent, id, log):
wx.Frame.__init__(self, parent, id, 'Playing with menus', size=(500, 250))
self.log = log
self.Cent... | #!/usr/bin/env python
import time
import wx
import images
#-------------------------------------------------------------------
class MyFrame(wx.Frame):
def __init__(self, parent, id, log):
wx.Frame.__init__(self, parent, id, 'Playing with menus', size=(500, 250))
self.log = log
self.Cent... |
41,591 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/MessageDialog.py | 29,30 | 1,55 | runTest | 30,38 | 30,38 | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a MessageDialog", (50,50))
... | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a MessageDialog", (50,50))
... | win = TestPanel(nb, log)
return win
#---------------------------------------------------------------------------
| win = TestPanel(nb, log)
return win
#---------------------------------------------------------------------------
| 7 | 400 | 32 | 432 | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a MessageDialog", (50,50))
... | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a MessageDialog", (50,50))
... | |
41,592 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/MessageDialog.py | 16,17 | 7,29 | OnButton | TestPanel | 17,29 | 17,29 | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a MessageDialog", (50,50))
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
def OnButton(self, evt):
FILL_FUNC_BODY | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a MessageDialog", (50,50))
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
def OnButton(self, evt):
FILL_FUNC_BODY | dlg = wx.MessageDialog(self, 'Hello from Python and wxPython!',
'A Message Box',
wx.OK | wx.ICON_INFORMATION
#wx.YES_NO | wx.NO_DEFAULT | wx.CANCEL | wx.ICON_INFORMATION
)
dlg.Show... | dlg = wx.MessageDialog(self, 'Hello from Python and wxPython!',
'A Message Box',
wx.OK | wx.ICON_INFORMATION
#wx.YES_NO | wx.NO_DEFAULT | wx.CANCEL | wx.ICON_INFORMATION
)
dlg.Show... | 25 | 117 | 111 | 228 | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a MessageDialog", (50,50))
... | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a MessageDialog", (50,50))
... |
41,595 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/MiniFrame.py | 49,50 | 1,68 | runTest | 50,57 | 50,57 | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class MyMiniFrame(wx.MiniFrame):
def __init__(
self, parent, title, pos=wx.DefaultPosition, size=wx.DefaultSize,
style=wx.DEFAULT_FRAME_STYLE
):
wx.MiniFrame.__init__(self,... | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class MyMiniFrame(wx.MiniFrame):
def __init__(
self, parent, title, pos=wx.DefaultPosition, size=wx.DefaultSize,
style=wx.DEFAULT_FRAME_STYLE
):
wx.MiniFrame.__init__(self,... | win = TestPanel(nb, log)
return win
#---------------------------------------------------------------------------
| win = TestPanel(nb, log)
return win
#---------------------------------------------------------------------------
| 7 | 574 | 30 | 604 | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class MyMiniFrame(wx.MiniFrame):
def __init__(
self, parent, title, pos=wx.DefaultPosition, size=wx.DefaultSize,
style=wx.DEFAULT_FRAME_STYLE
):
wx.MiniFrame.__init__(self,... | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class MyMiniFrame(wx.MiniFrame):
def __init__(
self, parent, title, pos=wx.DefaultPosition, size=wx.DefaultSize,
style=wx.DEFAULT_FRAME_STYLE
):
wx.MiniFrame.__init__(self,... | |
41,596 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/MiniFrame.py | 20,21 | 6,29 | OnCloseMe | MyMiniFrame | 21,23 | 21,23 | class MyMiniFrame(wx.MiniFrame):
def __init__(
self, parent, title, pos=wx.DefaultPosition, size=wx.DefaultSize,
style=wx.DEFAULT_FRAME_STYLE
):
wx.MiniFrame.__init__(self, parent, -1, title, pos, size, style)
panel = wx.Panel(self, -1)
button = wx.Button(panel, -1,... | class MyMiniFrame(wx.MiniFrame):
def __init__(
self, parent, title, pos=wx.DefaultPosition, size=wx.DefaultSize,
style=wx.DEFAULT_FRAME_STYLE
):
wx.MiniFrame.__init__(self, parent, -1, title, pos, size, style)
panel = wx.Panel(self, -1)
button = wx.Button(panel, -1,... | self.Close(True)
| self.Close(True)
| 1 | 229 | 11 | 240 | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class MyMiniFrame(wx.MiniFrame):
def __init__(
self, parent, title, pos=wx.DefaultPosition, size=wx.DefaultSize,
style=wx.DEFAULT_FRAME_STYLE
):
wx.MiniFrame.__init__(self,... | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class MyMiniFrame(wx.MiniFrame):
def __init__(
self, parent, title, pos=wx.DefaultPosition, size=wx.DefaultSize,
style=wx.DEFAULT_FRAME_STYLE
):
wx.MiniFrame.__init__(self,... |
41,597 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/MiniFrame.py | 38,39 | 29,49 | OnButton | TestPanel | 39,49 | 39,49 | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a MiniFrame", (50,50))
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
def OnButton(self, evt):
FILL_FUNC_BODY | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a MiniFrame", (50,50))
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
def OnButton(self, evt):
FILL_FUNC_BODY | win = MyMiniFrame(self, "This is a wx.MiniFrame",
style=wx.DEFAULT_FRAME_STYLE | wx.TINY_CAPTION)
win.SetSize((200, 200))
win.CenterOnParent(wx.BOTH)
win.Show(True)
#---------------------------------------------------------------------------
| win = MyMiniFrame(self, "This is a wx.MiniFrame",
style=wx.DEFAULT_FRAME_STYLE | wx.TINY_CAPTION)
win.SetSize((200, 200))
win.CenterOnParent(wx.BOTH)
win.Show(True)
#---------------------------------------------------------------------------
| 15 | 117 | 102 | 219 | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class MyMiniFrame(wx.MiniFrame):
def __init__(
self, parent, title, pos=wx.DefaultPosition, size=wx.DefaultSize,
style=wx.DEFAULT_FRAME_STYLE
):
wx.MiniFrame.__init__(self,... | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class MyMiniFrame(wx.MiniFrame):
def __init__(
self, parent, title, pos=wx.DefaultPosition, size=wx.DefaultSize,
style=wx.DEFAULT_FRAME_STYLE
):
wx.MiniFrame.__init__(self,... |
41,600 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/MultiChoiceDialog.py | 36,37 | 1,60 | runTest | 37,44 | 37,44 | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a wx.MultiChoiceDialog", (5... | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a wx.MultiChoiceDialog", (5... | win = TestPanel(nb, log)
return win
#---------------------------------------------------------------------------
| win = TestPanel(nb, log)
return win
#---------------------------------------------------------------------------
| 7 | 473 | 30 | 503 | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a wx.MultiChoiceDialog", (5... | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a wx.MultiChoiceDialog", (5... | |
41,601 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/MultiChoiceDialog.py | 16,17 | 7,36 | OnButton | TestPanel | 17,36 | 17,36 | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a wx.MultiChoiceDialog", (50,50))
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
def OnButton(self, evt):
FILL_FUNC_BODY | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a wx.MultiChoiceDialog", (50,50))
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
def OnButton(self, evt):
FILL_FUNC_BODY | lst = [ 'apple', 'pear', 'banana', 'coconut', 'orange', 'grape', 'pineapple',
'blueberry', 'raspberry', 'blackberry', 'snozzleberry',
'etc', 'etc..', 'etc...' ]
dlg = wx.MultiChoiceDialog( self,
"Pick some fruit from\nthis list",
... | lst = [ 'apple', 'pear', 'banana', 'coconut', 'orange', 'grape', 'pineapple',
'blueberry', 'raspberry', 'blackberry', 'snozzleberry',
'etc', 'etc..', 'etc...' ]
dlg = wx.MultiChoiceDialog( self,
"Pick some fruit from\nthis list",
... | 52 | 121 | 220 | 341 | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a wx.MultiChoiceDialog", (5... | #!/usr/bin/env python
import wx
#---------------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a wx.MultiChoiceDialog", (5... |
41,602 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/MultiSplitterWindow.py | 143,144 | 1,169 | runTest | 144,151 | 144,151 | #!/usr/bin/env python
import wx
from wx.lib.splitter import MultiSplitterWindow
#----------------------------------------------------------------------
class SamplePane(wx.Panel):
"""
Just a simple test window to put into the splitter.
"""
def __init__(self, parent, colour, label):
wx.Panel._... | #!/usr/bin/env python
import wx
from wx.lib.splitter import MultiSplitterWindow
#----------------------------------------------------------------------
class SamplePane(wx.Panel):
"""
Just a simple test window to put into the splitter.
"""
def __init__(self, parent, colour, label):
wx.Panel._... | win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------
| 7 | 1,632 | 30 | 1,662 | #!/usr/bin/env python
import wx
from wx.lib.splitter import MultiSplitterWindow
#----------------------------------------------------------------------
class SamplePane(wx.Panel):
"""
Just a simple test window to put into the splitter.
"""
def __init__(self, parent, colour, label):
wx.Panel._... | #!/usr/bin/env python
import wx
from wx.lib.splitter import MultiSplitterWindow
#----------------------------------------------------------------------
class SamplePane(wx.Panel):
"""
Just a simple test window to put into the splitter.
"""
def __init__(self, parent, colour, label):
wx.Panel._... | |
41,603 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/MultiSplitterWindow.py | 54,55 | 22,64 | OnSetLiveUpdate | ControlPane | 55,59 | 55,59 | class ControlPane(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent)
hvBox = wx.RadioBox(self, -1, "Orientation",
choices=["Horizontal", "Vertical"],
style=wx.RA_SPECIFY_COLS,
majorDimension=1)
... | class ControlPane(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent)
hvBox = wx.RadioBox(self, -1, "Orientation",
choices=["Horizontal", "Vertical"],
style=wx.RA_SPECIFY_COLS,
majorDimension=1)
... | check = evt.GetEventObject()
self.GetParent().SetLiveUpdate(check.GetValue())
| check = evt.GetEventObject()
self.GetParent().SetLiveUpdate(check.GetValue())
| 4 | 446 | 33 | 479 | #!/usr/bin/env python
import wx
from wx.lib.splitter import MultiSplitterWindow
#----------------------------------------------------------------------
class SamplePane(wx.Panel):
"""
Just a simple test window to put into the splitter.
"""
def __init__(self, parent, colour, label):
wx.Panel._... | #!/usr/bin/env python
import wx
from wx.lib.splitter import MultiSplitterWindow
#----------------------------------------------------------------------
class SamplePane(wx.Panel):
"""
Just a simple test window to put into the splitter.
"""
def __init__(self, parent, colour, label):
wx.Panel._... |
41,604 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/MultiSplitterWindow.py | 17,18 | 8,22 | SetOtherLabel | SamplePane | 18,22 | 18,22 | class SamplePane(wx.Panel):
"""
Just a simple test window to put into the splitter.
"""
def __init__(self, parent, colour, label):
wx.Panel.__init__(self, parent, style=wx.BORDER_SUNKEN)
self.SetBackgroundColour(colour)
wx.StaticText(self, -1, label, (5,5))
def SetOtherLabel... | class SamplePane(wx.Panel):
"""
Just a simple test window to put into the splitter.
"""
def __init__(self, parent, colour, label):
wx.Panel.__init__(self, parent, style=wx.BORDER_SUNKEN)
self.SetBackgroundColour(colour)
wx.StaticText(self, -1, label, (5,5))
def SetOtherLabel... | wx.StaticText(self, -1, label, (5, 30))
| wx.StaticText(self, -1, label, (5, 30))
| 5 | 120 | 28 | 148 | #!/usr/bin/env python
import wx
from wx.lib.splitter import MultiSplitterWindow
#----------------------------------------------------------------------
class SamplePane(wx.Panel):
"""
Just a simple test window to put into the splitter.
"""
def __init__(self, parent, colour, label):
wx.Panel._... | #!/usr/bin/env python
import wx
from wx.lib.splitter import MultiSplitterWindow
#----------------------------------------------------------------------
class SamplePane(wx.Panel):
"""
Just a simple test window to put into the splitter.
"""
def __init__(self, parent, colour, label):
wx.Panel._... |
41,605 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/MultiSplitterWindow.py | 104,105 | 64,143 | OnChanging | TestPanel | 105,116 | 105,116 | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
cp = ControlPane(self)
splitter = MultiSplitterWindow(self, style=wx.SP_LIVE_UPDATE)
self.splitter = splitter
sizer = wx.BoxSizer(wx.HORIZONTAL)
si... | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
cp = ControlPane(self)
splitter = MultiSplitterWindow(self, style=wx.SP_LIVE_UPDATE)
self.splitter = splitter
sizer = wx.BoxSizer(wx.HORIZONTAL)
si... | self.log.write( "Changing sash:%d %s\n" %
(evt.GetSashIdx(), evt.GetSashPosition()))
# This is one way to control the sash limits
#if evt.GetSashPosition() < 50:
# evt.Veto()
# Or you can reset the sash position to whatever you want
#if evt.Ge... | self.log.write( "Changing sash:%d %s\n" %
(evt.GetSashIdx(), evt.GetSashPosition()))
# This is one way to control the sash limits
#if evt.GetSashPosition() < 50:
# evt.Veto()
# Or you can reset the sash position to whatever you want
#if evt.Ge... | 41 | 710 | 141 | 851 | #!/usr/bin/env python
import wx
from wx.lib.splitter import MultiSplitterWindow
#----------------------------------------------------------------------
class SamplePane(wx.Panel):
"""
Just a simple test window to put into the splitter.
"""
def __init__(self, parent, colour, label):
wx.Panel._... | #!/usr/bin/env python
import wx
from wx.lib.splitter import MultiSplitterWindow
#----------------------------------------------------------------------
class SamplePane(wx.Panel):
"""
Just a simple test window to put into the splitter.
"""
def __init__(self, parent, colour, label):
wx.Panel._... |
41,606 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/MultipleChoiceDialog.py | 36,37 | 1,102 | runTest | 37,44 | 37,44 | #!/usr/bin/env python
import wx
import wx.lib.dialogs
#---------------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a Mul... | #!/usr/bin/env python
import wx
import wx.lib.dialogs
#---------------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a Mul... | win = TestPanel(nb, log)
return win
#---------------------------------------------------------------------------
| win = TestPanel(nb, log)
return win
#---------------------------------------------------------------------------
| 7 | 836 | 30 | 866 | #!/usr/bin/env python
import wx
import wx.lib.dialogs
#---------------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a Mul... | #!/usr/bin/env python
import wx
import wx.lib.dialogs
#---------------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a Mul... | |
41,607 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/MultipleChoiceDialog.py | 17,18 | 8,36 | OnButton | TestPanel | 18,36 | 18,36 | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a MultipleChoiceDialog", (50,50))
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
def OnButton(self, evt):
FILL_FUNC_BODY | class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a MultipleChoiceDialog", (50,50))
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
def OnButton(self, evt):
FILL_FUNC_BODY | lst = [ 'apple', 'pear', 'banana', 'coconut', 'orange', 'grape', 'pineapple',
'blueberry', 'raspberry', 'blackberry', 'snozzleberry',
'etc', 'etc..', 'etc...' ]
dlg = wx.lib.dialogs.MultipleChoiceDialog(
self,
... | lst = [ 'apple', 'pear', 'banana', 'coconut', 'orange', 'grape', 'pineapple',
'blueberry', 'raspberry', 'blackberry', 'snozzleberry',
'etc', 'etc..', 'etc...' ]
dlg = wx.lib.dialogs.MultipleChoiceDialog(
self,
... | 43 | 120 | 210 | 330 | #!/usr/bin/env python
import wx
import wx.lib.dialogs
#---------------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a Mul... | #!/usr/bin/env python
import wx
import wx.lib.dialogs
#---------------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
self.log = log
wx.Panel.__init__(self, parent, -1)
b = wx.Button(self, -1, "Create and Show a Mul... |
41,608 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/Notebook.py | 105,106 | 1,135 | runTest | 106,112 | 106,112 | #!/usr/bin/env python
import sys
import wx
import ColorPanel
import GridSimple
import ListCtrl
import ScrolledWindow
import images
#----------------------------------------------------------------------------
class TestNB(wx.Notebook):
def __init__(self, parent, id, log):
wx.Notebook.__init__(self, par... | #!/usr/bin/env python
import sys
import wx
import ColorPanel
import GridSimple
import ListCtrl
import ScrolledWindow
import images
#----------------------------------------------------------------------------
class TestNB(wx.Notebook):
def __init__(self, parent, id, log):
wx.Notebook.__init__(self, par... | testWin = TestNB(nb, -1, log)
return testWin
#----------------------------------------------------------------------------
| testWin = TestNB(nb, -1, log)
return testWin
#----------------------------------------------------------------------------
| 8 | 1,177 | 34 | 1,211 | #!/usr/bin/env python
import sys
import wx
import ColorPanel
import GridSimple
import ListCtrl
import ScrolledWindow
import images
#----------------------------------------------------------------------------
class TestNB(wx.Notebook):
def __init__(self, parent, id, log):
wx.Notebook.__init__(self, par... | #!/usr/bin/env python
import sys
import wx
import ColorPanel
import GridSimple
import ListCtrl
import ScrolledWindow
import images
#----------------------------------------------------------------------------
class TestNB(wx.Notebook):
def __init__(self, parent, id, log):
wx.Notebook.__init__(self, par... | |
41,609 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/Notebook.py | 87,88 | 15,105 | OnPageChanged | TestNB | 88,95 | 88,95 | class TestNB(wx.Notebook):
def __init__(self, parent, id, log):
wx.Notebook.__init__(self, parent, id, size=(21,21), style=
wx.BK_DEFAULT
#wx.BK_TOP
#wx.BK_BOTTOM
#wx.BK_LEFT
... | class TestNB(wx.Notebook):
def __init__(self, parent, id, log):
wx.Notebook.__init__(self, parent, id, size=(21,21), style=
wx.BK_DEFAULT
#wx.BK_TOP
#wx.BK_BOTTOM
#wx.BK_LEFT
... | if self:
old = event.GetOldSelection()
new = event.GetSelection()
sel = self.GetSelection()
self.log.write('OnPageChanged, old:%d, new:%d, sel:%d\n' % (old, new, sel))
event.Skip()
| if self:
old = event.GetOldSelection()
new = event.GetSelection()
sel = self.GetSelection()
self.log.write('OnPageChanged, old:%d, new:%d, sel:%d\n' % (old, new, sel))
event.Skip()
| 20 | 878 | 85 | 963 | #!/usr/bin/env python
import sys
import wx
import ColorPanel
import GridSimple
import ListCtrl
import ScrolledWindow
import images
#----------------------------------------------------------------------------
class TestNB(wx.Notebook):
def __init__(self, parent, id, log):
wx.Notebook.__init__(self, par... | #!/usr/bin/env python
import sys
import wx
import ColorPanel
import GridSimple
import ListCtrl
import ScrolledWindow
import images
#----------------------------------------------------------------------------
class TestNB(wx.Notebook):
def __init__(self, parent, id, log):
wx.Notebook.__init__(self, par... |
41,611 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/OGL.py | 185,186 | 145,194 | OnSizingEndDragLeft | DividedShape | 186,194 | 186,194 | class DividedShape(ogl.DividedShape):
def __init__(self, width, height, canvas):
ogl.DividedShape.__init__(self, width, height)
region1 = ogl.ShapeRegion()
region1.SetText('DividedShape')
region1.SetProportions(0.0, 0.2)
region1.SetFormatMode(ogl.FORMAT_CENTRE_HORIZ)
... | class DividedShape(ogl.DividedShape):
def __init__(self, width, height, canvas):
ogl.DividedShape.__init__(self, width, height)
region1 = ogl.ShapeRegion()
region1.SetText('DividedShape')
region1.SetProportions(0.0, 0.2)
region1.SetFormatMode(ogl.FORMAT_CENTRE_HORIZ)
... | ogl.DividedShape.OnSizingEndDragLeft(self, pt, x, y, keys, attch)
self.SetRegionSizes()
self.ReformatRegions()
self.GetCanvas().Refresh()
#----------------------------------------------------------------------
| ogl.DividedShape.OnSizingEndDragLeft(self, pt, x, y, keys, attch)
self.SetRegionSizes()
self.ReformatRegions()
self.GetCanvas().Refresh()
#----------------------------------------------------------------------
| 10 | 443 | 74 | 517 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 20040508 - Pierre Hjälm
#
# o Changed to use the python version of OGL
# o Added TextShape, CompositeShape and CompositeShape with divisions
#
# 20040830 - Pierre Hjälm
#
# o Added Dr... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 20040508 - Pierre Hjälm
#
# o Changed to use the python version of OGL
# o Added TextShape, CompositeShape and CompositeShape with divisions
#
# 20040830 - Pierre Hjälm
#
# o Added Dr... |
41,612 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/OGL.py | 207,208 | 194,269 | OnLeftClick | MyEvtHandler | 208,241 | 208,241 | class MyEvtHandler(ogl.ShapeEvtHandler):
def __init__(self, log, frame):
ogl.ShapeEvtHandler.__init__(self)
self.log = log
self.statbarFrame = frame
def UpdateStatusBar(self, shape):
x, y = shape.GetX(), shape.GetY()
width, height = shape.GetBoundingBoxMax()
self... | class MyEvtHandler(ogl.ShapeEvtHandler):
def __init__(self, log, frame):
ogl.ShapeEvtHandler.__init__(self)
self.log = log
self.statbarFrame = frame
def UpdateStatusBar(self, shape):
x, y = shape.GetX(), shape.GetY()
width, height = shape.GetBoundingBoxMax()
self... | shape = self.GetShape()
canvas = shape.GetCanvas()
dc = wx.ClientDC(canvas)
canvas.PrepareDC(dc)
if shape.Selected():
shape.Select(False, dc)
#canvas.Redraw(dc)
canvas.Refresh(False)
else:
redraw = False
shapeLi... | shape = self.GetShape()
canvas = shape.GetCanvas()
dc = wx.ClientDC(canvas)
canvas.PrepareDC(dc)
if shape.Selected():
shape.Select(False, dc)
#canvas.Redraw(dc)
canvas.Refresh(False)
else:
redraw = False
shapeLi... | 75 | 480 | 285 | 765 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 20040508 - Pierre Hjälm
#
# o Changed to use the python version of OGL
# o Added TextShape, CompositeShape and CompositeShape with divisions
#
# 20040830 - Pierre Hjälm
#
# o Added Dr... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 20040508 - Pierre Hjälm
#
# o Changed to use the python version of OGL
# o Added TextShape, CompositeShape and CompositeShape with divisions
#
# 20040830 - Pierre Hjälm
#
# o Added Dr... |
41,613 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/OGL.py | 363,364 | 269,401 | MyAddShape | TestWindow | 364,392 | 364,392 | class TestWindow(ogl.ShapeCanvas):
def __init__(self, parent, log, frame):
ogl.ShapeCanvas.__init__(self, parent)
maxWidth = 1000
maxHeight = 1000
self.SetScrollbars(20, 20, maxWidth//20, maxHeight//20)
self.log = log
self.frame = frame
self.SetBackgroundCo... | class TestWindow(ogl.ShapeCanvas):
def __init__(self, parent, log, frame):
ogl.ShapeCanvas.__init__(self, parent)
maxWidth = 1000
maxHeight = 1000
self.SetScrollbars(20, 20, maxWidth//20, maxHeight//20)
self.log = log
self.frame = frame
self.SetBackgroundCo... | # Composites have to be moved for all children to get in place
if isinstance(shape, ogl.CompositeShape):
dc = wx.ClientDC(self)
self.PrepareDC(dc)
shape.Move(dc, x, y)
else:
shape.SetDraggable(True, True)
shape.SetCanvas(self)
shape... | # Composites have to be moved for all children to get in place
if isinstance(shape, ogl.CompositeShape):
dc = wx.ClientDC(self)
self.PrepareDC(dc)
shape.Move(dc, x, y)
else:
shape.SetDraggable(True, True)
shape.SetCanvas(self)
shape... | 55 | 1,224 | 317 | 1,541 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 20040508 - Pierre Hjälm
#
# o Changed to use the python version of OGL
# o Added TextShape, CompositeShape and CompositeShape with divisions
#
# 20040830 - Pierre Hjälm
#
# o Added Dr... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 20040508 - Pierre Hjälm
#
# o Changed to use the python version of OGL
# o Added TextShape, CompositeShape and CompositeShape with divisions
#
# 20040830 - Pierre Hjälm
#
# o Added Dr... |
41,616 | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix | /home/hieuvd/dung_repo/raw/stars_02/wxWidgets_Phoenix/Phoenix/demo/PDFViewer.py | 47,48 | 1,110 | runTest | 48,62 | 48,62 | #!/usr/bin/env python
import wx
try:
from wx.lib.pdfviewer import pdfViewer, pdfButtonPanel
havePyPdf = True
except ImportError:
havePyPdf = False
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__in... | #!/usr/bin/env python
import wx
try:
from wx.lib.pdfviewer import pdfViewer, pdfButtonPanel
havePyPdf = True
except ImportError:
havePyPdf = False
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__in... | if havePyPdf:
win = TestPanel(nb, log)
return win
else:
from wx.lib.msgpanel import MessagePanel
win = MessagePanel(nb,
'This demo requires either the\n'
'PyMuPDF see http://pythonhosted.org/PyMuPDF\n'
... | if havePyPdf:
win = TestPanel(nb, log)
return win
else:
from wx.lib.msgpanel import MessagePanel
win = MessagePanel(nb,
'This demo requires either the\n'
'PyMuPDF see http://pythonhosted.org/PyMuPDF\n'
... | 34 | 1,176 | 149 | 1,325 | #!/usr/bin/env python
import wx
try:
from wx.lib.pdfviewer import pdfViewer, pdfButtonPanel
havePyPdf = True
except ImportError:
havePyPdf = False
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__in... | #!/usr/bin/env python
import wx
try:
from wx.lib.pdfviewer import pdfViewer, pdfButtonPanel
havePyPdf = True
except ImportError:
havePyPdf = False
#----------------------------------------------------------------------
class TestPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__in... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.