mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-21 05:15:41 +08:00
Merge recent changes from 2.8 branch.
Make updates for recent changes on CVS HEAD. Remove or workaround deprecated items. Fix compile errors. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1336,7 +1336,7 @@ int wxTreeListHeaderWindow::XToCol(int x)
|
||||
|
||||
void wxTreeListHeaderWindow::RefreshColLabel(int col)
|
||||
{
|
||||
if ( col > GetColumnCount() )
|
||||
if ( col >= GetColumnCount() )
|
||||
return;
|
||||
|
||||
int x = 0;
|
||||
@@ -3600,7 +3600,7 @@ void wxTreeListMainWindow::OnChar (wxKeyEvent &event) {
|
||||
default:
|
||||
if (event.GetKeyCode() >= (int)' ') {
|
||||
if (!m_findTimer->IsRunning()) m_findStr.Clear();
|
||||
m_findStr.Append (event.GetKeyCode());
|
||||
m_findStr.Append ((char)event.GetKeyCode());
|
||||
m_findTimer->Start (FIND_TIMER_TICKS, wxTIMER_ONE_SHOT);
|
||||
wxTreeItemId prev = m_curItem? (wxTreeItemId*)m_curItem: (wxTreeItemId*)NULL;
|
||||
while (true) {
|
||||
@@ -4681,6 +4681,18 @@ int wxTreeListCtrl::GetColumnCount() const
|
||||
|
||||
void wxTreeListCtrl::SetColumnWidth(int column, int width)
|
||||
{
|
||||
if (width == wxLIST_AUTOSIZE_USEHEADER)
|
||||
{
|
||||
wxFont font = m_header_win->GetFont();
|
||||
m_header_win->GetTextExtent(m_header_win->GetColumnText(column), &width, NULL, NULL, NULL, font.Ok()? &font: NULL);
|
||||
//search wxTreeListHeaderWindow::OnPaint to understand this:
|
||||
width += 2*EXTRA_WIDTH + MARGIN;
|
||||
}
|
||||
else if (width == wxLIST_AUTOSIZE)
|
||||
{
|
||||
width = m_main_win->GetBestColumnWidth(column);
|
||||
}
|
||||
|
||||
m_header_win->SetColumnWidth (column, width);
|
||||
m_header_win->Refresh();
|
||||
}
|
||||
|
||||
@@ -35,7 +35,13 @@ then these squares should be transparent.
|
||||
dc.SetBrush(wx.Brush(brushclr))
|
||||
rect.SetPosition(pos)
|
||||
dc.DrawRoundedRectangleRect(rect, 8)
|
||||
|
||||
|
||||
# some additional testing stuff
|
||||
#dc.SetPen(wx.Pen(wx.Colour(0,0,255, 196)))
|
||||
#dc.SetBrush(wx.Brush(wx.Colour(0,0,255, 64)))
|
||||
#dc.DrawCircle(50, 275, 25)
|
||||
#dc.DrawEllipse(100, 275, 75, 50)
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -25,10 +25,10 @@ class TestPanel(wx.Panel):
|
||||
ctrl = wx.animate.AnimationCtrl(self, -1, ani)
|
||||
ctrl.SetUseWindowBackgroundColour()
|
||||
ctrl.Play()
|
||||
sizer.Add(ctrl, 0, wx.ALL, 10)
|
||||
sizer.AddF(ctrl, wx.SizerFlags().Border(wx.ALL, 10))
|
||||
|
||||
border = wx.BoxSizer()
|
||||
border.Add(sizer, 1, wx.EXPAND|wx.ALL, 20)
|
||||
border.AddF(sizer, wx.SizerFlags(1).Expand().Border(wx.ALL, 20))
|
||||
self.SetSizer(border)
|
||||
|
||||
|
||||
|
||||
@@ -764,7 +764,8 @@ class CustomTreeCtrlDemo(wx.Panel):
|
||||
splitter = wx.SplitterWindow(self, -1, style=wx.CLIP_CHILDREN | wx.SP_LIVE_UPDATE | wx.SP_3D)
|
||||
|
||||
# Create the CustomTreeCtrl, using a derived class defined below
|
||||
self.tree = CustomTreeCtrl(splitter, -1, log=self.log, style=wx.SUNKEN_BORDER)
|
||||
self.tree = CustomTreeCtrl(splitter, -1, log=self.log,
|
||||
style= wx.SUNKEN_BORDER| CT.TR_HAS_BUTTONS | CT.TR_HAS_VARIABLE_ROW_HEIGHT)
|
||||
|
||||
self.leftpanel = wx.ScrolledWindow(splitter, -1, style=wx.SUNKEN_BORDER)
|
||||
self.leftpanel.SetScrollRate(20,20)
|
||||
@@ -1239,11 +1240,10 @@ class CustomTreeCtrl(CT.CustomTreeCtrl):
|
||||
|
||||
def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition,
|
||||
size=wx.DefaultSize,
|
||||
style=wx.SUNKEN_BORDER,
|
||||
ctstyle=CT.TR_HAS_BUTTONS | CT.TR_HAS_VARIABLE_ROW_HEIGHT,
|
||||
style=wx.SUNKEN_BORDER | CT.TR_HAS_BUTTONS | CT.TR_HAS_VARIABLE_ROW_HEIGHT,
|
||||
log=None):
|
||||
|
||||
CT.CustomTreeCtrl.__init__(self, parent, id, pos, size, style, ctstyle)
|
||||
CT.CustomTreeCtrl.__init__(self, parent, id, pos, size, style)
|
||||
|
||||
alldata = dir(CT)
|
||||
|
||||
|
||||
@@ -15,7 +15,10 @@ class TestPanel(wx.Panel):
|
||||
def OnButton(self, evt):
|
||||
# In this case we include a "New directory" button.
|
||||
dlg = wx.DirDialog(self, "Choose a directory:",
|
||||
style=wx.DD_DEFAULT_STYLE|wx.DD_NEW_DIR_BUTTON)
|
||||
style=wx.DD_DEFAULT_STYLE
|
||||
#| wx.DD_DIR_MUST_EXIST
|
||||
#| wx.DD_CHANGE_DIR
|
||||
)
|
||||
|
||||
# If the user selects OK, then we process the dialog's data.
|
||||
# This is done by getting the path data from the dialog - BEFORE
|
||||
|
||||
@@ -91,11 +91,11 @@ class SimpleView(wx.Panel):
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def runTest(frame, nb, log):
|
||||
if wx.Platform == "__WXMAC__":
|
||||
from Main import MessagePanel
|
||||
win = MessagePanel(nb, 'This demo currently fails on the Mac. The problem is being looked into...',
|
||||
'Sorry', wx.ICON_WARNING)
|
||||
return win
|
||||
## if wx.Platform == "__WXMAC__":
|
||||
## from Main import MessagePanel
|
||||
## win = MessagePanel(nb, 'This demo currently fails on the Mac. The problem is being looked into...',
|
||||
## 'Sorry', wx.ICON_WARNING)
|
||||
## return win
|
||||
|
||||
if 1:
|
||||
win = gizmos.DynamicSashWindow(nb, -1, style = wx.CLIP_CHILDREN
|
||||
|
||||
@@ -19,7 +19,13 @@ class TestPanel(wx.Panel):
|
||||
|
||||
def OnPaint(self, evt):
|
||||
dc = wx.PaintDC(self)
|
||||
gc = wx.GraphicsContext.Create(dc)
|
||||
try:
|
||||
gc = wx.GraphicsContext.Create(dc)
|
||||
except NotImplementedError:
|
||||
dc.DrawText("This build of wxPython does not support the wx.GraphicsContext "
|
||||
"family of classes.",
|
||||
25, 25)
|
||||
return
|
||||
|
||||
font = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
|
||||
font.SetWeight(wx.BOLD)
|
||||
@@ -64,6 +70,13 @@ class TestPanel(wx.Panel):
|
||||
gc.DrawText("Scale", 0, -BASE2)
|
||||
gc.Translate(0, 20)
|
||||
|
||||
# for testing clipping
|
||||
#gc.Clip(0, 0, 100, 100)
|
||||
#rgn = wx.RegionFromPoints([ (0,0), (75,0), (75,25,), (100, 25),
|
||||
# (100,100), (0,100), (0,0) ])
|
||||
#gc.ClipRegion(rgn)
|
||||
#gc.ResetClip()
|
||||
|
||||
gc.SetBrush(wx.Brush(wx.Colour(178, 34, 34, 128))) # 128 == half transparent
|
||||
for cnt in range(8):
|
||||
gc.Scale(1.08, 1.08) # increase scale by 8%
|
||||
@@ -75,7 +88,7 @@ class TestPanel(wx.Panel):
|
||||
gc.PushState() # save it again
|
||||
gc.Translate(400, 200)
|
||||
gc.DrawText("Rotate", 0, -BASE2)
|
||||
|
||||
|
||||
gc.Translate(0, 75)
|
||||
for angle in range(0, 360, 30):
|
||||
gc.PushState() # save this new current state so we can pop back to
|
||||
|
||||
@@ -242,7 +242,8 @@ class TestFrame(wx.Frame):
|
||||
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
app = wx.PySimpleApp()
|
||||
from wx.lib.mixins.inspect import InspectableApp
|
||||
app = InspectableApp(False)
|
||||
frame = TestFrame(None, sys.stdout)
|
||||
frame.Show(True)
|
||||
#import wx.py
|
||||
|
||||
@@ -177,7 +177,10 @@ class LanguageSelectPanel(wx.Panel):
|
||||
|
||||
# create a locale object for this language
|
||||
self.locale = wx.Locale(lang)
|
||||
self.locale.AddCatalog('wxpydemo')
|
||||
if self.locale.IsOk():
|
||||
self.locale.AddCatalog('wxpydemo')
|
||||
else:
|
||||
self.locale = None
|
||||
|
||||
def translateExample(self):
|
||||
self.translatedST.SetLabel(_(self.englishBaseCh.GetStringSelection()))
|
||||
|
||||
+2
-24
@@ -47,29 +47,6 @@ import images
|
||||
_treeList = [
|
||||
# new stuff
|
||||
('Recent Additions/Updates', [
|
||||
'RichTextCtrl',
|
||||
'Treebook',
|
||||
'Toolbook',
|
||||
'BitmapFromBuffer',
|
||||
'RawBitmapAccess',
|
||||
'DragScroller',
|
||||
'DelayedResult',
|
||||
'ExpandoTextCtrl',
|
||||
'ButtonPanel',
|
||||
'FlatNotebook',
|
||||
'CustomTreeCtrl',
|
||||
'AboutBox',
|
||||
'AlphaDrawing',
|
||||
'GraphicsContext',
|
||||
'CollapsiblePane',
|
||||
'ComboCtrl',
|
||||
'OwnerDrawnComboBox',
|
||||
'BitmapComboBox',
|
||||
'I18N',
|
||||
'Img2PyArtProvider',
|
||||
'SearchCtrl',
|
||||
'SizedControls',
|
||||
'AUI_MDI',
|
||||
]),
|
||||
|
||||
# managed windows == things with a (optional) caption you can close
|
||||
@@ -214,6 +191,7 @@ _treeList = [
|
||||
'Throbber',
|
||||
'Ticker',
|
||||
'TimeCtrl',
|
||||
'TreeMixin',
|
||||
'VListBox',
|
||||
]),
|
||||
|
||||
@@ -1688,7 +1666,7 @@ class wxPythonDemo(wx.Frame):
|
||||
|
||||
def OnOpenWidgetInspector(self, evt):
|
||||
# Activate the widget inspection tool
|
||||
from wx.lib.inspect import InspectionTool
|
||||
from wx.lib.inspection import InspectionTool
|
||||
if not InspectionTool().initialized:
|
||||
InspectionTool().Init()
|
||||
|
||||
|
||||
@@ -157,10 +157,8 @@ class MyCanvas(wx.ScrolledWindow):
|
||||
self.x, self.y = self.ConvertEventCoords(event)
|
||||
|
||||
def ConvertEventCoords(self, event):
|
||||
xView, yView = self.GetViewStart()
|
||||
xDelta, yDelta = self.GetScrollPixelsPerUnit()
|
||||
return (event.GetX() + (xView * xDelta),
|
||||
event.GetY() + (yView * yDelta))
|
||||
newpos = self.CalcUnscrolledPosition(event.GetX(), event.GetY())
|
||||
return newpos
|
||||
|
||||
def OnLeftButtonEvent(self, event):
|
||||
if event.LeftDown():
|
||||
@@ -172,23 +170,34 @@ class MyCanvas(wx.ScrolledWindow):
|
||||
|
||||
elif event.Dragging() and self.drawing:
|
||||
if BUFFERED:
|
||||
# If doing buffered drawing, create the buffered DC, giving it
|
||||
# it a real DC to blit to when done.
|
||||
cdc = wx.ClientDC(self)
|
||||
self.PrepareDC(cdc)
|
||||
dc = wx.BufferedDC(cdc, self.buffer)
|
||||
# If doing buffered drawing we'll just update the
|
||||
# buffer here and then refresh that portion of the
|
||||
# window, then that portion of the buffer will be
|
||||
# redrawn in the EVT_PAINT handler.
|
||||
dc = wx.BufferedDC(None, self.buffer)
|
||||
else:
|
||||
# otherwise we'll draw directly to a wx.ClientDC
|
||||
dc = wx.ClientDC(self)
|
||||
self.PrepareDC(dc)
|
||||
|
||||
dc.BeginDrawing()
|
||||
dc.SetPen(wx.Pen('MEDIUM FOREST GREEN', 4))
|
||||
coords = (self.x, self.y) + self.ConvertEventCoords(event)
|
||||
self.curLine.append(coords)
|
||||
dc.DrawLine(*coords)
|
||||
self.SetXY(event)
|
||||
dc.EndDrawing()
|
||||
|
||||
|
||||
if BUFFERED:
|
||||
# figure out what part of the window to refresh
|
||||
x1,y1, x2,y2 = dc.GetBoundingBox()
|
||||
x1,y1 = self.CalcScrolledPosition(x1, y1)
|
||||
x2,y2 = self.CalcScrolledPosition(x2, y2)
|
||||
# make a rectangle
|
||||
rect = wx.Rect()
|
||||
rect.SetTopLeft((x1,y1))
|
||||
rect.SetBottomRight((x2,y2))
|
||||
rect.Inflate(2,2)
|
||||
# refresh it
|
||||
self.RefreshRect(rect)
|
||||
|
||||
elif event.LeftUp() and self.drawing:
|
||||
self.lines.append(self.curLine)
|
||||
|
||||
@@ -0,0 +1,265 @@
|
||||
import wx, wx.lib.customtreectrl, wx.gizmos
|
||||
try:
|
||||
import treemixin
|
||||
except ImportError:
|
||||
from wx.lib.mixins import treemixin
|
||||
|
||||
overview = treemixin.__doc__
|
||||
|
||||
class TreeModel(object):
|
||||
''' TreeModel holds the domain objects that are shown in the different
|
||||
tree controls. Each domain object is simply a two-tuple consisting of
|
||||
a label and a list of child tuples, i.e. (label, [list of child tuples]).
|
||||
'''
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.items = []
|
||||
self.itemCounter = 0
|
||||
super(TreeModel, self).__init__(*args, **kwargs)
|
||||
|
||||
def GetItem(self, indices):
|
||||
text, children = 'Hidden root', self.items
|
||||
for index in indices:
|
||||
text, children = children[index]
|
||||
return text, children
|
||||
|
||||
def GetText(self, indices):
|
||||
return self.GetItem(indices)[0]
|
||||
|
||||
def GetChildren(self, indices):
|
||||
return self.GetItem(indices)[1]
|
||||
|
||||
def GetChildrenCount(self, indices):
|
||||
return len(self.GetChildren(indices))
|
||||
|
||||
def SetChildrenCount(self, indices, count):
|
||||
children = self.GetChildren(indices)
|
||||
while len(children) > count:
|
||||
children.pop()
|
||||
while len(children) < count:
|
||||
children.append(('item %d'%self.itemCounter, []))
|
||||
self.itemCounter += 1
|
||||
|
||||
def MoveItem(self, itemToMoveIndex, newParentIndex):
|
||||
itemToMove = self.GetItem(itemToMoveIndex)
|
||||
newParentChildren = self.GetChildren(newParentIndex)
|
||||
newParentChildren.append(itemToMove)
|
||||
oldParentChildren = self.GetChildren(itemToMoveIndex[:-1])
|
||||
oldParentChildren.remove(itemToMove)
|
||||
|
||||
|
||||
class DemoTreeMixin(treemixin.VirtualTree, treemixin.DragAndDrop,
|
||||
treemixin.ExpansionState):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.model = kwargs.pop('treemodel')
|
||||
self.log = kwargs.pop('log')
|
||||
super(DemoTreeMixin, self).__init__(*args, **kwargs)
|
||||
self.CreateImageList()
|
||||
|
||||
def CreateImageList(self):
|
||||
size = (16, 16)
|
||||
self.imageList = wx.ImageList(*size)
|
||||
for art in wx.ART_FOLDER, wx.ART_FILE_OPEN, wx.ART_NORMAL_FILE:
|
||||
self.imageList.Add(wx.ArtProvider.GetBitmap(art, wx.ART_OTHER,
|
||||
size))
|
||||
self.AssignImageList(self.imageList)
|
||||
|
||||
def OnGetItemText(self, indices):
|
||||
return self.model.GetText(indices)
|
||||
|
||||
def OnGetChildrenCount(self, indices):
|
||||
return self.model.GetChildrenCount(indices)
|
||||
|
||||
def OnGetItemFont(self, indices):
|
||||
# Show how to change the item font. Here we use a small font for
|
||||
# items that have children and the default font otherwise.
|
||||
if self.model.GetChildrenCount(indices) > 0:
|
||||
return wx.SMALL_FONT
|
||||
else:
|
||||
return super(DemoTreeMixin, self).OnGetItemFont(indices)
|
||||
|
||||
def OnGetItemTextColour(self, indices):
|
||||
# Show how to change the item text colour. In this case second level
|
||||
# items are coloured red and third level items are blue. All other
|
||||
# items have the default text colour.
|
||||
if len(indices) % 2 == 0:
|
||||
return wx.RED
|
||||
elif len(indices) % 3 == 0:
|
||||
return wx.BLUE
|
||||
else:
|
||||
return super(DemoTreeMixin, self).OnGetItemTextColour(indices)
|
||||
|
||||
def OnGetItemBackgroundColour(self, indices):
|
||||
# Show how to change the item background colour. In this case the
|
||||
# background colour of each third item is green.
|
||||
if indices[-1] == 2:
|
||||
return wx.GREEN
|
||||
else:
|
||||
return super(DemoTreeMixin,
|
||||
self).OnGetItemBackgroundColour(indices)
|
||||
|
||||
def OnGetItemImage(self, indices, which):
|
||||
# Return the right icon depending on whether the item has children.
|
||||
if which in [wx.TreeItemIcon_Normal, wx.TreeItemIcon_Selected]:
|
||||
if self.model.GetChildrenCount(indices):
|
||||
return 0
|
||||
else:
|
||||
return 2
|
||||
else:
|
||||
return 1
|
||||
|
||||
def OnDrop(self, dropTarget, dragItem):
|
||||
dropIndex = self.GetIndexOfItem(dropTarget)
|
||||
dropText = self.model.GetText(dropIndex)
|
||||
dragIndex = self.GetIndexOfItem(dragItem)
|
||||
dragText = self.model.GetText(dragIndex)
|
||||
self.log.write('drop %s %s on %s %s'%(dragText, dragIndex,
|
||||
dropText, dropIndex))
|
||||
self.model.MoveItem(dragIndex, dropIndex)
|
||||
self.GetParent().RefreshItems()
|
||||
|
||||
|
||||
class VirtualTreeCtrl(DemoTreeMixin, wx.TreeCtrl):
|
||||
pass
|
||||
|
||||
|
||||
class VirtualTreeListCtrl(DemoTreeMixin, wx.gizmos.TreeListCtrl):
|
||||
def __init__(self, *args, **kwargs):
|
||||
kwargs['style'] = wx.TR_DEFAULT_STYLE | wx.TR_FULL_ROW_HIGHLIGHT
|
||||
super(VirtualTreeListCtrl, self).__init__(*args, **kwargs)
|
||||
self.AddColumn('Column 0')
|
||||
self.AddColumn('Column 1')
|
||||
for art in wx.ART_TIP, wx.ART_WARNING:
|
||||
self.imageList.Add(wx.ArtProvider.GetBitmap(art, wx.ART_OTHER,
|
||||
(16, 16)))
|
||||
|
||||
def OnGetItemText(self, indices, column=0):
|
||||
# Return a different label depending on column.
|
||||
return '%s, column %d'%\
|
||||
(super(VirtualTreeListCtrl, self).OnGetItemText(indices), column)
|
||||
|
||||
def OnGetItemImage(self, indices, which, column=0):
|
||||
# Also change the image of the other columns when the item has
|
||||
# children.
|
||||
if column == 0:
|
||||
return super(VirtualTreeListCtrl, self).OnGetItemImage(indices,
|
||||
which)
|
||||
elif self.OnGetChildrenCount(indices):
|
||||
return 4
|
||||
else:
|
||||
return 3
|
||||
|
||||
|
||||
class VirtualCustomTreeCtrl(DemoTreeMixin,
|
||||
wx.lib.customtreectrl.CustomTreeCtrl):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.checked = {}
|
||||
kwargs['ctstyle'] = wx.TR_DEFAULT_STYLE | wx.TR_HIDE_ROOT | \
|
||||
wx.TR_HAS_BUTTONS | wx.TR_FULL_ROW_HIGHLIGHT
|
||||
super(VirtualCustomTreeCtrl, self).__init__(*args, **kwargs)
|
||||
self.Bind(wx.lib.customtreectrl.EVT_TREE_ITEM_CHECKED,
|
||||
self.OnItemChecked)
|
||||
|
||||
def OnGetItemType(self, indices):
|
||||
if len(indices) == 1:
|
||||
return 1
|
||||
elif len(indices) == 2:
|
||||
return 2
|
||||
else:
|
||||
return 0
|
||||
|
||||
def OnGetItemChecked(self, indices):
|
||||
return self.checked.get(indices, False)
|
||||
|
||||
def OnItemChecked(self, event):
|
||||
item = event.GetItem()
|
||||
itemIndex = self.GetIndexOfItem(item)
|
||||
if self.GetItemType(item) == 2:
|
||||
# It's a radio item; reset other items on the same level
|
||||
for nr in range(self.GetChildrenCount(self.GetItemParent(item))):
|
||||
self.checked[itemIndex[:-1]+(nr,)] = False
|
||||
self.checked[itemIndex] = True
|
||||
|
||||
|
||||
|
||||
class TreeNotebook(wx.Notebook):
|
||||
def __init__(self, *args, **kwargs):
|
||||
treemodel = kwargs.pop('treemodel')
|
||||
log = kwargs.pop('log')
|
||||
super(TreeNotebook, self).__init__(*args, **kwargs)
|
||||
self.trees = []
|
||||
for class_, title in [(VirtualTreeCtrl, 'TreeCtrl'),
|
||||
(VirtualTreeListCtrl, 'TreeListCtrl'),
|
||||
(VirtualCustomTreeCtrl, 'CustomTreeCtrl')]:
|
||||
tree = class_(self, treemodel=treemodel, log=log)
|
||||
self.trees.append(tree)
|
||||
self.AddPage(tree, title)
|
||||
self.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self.OnPageChanged)
|
||||
|
||||
def OnPageChanged(self, event):
|
||||
oldTree = self.GetPage(event.OldSelection)
|
||||
newTree = self.GetPage(event.Selection)
|
||||
newTree.RefreshItems()
|
||||
newTree.SetExpansionState(oldTree.GetExpansionState())
|
||||
event.Skip()
|
||||
|
||||
def GetIndicesOfSelectedItems(self):
|
||||
tree = self.trees[self.GetSelection()]
|
||||
if tree.GetSelections():
|
||||
return [tree.GetIndexOfItem(item) for item in tree.GetSelections()]
|
||||
else:
|
||||
return [()]
|
||||
|
||||
def RefreshItems(self):
|
||||
tree = self.trees[self.GetSelection()]
|
||||
tree.RefreshItems()
|
||||
tree.UnselectAll()
|
||||
|
||||
|
||||
class TestPanel(wx.Panel):
|
||||
def __init__(self, parent, log):
|
||||
self.log = log
|
||||
super(TestPanel, self).__init__(parent)
|
||||
self.treemodel = TreeModel()
|
||||
self.CreateControls()
|
||||
self.LayoutControls()
|
||||
|
||||
def CreateControls(self):
|
||||
self.notebook = TreeNotebook(self, treemodel=self.treemodel,
|
||||
log=self.log)
|
||||
self.label = wx.StaticText(self, label='Number of children: ')
|
||||
self.childrenCountCtrl = wx.SpinCtrl(self, value='0', max=10000)
|
||||
self.button = wx.Button(self, label='Update children')
|
||||
self.button.Bind(wx.EVT_BUTTON, self.OnEnter)
|
||||
|
||||
def LayoutControls(self):
|
||||
hSizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
options = dict(flag=wx.ALIGN_CENTER_VERTICAL|wx.ALL, border=2)
|
||||
hSizer.Add(self.label, **options)
|
||||
hSizer.Add(self.childrenCountCtrl, 2, **options)
|
||||
hSizer.Add(self.button, **options)
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
sizer.Add(self.notebook, 1, wx.EXPAND)
|
||||
sizer.Add(hSizer, 0, wx.EXPAND)
|
||||
self.SetSizer(sizer)
|
||||
|
||||
def OnEnter(self, event):
|
||||
indicesList = self.notebook.GetIndicesOfSelectedItems()
|
||||
newChildrenCount = self.childrenCountCtrl.GetValue()
|
||||
for indices in indicesList:
|
||||
text = self.treemodel.GetText(indices)
|
||||
oldChildrenCount = self.treemodel.GetChildrenCount(indices)
|
||||
self.log.write('%s %s now has %d children (was %d)'%(text, indices,
|
||||
newChildrenCount, oldChildrenCount))
|
||||
self.treemodel.SetChildrenCount(indices, newChildrenCount)
|
||||
self.notebook.RefreshItems()
|
||||
|
||||
|
||||
def runTest(frame, nb, log):
|
||||
win = TestPanel(nb, log)
|
||||
return win
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
import sys, os, run
|
||||
run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])
|
||||
|
||||
@@ -18,7 +18,7 @@ on the command line.
|
||||
"""
|
||||
|
||||
import wx
|
||||
import wx.lib.mixins.inspect
|
||||
import wx.lib.mixins.inspection
|
||||
import sys, os
|
||||
|
||||
# stuff for debugging
|
||||
@@ -40,7 +40,7 @@ class Log:
|
||||
write = WriteText
|
||||
|
||||
|
||||
class RunDemoApp(wx.App, wx.lib.mixins.inspect.InspectionMixin):
|
||||
class RunDemoApp(wx.App, wx.lib.mixins.inspection.InspectionMixin):
|
||||
def __init__(self, name, module, useShell):
|
||||
self.name = name
|
||||
self.demoModule = module
|
||||
|
||||
@@ -73,7 +73,7 @@ def getTasks(config_env):
|
||||
|
||||
|
||||
beastTask1 = Task(
|
||||
[ #Job("beast.23", "distrib/all/build-windows", ["2.3"], env=config_env),
|
||||
[ Job("beast.23", "distrib/all/build-windows", ["2.3"], env=config_env),
|
||||
# Job("co-rh9.23", "distrib/all/build-rpm", ["beast", "co-rh9", "rh9", "2.3"], env=config_env),
|
||||
Job("beast.24", "distrib/all/build-windows", ["2.4"], env=config_env),
|
||||
# Job("co-rh9.24", "distrib/all/build-rpm", ["beast", "co-rh9", "rh9", "2.4"], env=config_env),
|
||||
@@ -89,7 +89,8 @@ def getTasks(config_env):
|
||||
])
|
||||
|
||||
xavierTask = Task([
|
||||
Job("xavier", "distrib/all/build-deb", ["xavier", "/work/chroot/dapper", "dapper"], env=config_env),
|
||||
Job("xavier.d", "distrib/all/build-deb", ["xavier", "/work/chroot/dapper", "dapper"], env=config_env),
|
||||
Job("xavier.f", "distrib/all/build-deb", ["xavier", "/work/chroot/feisty", "feisty"], env=config_env),
|
||||
])
|
||||
|
||||
buildTasks = [ #jaguarTask,
|
||||
|
||||
@@ -25,8 +25,8 @@ function TestOnline {
|
||||
if [ $skipdeb != yes ]; then
|
||||
# We use a chroot environment on the build machine for the debian
|
||||
# builds, so this build is pretty simple. Just copy the tarball
|
||||
# and a build script to /tmp, and then run do-build-deb in the
|
||||
# chroot.
|
||||
# and a build script to the build machine, and then run
|
||||
# do-build-deb in the chroot.
|
||||
|
||||
if TestOnline $host; then
|
||||
|
||||
@@ -37,7 +37,7 @@ if [ $skipdeb != yes ]; then
|
||||
scp $STAGING_DIR/wxPython-src* distrib/all/do-build-deb \
|
||||
root@$host:$chRootRoot/$LINUX_BUILD
|
||||
|
||||
ssh root@$host "dchroot --chroot $chRootName --directory $LINUX_BUILD \"do-build-deb $VERSION $VER2\""
|
||||
ssh root@$host "dchroot --chroot $chRootName --directory $LINUX_BUILD \"./do-build-deb $VERSION $VER2\""
|
||||
|
||||
echo "Fetching the results..."
|
||||
mkdir -p $STAGING_DIR/$chRootName
|
||||
|
||||
@@ -6,6 +6,12 @@ rem or extensions that can share the same DLL.
|
||||
setlocal
|
||||
set BASE=_distrib_zip\wxPython-%1
|
||||
|
||||
set TYPE=h
|
||||
if %2 == "debug" set TYPE=d
|
||||
|
||||
set DELTYPE=d
|
||||
if %2 == "debug" set DELTYPE=h
|
||||
|
||||
rem **** Make a directory to build up a distribution tree
|
||||
mkdir _distrib_zip
|
||||
mkdir %BASE%
|
||||
@@ -30,19 +36,19 @@ copy %WXWIN%\wxPython\src\*.py %BASE%\include\wx\wxPython\i_files
|
||||
|
||||
mkdir %BASE%\lib
|
||||
mkdir %BASE%\lib\vc_dll
|
||||
mkdir %BASE%\lib\vc_dll\mswh
|
||||
mkdir %BASE%\lib\vc_dll\mswuh
|
||||
mkdir %BASE%\lib\vc_dll\msw%TYPE%
|
||||
mkdir %BASE%\lib\vc_dll\mswu%TYPE%
|
||||
|
||||
copy /s %WXWIN%\lib\vc_dll\mswh\* %BASE%\lib\vc_dll\mswh
|
||||
copy /s %WXWIN%\lib\vc_dll\mswuh\* %BASE%\lib\vc_dll\mswuh
|
||||
copy /s %WXWIN%\lib\vc_dll\msw%TYPE%\* %BASE%\lib\vc_dll\mswh
|
||||
copy /s %WXWIN%\lib\vc_dll\mswu%TYPE%\* %BASE%\lib\vc_dll\mswuh
|
||||
copy %WXWIN%\lib\vc_dll\* %BASE%\lib\vc_dll
|
||||
|
||||
|
||||
rem *** remove unneeded files
|
||||
cd _distrib_zip
|
||||
|
||||
ffind /SB wx*d_*.* > del-files
|
||||
ffind /SB wx*d.* >> del-files
|
||||
ffind /SB wx*%DELTYPE%_*.* > del-files
|
||||
ffind /SB wx*%DELTYPE%.* >> del-files
|
||||
ffind /SB .#* >> del-files
|
||||
ffind /SB .cvsignore >> del-files
|
||||
|
||||
@@ -68,8 +74,10 @@ rm del-files
|
||||
rm del-dirs
|
||||
|
||||
rem *** bundle it all up TODO: don't hard-code the 2.8
|
||||
tar cvf ../dist/wxPython2.8-win32-devel-%1.tar wxPython-%1
|
||||
bzip2 -9 ../dist/wxPython2.8-win32-devel-%1.tar
|
||||
set EXT=
|
||||
if %2 == "debug" set EXT="-debug"
|
||||
tar cvf ../dist/wxPython2.8-win32-devel-%1%EXT%.tar wxPython-%1
|
||||
bzip2 -9 ../dist/wxPython2.8-win32-devel-%1%EXT%.tar
|
||||
|
||||
rem *** cleanup
|
||||
cd ..
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
# Build an RPM containing both wxGTK and wxPython
|
||||
|
||||
##set -o xtrace
|
||||
##set -o errexit
|
||||
|
||||
spectemplate=distrib/wxPythonFull.spec.in
|
||||
|
||||
@@ -236,7 +237,7 @@ fi
|
||||
#----------------------------------------------------------------------
|
||||
# build the RPM
|
||||
|
||||
if [ -z "${skiprpm}" ]; then
|
||||
if [ "${skiprpm}" != "1" ]; then
|
||||
echo "*** Building RPMs..."
|
||||
cp ${distdir}/${tarver}.tar.bz2 ${rpmtop}/SOURCES
|
||||
|
||||
|
||||
+130
-4
@@ -3,7 +3,7 @@ Recent Changes for wxPython
|
||||
|
||||
2.9.0.0
|
||||
-------
|
||||
*
|
||||
*
|
||||
|
||||
wxGTK: Implemented support for underlined fonts in wx.StaticText
|
||||
|
||||
@@ -11,12 +11,59 @@ wxGTK: wx.TopLevelWindow.SetSizeHints size increments now work
|
||||
|
||||
Added wx.EventBlocker class
|
||||
|
||||
wxGTK: make wx.TopLevelWindow.GetSize() return the size of the window
|
||||
including the decorations and updated SetSize() to account for this as
|
||||
well.
|
||||
|
||||
wxMSW: For consistency with wxGTK, when a top level window is
|
||||
minimized the size returned from GetSize will be the restored size,
|
||||
not the size of the icon window.
|
||||
|
||||
wxGTK: For consistency with wxMSW, when a top level window is
|
||||
minimized the size returned from GetClientSize will be (0,0).
|
||||
|
||||
wxGTK: Color cursors now supported.
|
||||
|
||||
Added wx.DC.StretchBlit() for wxMac and wxMSW (Vince Harron)
|
||||
|
||||
Added support for labels for toolbar controls (Vince Harron)
|
||||
|
||||
wxGTK: Implemented support for underlined fonts in wx.StaticText.
|
||||
|
||||
wxGTK: Setting foreground colour of single line wx.TextCtrl now works.
|
||||
|
||||
wxMac: Corrected top border size for wxStaticBox with empty label (nusi)
|
||||
|
||||
wx.Window.IsEnabled() now returns false even if the window parent, and
|
||||
not the window itself, is disabled and added IsThisEnabled()
|
||||
implementing the old IsEnabled() behaviour.
|
||||
|
||||
wxGTK: Now using the native tab traversal functions instead of
|
||||
simulating it ourselves.
|
||||
|
||||
Generating wx.NavigationKeyEvent events doesn't work any more under
|
||||
wxGTK (and other platforms in the future), use wx.Window.Navigate() or
|
||||
NavigateIn() instead.
|
||||
|
||||
|
||||
|
||||
2.8.1.2
|
||||
|
||||
|
||||
|
||||
2.8.3.1
|
||||
-------
|
||||
*
|
||||
*
|
||||
|
||||
wxGTK: Make wx.NO_BORDER style work with wx.RadioBox (patch 1525406)
|
||||
|
||||
Update to 0.9.1 of TreeMixin.
|
||||
|
||||
|
||||
|
||||
|
||||
2.8.3.0
|
||||
-------
|
||||
* 22-March-2007
|
||||
|
||||
Added wx.ToolBar.SetToolNormalBitmap and SetToolDisabledBitmap
|
||||
methods. (Keep in mind however that the disabled bitmap is currently
|
||||
@@ -27,6 +74,85 @@ Refactored the inspection tool such that it can be used as a wx.App
|
||||
mix-in class as it was used before (with the wx.lib.mixins.inspect
|
||||
module) and also as a non mix-in tool (using wx.lib.inspect.InspectionTool).
|
||||
|
||||
Add wx.lib.mixins.treemixin from Frank Niessink.
|
||||
|
||||
Added the wx.SizerFlags class, and also added AddF, InsertF and
|
||||
PrependF methods to wx.Sizer. The wxSizerFlags class provides a
|
||||
convienient and easier to read way to add items to a sizer. It was
|
||||
added as a new set of methods of the wx.Sizer class so as to not
|
||||
disturb existing code. For example, instead of writing::
|
||||
|
||||
sizer.Add(ctrl, 0, wx.EXPAND | wx.ALL, 10)
|
||||
|
||||
you can now write::
|
||||
|
||||
sizer.AddF(ctrl, wx.SizerFlags().Expand().Border(wx.ALL,10))
|
||||
|
||||
|
||||
Will Sadkin provided a patch for the wx.lib.masked package that fixes
|
||||
its support for using the navigation keys on the numeric keypad.
|
||||
|
||||
wx.lib.plot: patch #1663937 to allow user to turn off scientific
|
||||
notation on plot.
|
||||
|
||||
wxGTK: Most of the remaining TODOs for the wx.GraphicsContext on wxGTK
|
||||
have been done. This includes implementations for GetTextExtent,
|
||||
Clip, DrawBitmap, fixing the drawing position of text to be at the
|
||||
upper left corner instead of the baseline, etc.
|
||||
|
||||
wx.lib.customtreectrl patches from Andrea:
|
||||
|
||||
1. ExpandAll has been renamed as ExpandAllChildren, and the new
|
||||
ExpandAll now takes no input arguments (consistent with
|
||||
wx.TreeCtrl)
|
||||
|
||||
2. ctstyle keyword is now defaulted to 0: every style related to
|
||||
CustomTreeCtrl and the underlying wx.PyScrolledWindow should be
|
||||
declared using the keyword "style" only. For backward
|
||||
compatibility, ctstyle continues to work as I merged ctstyle and
|
||||
style in the __init__ method.
|
||||
|
||||
3. GetClassDefaultAttributes is now a classmethod.
|
||||
|
||||
4. UnselectAll bug fixed.
|
||||
|
||||
|
||||
Renamed the wx.lib.inspect and wx.lib.mixins.inspect modules to
|
||||
inspection, in order to avoid conflicts with the inspect module in the
|
||||
standard Python library.
|
||||
|
||||
Lots of changes to XRCed from Roman Rolinsky:
|
||||
|
||||
* Preferences for default "sizeritem" parameters for new panels and
|
||||
controls can be configured ("File">"Preferences...").
|
||||
|
||||
* Implemented comment object for including simple one-line comments and
|
||||
comment directives as tree nodes. No validation is performed for a
|
||||
valid XML string so comments must not contain "-->". Comment directive
|
||||
is a special comment starting with '%' character, followed by a line
|
||||
of python code. It is executed using 'exec' when the resource file is
|
||||
opened. This is useful to import plugin modules containing custom
|
||||
handlers which are specific to the resource file, hovewer this is of
|
||||
course a security hole if you use foreign XRC files. A warning is
|
||||
displayed if the preference option 'ask' is selected (by default).
|
||||
|
||||
* Added support for custom controls and plugin modules. Refer to this
|
||||
wxPythonWiki for the details: http://wiki.wxpython.org/index.cgi/XRCed#custom
|
||||
|
||||
* Tool panel sections can be collapsed/expanded by clicking on the
|
||||
label of a tool group.
|
||||
|
||||
* Some undo/redo and other fixes.
|
||||
|
||||
* Fixes for wxMSW (notebook highlighting, control sizes, tree Unselect).
|
||||
|
||||
* Notebook page highlighting fix. Highlight resizes when the window
|
||||
is resized. ParamUnit spin button detects event handler re-entry
|
||||
(wxGTK probably has a bug in wxSpinButton with repeated events).
|
||||
|
||||
* Fix for dealing with empty 'growable' property, using MiniFrame
|
||||
for properties panel, the panel is restored together with the
|
||||
main window.
|
||||
|
||||
|
||||
|
||||
@@ -73,7 +199,7 @@ windows so they are no longer clipped by the bounds of the stc window.
|
||||
|
||||
2.8.1.0
|
||||
-------
|
||||
* 8-Jan-2006
|
||||
* 8-Jan-2007
|
||||
|
||||
Added EVT_TASKBAR_CLICK and use it to show taskbar icon menu on right
|
||||
button release, not press, under MSW (bug 1623761)
|
||||
|
||||
@@ -165,6 +165,11 @@ const wxAcceleratorTable wxNullAcceleratorTable;
|
||||
%mutable;
|
||||
|
||||
|
||||
wxAcceleratorEntry *wxGetAccelFromString(const wxString& label);
|
||||
%pythoncode {
|
||||
def GetAccelFromString(label):
|
||||
entry = AcceleratorEntry()
|
||||
entry.FromString(label)
|
||||
return entry
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
@@ -319,7 +319,7 @@ the ``type`` parameter.", "");
|
||||
%extend {
|
||||
DocStr(CopyFromBuffer,
|
||||
"Copy data from a RGB buffer object to replace the bitmap pixel data.
|
||||
See `wxBitmapFromBuffer` for more details.", "");
|
||||
See `wx.BitmapFromBuffer` for more details.", "");
|
||||
void CopyFromBuffer(buffer data, int DATASIZE)
|
||||
{
|
||||
int height=self->GetHeight();
|
||||
@@ -352,7 +352,7 @@ See `wxBitmapFromBuffer` for more details.", "");
|
||||
|
||||
DocStr(CopyFromBufferRGBA,
|
||||
"Copy data from a RGBA buffer object to replace the bitmap pixel data.
|
||||
See `wxBitmapFromBufferRGBA` for more details.", "");
|
||||
See `wx.BitmapFromBufferRGBA` for more details.", "");
|
||||
void CopyFromBufferRGBA(buffer data, int DATASIZE)
|
||||
{
|
||||
int height=self->GetHeight();
|
||||
|
||||
+19
-14
@@ -113,9 +113,10 @@ wxColour wxGetColourFromUser(wxWindow *parent = (wxWindow *)NULL,
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
enum {
|
||||
wxDD_CHANGE_DIR,
|
||||
wxDD_DIR_MUST_EXIST,
|
||||
wxDD_NEW_DIR_BUTTON,
|
||||
wxDD_DEFAULT_STYLE,
|
||||
wxDD_CHANGE_DIR,
|
||||
};
|
||||
|
||||
DocStr(wxDirDialog,
|
||||
@@ -129,10 +130,12 @@ Window Styles
|
||||
wx.DEFAULT_DIALOG_STYLE, wx.DD_NEW_DIR_BUTTON
|
||||
and wx.RESIZE_BORDER.
|
||||
|
||||
wx.DD_NEW_DIR_BUTTON Add 'Create new directory' button and allow
|
||||
directory names to be editable. On Windows
|
||||
the new directory button is only available
|
||||
with recent versions of the common dialogs.
|
||||
wx.DD_DIR_MUST_EXIST The dialog will allow the user to choose only an
|
||||
existing folder. When this style is not given, a
|
||||
'Create new directory' button is added to the dialog
|
||||
(on Windows) or some other way is provided to the
|
||||
user to type the name of a new folder.
|
||||
Use this instead of deprecated wx.DD_NEW_DIR_BUTTON.
|
||||
|
||||
wx.DD_CHANGE_DIR Change the current working directory to the
|
||||
directory chosen by the user.
|
||||
@@ -195,15 +198,6 @@ public:
|
||||
%}
|
||||
|
||||
enum {
|
||||
// These will dissappear in 2.8
|
||||
wxOPEN,
|
||||
wxSAVE,
|
||||
wxOVERWRITE_PROMPT,
|
||||
wxFILE_MUST_EXIST,
|
||||
wxMULTIPLE,
|
||||
wxCHANGE_DIR,
|
||||
wxHIDE_READONLY,
|
||||
|
||||
wxFD_OPEN,
|
||||
wxFD_SAVE,
|
||||
wxFD_OVERWRITE_PROMPT,
|
||||
@@ -214,6 +208,17 @@ enum {
|
||||
wxFD_DEFAULT_STYLE,
|
||||
};
|
||||
|
||||
%pythoncode {
|
||||
%# deprecated names
|
||||
OPEN = FD_OPEN,
|
||||
SAVE = FD_SAVE,
|
||||
OVERWRITE_PROMPT = FD_OVERWRITE_PROMPT,
|
||||
FILE_MUST_EXIST = FD_FILE_MUST_EXIST,
|
||||
MULTIPLE = FD_MULTIPLE,
|
||||
CHANGE_DIR = FD_CHANGE_DIR
|
||||
}
|
||||
|
||||
|
||||
DocStr(wxFileDialog,
|
||||
"wx.FileDialog allows the user to select one or more files from the
|
||||
filesystem.", "
|
||||
|
||||
@@ -419,8 +419,11 @@ public:
|
||||
const wxString& globalFilename = wxPyEmptyString,
|
||||
long style = wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_GLOBAL_FILE),
|
||||
"", "");
|
||||
|
||||
~wxFileConfig();
|
||||
|
||||
static wxString GetGlobalFileName(const wxString& szFile);
|
||||
static wxString GetLocalFileName(const wxString& szFile, int style = 0);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -510,10 +510,6 @@ public:
|
||||
int n = 1,
|
||||
Month month = Inv_Month,
|
||||
int year = Inv_Year);
|
||||
// wxDateTime GetWeekDay(WeekDay weekday,
|
||||
// int n = 1,
|
||||
// Month month = Inv_Month,
|
||||
// int year = Inv_Year);
|
||||
|
||||
// sets to the last weekday in the given month, year
|
||||
bool SetToLastWeekDay(WeekDay weekday,
|
||||
@@ -523,17 +519,6 @@ public:
|
||||
Month month = Inv_Month,
|
||||
int year = Inv_Year);
|
||||
|
||||
// sets the date to the given day of the given week in the year,
|
||||
// returns True on success and False if given date doesn't exist (e.g.
|
||||
// numWeek is > 53)
|
||||
bool SetToTheWeek(wxDateTime_t numWeek, WeekDay weekday = Mon, WeekFlags flags = Monday_First);
|
||||
wxDateTime GetWeek(wxDateTime_t numWeek, WeekDay weekday = Mon, WeekFlags flags = Monday_First);
|
||||
|
||||
%pythoncode {
|
||||
SetToTheWeek = wx._deprecated(SetToTheWeek, "SetToTheWeek is deprecated, use (static) SetToWeekOfYear instead")
|
||||
GetWeek = wx._deprecated(GetWeek, "GetWeek is deprecated, use GetWeekOfYear instead")
|
||||
}
|
||||
|
||||
// returns the date corresponding to the given week day of the given
|
||||
// week (in ISO notation) of the specified year
|
||||
static wxDateTime SetToWeekOfYear(int year,
|
||||
@@ -911,7 +896,6 @@ public:
|
||||
%property(RataDie, GetRataDie, doc="See `GetRataDie`");
|
||||
%property(Second, GetSecond, SetSecond, doc="See `GetSecond` and `SetSecond`");
|
||||
%property(Ticks, GetTicks, doc="See `GetTicks`");
|
||||
%property(Week, GetWeek, doc="See `GetWeek`");
|
||||
%property(WeekDay, GetWeekDay, doc="See `GetWeekDay`");
|
||||
%property(WeekDayInSameWeek, GetWeekDayInSameWeek, doc="See `GetWeekDayInSameWeek`");
|
||||
%property(WeekOfMonth, GetWeekOfMonth, doc="See `GetWeekOfMonth`");
|
||||
|
||||
+53
-1
@@ -354,6 +354,57 @@ position.", "
|
||||
BlitPointSize);
|
||||
|
||||
|
||||
DocDeclStr(
|
||||
bool , StretchBlit(wxCoord dstX, wxCoord dstY,
|
||||
wxCoord dstWidth, wxCoord dstHeight,
|
||||
wxDC *source,
|
||||
wxCoord srcX, wxCoord srcY,
|
||||
wxCoord srcWidth, wxCoord srcHeight,
|
||||
int rop = wxCOPY, bool useMask = false,
|
||||
wxCoord srcMaskX = wxDefaultCoord,
|
||||
wxCoord srcMaskY = wxDefaultCoord),
|
||||
"Copy from a source DC to this DC, specifying the destination
|
||||
coordinates, destination size, source DC, source coordinates, size of
|
||||
source area to copy, logical function, whether to use a bitmap mask,
|
||||
and mask source position.", "
|
||||
|
||||
:param xdest: Destination device context x position.
|
||||
:param ydest: Destination device context y position.
|
||||
:param dstWidth: Width of destination area.
|
||||
:param dstHeight: Height of destination area.
|
||||
:param source: Source device context.
|
||||
:param xsrc: Source device context x position.
|
||||
:param ysrc: Source device context y position.
|
||||
:param srcWidth: Width of source area to be copied.
|
||||
:param srcHeight: Height of source area to be copied.
|
||||
:param logicalFunc: Logical function to use: see `SetLogicalFunction`.
|
||||
:param useMask: If true, StretchBlit does a transparent blit using
|
||||
the mask that is associated with the bitmap selected
|
||||
into the source device context.
|
||||
:param xsrcMask: Source x position on the mask. If both xsrcMask and
|
||||
ysrcMask are -1, xsrc and ysrc will be assumed for
|
||||
the mask source position. Currently only implemented
|
||||
on Windows.
|
||||
:param ysrcMask: Source y position on the mask.
|
||||
");
|
||||
|
||||
|
||||
|
||||
DocDeclStrName(
|
||||
bool , StretchBlit(const wxPoint& dstPt, const wxSize& dstSize,
|
||||
wxDC *source, const wxPoint& srcPt, const wxSize& srcSize,
|
||||
int rop = wxCOPY, bool useMask = false,
|
||||
const wxPoint& srcMaskPt = wxDefaultPosition),
|
||||
"Copy from a source DC to this DC, specifying the destination
|
||||
coordinates, destination size, source DC, source coordinates, size of
|
||||
source area to copy, logical function, whether to use a bitmap mask,
|
||||
and mask source position. This version is the same as `StretchBlit`
|
||||
except `wx.Point` and `wx.Size` objects are used instead of individual
|
||||
position and size components.", "",
|
||||
StretchBlitPointSize);
|
||||
|
||||
|
||||
|
||||
DocDeclStr(
|
||||
wxBitmap , GetAsBitmap(const wxRect *subrect = NULL) const,
|
||||
"", "");
|
||||
@@ -1487,7 +1538,8 @@ destroyed safely.", "");
|
||||
|
||||
enum {
|
||||
wxBUFFER_VIRTUAL_AREA,
|
||||
wxBUFFER_CLIENT_AREA
|
||||
wxBUFFER_CLIENT_AREA,
|
||||
wxBUFFER_USES_SHARED_BUFFER
|
||||
};
|
||||
|
||||
MustHaveApp(wxBufferedDC);
|
||||
|
||||
@@ -520,8 +520,6 @@ enum {
|
||||
wxLB_EXTENDED,
|
||||
wxLB_OWNERDRAW,
|
||||
wxLB_HSCROLL,
|
||||
wxPROCESS_ENTER,
|
||||
wxPASSWORD,
|
||||
|
||||
wxCB_SIMPLE,
|
||||
wxCB_DROPDOWN,
|
||||
@@ -802,9 +800,8 @@ enum wxStretch
|
||||
wxSHAPED,
|
||||
wxFIXED_MINSIZE,
|
||||
wxTILE,
|
||||
wxADJUST_MINSIZE,
|
||||
};
|
||||
|
||||
%pythoncode { ADJUST_MINSIZE = 0 }
|
||||
|
||||
enum wxBorder
|
||||
{
|
||||
@@ -907,8 +904,6 @@ enum wxKeyCode {
|
||||
WXK_MENU,
|
||||
WXK_PAUSE,
|
||||
WXK_CAPITAL,
|
||||
WXK_PRIOR, /* Page up */
|
||||
WXK_NEXT, /* Page down */
|
||||
WXK_END,
|
||||
WXK_HOME,
|
||||
WXK_LEFT,
|
||||
@@ -978,9 +973,7 @@ enum wxKeyCode {
|
||||
WXK_NUMPAD_UP,
|
||||
WXK_NUMPAD_RIGHT,
|
||||
WXK_NUMPAD_DOWN,
|
||||
WXK_NUMPAD_PRIOR,
|
||||
WXK_NUMPAD_PAGEUP,
|
||||
WXK_NUMPAD_NEXT,
|
||||
WXK_NUMPAD_PAGEDOWN,
|
||||
WXK_NUMPAD_END,
|
||||
WXK_NUMPAD_BEGIN,
|
||||
@@ -1023,7 +1016,13 @@ enum wxKeyCode {
|
||||
WXK_SPECIAL20
|
||||
};
|
||||
|
||||
|
||||
// deprecated synonymns
|
||||
%pythoncode {
|
||||
WXK_PRIOR = WXK_PAGEUP
|
||||
WXK_NEXT = WXK_PAGEDOWN
|
||||
WXK_NUMPAD_PRIOR = WXK_NUMPAD_PAGEUP
|
||||
WXK_NUMPAD_NEXT = WXK_NUMPAD_PAGEDOWN
|
||||
}
|
||||
|
||||
typedef enum {
|
||||
wxPAPER_NONE, // Use specific dimensions
|
||||
|
||||
@@ -121,7 +121,7 @@ doesn't belong to any display", "");
|
||||
"Find the display where the given window lies, return wx.NOT_FOUND if
|
||||
it is not shown at all.", "");
|
||||
|
||||
static int GetFromWindow(wxWindow *window);
|
||||
static int GetFromWindow(const wxWindow *window);
|
||||
|
||||
|
||||
DocDeclStr(
|
||||
|
||||
@@ -663,7 +663,7 @@ false otherwise (if it was).", "");
|
||||
DocStr(wxScrollEvent,
|
||||
"A scroll event holds information about events sent from stand-alone
|
||||
scrollbars and sliders. Note that scrolled windows do not send
|
||||
instnaces of this event class, but send the `wx.ScrollWinEvent`
|
||||
instances of this event class, but send the `wx.ScrollWinEvent`
|
||||
instead.", "
|
||||
|
||||
Events
|
||||
|
||||
@@ -70,13 +70,9 @@ void wxBell();
|
||||
MustHaveApp(wxEndBusyCursor);
|
||||
void wxEndBusyCursor();
|
||||
|
||||
long wxGetElapsedTime(bool resetTimer = true);
|
||||
%pythoncode { GetElapsedTime = wx._deprecated(GetElapsedTime) }
|
||||
|
||||
bool wxIsBusy();
|
||||
wxString wxNow();
|
||||
bool wxShell(const wxString& command = wxPyEmptyString);
|
||||
void wxStartTimer();
|
||||
|
||||
|
||||
DocDeclA(
|
||||
|
||||
@@ -670,13 +670,15 @@ public:
|
||||
static wxGraphicsContext* , CreateFromNative( void * context ) ,
|
||||
"Creates a wx.GraphicsContext from a native context. This native
|
||||
context must be eg a CGContextRef for Core Graphics, a Graphics
|
||||
pointer for GDIPlus or a cairo_t pointer for Cairo.", "");
|
||||
pointer for GDIPlus or a cairo_t pointer for Cairo. NOTE: For
|
||||
wxPython we still need a way to make this value usable.", "");
|
||||
|
||||
|
||||
%newobject CreateFromNative;
|
||||
DocDeclStr(
|
||||
static wxGraphicsContext* , CreateFromNativeWindow( void * window ) ,
|
||||
"Creates a wx.GraphicsContext from a native window.", "");
|
||||
"Creates a wx.GraphicsContext from a native window. NOTE: For wxPython
|
||||
we still need a way to make this value usable.", "");
|
||||
|
||||
|
||||
|
||||
@@ -799,8 +801,7 @@ this context.", "");
|
||||
DocDeclStr(
|
||||
virtual wxGraphicsMatrix , GetTransform() const,
|
||||
"Gets the current transformation matrix of this context.", "");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
DocStr(SetPen, "Sets the stroke pen", "");
|
||||
@@ -937,8 +938,9 @@ and the current brush is used for filling.", "");
|
||||
|
||||
|
||||
%extend {
|
||||
DocStr(StrokeLineSegements,
|
||||
"Stroke disconnected lines from begin to end points", "");
|
||||
DocAStr(StrokeLineSegements,
|
||||
"StrokeLineSegments(self, List beginPoints, List endPoints)",
|
||||
"Stroke disconnected lines from begin to end points", "");
|
||||
void StrokeLineSegements(PyObject* beginPoints, PyObject* endPoints)
|
||||
{
|
||||
size_t c1, c2, count;
|
||||
|
||||
+67
-64
@@ -329,12 +329,12 @@ public:
|
||||
~wxLocale();
|
||||
|
||||
%extend {
|
||||
bool Init1(const wxString& szName,
|
||||
const wxString& szShort = wxPyEmptyString,
|
||||
const wxString& szLocale = wxPyEmptyString,
|
||||
bool Init1(const wxString& name,
|
||||
const wxString& shortName = wxPyEmptyString,
|
||||
const wxString& locale = wxPyEmptyString,
|
||||
bool bLoadDefault = true,
|
||||
bool bConvertEncoding = false) {
|
||||
bool rc = self->Init(szName, szShort, szLocale, bLoadDefault, bConvertEncoding);
|
||||
bool rc = self->Init(name, shortName, locale, bLoadDefault, bConvertEncoding);
|
||||
// Python before 2.4 needs to have LC_NUMERIC set to "C" in order
|
||||
// for the floating point conversions and such to work right.
|
||||
%#if PY_VERSION_HEX < 0x02040000
|
||||
@@ -416,13 +416,13 @@ public:
|
||||
// The loaded catalog will be used for message lookup by GetString().
|
||||
//
|
||||
// Returns 'True' if it was successfully loaded
|
||||
bool AddCatalog(const wxString& szDomain);
|
||||
bool AddCatalog(const wxString& domain);
|
||||
|
||||
// check if the given locale is provided by OS and C run time
|
||||
static bool IsAvailable(int lang);
|
||||
|
||||
// check if the given catalog is loaded
|
||||
bool IsLoaded(const wxString& szDomain) const;
|
||||
bool IsLoaded(const wxString& domain) const;
|
||||
|
||||
// Retrieve the language info struct for the given language
|
||||
//
|
||||
@@ -455,8 +455,8 @@ public:
|
||||
//
|
||||
// domains are searched in the last to first order, i.e. catalogs
|
||||
// added later override those added before.
|
||||
wxString GetString(const wxString& szOrigString,
|
||||
const wxString& szDomain = wxPyEmptyString) const;
|
||||
wxString GetString(const wxString& origString,
|
||||
const wxString& domain = wxPyEmptyString) const;
|
||||
|
||||
// Returns the current short name for the locale
|
||||
const wxString& GetName() const;
|
||||
@@ -478,28 +478,31 @@ class wxPyLocale : public wxLocale
|
||||
public:
|
||||
wxPyLocale();
|
||||
|
||||
wxPyLocale(const wxChar *szName, // name (for messages)
|
||||
const wxChar *szShort = (const wxChar *) NULL, // dir prefix (for msg files)
|
||||
const wxChar *szLocale = (const wxChar *) NULL, // locale (for setlocale)
|
||||
bool bLoadDefault = true, // preload wxstd.mo?
|
||||
bool bConvertEncoding = false); // convert Win<->Unix if necessary?
|
||||
wxPyLocale(const wxString& name, // name (for messages)
|
||||
const wxString& shortName = wxPyEmptyString, // dir prefix (for msg files)
|
||||
const wxString& locale = wxPyEmptyString, // locale (for setlocale)
|
||||
bool bLoadDefault = true, // preload wxstd.mo?
|
||||
bool bConvertEncoding = false); // convert Win<->Unix if necessary?
|
||||
|
||||
wxPyLocale(int language, // wxLanguage id or custom language
|
||||
int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING);
|
||||
int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING);
|
||||
|
||||
~wxPyLocale();
|
||||
|
||||
virtual const wxChar *GetString(const wxChar *szOrigString,
|
||||
const wxChar *szDomain = NULL) const;
|
||||
virtual const wxChar *GetString(const wxChar *szOrigString,
|
||||
const wxChar *szOrigString2, size_t n,
|
||||
const wxChar *szDomain = NULL) const;
|
||||
|
||||
virtual wxChar *GetSingularString(const wxChar *szOrigString,
|
||||
const wxChar *szDomain = NULL) const;
|
||||
virtual wxChar *GetPluralString(const wxChar *szOrigString,
|
||||
const wxChar *szOrigString2, size_t n,
|
||||
const wxChar *szDomain = NULL) const;
|
||||
virtual const wxString& GetString(const wxString& origString,
|
||||
const wxString& domain = wxPyEmptyString) const;
|
||||
virtual const wxString& GetString(const wxString& origString,
|
||||
const wxString& origString2,
|
||||
size_t n,
|
||||
const wxString& domain = wxPyEmptyString) const;
|
||||
|
||||
virtual const wxString& GetSingularString(const wxString& origString,
|
||||
const wxString& domain = wxPyEmptyString) const;
|
||||
virtual const wxString& GetPluralString(const wxString& origString,
|
||||
const wxString& origString2,
|
||||
size_t n,
|
||||
const wxString& domain = wxPyEmptyString) const;
|
||||
|
||||
|
||||
PYPRIVATE;
|
||||
private:
|
||||
@@ -510,12 +513,12 @@ wxPyLocale::wxPyLocale() : wxLocale()
|
||||
{
|
||||
}
|
||||
|
||||
wxPyLocale::wxPyLocale(const wxChar *szName, // name (for messages)
|
||||
const wxChar *szShort, // dir prefix (for msg files)
|
||||
const wxChar *szLocale, // locale (for setlocale)
|
||||
bool bLoadDefault, // preload wxstd.mo?
|
||||
bool bConvertEncoding) // convert Win<->Unix if necessary?
|
||||
: wxLocale(szName, szShort, szLocale, bLoadDefault, bConvertEncoding)
|
||||
wxPyLocale::wxPyLocale(const wxString& name, // name (for messages)
|
||||
const wxString& shortName, // dir prefix (for msg files)
|
||||
const wxString& locale, // locale (for setlocale)
|
||||
bool bLoadDefault, // preload wxstd.mo?
|
||||
bool bConvertEncoding) // convert Win<->Unix if necessary?
|
||||
: wxLocale(name, shortName, locale, bLoadDefault, bConvertEncoding)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -528,31 +531,29 @@ wxPyLocale::~wxPyLocale()
|
||||
{
|
||||
}
|
||||
|
||||
const wxChar *wxPyLocale::GetString(const wxChar *szOrigString,
|
||||
const wxChar *szDomain) const
|
||||
const wxString& wxPyLocale::GetString(const wxString& origString,
|
||||
const wxString& domain) const
|
||||
{
|
||||
wxChar *str = GetSingularString(szOrigString, szDomain);
|
||||
return (str != NULL) ? str : wxLocale::GetString(szOrigString, szDomain);
|
||||
return GetSingularString(origString, domain);
|
||||
}
|
||||
|
||||
const wxChar *wxPyLocale::GetString(const wxChar *szOrigString,
|
||||
const wxChar *szOrigString2, size_t n,
|
||||
const wxChar *szDomain) const
|
||||
const wxString& wxPyLocale::GetString(const wxString& origString,
|
||||
const wxString& origString2,
|
||||
size_t n,
|
||||
const wxString& domain) const
|
||||
{
|
||||
wxChar *str = GetPluralString(szOrigString, szOrigString2, n, szDomain);
|
||||
return (str != NULL) ? str : wxLocale::GetString(szOrigString, szOrigString2, n, szDomain);
|
||||
return GetPluralString(origString, origString2, n, domain);
|
||||
}
|
||||
|
||||
wxChar *wxPyLocale::GetSingularString(const wxChar *szOrigString,
|
||||
const wxChar *szDomain) const
|
||||
const wxString& wxPyLocale::GetSingularString(const wxString& origString,
|
||||
const wxString& domain) const
|
||||
{
|
||||
bool found;
|
||||
static wxString str;
|
||||
str = _T("error in translation"); // when the first if condition is true but the second if condition is not we do not want to return the previously queried string.
|
||||
wxString str( _T("error in translation"));
|
||||
wxPyBlock_t blocked = wxPyBeginBlockThreads();
|
||||
if((found=wxPyCBH_findCallback(m_myInst, "GetSingularString"))) {
|
||||
PyObject* param1 = wx2PyString(szOrigString);
|
||||
PyObject* param2 = wx2PyString(szDomain);
|
||||
if ((found=wxPyCBH_findCallback(m_myInst, "GetSingularString"))) {
|
||||
PyObject* param1 = wx2PyString(origString);
|
||||
PyObject* param2 = wx2PyString(domain);
|
||||
PyObject* ret = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(OO)", param1, param2));
|
||||
Py_DECREF(param1);
|
||||
Py_DECREF(param2);
|
||||
@@ -562,22 +563,24 @@ wxChar *wxPyLocale::GetSingularString(const wxChar *szOrigString,
|
||||
}
|
||||
}
|
||||
wxPyEndBlockThreads(blocked);
|
||||
return (found ? (wxChar*)str.c_str() : NULL);
|
||||
return (found ? str : wxLocale::GetString(origString, domain));
|
||||
}
|
||||
|
||||
wxChar *wxPyLocale::GetPluralString(const wxChar *szOrigString,
|
||||
const wxChar *szOrigString2, size_t n,
|
||||
const wxChar *szDomain) const
|
||||
const wxString& wxPyLocale::GetPluralString(const wxString& origString,
|
||||
const wxString& origString2, size_t n,
|
||||
const wxString& domain) const
|
||||
{
|
||||
bool found;
|
||||
static wxString str;
|
||||
str = _T("error in translation"); // when the first if condition is true but the second if condition is not we do not want to return the previously queried string.
|
||||
wxString str( _T("error in translation"));
|
||||
wxPyBlock_t blocked = wxPyBeginBlockThreads();
|
||||
if((found=wxPyCBH_findCallback(m_myInst, "GetPluralString"))) {
|
||||
PyObject* param1 = wx2PyString(szOrigString);
|
||||
PyObject* param2 = wx2PyString(szOrigString2);
|
||||
PyObject* param4 = wx2PyString(szDomain);
|
||||
PyObject* ret = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(OOiO)", param1, param2, (int)n, param4));
|
||||
if ((found=wxPyCBH_findCallback(m_myInst, "GetPluralString"))) {
|
||||
PyObject* param1 = wx2PyString(origString);
|
||||
PyObject* param2 = wx2PyString(origString2);
|
||||
PyObject* param4 = wx2PyString(domain);
|
||||
PyObject* ret = wxPyCBH_callCallbackObj(m_myInst,
|
||||
Py_BuildValue("(OOiO)",
|
||||
param1, param2,
|
||||
(int)n, param4));
|
||||
Py_DECREF(param1);
|
||||
Py_DECREF(param2);
|
||||
Py_DECREF(param4);
|
||||
@@ -587,7 +590,7 @@ wxChar *wxPyLocale::GetPluralString(const wxChar *szOrigString,
|
||||
}
|
||||
}
|
||||
wxPyEndBlockThreads(blocked);
|
||||
return (found ? (wxChar*)str.c_str() : NULL);
|
||||
return (found ? str : wxLocale::GetString(origString, origString2, n, domain) );
|
||||
}
|
||||
%}
|
||||
|
||||
@@ -619,11 +622,11 @@ public:
|
||||
|
||||
void _setCallbackInfo(PyObject* self, PyObject* _class);
|
||||
|
||||
virtual const wxChar *GetSingularString(const wxChar *szOrigString,
|
||||
const wxChar *szDomain = NULL) const;
|
||||
virtual const wxChar *GetPluralString(const wxChar *szOrigString,
|
||||
const wxChar *szOrigString2, size_t n,
|
||||
const wxChar *szDomain = NULL) const;
|
||||
virtual const wxString& GetSingularString(const wxString& origString,
|
||||
const wxString& domain = wxPyEmptyString) const;
|
||||
virtual const wxString& GetPluralString(const wxString& origString,
|
||||
const wxString& origString2, size_t n,
|
||||
const wxString& domain = wxPyEmptyString) const;
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
@@ -367,7 +367,6 @@ public:
|
||||
}
|
||||
|
||||
%property(Frame, GetFrame, doc="See `GetFrame`");
|
||||
%property(Menu, GetMenu, doc="See `GetMenu`");
|
||||
%property(MenuCount, GetMenuCount, doc="See `GetMenuCount`");
|
||||
%property(Menus, GetMenus, SetMenus, doc="See `GetMenus` and `SetMenus`");
|
||||
};
|
||||
|
||||
@@ -76,11 +76,11 @@ public:
|
||||
// Get whether there's a sash in this position
|
||||
bool GetSashVisible(wxSashEdgePosition edge) const;
|
||||
|
||||
// Set whether there's a border in this position
|
||||
void SetSashBorder(wxSashEdgePosition edge, bool border);
|
||||
// // Set whether there's a border in this position
|
||||
// void SetSashBorder(wxSashEdgePosition edge, bool border);
|
||||
|
||||
// Get whether there's a border in this position
|
||||
bool HasBorder(wxSashEdgePosition edge) const;
|
||||
// // Get whether there's a border in this position
|
||||
// bool HasBorder(wxSashEdgePosition edge) const;
|
||||
|
||||
// Get border size
|
||||
int GetEdgeMargin(wxSashEdgePosition edge) const;
|
||||
|
||||
+242
-14
@@ -21,6 +21,155 @@
|
||||
//---------------------------------------------------------------------------
|
||||
%newgroup;
|
||||
|
||||
DocStr(wxSizerFlags,
|
||||
"Normally, when you add an item to a sizer via `wx.Sizer.Add`, you have
|
||||
to specify a lot of flags and parameters which can be unwieldy. This
|
||||
is where wx.SizerFlags comes in: it allows you to specify all
|
||||
parameters using the named methods instead. For example, instead of::
|
||||
|
||||
sizer.Add(ctrl, 0, wx.EXPAND | wx.ALL, 10)
|
||||
|
||||
you can now write::
|
||||
|
||||
sizer.AddF(ctrl, wx.SizerFlags().Expand().Border(wx.ALL, 10))
|
||||
|
||||
This is more readable and also allows you to create wx.SizerFlags
|
||||
objects which can be reused for several sizer items.::
|
||||
|
||||
flagsExpand = wx.SizerFlags(1)
|
||||
flagsExpand.Expand().Border(wx.ALL, 10)
|
||||
sizer.AddF(ctrl1, flagsExpand)
|
||||
sizer.AddF(ctrl2, flagsExpand)
|
||||
|
||||
Note that by specification, all methods of wx.SizerFlags return the
|
||||
wx.SizerFlags object itself allowing chaining multiple method calls
|
||||
like in the examples above.", "");
|
||||
|
||||
class wxSizerFlags
|
||||
{
|
||||
public:
|
||||
// construct the flags object initialized with the given proportion (0 by
|
||||
// default)
|
||||
DocCtorStr(
|
||||
wxSizerFlags(int proportion = 0),
|
||||
"Constructs the flags object with the specified proportion.", "");
|
||||
|
||||
~wxSizerFlags();
|
||||
|
||||
// This typemap ensures that the returned object is the same
|
||||
// Python instance as what was passed in as `self`, instead of
|
||||
// creating a new proxy as SWIG would normally do.
|
||||
%typemap(out) wxSizerFlags& { $result = $self; Py_INCREF($result); }
|
||||
|
||||
DocDeclStr(
|
||||
wxSizerFlags& , Proportion(int proportion),
|
||||
"Sets the item's proportion value.", "");
|
||||
|
||||
DocDeclStr(
|
||||
wxSizerFlags& , Align(int alignment),
|
||||
"Sets the item's alignment", "");
|
||||
|
||||
DocDeclStr(
|
||||
wxSizerFlags& , Expand(),
|
||||
"Sets the wx.EXPAND flag, which will cause the item to be expanded to
|
||||
fill as much space as it is given by the sizer.", "");
|
||||
|
||||
DocDeclStr(
|
||||
wxSizerFlags& , Centre(),
|
||||
"Same as `Center` for those with an alternate dialect of English.", "");
|
||||
|
||||
DocDeclStr(
|
||||
wxSizerFlags& , Center(),
|
||||
"Sets the centering alignment flags.", "");
|
||||
|
||||
DocDeclStr(
|
||||
wxSizerFlags& , Left(),
|
||||
"Aligns the object to the left, a shortcut for calling
|
||||
Align(wx.ALIGN_LEFT)", "");
|
||||
|
||||
DocDeclStr(
|
||||
wxSizerFlags& , Right(),
|
||||
"Aligns the object to the right, a shortcut for calling
|
||||
Align(wx.ALIGN_RIGHT)", "");
|
||||
|
||||
DocDeclStr(
|
||||
wxSizerFlags& , Top(),
|
||||
"Aligns the object to the top of the available space, a shortcut for
|
||||
calling Align(wx.ALIGN_TOP)", "");
|
||||
|
||||
DocDeclStr(
|
||||
wxSizerFlags& , Bottom(),
|
||||
"Aligns the object to the bottom of the available space, a shortcut for
|
||||
calling Align(wx.ALIGN_BOTTOM)", "");
|
||||
|
||||
DocDeclStr(
|
||||
wxSizerFlags& , Shaped(),
|
||||
"Sets the wx.SHAPED flag.", "");
|
||||
|
||||
DocDeclStr(
|
||||
wxSizerFlags& , FixedMinSize(),
|
||||
"Sets the wx.FIXED_MINSIZE flag.", "");
|
||||
|
||||
|
||||
|
||||
%extend {
|
||||
DocDeclStr(
|
||||
wxSizerFlags& , Border(int direction=wxALL, int borderInPixels=-1),
|
||||
"Sets the border of the item in the direction(s) or sides given by the
|
||||
direction parameter. If the borderInPixels value is not given then
|
||||
the default border size (see `GetDefaultBorder`) will be used.", "")
|
||||
{
|
||||
if (borderInPixels == -1)
|
||||
return self->Border(direction);
|
||||
else
|
||||
return self->Border(direction, borderInPixels);
|
||||
}
|
||||
}
|
||||
|
||||
DocDeclStr(
|
||||
wxSizerFlags& , DoubleBorder(int direction = wxALL),
|
||||
"Sets the border in the given direction to twice the default border
|
||||
size.", "");
|
||||
|
||||
DocDeclStr(
|
||||
wxSizerFlags& , TripleBorder(int direction = wxALL),
|
||||
"Sets the border in the given direction to three times the default
|
||||
border size.", "");
|
||||
|
||||
DocDeclStr(
|
||||
wxSizerFlags& , HorzBorder(),
|
||||
"Sets the left and right borders to the default border size.", "");
|
||||
|
||||
DocDeclStr(
|
||||
wxSizerFlags& , DoubleHorzBorder(),
|
||||
"Sets the left and right borders to twice the default border size.", "");
|
||||
|
||||
|
||||
// Clear the typemap
|
||||
%typemap(out) wxSizerFlags& ;
|
||||
|
||||
|
||||
|
||||
DocDeclStr(
|
||||
static int , GetDefaultBorder(),
|
||||
"Returns the default border size used by the other border methods", "");
|
||||
|
||||
|
||||
DocDeclStr(
|
||||
int , GetProportion() const,
|
||||
"Returns the proportion value to be used in the sizer item.", "");
|
||||
|
||||
DocDeclStr(
|
||||
int , GetFlags() const,
|
||||
"Returns the flags value to be used in the sizer item.", "");
|
||||
|
||||
DocDeclStr(
|
||||
int , GetBorderInPixels() const,
|
||||
"Returns the border value in pixels to be used in the sizer item.", "");
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
DocStr(wxSizerItem,
|
||||
"The wx.SizerItem class is used to track the position, size and other
|
||||
attributes of each item managed by a `wx.Sizer`. It is not usually
|
||||
@@ -444,7 +593,7 @@ public:
|
||||
|
||||
- **sizer**: The (child-)sizer to be added to the sizer. This
|
||||
allows placing a child sizer in a sizer and thus to create
|
||||
hierarchies of sizers (typically a vertical box as the top
|
||||
hierarchies of sizers (for example a vertical box as the top
|
||||
sizer and several horizontal boxes on the level beneath).
|
||||
|
||||
- **size**: A `wx.Size` or a 2-element sequence of integers
|
||||
@@ -552,8 +701,34 @@ public:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// virtual wxSizerItem* AddSpacer(int size);
|
||||
// virtual wxSizerItem* AddStretchSpacer(int prop = 1);
|
||||
|
||||
DocAStr(AddF,
|
||||
"AddF(self, item, wx.SizerFlags flags) -> wx.SizerItem",
|
||||
"Similar to `Add` but uses the `wx.SizerFlags` convenience class for
|
||||
setting the various flags, options and borders.", "");
|
||||
wxSizerItem* AddF(PyObject* item, wxSizerFlags& flags) {
|
||||
|
||||
wxPyBlock_t blocked = wxPyBeginBlockThreads();
|
||||
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false);
|
||||
if ( info.sizer )
|
||||
PyObject_SetAttrString(item,"thisown",Py_False);
|
||||
wxPyEndBlockThreads(blocked);
|
||||
|
||||
// Now call the real Add method if a valid item type was found
|
||||
if ( info.window )
|
||||
return self->Add(info.window, flags);
|
||||
else if ( info.sizer )
|
||||
return self->Add(info.sizer, flags);
|
||||
else if (info.gotSize)
|
||||
return self->Add(info.size.GetWidth(), info.size.GetHeight(),
|
||||
flags.GetProportion(),
|
||||
flags.GetFlags(),
|
||||
flags.GetBorderInPixels());
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
DocAStr(Insert,
|
||||
"Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
|
||||
@@ -586,8 +761,35 @@ the item at index *before*. See `Add` for a description of the parameters.", ""
|
||||
}
|
||||
|
||||
|
||||
// virtual wxSizerItem* InsertSpacer(size_t index, int size);
|
||||
// virtual wxSizerItem* InsertStretchSpacer(size_t index, int prop = 1);
|
||||
|
||||
DocAStr(InsertF,
|
||||
"InsertF(self, int before, item, wx.SizerFlags flags) -> wx.SizerItem",
|
||||
"Similar to `Insert`, but uses the `wx.SizerFlags` convenience class
|
||||
for setting the various flags, options and borders.", "");
|
||||
wxSizerItem* InsertF(int before, PyObject* item, wxSizerFlags& flags) {
|
||||
|
||||
wxPyBlock_t blocked = wxPyBeginBlockThreads();
|
||||
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false);
|
||||
if ( info.sizer )
|
||||
PyObject_SetAttrString(item,"thisown",Py_False);
|
||||
wxPyEndBlockThreads(blocked);
|
||||
|
||||
// Now call the real Insert method if a valid item type was found
|
||||
if ( info.window )
|
||||
return self->Insert(before, info.window, flags);
|
||||
else if ( info.sizer )
|
||||
return self->Insert(before, info.sizer, flags);
|
||||
else if (info.gotSize)
|
||||
return self->Insert(before, info.size.GetWidth(), info.size.GetHeight(),
|
||||
flags.GetProportion(),
|
||||
flags.GetFlags(),
|
||||
flags.GetBorderInPixels());
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
DocAStr(Prepend,
|
||||
"Prepend(self, item, int proportion=0, int flag=0, int border=0,
|
||||
@@ -619,10 +821,36 @@ this sizer. See `Add` for a description of the parameters.", "");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// virtual wxSizerItem* PrependSpacer(int size);
|
||||
// virtual wxSizerItem* PrependStretchSpacer(int prop = 1);
|
||||
|
||||
|
||||
DocAStr(PrependF,
|
||||
"PrependF(self, item, wx.SizerFlags flags) -> wx.SizerItem",
|
||||
"Similar to `Prepend` but uses the `wx.SizerFlags` convenience class
|
||||
for setting the various flags, options and borders.", "");
|
||||
wxSizerItem* PrependF(PyObject* item, wxSizerFlags& flags) {
|
||||
|
||||
wxPyBlock_t blocked = wxPyBeginBlockThreads();
|
||||
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, true, false);
|
||||
if ( info.sizer )
|
||||
PyObject_SetAttrString(item,"thisown",Py_False);
|
||||
wxPyEndBlockThreads(blocked);
|
||||
|
||||
// Now call the real Add method if a valid item type was found
|
||||
if ( info.window )
|
||||
return self->Prepend(info.window, flags);
|
||||
else if ( info.sizer )
|
||||
return self->Prepend(info.sizer, flags);
|
||||
else if (info.gotSize)
|
||||
return self->Prepend(info.size.GetWidth(), info.size.GetHeight(),
|
||||
flags.GetProportion(),
|
||||
flags.GetFlags(),
|
||||
flags.GetBorderInPixels());
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
DocAStr(Remove,
|
||||
"Remove(self, item) -> bool",
|
||||
"Removes an item from the sizer and destroys it. This method does not
|
||||
@@ -642,7 +870,7 @@ and removed.", "
|
||||
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, true);
|
||||
wxPyEndBlockThreads(blocked);
|
||||
if ( info.window )
|
||||
return self->Remove(info.window);
|
||||
return false; //self->Remove(info.window);
|
||||
else if ( info.sizer )
|
||||
return self->Remove(info.sizer);
|
||||
else if ( info.gotPos )
|
||||
@@ -675,18 +903,18 @@ was found and detached.", "");
|
||||
|
||||
|
||||
DocAStr(GetItem,
|
||||
"GetItem(self, item) -> wx.SizerItem",
|
||||
"GetItem(self, item, recursive=False) -> wx.SizerItem",
|
||||
"Returns the `wx.SizerItem` which holds the *item* given. The *item*
|
||||
parameter can be either a window, a sizer, or the zero-based index of
|
||||
the item to be found.", "");
|
||||
wxSizerItem* GetItem(PyObject* item) {
|
||||
wxSizerItem* GetItem(PyObject* item, bool recursive=false) {
|
||||
wxPyBlock_t blocked = wxPyBeginBlockThreads();
|
||||
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, false, true);
|
||||
wxPyEndBlockThreads(blocked);
|
||||
if ( info.window )
|
||||
return self->GetItem(info.window);
|
||||
return self->GetItem(info.window, recursive);
|
||||
else if ( info.sizer )
|
||||
return self->GetItem(info.sizer);
|
||||
return self->GetItem(info.sizer, recursive);
|
||||
else if ( info.gotPos )
|
||||
return self->GetItem(info.pos);
|
||||
else
|
||||
@@ -731,9 +959,9 @@ the item to be found.", "");
|
||||
"""
|
||||
if isinstance(olditem, wx.Window):
|
||||
return self._ReplaceWin(olditem, item, recursive)
|
||||
elif isinstnace(olditem, wx.Sizer):
|
||||
elif isinstance(olditem, wx.Sizer):
|
||||
return self._ReplaceSizer(olditem, item, recursive)
|
||||
elif isinstnace(olditem, int):
|
||||
elif isinstance(olditem, int):
|
||||
return self._ReplaceItem(olditem, item)
|
||||
else:
|
||||
raise TypeError("Expected Window, Sizer, or integer for first parameter.")
|
||||
|
||||
@@ -198,14 +198,6 @@ class wxPenList : public wxGDIObjListBase {
|
||||
public:
|
||||
|
||||
wxPen* FindOrCreatePen(const wxColour& colour, int width, int style);
|
||||
|
||||
void AddPen(wxPen* pen);
|
||||
void RemovePen(wxPen* pen);
|
||||
%pythoncode {
|
||||
AddPen = wx._deprecated(AddPen)
|
||||
RemovePen = wx._deprecated(RemovePen)
|
||||
}
|
||||
// int GetCount();
|
||||
};
|
||||
|
||||
|
||||
@@ -213,14 +205,6 @@ class wxBrushList : public wxGDIObjListBase {
|
||||
public:
|
||||
|
||||
wxBrush * FindOrCreateBrush(const wxColour& colour, int style=wxSOLID);
|
||||
|
||||
void AddBrush(wxBrush *brush);
|
||||
void RemoveBrush(wxBrush *brush);
|
||||
%pythoncode {
|
||||
AddBrush = wx._deprecated(AddBrush)
|
||||
RemoveBrush = wx._deprecated(RemoveBrush)
|
||||
}
|
||||
// int GetCount();
|
||||
};
|
||||
|
||||
|
||||
@@ -231,15 +215,6 @@ public:
|
||||
bool underline = false,
|
||||
const wxString& facename = wxPyEmptyString,
|
||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
|
||||
|
||||
void AddFont(wxFont* font);
|
||||
void RemoveFont(wxFont *font);
|
||||
%pythoncode {
|
||||
AddFont = wx._deprecated(AddFont)
|
||||
RemoveFont = wx._deprecated(RemoveFont)
|
||||
}
|
||||
|
||||
// int GetCount();
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
@@ -70,6 +70,12 @@ enum {
|
||||
|
||||
%pythoncode { TE_LINEWRAP = TE_CHARWRAP }
|
||||
|
||||
// deprecated synonymns
|
||||
%pythoncode {
|
||||
PROCESS_ENTER = TE_PROCESS_ENTER
|
||||
PASSWORD = TE_PASSWORD
|
||||
}
|
||||
|
||||
|
||||
|
||||
enum wxTextAttrAlignment
|
||||
|
||||
@@ -325,8 +325,10 @@ public:
|
||||
%Rename(AddToolItem, wxToolBarToolBase*, AddTool (wxToolBarToolBase *tool));
|
||||
%Rename(InsertToolItem, wxToolBarToolBase*, InsertTool (size_t pos, wxToolBarToolBase *tool));
|
||||
|
||||
wxToolBarToolBase *AddControl(wxControl *control);
|
||||
wxToolBarToolBase *InsertControl(size_t pos, wxControl *control);
|
||||
wxToolBarToolBase *AddControl(wxControl *control,
|
||||
const wxString& label = wxEmptyString);
|
||||
wxToolBarToolBase *InsertControl(size_t pos, wxControl *control,
|
||||
const wxString& label = wxEmptyString);
|
||||
wxControl *FindControl( int id );
|
||||
|
||||
wxToolBarToolBase *AddSeparator();
|
||||
|
||||
+13
-9
@@ -30,13 +30,11 @@ enum
|
||||
wxMINIMIZE,
|
||||
wxMAXIMIZE,
|
||||
wxCLOSE_BOX,
|
||||
wxTHICK_FRAME,
|
||||
wxSYSTEM_MENU,
|
||||
wxMINIMIZE_BOX,
|
||||
wxMAXIMIZE_BOX,
|
||||
wxTINY_CAPTION_HORIZ,
|
||||
wxTINY_CAPTION_VERT,
|
||||
wxRESIZE_BOX,
|
||||
wxRESIZE_BORDER,
|
||||
|
||||
wxDIALOG_NO_PARENT,
|
||||
@@ -54,16 +52,22 @@ enum
|
||||
wxFRAME_EX_METAL,
|
||||
wxDIALOG_EX_METAL,
|
||||
wxWS_EX_CONTEXTHELP,
|
||||
|
||||
// Obsolete
|
||||
wxDIALOG_MODAL,
|
||||
wxDIALOG_MODELESS,
|
||||
wxUSER_COLOURS,
|
||||
wxNO_3D,
|
||||
|
||||
wxFRAME_EX_CONTEXTHELP,
|
||||
wxDIALOG_EX_CONTEXTHELP,
|
||||
};
|
||||
};
|
||||
|
||||
%pythoncode {
|
||||
%# deprecated
|
||||
RESIZE_BOX = MAXIMIZE_BOX
|
||||
THICK_FRAME = RESIZE_BORDER
|
||||
|
||||
%# Obsolete
|
||||
wxDIALOG_MODAL = 0
|
||||
wxDIALOG_MODELESS = 0
|
||||
wxUSER_COLOURS = 0
|
||||
wxNO_3D = 0
|
||||
}
|
||||
|
||||
|
||||
enum
|
||||
|
||||
@@ -469,6 +469,9 @@ public:
|
||||
// change the background colour of the selected cells
|
||||
void SetSelectionBackground(const wxColour& col);
|
||||
|
||||
// refreshes only the selected items
|
||||
void RefreshSelected();
|
||||
|
||||
virtual void OnDrawSeparator(wxDC& dc, wxRect& rect, size_t n) const;
|
||||
virtual void OnDrawBackground(wxDC& dc, const wxRect& rect, size_t n) const;
|
||||
|
||||
|
||||
+39
-4
@@ -775,7 +775,16 @@ window had already been in the specified state.", "");
|
||||
|
||||
DocDeclStr(
|
||||
bool , IsEnabled() const,
|
||||
"Returns true if the window is enabled for input, false otherwise.", "");
|
||||
"Returns true if the window is enabled for input, false otherwise.
|
||||
This method takes into account the enabled state of parent windows up
|
||||
to the top-level window.", "");
|
||||
|
||||
DocDeclStr(
|
||||
bool , IsThisEnabled() const,
|
||||
"Returns the internal enabled state independent of the parent(s) state,
|
||||
i.e. the state in which the window would be if all of its parents are
|
||||
enabled. Use `IsEnabled` to get the effective window state.", "");
|
||||
|
||||
|
||||
DocDeclStr(
|
||||
virtual bool , IsShownOnScreen() const,
|
||||
@@ -892,6 +901,12 @@ or None.", "");
|
||||
"Can this window have focus?", "");
|
||||
|
||||
|
||||
DocDeclStr(
|
||||
bool , CanAcceptFocus() const,
|
||||
"Can this window have focus right now?", "");
|
||||
|
||||
|
||||
|
||||
DocDeclStr(
|
||||
virtual bool , AcceptsFocusFromKeyboard() const,
|
||||
"Can this window be given focus by keyboard navigation? if not, the
|
||||
@@ -899,13 +914,24 @@ only way to give it focus (provided it accepts it at all) is to click
|
||||
it.", "");
|
||||
|
||||
|
||||
|
||||
DocDeclStr(
|
||||
bool , CanAcceptFocusFromKeyboard() const,
|
||||
"Can this window be assigned focus from keyboard right now?", "");
|
||||
|
||||
|
||||
|
||||
DocDeclAStr(
|
||||
virtual bool , NavigateIn(int flags = wxNavigationKeyEvent::IsForward),
|
||||
"NavigateIn(self, int flags=NavigationKeyEvent.IsForward) -> bool",
|
||||
"Navigates inside this window.", "");
|
||||
|
||||
|
||||
DocDeclAStr(
|
||||
virtual bool , Navigate(int flags = wxNavigationKeyEvent::IsForward),
|
||||
"Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool",
|
||||
"Does keyboard navigation from this window to another, by sending a
|
||||
`wx.NavigationKeyEvent`.", "
|
||||
"Does keyboard navigation starting from this window to another. This is
|
||||
equivalient to self.GetParent().NavigateIn().", "
|
||||
|
||||
:param flags: A combination of the ``IsForward`` or ``IsBackward``
|
||||
and the ``WinChange`` values in the `wx.NavigationKeyEvent`
|
||||
@@ -973,8 +999,16 @@ do not change.", "");
|
||||
wxWindow *, GetGrandParent() const,
|
||||
"Returns the parent of the parent of this window, or None if there
|
||||
isn't one.", "");
|
||||
|
||||
|
||||
|
||||
%extend {
|
||||
DocDeclStr(wxWindow *, GetTopLevelParent(),
|
||||
"Returns the first frame or dialog in this window's parental hierarchy.", "")
|
||||
{
|
||||
return wxGetTopLevelParent(self);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DocDeclStr(
|
||||
virtual bool , IsTopLevel() const,
|
||||
@@ -2114,6 +2148,7 @@ opaque.", "");
|
||||
%property(Font, GetFont, SetFont, doc="See `GetFont` and `SetFont`");
|
||||
%property(ForegroundColour, GetForegroundColour, SetForegroundColour, doc="See `GetForegroundColour` and `SetForegroundColour`");
|
||||
%property(GrandParent, GetGrandParent, doc="See `GetGrandParent`");
|
||||
%property(TopLevelParent, GetTopLevelParent, doc="See `GetTopLevelParent`");
|
||||
%property(Handle, GetHandle, doc="See `GetHandle`");
|
||||
%property(HelpText, GetHelpText, SetHelpText, doc="See `GetHelpText` and `SetHelpText`");
|
||||
%property(Id, GetId, SetId, doc="See `GetId` and `SetId`");
|
||||
|
||||
+38
-1
@@ -202,6 +202,11 @@ The following example shows a simple implementation that utilizes
|
||||
%ignore wxAuiMDIParentFrame::~wxAuiMDIParentFrame;
|
||||
%rename(PreAuiMDIParentFrame) wxAuiMDIParentFrame::wxAuiMDIParentFrame();
|
||||
|
||||
// Ignore these for now because they need a typemap for the return value, see below.
|
||||
%ignore wxAuiMDIParentFrame::GetNotebook;
|
||||
%ignore wxAuiMDIParentFrame::GetActiveChild;
|
||||
%ignore wxAuiMDIParentFrame::GetClientWindow;
|
||||
|
||||
%pythonAppend wxAuiMDIChildFrame::wxAuiMDIChildFrame "self._setOORInfo(self)";
|
||||
%pythonAppend wxAuiMDIChildFrame::wxAuiMDIChildFrame() "val._setOORInfo(val)";
|
||||
%ignore wxAuiMDIChildFrame::~wxAuiMDIChildFrame;
|
||||
@@ -213,6 +218,8 @@ The following example shows a simple implementation that utilizes
|
||||
%rename(PreAuiMDIClientWindow) wxAuiMDIClientWindow::wxAuiMDIClientWindow();
|
||||
|
||||
|
||||
%typemap(out) wxEvtHandler* { $result = wxPyMake_wxObject($1, $owner); }
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Get all our defs from the REAL header files.
|
||||
|
||||
@@ -300,6 +307,36 @@ The following example shows a simple implementation that utilizes
|
||||
~wxAuiPaneButton() {}
|
||||
}
|
||||
|
||||
%extend wxAuiMDIParentFrame {
|
||||
%typemap(out) wxAuiNotebook* { $result = wxPyMake_wxObject($1, $owner); }
|
||||
%typemap(out) wxAuiMDIChildFrame* { $result = wxPyMake_wxObject($1, $owner); }
|
||||
%typemap(out) wxAuiMDIClientWindow* { $result = wxPyMake_wxObject($1, $owner); }
|
||||
|
||||
%rename(GetNotebook) _GetNotebook;
|
||||
%rename(GetActiveChild) _GetActiveChild;
|
||||
%rename(GetClientWindow) _GetClientWindow;
|
||||
|
||||
wxAuiNotebook* _GetNotebook() const
|
||||
{
|
||||
return self->GetNotebook();
|
||||
}
|
||||
|
||||
wxAuiMDIChildFrame* _GetActiveChild() const
|
||||
{
|
||||
return self->GetActiveChild();
|
||||
}
|
||||
|
||||
wxAuiMDIClientWindow* _GetClientWindow() const
|
||||
{
|
||||
return self->GetClientWindow();
|
||||
}
|
||||
|
||||
%typemap(out) wxAuiNotebook*;
|
||||
%typemap(out) wxAuiMDIChildFrame*;
|
||||
%typemap(out) wxAuiMDIClientWindow*;
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
%{
|
||||
@@ -482,7 +519,7 @@ class wxPyAuiDockArt : public wxAuiDefaultDockArt
|
||||
{
|
||||
public:
|
||||
%pythonAppend wxPyAuiDockArt setCallbackInfo(PyAuiDockArt)
|
||||
wxPyAuiDocArt();
|
||||
wxPyAuiDockArt();
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -49,6 +49,13 @@ enum {
|
||||
wxCC_POPUP_ON_MOUSE_UP = 0x0002,
|
||||
// All text is not automatically selected on click
|
||||
wxCC_NO_TEXT_AUTO_SELECT = 0x0004,
|
||||
// Drop-button stays down as long as popup is displayed.
|
||||
wxCC_BUTTON_STAYS_DOWN = 0x0008,
|
||||
// Drop-button covers the entire control.
|
||||
wxCC_FULL_BUTTON = 0x0010,
|
||||
// Drop-button goes over the custom-border (used under WinVista).
|
||||
wxCC_BUTTON_COVERS_BORDER = 0x0020,
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -455,6 +455,20 @@ class wxGridCellAttr;
|
||||
#define wxGRID_VALUE_DATETIME "datetime"
|
||||
|
||||
|
||||
// magic constant which tells (to some functions) to automatically calculate
|
||||
// the appropriate size
|
||||
enum { wxGRID_AUTOSIZE };
|
||||
|
||||
|
||||
// many wxGrid methods work either with columns or rows, this enum is used for
|
||||
// the parameter indicating which one should it be
|
||||
enum wxGridDirection
|
||||
{
|
||||
wxGRID_COLUMN,
|
||||
wxGRID_ROW
|
||||
};
|
||||
|
||||
|
||||
%immutable;
|
||||
const wxGridCellCoords wxGridNoCellCoords;
|
||||
const wxRect wxGridNoCellRect;
|
||||
@@ -2143,6 +2157,23 @@ public:
|
||||
};
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxGridUpdateLocker prevents updates to a grid during its lifetime
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class wxGridUpdateLocker
|
||||
{
|
||||
public:
|
||||
// if the pointer is NULL, Create() can be called later
|
||||
wxGridUpdateLocker(wxGrid *grid = NULL);
|
||||
~wxGridUpdateLocker();
|
||||
|
||||
// can be called if ctor was used with a NULL pointer, must not be called
|
||||
// more than once
|
||||
void Create(wxGrid *grid);
|
||||
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
||||
// Grid events and stuff
|
||||
|
||||
@@ -1500,6 +1500,9 @@ TE_BESTWRAP = _controls_.TE_BESTWRAP
|
||||
TE_RICH2 = _controls_.TE_RICH2
|
||||
TE_CAPITALIZE = _controls_.TE_CAPITALIZE
|
||||
TE_LINEWRAP = TE_CHARWRAP
|
||||
PROCESS_ENTER = TE_PROCESS_ENTER
|
||||
PASSWORD = TE_PASSWORD
|
||||
|
||||
TEXT_ALIGNMENT_DEFAULT = _controls_.TEXT_ALIGNMENT_DEFAULT
|
||||
TEXT_ALIGNMENT_LEFT = _controls_.TEXT_ALIGNMENT_LEFT
|
||||
TEXT_ALIGNMENT_CENTRE = _controls_.TEXT_ALIGNMENT_CENTRE
|
||||
@@ -3778,11 +3781,11 @@ class ToolBarBase(_core.Control):
|
||||
return _controls_.ToolBarBase_InsertToolItem(*args, **kwargs)
|
||||
|
||||
def AddControl(*args, **kwargs):
|
||||
"""AddControl(self, Control control) -> ToolBarToolBase"""
|
||||
"""AddControl(self, Control control, String label=wxEmptyString) -> ToolBarToolBase"""
|
||||
return _controls_.ToolBarBase_AddControl(*args, **kwargs)
|
||||
|
||||
def InsertControl(*args, **kwargs):
|
||||
"""InsertControl(self, size_t pos, Control control) -> ToolBarToolBase"""
|
||||
"""InsertControl(self, size_t pos, Control control, String label=wxEmptyString) -> ToolBarToolBase"""
|
||||
return _controls_.ToolBarBase_InsertControl(*args, **kwargs)
|
||||
|
||||
def FindControl(*args, **kwargs):
|
||||
|
||||
@@ -24263,18 +24263,22 @@ SWIGINTERN PyObject *_wrap_ToolBarBase_AddControl(PyObject *SWIGUNUSEDPARM(self)
|
||||
PyObject *resultobj = 0;
|
||||
wxToolBarBase *arg1 = (wxToolBarBase *) 0 ;
|
||||
wxControl *arg2 = (wxControl *) 0 ;
|
||||
wxString const &arg3_defvalue = wxEmptyString ;
|
||||
wxString *arg3 = (wxString *) &arg3_defvalue ;
|
||||
wxToolBarToolBase *result = 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
void *argp2 = 0 ;
|
||||
int res2 = 0 ;
|
||||
bool temp3 = false ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
PyObject * obj2 = 0 ;
|
||||
char * kwnames[] = {
|
||||
(char *) "self",(char *) "control", NULL
|
||||
(char *) "self",(char *) "control",(char *) "label", NULL
|
||||
};
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:ToolBarBase_AddControl",kwnames,&obj0,&obj1)) SWIG_fail;
|
||||
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:ToolBarBase_AddControl",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxToolBarBase, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ToolBarBase_AddControl" "', expected argument " "1"" of type '" "wxToolBarBase *""'");
|
||||
@@ -24285,17 +24289,32 @@ SWIGINTERN PyObject *_wrap_ToolBarBase_AddControl(PyObject *SWIGUNUSEDPARM(self)
|
||||
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ToolBarBase_AddControl" "', expected argument " "2"" of type '" "wxControl *""'");
|
||||
}
|
||||
arg2 = reinterpret_cast< wxControl * >(argp2);
|
||||
if (obj2) {
|
||||
{
|
||||
arg3 = wxString_in_helper(obj2);
|
||||
if (arg3 == NULL) SWIG_fail;
|
||||
temp3 = true;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
result = (wxToolBarToolBase *)(arg1)->AddControl(arg2);
|
||||
result = (wxToolBarToolBase *)(arg1)->AddControl(arg2,(wxString const &)*arg3);
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
{
|
||||
resultobj = wxPyMake_wxObject(result, (bool)0);
|
||||
}
|
||||
{
|
||||
if (temp3)
|
||||
delete arg3;
|
||||
}
|
||||
return resultobj;
|
||||
fail:
|
||||
{
|
||||
if (temp3)
|
||||
delete arg3;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -24305,6 +24324,8 @@ SWIGINTERN PyObject *_wrap_ToolBarBase_InsertControl(PyObject *SWIGUNUSEDPARM(se
|
||||
wxToolBarBase *arg1 = (wxToolBarBase *) 0 ;
|
||||
size_t arg2 ;
|
||||
wxControl *arg3 = (wxControl *) 0 ;
|
||||
wxString const &arg4_defvalue = wxEmptyString ;
|
||||
wxString *arg4 = (wxString *) &arg4_defvalue ;
|
||||
wxToolBarToolBase *result = 0 ;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
@@ -24312,14 +24333,16 @@ SWIGINTERN PyObject *_wrap_ToolBarBase_InsertControl(PyObject *SWIGUNUSEDPARM(se
|
||||
int ecode2 = 0 ;
|
||||
void *argp3 = 0 ;
|
||||
int res3 = 0 ;
|
||||
bool temp4 = false ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
PyObject * obj2 = 0 ;
|
||||
PyObject * obj3 = 0 ;
|
||||
char * kwnames[] = {
|
||||
(char *) "self",(char *) "pos",(char *) "control", NULL
|
||||
(char *) "self",(char *) "pos",(char *) "control",(char *) "label", NULL
|
||||
};
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:ToolBarBase_InsertControl",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
|
||||
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:ToolBarBase_InsertControl",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxToolBarBase, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ToolBarBase_InsertControl" "', expected argument " "1"" of type '" "wxToolBarBase *""'");
|
||||
@@ -24335,17 +24358,32 @@ SWIGINTERN PyObject *_wrap_ToolBarBase_InsertControl(PyObject *SWIGUNUSEDPARM(se
|
||||
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ToolBarBase_InsertControl" "', expected argument " "3"" of type '" "wxControl *""'");
|
||||
}
|
||||
arg3 = reinterpret_cast< wxControl * >(argp3);
|
||||
if (obj3) {
|
||||
{
|
||||
arg4 = wxString_in_helper(obj3);
|
||||
if (arg4 == NULL) SWIG_fail;
|
||||
temp4 = true;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
result = (wxToolBarToolBase *)(arg1)->InsertControl(arg2,arg3);
|
||||
result = (wxToolBarToolBase *)(arg1)->InsertControl(arg2,arg3,(wxString const &)*arg4);
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
{
|
||||
resultobj = wxPyMake_wxObject(result, (bool)0);
|
||||
}
|
||||
{
|
||||
if (temp4)
|
||||
delete arg4;
|
||||
}
|
||||
return resultobj;
|
||||
fail:
|
||||
{
|
||||
if (temp4)
|
||||
delete arg4;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
+294
-15
@@ -116,8 +116,6 @@ LB_MULTIPLE = _core_.LB_MULTIPLE
|
||||
LB_EXTENDED = _core_.LB_EXTENDED
|
||||
LB_OWNERDRAW = _core_.LB_OWNERDRAW
|
||||
LB_HSCROLL = _core_.LB_HSCROLL
|
||||
PROCESS_ENTER = _core_.PROCESS_ENTER
|
||||
PASSWORD = _core_.PASSWORD
|
||||
CB_SIMPLE = _core_.CB_SIMPLE
|
||||
CB_DROPDOWN = _core_.CB_DROPDOWN
|
||||
CB_SORT = _core_.CB_SORT
|
||||
@@ -334,7 +332,7 @@ EXPAND = _core_.EXPAND
|
||||
SHAPED = _core_.SHAPED
|
||||
FIXED_MINSIZE = _core_.FIXED_MINSIZE
|
||||
TILE = _core_.TILE
|
||||
ADJUST_MINSIZE = _core_.ADJUST_MINSIZE
|
||||
ADJUST_MINSIZE = 0
|
||||
BORDER_DEFAULT = _core_.BORDER_DEFAULT
|
||||
BORDER_NONE = _core_.BORDER_NONE
|
||||
BORDER_STATIC = _core_.BORDER_STATIC
|
||||
@@ -416,8 +414,6 @@ WXK_CONTROL = _core_.WXK_CONTROL
|
||||
WXK_MENU = _core_.WXK_MENU
|
||||
WXK_PAUSE = _core_.WXK_PAUSE
|
||||
WXK_CAPITAL = _core_.WXK_CAPITAL
|
||||
WXK_PRIOR = _core_.WXK_PRIOR
|
||||
WXK_NEXT = _core_.WXK_NEXT
|
||||
WXK_END = _core_.WXK_END
|
||||
WXK_HOME = _core_.WXK_HOME
|
||||
WXK_LEFT = _core_.WXK_LEFT
|
||||
@@ -486,9 +482,7 @@ WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT
|
||||
WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP
|
||||
WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT
|
||||
WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN
|
||||
WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR
|
||||
WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP
|
||||
WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT
|
||||
WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN
|
||||
WXK_NUMPAD_END = _core_.WXK_NUMPAD_END
|
||||
WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN
|
||||
@@ -525,6 +519,11 @@ WXK_SPECIAL17 = _core_.WXK_SPECIAL17
|
||||
WXK_SPECIAL18 = _core_.WXK_SPECIAL18
|
||||
WXK_SPECIAL19 = _core_.WXK_SPECIAL19
|
||||
WXK_SPECIAL20 = _core_.WXK_SPECIAL20
|
||||
WXK_PRIOR = WXK_PAGEUP
|
||||
WXK_NEXT = WXK_PAGEDOWN
|
||||
WXK_NUMPAD_PRIOR = WXK_NUMPAD_PAGEUP
|
||||
WXK_NUMPAD_NEXT = WXK_NUMPAD_PAGEDOWN
|
||||
|
||||
PAPER_NONE = _core_.PAPER_NONE
|
||||
PAPER_LETTER = _core_.PAPER_LETTER
|
||||
PAPER_LEGAL = _core_.PAPER_LEGAL
|
||||
@@ -4581,7 +4580,7 @@ class ScrollEvent(CommandEvent):
|
||||
"""
|
||||
A scroll event holds information about events sent from stand-alone
|
||||
scrollbars and sliders. Note that scrolled windows do not send
|
||||
instnaces of this event class, but send the `wx.ScrollWinEvent`
|
||||
instances of this event class, but send the `wx.ScrollWinEvent`
|
||||
instead.
|
||||
"""
|
||||
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
|
||||
@@ -8124,10 +8123,11 @@ class AcceleratorTable(Object):
|
||||
Ok = IsOk
|
||||
_core_.AcceleratorTable_swigregister(AcceleratorTable)
|
||||
|
||||
def GetAccelFromString(label):
|
||||
entry = AcceleratorEntry()
|
||||
entry.FromString(label)
|
||||
return entry
|
||||
|
||||
def GetAccelFromString(*args, **kwargs):
|
||||
"""GetAccelFromString(String label) -> AcceleratorEntry"""
|
||||
return _core_.GetAccelFromString(*args, **kwargs)
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class VisualAttributes(object):
|
||||
@@ -8909,9 +8909,21 @@ class Window(EvtHandler):
|
||||
IsEnabled(self) -> bool
|
||||
|
||||
Returns true if the window is enabled for input, false otherwise.
|
||||
This method takes into account the enabled state of parent windows up
|
||||
to the top-level window.
|
||||
"""
|
||||
return _core_.Window_IsEnabled(*args, **kwargs)
|
||||
|
||||
def IsThisEnabled(*args, **kwargs):
|
||||
"""
|
||||
IsThisEnabled(self) -> bool
|
||||
|
||||
Returns the internal enabled state independent of the parent(s) state,
|
||||
i.e. the state in which the window would be if all of its parents are
|
||||
enabled. Use `IsEnabled` to get the effective window state.
|
||||
"""
|
||||
return _core_.Window_IsThisEnabled(*args, **kwargs)
|
||||
|
||||
def IsShownOnScreen(*args, **kwargs):
|
||||
"""
|
||||
IsShownOnScreen(self) -> bool
|
||||
@@ -9056,6 +9068,14 @@ class Window(EvtHandler):
|
||||
"""
|
||||
return _core_.Window_AcceptsFocus(*args, **kwargs)
|
||||
|
||||
def CanAcceptFocus(*args, **kwargs):
|
||||
"""
|
||||
CanAcceptFocus(self) -> bool
|
||||
|
||||
Can this window have focus right now?
|
||||
"""
|
||||
return _core_.Window_CanAcceptFocus(*args, **kwargs)
|
||||
|
||||
def AcceptsFocusFromKeyboard(*args, **kwargs):
|
||||
"""
|
||||
AcceptsFocusFromKeyboard(self) -> bool
|
||||
@@ -9066,6 +9086,14 @@ class Window(EvtHandler):
|
||||
"""
|
||||
return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
|
||||
|
||||
def CanAcceptFocusFromKeyboard(*args, **kwargs):
|
||||
"""
|
||||
CanAcceptFocusFromKeyboard(self) -> bool
|
||||
|
||||
Can this window be assigned focus from keyboard right now?
|
||||
"""
|
||||
return _core_.Window_CanAcceptFocusFromKeyboard(*args, **kwargs)
|
||||
|
||||
def Navigate(*args, **kwargs):
|
||||
"""
|
||||
Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
|
||||
@@ -9127,6 +9155,14 @@ class Window(EvtHandler):
|
||||
"""
|
||||
return _core_.Window_GetGrandParent(*args, **kwargs)
|
||||
|
||||
def GetTopLevelParent(*args, **kwargs):
|
||||
"""
|
||||
GetTopLevelParent(self) -> Window
|
||||
|
||||
Returns the first frame or dialog in this window's parental hierarchy.
|
||||
"""
|
||||
return _core_.Window_GetTopLevelParent(*args, **kwargs)
|
||||
|
||||
def IsTopLevel(*args, **kwargs):
|
||||
"""
|
||||
IsTopLevel(self) -> bool
|
||||
@@ -10423,6 +10459,7 @@ class Window(EvtHandler):
|
||||
Font = property(GetFont,SetFont,doc="See `GetFont` and `SetFont`")
|
||||
ForegroundColour = property(GetForegroundColour,SetForegroundColour,doc="See `GetForegroundColour` and `SetForegroundColour`")
|
||||
GrandParent = property(GetGrandParent,doc="See `GetGrandParent`")
|
||||
TopLevelParent = property(GetTopLevelParent,doc="See `GetTopLevelParent`")
|
||||
Handle = property(GetHandle,doc="See `GetHandle`")
|
||||
HelpText = property(GetHelpText,SetHelpText,doc="See `GetHelpText` and `SetHelpText`")
|
||||
Id = property(GetId,SetId,doc="See `GetId` and `SetId`")
|
||||
@@ -11066,7 +11103,6 @@ class MenuBar(Window):
|
||||
self.Append(m, l)
|
||||
|
||||
Frame = property(GetFrame,doc="See `GetFrame`")
|
||||
Menu = property(GetMenu,doc="See `GetMenu`")
|
||||
MenuCount = property(GetMenuCount,doc="See `GetMenuCount`")
|
||||
Menus = property(GetMenus,SetMenus,doc="See `GetMenus` and `SetMenus`")
|
||||
_core_.MenuBar_swigregister(MenuBar)
|
||||
@@ -11601,6 +11637,222 @@ _core_.ControlWithItems_swigregister(ControlWithItems)
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
class SizerFlags(object):
|
||||
"""
|
||||
Normally, when you add an item to a sizer via `wx.Sizer.Add`, you have
|
||||
to specify a lot of flags and parameters which can be unwieldy. This
|
||||
is where wx.SizerFlags comes in: it allows you to specify all
|
||||
parameters using the named methods instead. For example, instead of::
|
||||
|
||||
sizer.Add(ctrl, 0, wx.EXPAND | wx.ALL, 10)
|
||||
|
||||
you can now write::
|
||||
|
||||
sizer.AddF(ctrl, wx.SizerFlags().Expand().Border(wx.ALL, 10))
|
||||
|
||||
This is more readable and also allows you to create wx.SizerFlags
|
||||
objects which can be reused for several sizer items.::
|
||||
|
||||
flagsExpand = wx.SizerFlags(1)
|
||||
flagsExpand.Expand().Border(wx.ALL, 10)
|
||||
sizer.AddF(ctrl1, flagsExpand)
|
||||
sizer.AddF(ctrl2, flagsExpand)
|
||||
|
||||
Note that by specification, all methods of wx.SizerFlags return the
|
||||
wx.SizerFlags object itself allowing chaining multiple method calls
|
||||
like in the examples above.
|
||||
"""
|
||||
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
|
||||
__repr__ = _swig_repr
|
||||
def __init__(self, *args, **kwargs):
|
||||
"""
|
||||
__init__(self, int proportion=0) -> SizerFlags
|
||||
|
||||
Constructs the flags object with the specified proportion.
|
||||
"""
|
||||
_core_.SizerFlags_swiginit(self,_core_.new_SizerFlags(*args, **kwargs))
|
||||
__swig_destroy__ = _core_.delete_SizerFlags
|
||||
__del__ = lambda self : None;
|
||||
def Proportion(*args, **kwargs):
|
||||
"""
|
||||
Proportion(self, int proportion) -> SizerFlags
|
||||
|
||||
Sets the item's proportion value.
|
||||
"""
|
||||
return _core_.SizerFlags_Proportion(*args, **kwargs)
|
||||
|
||||
def Align(*args, **kwargs):
|
||||
"""
|
||||
Align(self, int alignment) -> SizerFlags
|
||||
|
||||
Sets the item's alignment
|
||||
"""
|
||||
return _core_.SizerFlags_Align(*args, **kwargs)
|
||||
|
||||
def Expand(*args, **kwargs):
|
||||
"""
|
||||
Expand(self) -> SizerFlags
|
||||
|
||||
Sets the wx.EXPAND flag, which will cause the item to be expanded to
|
||||
fill as much space as it is given by the sizer.
|
||||
"""
|
||||
return _core_.SizerFlags_Expand(*args, **kwargs)
|
||||
|
||||
def Centre(*args, **kwargs):
|
||||
"""
|
||||
Centre(self) -> SizerFlags
|
||||
|
||||
Same as `Center` for those with an alternate dialect of English.
|
||||
"""
|
||||
return _core_.SizerFlags_Centre(*args, **kwargs)
|
||||
|
||||
def Center(*args, **kwargs):
|
||||
"""
|
||||
Center(self) -> SizerFlags
|
||||
|
||||
Sets the centering alignment flags.
|
||||
"""
|
||||
return _core_.SizerFlags_Center(*args, **kwargs)
|
||||
|
||||
def Left(*args, **kwargs):
|
||||
"""
|
||||
Left(self) -> SizerFlags
|
||||
|
||||
Aligns the object to the left, a shortcut for calling
|
||||
Align(wx.ALIGN_LEFT)
|
||||
"""
|
||||
return _core_.SizerFlags_Left(*args, **kwargs)
|
||||
|
||||
def Right(*args, **kwargs):
|
||||
"""
|
||||
Right(self) -> SizerFlags
|
||||
|
||||
Aligns the object to the right, a shortcut for calling
|
||||
Align(wx.ALIGN_RIGHT)
|
||||
"""
|
||||
return _core_.SizerFlags_Right(*args, **kwargs)
|
||||
|
||||
def Top(*args, **kwargs):
|
||||
"""
|
||||
Top(self) -> SizerFlags
|
||||
|
||||
Aligns the object to the top of the available space, a shortcut for
|
||||
calling Align(wx.ALIGN_TOP)
|
||||
"""
|
||||
return _core_.SizerFlags_Top(*args, **kwargs)
|
||||
|
||||
def Bottom(*args, **kwargs):
|
||||
"""
|
||||
Bottom(self) -> SizerFlags
|
||||
|
||||
Aligns the object to the bottom of the available space, a shortcut for
|
||||
calling Align(wx.ALIGN_BOTTOM)
|
||||
"""
|
||||
return _core_.SizerFlags_Bottom(*args, **kwargs)
|
||||
|
||||
def Shaped(*args, **kwargs):
|
||||
"""
|
||||
Shaped(self) -> SizerFlags
|
||||
|
||||
Sets the wx.SHAPED flag.
|
||||
"""
|
||||
return _core_.SizerFlags_Shaped(*args, **kwargs)
|
||||
|
||||
def FixedMinSize(*args, **kwargs):
|
||||
"""
|
||||
FixedMinSize(self) -> SizerFlags
|
||||
|
||||
Sets the wx.FIXED_MINSIZE flag.
|
||||
"""
|
||||
return _core_.SizerFlags_FixedMinSize(*args, **kwargs)
|
||||
|
||||
def Border(*args, **kwargs):
|
||||
"""
|
||||
Border(self, int direction=ALL, int borderInPixels=-1) -> SizerFlags
|
||||
|
||||
Sets the border of the item in the direction(s) or sides given by the
|
||||
direction parameter. If the borderInPixels value is not given then
|
||||
the default border size (see `GetDefaultBorder`) will be used.
|
||||
"""
|
||||
return _core_.SizerFlags_Border(*args, **kwargs)
|
||||
|
||||
def DoubleBorder(*args, **kwargs):
|
||||
"""
|
||||
DoubleBorder(self, int direction=ALL) -> SizerFlags
|
||||
|
||||
Sets the border in the given direction to twice the default border
|
||||
size.
|
||||
"""
|
||||
return _core_.SizerFlags_DoubleBorder(*args, **kwargs)
|
||||
|
||||
def TripleBorder(*args, **kwargs):
|
||||
"""
|
||||
TripleBorder(self, int direction=ALL) -> SizerFlags
|
||||
|
||||
Sets the border in the given direction to three times the default
|
||||
border size.
|
||||
"""
|
||||
return _core_.SizerFlags_TripleBorder(*args, **kwargs)
|
||||
|
||||
def HorzBorder(*args, **kwargs):
|
||||
"""
|
||||
HorzBorder(self) -> SizerFlags
|
||||
|
||||
Sets the left and right borders to the default border size.
|
||||
"""
|
||||
return _core_.SizerFlags_HorzBorder(*args, **kwargs)
|
||||
|
||||
def DoubleHorzBorder(*args, **kwargs):
|
||||
"""
|
||||
DoubleHorzBorder(self) -> SizerFlags
|
||||
|
||||
Sets the left and right borders to twice the default border size.
|
||||
"""
|
||||
return _core_.SizerFlags_DoubleHorzBorder(*args, **kwargs)
|
||||
|
||||
def GetDefaultBorder(*args, **kwargs):
|
||||
"""
|
||||
GetDefaultBorder() -> int
|
||||
|
||||
Returns the default border size used by the other border methods
|
||||
"""
|
||||
return _core_.SizerFlags_GetDefaultBorder(*args, **kwargs)
|
||||
|
||||
GetDefaultBorder = staticmethod(GetDefaultBorder)
|
||||
def GetProportion(*args, **kwargs):
|
||||
"""
|
||||
GetProportion(self) -> int
|
||||
|
||||
Returns the proportion value to be used in the sizer item.
|
||||
"""
|
||||
return _core_.SizerFlags_GetProportion(*args, **kwargs)
|
||||
|
||||
def GetFlags(*args, **kwargs):
|
||||
"""
|
||||
GetFlags(self) -> int
|
||||
|
||||
Returns the flags value to be used in the sizer item.
|
||||
"""
|
||||
return _core_.SizerFlags_GetFlags(*args, **kwargs)
|
||||
|
||||
def GetBorderInPixels(*args, **kwargs):
|
||||
"""
|
||||
GetBorderInPixels(self) -> int
|
||||
|
||||
Returns the border value in pixels to be used in the sizer item.
|
||||
"""
|
||||
return _core_.SizerFlags_GetBorderInPixels(*args, **kwargs)
|
||||
|
||||
_core_.SizerFlags_swigregister(SizerFlags)
|
||||
|
||||
def SizerFlags_GetDefaultBorder(*args):
|
||||
"""
|
||||
SizerFlags_GetDefaultBorder() -> int
|
||||
|
||||
Returns the default border size used by the other border methods
|
||||
"""
|
||||
return _core_.SizerFlags_GetDefaultBorder(*args)
|
||||
|
||||
class SizerItem(Object):
|
||||
"""
|
||||
The wx.SizerItem class is used to track the position, size and other
|
||||
@@ -11996,6 +12248,15 @@ class Sizer(Object):
|
||||
"""
|
||||
return _core_.Sizer_Add(*args, **kwargs)
|
||||
|
||||
def AddF(*args, **kwargs):
|
||||
"""
|
||||
AddF(self, item, wx.SizerFlags flags) -> wx.SizerItem
|
||||
|
||||
Similar to `Add` but uses the `wx.SizerFlags` convenience class for
|
||||
setting the various flags, options and borders.
|
||||
"""
|
||||
return _core_.Sizer_AddF(*args, **kwargs)
|
||||
|
||||
def Insert(*args, **kwargs):
|
||||
"""
|
||||
Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
|
||||
@@ -12006,6 +12267,15 @@ class Sizer(Object):
|
||||
"""
|
||||
return _core_.Sizer_Insert(*args, **kwargs)
|
||||
|
||||
def InsertF(*args, **kwargs):
|
||||
"""
|
||||
InsertF(self, int before, item, wx.SizerFlags flags) -> wx.SizerItem
|
||||
|
||||
Similar to `Insert`, but uses the `wx.SizerFlags` convenience class
|
||||
for setting the various flags, options and borders.
|
||||
"""
|
||||
return _core_.Sizer_InsertF(*args, **kwargs)
|
||||
|
||||
def Prepend(*args, **kwargs):
|
||||
"""
|
||||
Prepend(self, item, int proportion=0, int flag=0, int border=0,
|
||||
@@ -12016,6 +12286,15 @@ class Sizer(Object):
|
||||
"""
|
||||
return _core_.Sizer_Prepend(*args, **kwargs)
|
||||
|
||||
def PrependF(*args, **kwargs):
|
||||
"""
|
||||
PrependF(self, item, wx.SizerFlags flags) -> wx.SizerItem
|
||||
|
||||
Similar to `Prepend` but uses the `wx.SizerFlags` convenience class
|
||||
for setting the various flags, options and borders.
|
||||
"""
|
||||
return _core_.Sizer_PrependF(*args, **kwargs)
|
||||
|
||||
def Remove(*args, **kwargs):
|
||||
"""
|
||||
Remove(self, item) -> bool
|
||||
@@ -12043,7 +12322,7 @@ class Sizer(Object):
|
||||
|
||||
def GetItem(*args, **kwargs):
|
||||
"""
|
||||
GetItem(self, item) -> wx.SizerItem
|
||||
GetItem(self, item, recursive=False) -> wx.SizerItem
|
||||
|
||||
Returns the `wx.SizerItem` which holds the *item* given. The *item*
|
||||
parameter can be either a window, a sizer, or the zero-based index of
|
||||
@@ -12083,9 +12362,9 @@ class Sizer(Object):
|
||||
"""
|
||||
if isinstance(olditem, wx.Window):
|
||||
return self._ReplaceWin(olditem, item, recursive)
|
||||
elif isinstnace(olditem, wx.Sizer):
|
||||
elif isinstance(olditem, wx.Sizer):
|
||||
return self._ReplaceSizer(olditem, item, recursive)
|
||||
elif isinstnace(olditem, int):
|
||||
elif isinstance(olditem, int):
|
||||
return self._ReplaceItem(olditem, item)
|
||||
else:
|
||||
raise TypeError("Expected Window, Sizer, or integer for first parameter.")
|
||||
|
||||
+1324
-213
File diff suppressed because it is too large
Load Diff
+41
-40
@@ -673,7 +673,7 @@ class Bitmap(GDIObject):
|
||||
CopyFromBuffer(self, buffer data)
|
||||
|
||||
Copy data from a RGB buffer object to replace the bitmap pixel data.
|
||||
See `wxBitmapFromBuffer` for more .
|
||||
See `wx.BitmapFromBuffer` for more .
|
||||
"""
|
||||
return _gdi_.Bitmap_CopyFromBuffer(*args, **kwargs)
|
||||
|
||||
@@ -682,7 +682,7 @@ class Bitmap(GDIObject):
|
||||
CopyFromBufferRGBA(self, buffer data)
|
||||
|
||||
Copy data from a RGBA buffer object to replace the bitmap pixel data.
|
||||
See `wxBitmapFromBufferRGBA` for more .
|
||||
See `wx.BitmapFromBufferRGBA` for more .
|
||||
"""
|
||||
return _gdi_.Bitmap_CopyFromBufferRGBA(*args, **kwargs)
|
||||
|
||||
@@ -3385,6 +3385,35 @@ class DC(_core.Object):
|
||||
"""
|
||||
return _gdi_.DC_BlitPointSize(*args, **kwargs)
|
||||
|
||||
def StretchBlit(*args, **kwargs):
|
||||
"""
|
||||
StretchBlit(self, int dstX, int dstY, int dstWidth, int dstHeight, DC source,
|
||||
int srcX, int srcY, int srcWidth, int srcHeight,
|
||||
int rop=COPY, bool useMask=False,
|
||||
int srcMaskX=wxDefaultCoord, int srcMaskY=wxDefaultCoord) -> bool
|
||||
|
||||
Copy from a source DC to this DC, specifying the destination
|
||||
coordinates, destination size, source DC, source coordinates, size of
|
||||
source area to copy, logical function, whether to use a bitmap mask,
|
||||
and mask source position.
|
||||
"""
|
||||
return _gdi_.DC_StretchBlit(*args, **kwargs)
|
||||
|
||||
def StretchBlitPointSize(*args, **kwargs):
|
||||
"""
|
||||
StretchBlitPointSize(self, Point dstPt, Size dstSize, DC source, Point srcPt,
|
||||
Size srcSize, int rop=COPY, bool useMask=False,
|
||||
Point srcMaskPt=DefaultPosition) -> bool
|
||||
|
||||
Copy from a source DC to this DC, specifying the destination
|
||||
coordinates, destination size, source DC, source coordinates, size of
|
||||
source area to copy, logical function, whether to use a bitmap mask,
|
||||
and mask source position. This version is the same as `StretchBlit`
|
||||
except `wx.Point` and `wx.Size` objects are used instead of individual
|
||||
position and size components.
|
||||
"""
|
||||
return _gdi_.DC_StretchBlitPointSize(*args, **kwargs)
|
||||
|
||||
def GetAsBitmap(*args, **kwargs):
|
||||
"""GetAsBitmap(self, Rect subrect=None) -> Bitmap"""
|
||||
return _gdi_.DC_GetAsBitmap(*args, **kwargs)
|
||||
@@ -4693,6 +4722,7 @@ def MemoryDCFromDC(*args, **kwargs):
|
||||
|
||||
BUFFER_VIRTUAL_AREA = _gdi_.BUFFER_VIRTUAL_AREA
|
||||
BUFFER_CLIENT_AREA = _gdi_.BUFFER_CLIENT_AREA
|
||||
BUFFER_USES_SHARED_BUFFER = _gdi_.BUFFER_USES_SHARED_BUFFER
|
||||
class BufferedDC(MemoryDC):
|
||||
"""
|
||||
This simple class provides a simple way to avoid flicker: when drawing
|
||||
@@ -5391,7 +5421,8 @@ class GraphicsContext(GraphicsObject):
|
||||
|
||||
Creates a wx.GraphicsContext from a native context. This native
|
||||
context must be eg a CGContextRef for Core Graphics, a Graphics
|
||||
pointer for GDIPlus or a cairo_t pointer for Cairo.
|
||||
pointer for GDIPlus or a cairo_t pointer for Cairo. NOTE: For
|
||||
wxPython we still need a way to make this value usable.
|
||||
"""
|
||||
return _gdi_.GraphicsContext_CreateFromNative(*args, **kwargs)
|
||||
|
||||
@@ -5400,7 +5431,8 @@ class GraphicsContext(GraphicsObject):
|
||||
"""
|
||||
CreateFromNativeWindow(void window) -> GraphicsContext
|
||||
|
||||
Creates a wx.GraphicsContext from a native window.
|
||||
Creates a wx.GraphicsContext from a native window. NOTE: For wxPython
|
||||
we still need a way to make this value usable.
|
||||
"""
|
||||
return _gdi_.GraphicsContext_CreateFromNativeWindow(*args, **kwargs)
|
||||
|
||||
@@ -5719,7 +5751,7 @@ class GraphicsContext(GraphicsObject):
|
||||
|
||||
def StrokeLineSegements(*args, **kwargs):
|
||||
"""
|
||||
StrokeLineSegements(self, PyObject beginPoints, PyObject endPoints)
|
||||
StrokeLineSegments(self, List beginPoints, List endPoints)
|
||||
|
||||
Stroke disconnected lines from begin to end points
|
||||
"""
|
||||
@@ -5800,7 +5832,8 @@ def GraphicsContext_CreateFromNative(*args, **kwargs):
|
||||
|
||||
Creates a wx.GraphicsContext from a native context. This native
|
||||
context must be eg a CGContextRef for Core Graphics, a Graphics
|
||||
pointer for GDIPlus or a cairo_t pointer for Cairo.
|
||||
pointer for GDIPlus or a cairo_t pointer for Cairo. NOTE: For
|
||||
wxPython we still need a way to make this value usable.
|
||||
"""
|
||||
return _gdi_.GraphicsContext_CreateFromNative(*args, **kwargs)
|
||||
|
||||
@@ -5808,7 +5841,8 @@ def GraphicsContext_CreateFromNativeWindow(*args, **kwargs):
|
||||
"""
|
||||
GraphicsContext_CreateFromNativeWindow(void window) -> GraphicsContext
|
||||
|
||||
Creates a wx.GraphicsContext from a native window.
|
||||
Creates a wx.GraphicsContext from a native window. NOTE: For wxPython
|
||||
we still need a way to make this value usable.
|
||||
"""
|
||||
return _gdi_.GraphicsContext_CreateFromNativeWindow(*args, **kwargs)
|
||||
|
||||
@@ -6238,17 +6272,6 @@ class PenList(GDIObjListBase):
|
||||
"""FindOrCreatePen(self, Colour colour, int width, int style) -> Pen"""
|
||||
return _gdi_.PenList_FindOrCreatePen(*args, **kwargs)
|
||||
|
||||
def AddPen(*args, **kwargs):
|
||||
"""AddPen(self, Pen pen)"""
|
||||
return _gdi_.PenList_AddPen(*args, **kwargs)
|
||||
|
||||
def RemovePen(*args, **kwargs):
|
||||
"""RemovePen(self, Pen pen)"""
|
||||
return _gdi_.PenList_RemovePen(*args, **kwargs)
|
||||
|
||||
AddPen = wx._deprecated(AddPen)
|
||||
RemovePen = wx._deprecated(RemovePen)
|
||||
|
||||
_gdi_.PenList_swigregister(PenList)
|
||||
|
||||
class BrushList(GDIObjListBase):
|
||||
@@ -6260,17 +6283,6 @@ class BrushList(GDIObjListBase):
|
||||
"""FindOrCreateBrush(self, Colour colour, int style=SOLID) -> Brush"""
|
||||
return _gdi_.BrushList_FindOrCreateBrush(*args, **kwargs)
|
||||
|
||||
def AddBrush(*args, **kwargs):
|
||||
"""AddBrush(self, Brush brush)"""
|
||||
return _gdi_.BrushList_AddBrush(*args, **kwargs)
|
||||
|
||||
def RemoveBrush(*args, **kwargs):
|
||||
"""RemoveBrush(self, Brush brush)"""
|
||||
return _gdi_.BrushList_RemoveBrush(*args, **kwargs)
|
||||
|
||||
AddBrush = wx._deprecated(AddBrush)
|
||||
RemoveBrush = wx._deprecated(RemoveBrush)
|
||||
|
||||
_gdi_.BrushList_swigregister(BrushList)
|
||||
|
||||
class FontList(GDIObjListBase):
|
||||
@@ -6286,17 +6298,6 @@ class FontList(GDIObjListBase):
|
||||
"""
|
||||
return _gdi_.FontList_FindOrCreateFont(*args, **kwargs)
|
||||
|
||||
def AddFont(*args, **kwargs):
|
||||
"""AddFont(self, Font font)"""
|
||||
return _gdi_.FontList_AddFont(*args, **kwargs)
|
||||
|
||||
def RemoveFont(*args, **kwargs):
|
||||
"""RemoveFont(self, Font font)"""
|
||||
return _gdi_.FontList_RemoveFont(*args, **kwargs)
|
||||
|
||||
AddFont = wx._deprecated(AddFont)
|
||||
RemoveFont = wx._deprecated(RemoveFont)
|
||||
|
||||
_gdi_.FontList_swigregister(FontList)
|
||||
|
||||
class ColourDatabase(object):
|
||||
|
||||
+275
-248
File diff suppressed because it is too large
Load Diff
+18
-21
@@ -316,11 +316,6 @@ def EndBusyCursor(*args):
|
||||
"""EndBusyCursor()"""
|
||||
return _misc_.EndBusyCursor(*args)
|
||||
|
||||
def GetElapsedTime(*args, **kwargs):
|
||||
"""GetElapsedTime(bool resetTimer=True) -> long"""
|
||||
return _misc_.GetElapsedTime(*args, **kwargs)
|
||||
GetElapsedTime = wx._deprecated(GetElapsedTime)
|
||||
|
||||
def IsBusy(*args):
|
||||
"""IsBusy() -> bool"""
|
||||
return _misc_.IsBusy(*args)
|
||||
@@ -333,10 +328,6 @@ def Shell(*args, **kwargs):
|
||||
"""Shell(String command=EmptyString) -> bool"""
|
||||
return _misc_.Shell(*args, **kwargs)
|
||||
|
||||
def StartTimer(*args):
|
||||
"""StartTimer()"""
|
||||
return _misc_.StartTimer(*args)
|
||||
|
||||
def GetOsVersion(*args):
|
||||
"""GetOsVersion() -> (platform, major, minor)"""
|
||||
return _misc_.GetOsVersion(*args)
|
||||
@@ -3307,8 +3298,26 @@ class FileConfig(ConfigBase):
|
||||
_misc_.FileConfig_swiginit(self,_misc_.new_FileConfig(*args, **kwargs))
|
||||
__swig_destroy__ = _misc_.delete_FileConfig
|
||||
__del__ = lambda self : None;
|
||||
def GetGlobalFileName(*args, **kwargs):
|
||||
"""GetGlobalFileName(String szFile) -> String"""
|
||||
return _misc_.FileConfig_GetGlobalFileName(*args, **kwargs)
|
||||
|
||||
GetGlobalFileName = staticmethod(GetGlobalFileName)
|
||||
def GetLocalFileName(*args, **kwargs):
|
||||
"""GetLocalFileName(String szFile, int style=0) -> String"""
|
||||
return _misc_.FileConfig_GetLocalFileName(*args, **kwargs)
|
||||
|
||||
GetLocalFileName = staticmethod(GetLocalFileName)
|
||||
_misc_.FileConfig_swigregister(FileConfig)
|
||||
|
||||
def FileConfig_GetGlobalFileName(*args, **kwargs):
|
||||
"""FileConfig_GetGlobalFileName(String szFile) -> String"""
|
||||
return _misc_.FileConfig_GetGlobalFileName(*args, **kwargs)
|
||||
|
||||
def FileConfig_GetLocalFileName(*args, **kwargs):
|
||||
"""FileConfig_GetLocalFileName(String szFile, int style=0) -> String"""
|
||||
return _misc_.FileConfig_GetLocalFileName(*args, **kwargs)
|
||||
|
||||
class ConfigPathChanger(object):
|
||||
"""
|
||||
A handy little class which changes current path to the path of given
|
||||
@@ -3707,17 +3716,6 @@ class DateTime(object):
|
||||
"""GetLastWeekDay(self, int weekday, int month=Inv_Month, int year=Inv_Year) -> DateTime"""
|
||||
return _misc_.DateTime_GetLastWeekDay(*args, **kwargs)
|
||||
|
||||
def SetToTheWeek(*args, **kwargs):
|
||||
"""SetToTheWeek(self, int numWeek, int weekday=Mon, int flags=Monday_First) -> bool"""
|
||||
return _misc_.DateTime_SetToTheWeek(*args, **kwargs)
|
||||
|
||||
def GetWeek(*args, **kwargs):
|
||||
"""GetWeek(self, int numWeek, int weekday=Mon, int flags=Monday_First) -> DateTime"""
|
||||
return _misc_.DateTime_GetWeek(*args, **kwargs)
|
||||
|
||||
SetToTheWeek = wx._deprecated(SetToTheWeek, "SetToTheWeek is deprecated, use (static) SetToWeekOfYear instead")
|
||||
GetWeek = wx._deprecated(GetWeek, "GetWeek is deprecated, use GetWeekOfYear instead")
|
||||
|
||||
def SetToWeekOfYear(*args, **kwargs):
|
||||
"""SetToWeekOfYear(int year, int numWeek, int weekday=Mon) -> DateTime"""
|
||||
return _misc_.DateTime_SetToWeekOfYear(*args, **kwargs)
|
||||
@@ -4036,7 +4034,6 @@ class DateTime(object):
|
||||
RataDie = property(GetRataDie,doc="See `GetRataDie`")
|
||||
Second = property(GetSecond,SetSecond,doc="See `GetSecond` and `SetSecond`")
|
||||
Ticks = property(GetTicks,doc="See `GetTicks`")
|
||||
Week = property(GetWeek,doc="See `GetWeek`")
|
||||
WeekDay = property(GetWeekDay,doc="See `GetWeekDay`")
|
||||
WeekDayInSameWeek = property(GetWeekDayInSameWeek,doc="See `GetWeekDayInSameWeek`")
|
||||
WeekOfMonth = property(GetWeekOfMonth,doc="See `GetWeekOfMonth`")
|
||||
|
||||
+118
-196
@@ -2801,6 +2801,23 @@ SWIG_AsVal_int (PyObject * obj, int *val)
|
||||
static const wxString wxPyFileSelectorDefaultWildcardStr(wxFileSelectorDefaultWildcardStr);
|
||||
static const wxString wxPyDirSelectorPromptStr(wxDirSelectorPromptStr);
|
||||
|
||||
wxMemorySize wxGetFreeMemory()
|
||||
{ wxPyRaiseNotImplemented(); return 0; }
|
||||
|
||||
|
||||
SWIGINTERN int
|
||||
SWIG_AsVal_unsigned_SS_long (PyObject* obj, unsigned long* val)
|
||||
{
|
||||
long v = 0;
|
||||
if (SWIG_AsVal_long(obj, &v) && v < 0) {
|
||||
return SWIG_TypeError;
|
||||
}
|
||||
else if (val)
|
||||
*val = (unsigned long)v;
|
||||
return SWIG_OK;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN int
|
||||
SWIG_AsVal_bool (PyObject *obj, bool *val)
|
||||
{
|
||||
@@ -2819,23 +2836,6 @@ SWIG_AsVal_bool (PyObject *obj, bool *val)
|
||||
}
|
||||
|
||||
|
||||
wxMemorySize wxGetFreeMemory()
|
||||
{ wxPyRaiseNotImplemented(); return 0; }
|
||||
|
||||
|
||||
SWIGINTERN int
|
||||
SWIG_AsVal_unsigned_SS_long (PyObject* obj, unsigned long* val)
|
||||
{
|
||||
long v = 0;
|
||||
if (SWIG_AsVal_long(obj, &v) && v < 0) {
|
||||
return SWIG_TypeError;
|
||||
}
|
||||
else if (val)
|
||||
*val = (unsigned long)v;
|
||||
return SWIG_OK;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERNINLINE PyObject*
|
||||
SWIG_From_unsigned_SS_long (unsigned long value)
|
||||
{
|
||||
@@ -4937,38 +4937,6 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_GetElapsedTime(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj = 0;
|
||||
bool arg1 = (bool) true ;
|
||||
long result;
|
||||
bool val1 ;
|
||||
int ecode1 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
char * kwnames[] = {
|
||||
(char *) "resetTimer", NULL
|
||||
};
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:GetElapsedTime",kwnames,&obj0)) SWIG_fail;
|
||||
if (obj0) {
|
||||
ecode1 = SWIG_AsVal_bool(obj0, &val1);
|
||||
if (!SWIG_IsOK(ecode1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetElapsedTime" "', expected argument " "1"" of type '" "bool""'");
|
||||
}
|
||||
arg1 = static_cast< bool >(val1);
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
result = (long)wxGetElapsedTime(arg1);
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
resultobj = SWIG_From_long(static_cast< long >(result));
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_IsBusy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
bool result;
|
||||
@@ -5055,23 +5023,6 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_StartTimer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
|
||||
if (!SWIG_Python_UnpackTuple(args,"StartTimer",0,0,0)) SWIG_fail;
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
wxStartTimer();
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
resultobj = SWIG_Py_Void();
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_GetOsVersion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *resultobj = 0;
|
||||
int *arg1 = (int *) 0 ;
|
||||
@@ -22974,6 +22925,103 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_FileConfig_GetGlobalFileName(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj = 0;
|
||||
wxString *arg1 = 0 ;
|
||||
wxString result;
|
||||
bool temp1 = false ;
|
||||
PyObject * obj0 = 0 ;
|
||||
char * kwnames[] = {
|
||||
(char *) "szFile", NULL
|
||||
};
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:FileConfig_GetGlobalFileName",kwnames,&obj0)) SWIG_fail;
|
||||
{
|
||||
arg1 = wxString_in_helper(obj0);
|
||||
if (arg1 == NULL) SWIG_fail;
|
||||
temp1 = true;
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
result = wxFileConfig::GetGlobalFileName((wxString const &)*arg1);
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
{
|
||||
#if wxUSE_UNICODE
|
||||
resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len());
|
||||
#else
|
||||
resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len());
|
||||
#endif
|
||||
}
|
||||
{
|
||||
if (temp1)
|
||||
delete arg1;
|
||||
}
|
||||
return resultobj;
|
||||
fail:
|
||||
{
|
||||
if (temp1)
|
||||
delete arg1;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_FileConfig_GetLocalFileName(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj = 0;
|
||||
wxString *arg1 = 0 ;
|
||||
int arg2 = (int) 0 ;
|
||||
wxString result;
|
||||
bool temp1 = false ;
|
||||
int val2 ;
|
||||
int ecode2 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
char * kwnames[] = {
|
||||
(char *) "szFile",(char *) "style", NULL
|
||||
};
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:FileConfig_GetLocalFileName",kwnames,&obj0,&obj1)) SWIG_fail;
|
||||
{
|
||||
arg1 = wxString_in_helper(obj0);
|
||||
if (arg1 == NULL) SWIG_fail;
|
||||
temp1 = true;
|
||||
}
|
||||
if (obj1) {
|
||||
ecode2 = SWIG_AsVal_int(obj1, &val2);
|
||||
if (!SWIG_IsOK(ecode2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FileConfig_GetLocalFileName" "', expected argument " "2"" of type '" "int""'");
|
||||
}
|
||||
arg2 = static_cast< int >(val2);
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
result = wxFileConfig::GetLocalFileName((wxString const &)*arg1,arg2);
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
{
|
||||
#if wxUSE_UNICODE
|
||||
resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len());
|
||||
#else
|
||||
resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len());
|
||||
#endif
|
||||
}
|
||||
{
|
||||
if (temp1)
|
||||
delete arg1;
|
||||
}
|
||||
return resultobj;
|
||||
fail:
|
||||
{
|
||||
if (temp1)
|
||||
delete arg1;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *FileConfig_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
||||
PyObject *obj;
|
||||
if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
|
||||
@@ -25244,130 +25292,6 @@ fail:
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_DateTime_SetToTheWeek(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj = 0;
|
||||
wxDateTime *arg1 = (wxDateTime *) 0 ;
|
||||
int arg2 ;
|
||||
wxDateTime::WeekDay arg3 = (wxDateTime::WeekDay) wxDateTime::Mon ;
|
||||
wxDateTime::WeekFlags arg4 = (wxDateTime::WeekFlags) wxDateTime::Monday_First ;
|
||||
bool result;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int val2 ;
|
||||
int ecode2 = 0 ;
|
||||
int val3 ;
|
||||
int ecode3 = 0 ;
|
||||
int val4 ;
|
||||
int ecode4 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
PyObject * obj2 = 0 ;
|
||||
PyObject * obj3 = 0 ;
|
||||
char * kwnames[] = {
|
||||
(char *) "self",(char *) "numWeek",(char *) "weekday",(char *) "flags", NULL
|
||||
};
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:DateTime_SetToTheWeek",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxDateTime, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DateTime_SetToTheWeek" "', expected argument " "1"" of type '" "wxDateTime *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< wxDateTime * >(argp1);
|
||||
ecode2 = SWIG_AsVal_int(obj1, &val2);
|
||||
if (!SWIG_IsOK(ecode2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DateTime_SetToTheWeek" "', expected argument " "2"" of type '" "int""'");
|
||||
}
|
||||
arg2 = static_cast< int >(val2);
|
||||
if (obj2) {
|
||||
ecode3 = SWIG_AsVal_int(obj2, &val3);
|
||||
if (!SWIG_IsOK(ecode3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DateTime_SetToTheWeek" "', expected argument " "3"" of type '" "wxDateTime::WeekDay""'");
|
||||
}
|
||||
arg3 = static_cast< wxDateTime::WeekDay >(val3);
|
||||
}
|
||||
if (obj3) {
|
||||
ecode4 = SWIG_AsVal_int(obj3, &val4);
|
||||
if (!SWIG_IsOK(ecode4)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DateTime_SetToTheWeek" "', expected argument " "4"" of type '" "wxDateTime::WeekFlags""'");
|
||||
}
|
||||
arg4 = static_cast< wxDateTime::WeekFlags >(val4);
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
result = (bool)(arg1)->SetToTheWeek(arg2,arg3,arg4);
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
{
|
||||
resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
|
||||
}
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_DateTime_GetWeek(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj = 0;
|
||||
wxDateTime *arg1 = (wxDateTime *) 0 ;
|
||||
int arg2 ;
|
||||
wxDateTime::WeekDay arg3 = (wxDateTime::WeekDay) wxDateTime::Mon ;
|
||||
wxDateTime::WeekFlags arg4 = (wxDateTime::WeekFlags) wxDateTime::Monday_First ;
|
||||
wxDateTime result;
|
||||
void *argp1 = 0 ;
|
||||
int res1 = 0 ;
|
||||
int val2 ;
|
||||
int ecode2 = 0 ;
|
||||
int val3 ;
|
||||
int ecode3 = 0 ;
|
||||
int val4 ;
|
||||
int ecode4 = 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
PyObject * obj2 = 0 ;
|
||||
PyObject * obj3 = 0 ;
|
||||
char * kwnames[] = {
|
||||
(char *) "self",(char *) "numWeek",(char *) "weekday",(char *) "flags", NULL
|
||||
};
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:DateTime_GetWeek",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxDateTime, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DateTime_GetWeek" "', expected argument " "1"" of type '" "wxDateTime *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< wxDateTime * >(argp1);
|
||||
ecode2 = SWIG_AsVal_int(obj1, &val2);
|
||||
if (!SWIG_IsOK(ecode2)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DateTime_GetWeek" "', expected argument " "2"" of type '" "int""'");
|
||||
}
|
||||
arg2 = static_cast< int >(val2);
|
||||
if (obj2) {
|
||||
ecode3 = SWIG_AsVal_int(obj2, &val3);
|
||||
if (!SWIG_IsOK(ecode3)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DateTime_GetWeek" "', expected argument " "3"" of type '" "wxDateTime::WeekDay""'");
|
||||
}
|
||||
arg3 = static_cast< wxDateTime::WeekDay >(val3);
|
||||
}
|
||||
if (obj3) {
|
||||
ecode4 = SWIG_AsVal_int(obj3, &val4);
|
||||
if (!SWIG_IsOK(ecode4)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DateTime_GetWeek" "', expected argument " "4"" of type '" "wxDateTime::WeekFlags""'");
|
||||
}
|
||||
arg4 = static_cast< wxDateTime::WeekFlags >(val4);
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
result = (arg1)->GetWeek(arg2,arg3,arg4);
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
resultobj = SWIG_NewPointerObj((new wxDateTime(static_cast< const wxDateTime& >(result))), SWIGTYPE_p_wxDateTime, SWIG_POINTER_OWN | 0 );
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWIGINTERN PyObject *_wrap_DateTime_SetToWeekOfYear(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj = 0;
|
||||
int arg1 ;
|
||||
@@ -36547,12 +36471,12 @@ SWIGINTERN PyObject *_wrap_Display_GetFromWindow(PyObject *SWIGUNUSEDPARM(self),
|
||||
if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Display_GetFromWindow",kwnames,&obj0)) SWIG_fail;
|
||||
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxWindow, 0 | 0 );
|
||||
if (!SWIG_IsOK(res1)) {
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Display_GetFromWindow" "', expected argument " "1"" of type '" "wxWindow *""'");
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Display_GetFromWindow" "', expected argument " "1"" of type '" "wxWindow const *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< wxWindow * >(argp1);
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
result = (int)wxDisplay::GetFromWindow(arg1);
|
||||
result = (int)wxDisplay::GetFromWindow((wxWindow const *)arg1);
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
@@ -39198,11 +39122,9 @@ static PyMethodDef SwigMethods[] = {
|
||||
{ (char *)"GetStockHelpString", (PyCFunction) _wrap_GetStockHelpString, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"Bell", (PyCFunction)_wrap_Bell, METH_NOARGS, NULL},
|
||||
{ (char *)"EndBusyCursor", (PyCFunction)_wrap_EndBusyCursor, METH_NOARGS, NULL},
|
||||
{ (char *)"GetElapsedTime", (PyCFunction) _wrap_GetElapsedTime, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"IsBusy", (PyCFunction)_wrap_IsBusy, METH_NOARGS, NULL},
|
||||
{ (char *)"Now", (PyCFunction)_wrap_Now, METH_NOARGS, NULL},
|
||||
{ (char *)"Shell", (PyCFunction) _wrap_Shell, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"StartTimer", (PyCFunction)_wrap_StartTimer, METH_NOARGS, NULL},
|
||||
{ (char *)"GetOsVersion", (PyCFunction)_wrap_GetOsVersion, METH_NOARGS, NULL},
|
||||
{ (char *)"GetOsDescription", (PyCFunction)_wrap_GetOsDescription, METH_NOARGS, NULL},
|
||||
{ (char *)"IsPlatformLittleEndian", (PyCFunction)_wrap_IsPlatformLittleEndian, METH_NOARGS, NULL},
|
||||
@@ -39720,6 +39642,8 @@ static PyMethodDef SwigMethods[] = {
|
||||
{ (char *)"Config_swiginit", Config_swiginit, METH_VARARGS, NULL},
|
||||
{ (char *)"new_FileConfig", (PyCFunction) _wrap_new_FileConfig, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"delete_FileConfig", (PyCFunction)_wrap_delete_FileConfig, METH_O, NULL},
|
||||
{ (char *)"FileConfig_GetGlobalFileName", (PyCFunction) _wrap_FileConfig_GetGlobalFileName, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"FileConfig_GetLocalFileName", (PyCFunction) _wrap_FileConfig_GetLocalFileName, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"FileConfig_swigregister", FileConfig_swigregister, METH_VARARGS, NULL},
|
||||
{ (char *)"FileConfig_swiginit", FileConfig_swiginit, METH_VARARGS, NULL},
|
||||
{ (char *)"new_ConfigPathChanger", (PyCFunction) _wrap_new_ConfigPathChanger, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
@@ -39777,8 +39701,6 @@ static PyMethodDef SwigMethods[] = {
|
||||
{ (char *)"DateTime_SetToWeekDay", (PyCFunction) _wrap_DateTime_SetToWeekDay, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"DateTime_SetToLastWeekDay", (PyCFunction) _wrap_DateTime_SetToLastWeekDay, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"DateTime_GetLastWeekDay", (PyCFunction) _wrap_DateTime_GetLastWeekDay, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"DateTime_SetToTheWeek", (PyCFunction) _wrap_DateTime_SetToTheWeek, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"DateTime_GetWeek", (PyCFunction) _wrap_DateTime_GetWeek, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"DateTime_SetToWeekOfYear", (PyCFunction) _wrap_DateTime_SetToWeekOfYear, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"DateTime_SetToLastMonthDay", (PyCFunction) _wrap_DateTime_SetToLastMonthDay, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
{ (char *)"DateTime_GetLastMonthDay", (PyCFunction) _wrap_DateTime_GetLastMonthDay, METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user