Added rotated text support
Added Some generic button and toggle button classes Lots of little fixes, additions, etc. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -30,6 +30,13 @@ rectangle representing the intersection is returned.
|
|||||||
|
|
||||||
Some bug fixes for Clipboard and Drag-n-Drop.
|
Some bug fixes for Clipboard and Drag-n-Drop.
|
||||||
|
|
||||||
|
Rotated text!!! WooHoo! (See wxDC.DrawRotatedtext())
|
||||||
|
|
||||||
|
Added a set of Generic Buttons to the library. These are simple
|
||||||
|
window classes that look and act like native buttons, but you can have
|
||||||
|
a bit more control over them. The bezel width can be set in addition
|
||||||
|
to colours, fonts, etc. There is a ToggleButton as well as Bitmap
|
||||||
|
versions too.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
90
utils/wxPython/demo/GenericButtons.py
Normal file
90
utils/wxPython/demo/GenericButtons.py
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
|
||||||
|
from wxPython.wx import *
|
||||||
|
from wxPython.lib.buttons import wxGenButton, wxGenBitmapButton, \
|
||||||
|
wxGenToggleButton, wxGenBitmapToggleButton
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
class TestPanel(wxPanel):
|
||||||
|
def __init__(self, parent, log):
|
||||||
|
wxPanel.__init__(self, parent, -1)
|
||||||
|
self.log = log
|
||||||
|
|
||||||
|
b = wxButton(self, -1, "A real button", (10,10))
|
||||||
|
b.SetDefault()
|
||||||
|
EVT_BUTTON(self, b.GetId(), self.OnButton)
|
||||||
|
b = wxButton(self, -1, "non-default", (100, 10))
|
||||||
|
EVT_BUTTON(self, b.GetId(), self.OnButton)
|
||||||
|
#wxTextCtrl(self, -1, "", (10,40))
|
||||||
|
|
||||||
|
b = wxGenButton(self, -1, 'Hello', (10,65))
|
||||||
|
EVT_BUTTON(self, b.GetId(), self.OnButton)
|
||||||
|
b = wxGenButton(self, -1, 'disabled', (100,65))
|
||||||
|
EVT_BUTTON(self, b.GetId(), self.OnButton)
|
||||||
|
b.Enable(false)
|
||||||
|
|
||||||
|
b = wxGenButton(self, -1, 'bigger', (195,50), (120, 55))
|
||||||
|
EVT_BUTTON(self, b.GetId(), self.OnButton)
|
||||||
|
b.SetFont(wxFont(20, wxSWISS, wxNORMAL, wxBOLD, false))
|
||||||
|
b.SetBezelWidth(5)
|
||||||
|
b.SetBackgroundColour(wxBLUE)
|
||||||
|
b.SetForegroundColour(wxWHITE)
|
||||||
|
#b.SetUseFocusIndicator(false)
|
||||||
|
|
||||||
|
bmp = wxBitmap('bitmaps/test2.bmp', wxBITMAP_TYPE_BMP)
|
||||||
|
b = wxGenBitmapButton(self, -1, bmp, (10, 130),
|
||||||
|
(bmp.GetWidth()+16, bmp.GetHeight()+16))
|
||||||
|
EVT_BUTTON(self, b.GetId(), self.OnButton)
|
||||||
|
|
||||||
|
|
||||||
|
b = wxGenBitmapButton(self, -1, None, (100, 130), (48,48))
|
||||||
|
EVT_BUTTON(self, b.GetId(), self.OnButton)
|
||||||
|
bmp = wxBitmap('bitmaps/lb1.bmp', wxBITMAP_TYPE_BMP)
|
||||||
|
mask = wxMaskColour(bmp, wxBLUE)
|
||||||
|
bmp.SetMask(mask)
|
||||||
|
b.SetBitmapLabel(bmp)
|
||||||
|
bmp = wxBitmap('bitmaps/lb2.bmp', wxBITMAP_TYPE_BMP)
|
||||||
|
mask = wxMaskColour(bmp, wxBLUE)
|
||||||
|
bmp.SetMask(mask)
|
||||||
|
b.SetBitmapSelected(bmp)
|
||||||
|
|
||||||
|
|
||||||
|
b = wxGenToggleButton(self, -1, "Toggle Button", (10, 230), (85, 26))
|
||||||
|
EVT_BUTTON(self, b.GetId(), self.OnToggleButton)
|
||||||
|
|
||||||
|
|
||||||
|
b = wxGenBitmapToggleButton(self, -1, None, (100, 230), (48,48))
|
||||||
|
EVT_BUTTON(self, b.GetId(), self.OnToggleButton)
|
||||||
|
bmp = wxBitmap('bitmaps/lb1.bmp', wxBITMAP_TYPE_BMP)
|
||||||
|
mask = wxMaskColour(bmp, wxBLUE)
|
||||||
|
bmp.SetMask(mask)
|
||||||
|
b.SetBitmapLabel(bmp)
|
||||||
|
bmp = wxBitmap('bitmaps/lb2.bmp', wxBITMAP_TYPE_BMP)
|
||||||
|
mask = wxMaskColour(bmp, wxBLUE)
|
||||||
|
bmp.SetMask(mask)
|
||||||
|
b.SetBitmapSelected(bmp)
|
||||||
|
|
||||||
|
|
||||||
|
def OnButton(self, event):
|
||||||
|
self.log.WriteText("Button Clicked: %d\n" % event.GetId())
|
||||||
|
|
||||||
|
def OnToggleButton(self, event):
|
||||||
|
msg = (event.GetIsDown() and "on") or "off"
|
||||||
|
self.log.WriteText("Button %d Toggled: %s\n" % (event.GetId(), msg))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
def runTest(frame, nb, log):
|
||||||
|
win = TestPanel(nb, log)
|
||||||
|
return win
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
import wxPython.lib.buttons
|
||||||
|
overview = wxPython.lib.buttons.__doc__
|
@@ -22,7 +22,8 @@ _useNestedSplitter = true
|
|||||||
|
|
||||||
_treeList = [
|
_treeList = [
|
||||||
('New since last release', ['wxMVCTree', 'wxVTKRenderWindow',
|
('New since last release', ['wxMVCTree', 'wxVTKRenderWindow',
|
||||||
'FileBrowseButton']),
|
'FileBrowseButton', #'wxToggleButton',
|
||||||
|
'GenericButtons']),
|
||||||
|
|
||||||
('Managed Windows', ['wxFrame', 'wxDialog', 'wxMiniFrame']),
|
('Managed Windows', ['wxFrame', 'wxDialog', 'wxMiniFrame']),
|
||||||
|
|
||||||
@@ -39,7 +40,8 @@ _treeList = [
|
|||||||
('Controls', ['wxButton', 'wxCheckBox', 'wxCheckListBox', 'wxChoice',
|
('Controls', ['wxButton', 'wxCheckBox', 'wxCheckListBox', 'wxChoice',
|
||||||
'wxComboBox', 'wxGauge', 'wxListBox', 'wxListCtrl', 'wxTextCtrl',
|
'wxComboBox', 'wxGauge', 'wxListBox', 'wxListCtrl', 'wxTextCtrl',
|
||||||
'wxTreeCtrl', 'wxSpinButton', 'wxStaticText', 'wxStaticBitmap',
|
'wxTreeCtrl', 'wxSpinButton', 'wxStaticText', 'wxStaticBitmap',
|
||||||
'wxRadioBox', 'wxSlider']),
|
'wxRadioBox', 'wxSlider', #'wxToggleButton'
|
||||||
|
]),
|
||||||
|
|
||||||
('Window Layout', ['wxLayoutConstraints', 'Sizers', 'OldSizers']),
|
('Window Layout', ['wxLayoutConstraints', 'Sizers', 'OldSizers']),
|
||||||
|
|
||||||
@@ -51,7 +53,7 @@ _treeList = [
|
|||||||
('wxPython Library', ['Layoutf', 'wxScrolledMessageDialog',
|
('wxPython Library', ['Layoutf', 'wxScrolledMessageDialog',
|
||||||
'wxMultipleChoiceDialog', 'wxPlotCanvas', 'wxFloatBar',
|
'wxMultipleChoiceDialog', 'wxPlotCanvas', 'wxFloatBar',
|
||||||
'PyShell', 'wxCalendar', 'wxMVCTree', 'wxVTKRenderWindow',
|
'PyShell', 'wxCalendar', 'wxMVCTree', 'wxVTKRenderWindow',
|
||||||
'FileBrowseButton',]),
|
'FileBrowseButton', 'GenericButtons']),
|
||||||
|
|
||||||
('Cool Contribs', ['pyTree', 'hangman', 'SlashDot', 'XMLtreeview']),
|
('Cool Contribs', ['pyTree', 'hangman', 'SlashDot', 'XMLtreeview']),
|
||||||
|
|
||||||
@@ -136,13 +138,16 @@ class wxPythonDemo(wxFrame):
|
|||||||
self.treeMap = {}
|
self.treeMap = {}
|
||||||
self.tree = wxTreeCtrl(splitter, tID)
|
self.tree = wxTreeCtrl(splitter, tID)
|
||||||
root = self.tree.AddRoot("Overview")
|
root = self.tree.AddRoot("Overview")
|
||||||
|
firstChild = None
|
||||||
for item in _treeList:
|
for item in _treeList:
|
||||||
child = self.tree.AppendItem(root, item[0])
|
child = self.tree.AppendItem(root, item[0])
|
||||||
|
if not firstChild: firstChild = child
|
||||||
for childItem in item[1]:
|
for childItem in item[1]:
|
||||||
theDemo = self.tree.AppendItem(child, childItem)
|
theDemo = self.tree.AppendItem(child, childItem)
|
||||||
self.treeMap[childItem] = theDemo
|
self.treeMap[childItem] = theDemo
|
||||||
|
|
||||||
self.tree.Expand(root)
|
self.tree.Expand(root)
|
||||||
|
self.tree.Expand(firstChild)
|
||||||
EVT_TREE_ITEM_EXPANDED (self.tree, tID, self.OnItemExpanded)
|
EVT_TREE_ITEM_EXPANDED (self.tree, tID, self.OnItemExpanded)
|
||||||
EVT_TREE_ITEM_COLLAPSED (self.tree, tID, self.OnItemCollapsed)
|
EVT_TREE_ITEM_COLLAPSED (self.tree, tID, self.OnItemCollapsed)
|
||||||
EVT_TREE_SEL_CHANGED (self.tree, tID, self.OnSelChanged)
|
EVT_TREE_SEL_CHANGED (self.tree, tID, self.OnSelChanged)
|
||||||
|
BIN
utils/wxPython/demo/bitmaps/lb1.bmp
Normal file
BIN
utils/wxPython/demo/bitmaps/lb1.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
BIN
utils/wxPython/demo/bitmaps/lb2.bmp
Normal file
BIN
utils/wxPython/demo/bitmaps/lb2.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
@@ -18,8 +18,8 @@ class TestPanel(wxPanel):
|
|||||||
EVT_BUTTON(self, 20, self.OnClick)
|
EVT_BUTTON(self, 20, self.OnClick)
|
||||||
|
|
||||||
bmp = wxBitmap('bitmaps/test2.bmp', wxBITMAP_TYPE_BMP)
|
bmp = wxBitmap('bitmaps/test2.bmp', wxBITMAP_TYPE_BMP)
|
||||||
mask = wxMaskColour(bmp, wxBLUE)
|
#mask = wxMaskColour(bmp, wxBLUE)
|
||||||
bmp.SetMask(mask)
|
#bmp.SetMask(mask)
|
||||||
wxBitmapButton(self, 30, bmp, wxPoint(140, 20),
|
wxBitmapButton(self, 30, bmp, wxPoint(140, 20),
|
||||||
wxSize(bmp.GetWidth()+10, bmp.GetHeight()+10))
|
wxSize(bmp.GetWidth()+10, bmp.GetHeight()+10))
|
||||||
EVT_BUTTON(self, 30, self.OnClick)
|
EVT_BUTTON(self, 30, self.OnClick)
|
||||||
|
@@ -67,6 +67,12 @@ class MyCanvas(wxScrolledWindow):
|
|||||||
dc.SetTextForeground(wxColour(0, 0xFF, 0x80))
|
dc.SetTextForeground(wxColour(0, 0xFF, 0x80))
|
||||||
dc.DrawText("a bitmap", 200, 85)
|
dc.DrawText("a bitmap", 200, 85)
|
||||||
|
|
||||||
|
font = wxFont(20, wxSWISS, wxNORMAL, wxNORMAL)
|
||||||
|
dc.SetFont(font)
|
||||||
|
dc.SetTextForeground(wxBLACK)
|
||||||
|
for a in range(0, 360, 45):
|
||||||
|
dc.DrawRotatedText("Rotated text...", 300, 300, a)
|
||||||
|
|
||||||
self.DrawSavedLines(dc)
|
self.DrawSavedLines(dc)
|
||||||
dc.EndDrawing()
|
dc.EndDrawing()
|
||||||
|
|
||||||
|
@@ -2,10 +2,21 @@
|
|||||||
from wxPython.wx import *
|
from wxPython.wx import *
|
||||||
|
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class MySplitter(wxSplitterWindow):
|
||||||
|
def __init__(self, parent, ID, log):
|
||||||
|
wxSplitterWindow.__init__(self, parent, ID)
|
||||||
|
self.log = log
|
||||||
|
EVT_SPLITTER_SASH_POS_CHANGED(self, self.GetId(), self.OnSashChanged)
|
||||||
|
|
||||||
|
def OnSashChanged(self, evt):
|
||||||
|
self.log.WriteText("sash changed to " + str(evt.GetSashPosition()))
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
def runTest(frame, nb, log):
|
def runTest(frame, nb, log):
|
||||||
splitter = wxSplitterWindow(nb, -1)
|
splitter = MySplitter(nb, -1, log)
|
||||||
|
|
||||||
p1 = wxWindow(splitter, -1)
|
p1 = wxWindow(splitter, -1)
|
||||||
p1.SetBackgroundColour(wxRED)
|
p1.SetBackgroundColour(wxRED)
|
||||||
|
@@ -119,7 +119,7 @@ import sys, os, string, getopt
|
|||||||
# This is really the wxPython version number, and will be placed in the
|
# This is really the wxPython version number, and will be placed in the
|
||||||
# Makefiles for use with the distribution related targets.
|
# Makefiles for use with the distribution related targets.
|
||||||
|
|
||||||
__version__ = '2.1.11'
|
__version__ = '2.1.12'
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@@ -832,8 +832,8 @@ item: Install File
|
|||||||
Flags=0000000010000010
|
Flags=0000000010000010
|
||||||
end
|
end
|
||||||
item: Install File
|
item: Install File
|
||||||
Source=e:\Projects\wx\utils\wxPython\README.txt
|
Source=e:\Projects\wx\utils\wxPython\*.txt
|
||||||
Destination=%MAINDIR%\wxPython\README.txt
|
Destination=%MAINDIR%\wxPython
|
||||||
Description=README file
|
Description=README file
|
||||||
Flags=0000000010000010
|
Flags=0000000010000010
|
||||||
end
|
end
|
||||||
|
Binary file not shown.
340
utils/wxPython/lib/buttons.py
Normal file
340
utils/wxPython/lib/buttons.py
Normal file
@@ -0,0 +1,340 @@
|
|||||||
|
#----------------------------------------------------------------------
|
||||||
|
# Name: wxPython.lib.buttons
|
||||||
|
# Purpose: Various kinds of generic buttons, (not native controls but
|
||||||
|
# self-drawn.)
|
||||||
|
#
|
||||||
|
# Author: Robin Dunn
|
||||||
|
#
|
||||||
|
# Created: 9-Dec-1999
|
||||||
|
# RCS-ID: $Id$
|
||||||
|
# Copyright: (c) 1999 by Total Control Software
|
||||||
|
# Licence: wxWindows license
|
||||||
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
|
"""
|
||||||
|
This module implements various forms of generic buttons, meaning that
|
||||||
|
they are not built on native controls but are self-drawn.
|
||||||
|
|
||||||
|
The wxGenButton is the base. It acts like a normal button but you
|
||||||
|
are able to better control how it looks, bevel width, colours, etc.
|
||||||
|
|
||||||
|
wxGenBitmapButton is a button with one or more bitmaps that show
|
||||||
|
the various states the button can be in.
|
||||||
|
|
||||||
|
wxGenToggleButton stays depressed when clicked, until clicked again.
|
||||||
|
|
||||||
|
wxGenBitmapToggleButton the same but with bitmaps.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
from wxPython.wx import *
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
|
class wxGenButtonEvent(wxPyCommandEvent):
|
||||||
|
def __init__(self, eventType, ID):
|
||||||
|
wxPyCommandEvent.__init__(self, eventType, ID)
|
||||||
|
self.isDown = false
|
||||||
|
|
||||||
|
def SetIsDown(self, isDown):
|
||||||
|
self.isDown = isDown
|
||||||
|
|
||||||
|
def GetIsDown(self):
|
||||||
|
return self.isDown
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
|
class wxGenButton(wxWindow):
|
||||||
|
def __init__(self, parent, ID, label,
|
||||||
|
pos = wxDefaultPosition, size = wxDefaultSize,
|
||||||
|
style = 0, validator = wxDefaultValidator,
|
||||||
|
name = "genbutton"):
|
||||||
|
wxWindow.__init__(self, parent, ID, pos, size, style, name)
|
||||||
|
self.SetValidator(validator)
|
||||||
|
|
||||||
|
self.up = true
|
||||||
|
self.bezelWidth = 2
|
||||||
|
self.hasFocus = false
|
||||||
|
self.useFocusInd = true
|
||||||
|
|
||||||
|
self.SetLabel(label)
|
||||||
|
self.SetPosition(pos)
|
||||||
|
if type(size) == type(()):
|
||||||
|
size = wxSize(size[0], size[1])
|
||||||
|
w = size.width
|
||||||
|
h = size.height
|
||||||
|
dsize = wxSize(75,23) ### wxButton_GetDefaultSize()
|
||||||
|
if self.bezelWidth > 2:
|
||||||
|
dsize.width = dsize.width + self.bezelWidth - 2
|
||||||
|
dsize.height = dsize.height + self.bezelWidth - 2
|
||||||
|
if w == -1: w = dsize.width
|
||||||
|
if h == -1: h = dsize.height
|
||||||
|
self.SetSize(wxSize(w,h))
|
||||||
|
font = parent.GetFont()
|
||||||
|
if not font.Ok():
|
||||||
|
font = wxSystemSettings_GetSystemFont(wxSYS_DEFAULT_GUI_FONT)
|
||||||
|
self.SetFont(font)
|
||||||
|
self.InitColours()
|
||||||
|
|
||||||
|
EVT_LEFT_DOWN(self, self.OnLeftDown)
|
||||||
|
EVT_LEFT_UP(self, self.OnLeftUp)
|
||||||
|
EVT_MOTION(self, self.OnMotion)
|
||||||
|
EVT_SET_FOCUS(self, self.OnGainFocus)
|
||||||
|
EVT_KILL_FOCUS(self, self.OnLoseFocus)
|
||||||
|
EVT_KEY_DOWN(self, self.OnKeyDown)
|
||||||
|
EVT_KEY_UP(self, self.OnKeyUp)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def SetBezelWidth(self, width):
|
||||||
|
"""Set the width of the 3D effect"""
|
||||||
|
self.bezelWidth = width
|
||||||
|
|
||||||
|
def GetBezelWidth(self):
|
||||||
|
"""Return the width of the 3D effect"""
|
||||||
|
return self.bezelWidth
|
||||||
|
|
||||||
|
def SetUseFocusIndicator(self, flag):
|
||||||
|
"""Specifiy if a focus indicator (dotted line) should be used"""
|
||||||
|
self.useFocusInd = flag
|
||||||
|
|
||||||
|
def GetUseFocusIndicator(self):
|
||||||
|
"""Return focus indicator flag"""
|
||||||
|
return self.useFocusInd
|
||||||
|
|
||||||
|
|
||||||
|
def InitColours(self):
|
||||||
|
faceClr = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNFACE)
|
||||||
|
textClr = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNTEXT)
|
||||||
|
self.SetBackgroundColour(faceClr)
|
||||||
|
self.SetForegroundColour(textClr)
|
||||||
|
|
||||||
|
shadowClr = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNSHADOW)
|
||||||
|
highlightClr = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNHIGHLIGHT)
|
||||||
|
self.shadowPen = wxPen(shadowClr, 1, wxSOLID)
|
||||||
|
self.highlightPen = wxPen(highlightClr, 1, wxSOLID)
|
||||||
|
|
||||||
|
self.focusIndPen = wxPen(textClr, 1, wxUSER_DASH)
|
||||||
|
|
||||||
|
|
||||||
|
def Notify(self):
|
||||||
|
evt = wxGenButtonEvent(wxEVT_COMMAND_BUTTON_CLICKED, self.GetId())
|
||||||
|
evt.SetIsDown(not self.up)
|
||||||
|
self.GetEventHandler().ProcessEvent(evt)
|
||||||
|
|
||||||
|
|
||||||
|
def DrawBezel(self, dc, x1, y1, x2, y2):
|
||||||
|
# draw the upper left sides
|
||||||
|
if self.up:
|
||||||
|
dc.SetPen(self.highlightPen)
|
||||||
|
else:
|
||||||
|
dc.SetPen(self.shadowPen)
|
||||||
|
for i in range(self.bezelWidth):
|
||||||
|
dc.DrawLine(x1+i, y1, x1+i, y2-i)
|
||||||
|
dc.DrawLine(x1, y1+i, x2-i, y1+i)
|
||||||
|
|
||||||
|
# draw the lower right sides
|
||||||
|
if self.up:
|
||||||
|
dc.SetPen(self.shadowPen)
|
||||||
|
else:
|
||||||
|
dc.SetPen(self.highlightPen)
|
||||||
|
for i in range(self.bezelWidth):
|
||||||
|
dc.DrawLine(x1+i, y2-i, x2+1, y2-i)
|
||||||
|
dc.DrawLine(x2-i, y1+i, x2-i, y2)
|
||||||
|
|
||||||
|
|
||||||
|
def DrawLabel(self, dc, width, height, dw=0, dy=0):
|
||||||
|
dc.SetFont(self.GetFont())
|
||||||
|
if self.IsEnabled():
|
||||||
|
dc.SetTextForeground(self.GetForegroundColour())
|
||||||
|
else:
|
||||||
|
dc.SetTextForeground(wxSystemSettings_GetSystemColour(wxSYS_COLOUR_GRAYTEXT))
|
||||||
|
label = self.GetLabel()
|
||||||
|
tw, th = dc.GetTextExtent(label)
|
||||||
|
if not self.up:
|
||||||
|
dw = dy = 1
|
||||||
|
dc.DrawText(label, (width-tw)/2+dw, (height-th)/2+dy)
|
||||||
|
|
||||||
|
|
||||||
|
def DrawFocusIndicator(self, dc, w, h):
|
||||||
|
bw = self.bezelWidth
|
||||||
|
dc.SetLogicalFunction(wxINVERT)
|
||||||
|
self.focusIndPen.SetColour(self.GetForegroundColour())
|
||||||
|
self.focusIndPen.SetDashes([1,2,1,2]) # This isn't quite working the way I expected...
|
||||||
|
dc.SetPen(self.focusIndPen)
|
||||||
|
dc.SetBrush(wxTRANSPARENT_BRUSH)
|
||||||
|
dc.DrawRectangle(bw+2,bw+2, w-bw*2-4, h-bw*2-4)
|
||||||
|
|
||||||
|
|
||||||
|
def OnPaint(self, event):
|
||||||
|
(width, height) = self.GetClientSizeTuple()
|
||||||
|
x1 = y1 = 0
|
||||||
|
x2 = width-1
|
||||||
|
y2 = height-1
|
||||||
|
dc = wxPaintDC(self)
|
||||||
|
dc.SetBackground(wxBrush(self.GetBackgroundColour(), wxSOLID))
|
||||||
|
dc.Clear()
|
||||||
|
self.DrawBezel(dc, x1, y1, x2, y2)
|
||||||
|
self.DrawLabel(dc, width, height)
|
||||||
|
if self.hasFocus and self.useFocusInd:
|
||||||
|
self.DrawFocusIndicator(dc, width, height)
|
||||||
|
|
||||||
|
def OnEraseBackground(self, event):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def OnLeftDown(self, event):
|
||||||
|
if not self.IsEnabled():
|
||||||
|
return
|
||||||
|
self.up = false
|
||||||
|
self.CaptureMouse()
|
||||||
|
self.SetFocus()
|
||||||
|
self.Refresh()
|
||||||
|
|
||||||
|
|
||||||
|
def OnLeftUp(self, event):
|
||||||
|
if not self.IsEnabled():
|
||||||
|
return
|
||||||
|
if not self.up: # if the button was down when the mouse was released...
|
||||||
|
self.Notify()
|
||||||
|
self.up = true
|
||||||
|
self.ReleaseMouse()
|
||||||
|
self.Refresh()
|
||||||
|
|
||||||
|
|
||||||
|
def OnMotion(self, event):
|
||||||
|
if not self.IsEnabled():
|
||||||
|
return
|
||||||
|
if event.LeftIsDown():
|
||||||
|
x,y = event.GetPositionTuple()
|
||||||
|
w,h = self.GetClientSizeTuple()
|
||||||
|
if self.up and x<w and x>=0 and y<h and y>=0:
|
||||||
|
self.up = false
|
||||||
|
self.Refresh()
|
||||||
|
return
|
||||||
|
if not self.up and (x<0 or y<0 or x>=w or y>=h):
|
||||||
|
self.up = true
|
||||||
|
self.Refresh()
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
def OnGainFocus(self, event):
|
||||||
|
self.hasFocus = true
|
||||||
|
dc = wxClientDC(self)
|
||||||
|
w, h = self.GetClientSizeTuple()
|
||||||
|
if self.useFocusInd:
|
||||||
|
self.DrawFocusIndicator(dc, w, h)
|
||||||
|
|
||||||
|
|
||||||
|
def OnLoseFocus(self, event):
|
||||||
|
self.hasFocus = false
|
||||||
|
dc = wxClientDC(self)
|
||||||
|
w, h = self.GetClientSizeTuple()
|
||||||
|
if self.useFocusInd:
|
||||||
|
self.DrawFocusIndicator(dc, w, h)
|
||||||
|
|
||||||
|
|
||||||
|
def OnKeyDown(self, event):
|
||||||
|
if self.hasFocus and event.KeyCode() == ord(" "):
|
||||||
|
self.up = false
|
||||||
|
self.Refresh()
|
||||||
|
event.Skip()
|
||||||
|
|
||||||
|
def OnKeyUp(self, event):
|
||||||
|
if self.hasFocus and event.KeyCode() == ord(" "):
|
||||||
|
self.up = true
|
||||||
|
self.Notify()
|
||||||
|
self.Refresh()
|
||||||
|
event.Skip()
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
|
class wxGenBitmapButton(wxGenButton):
|
||||||
|
def __init__(self, parent, ID, bitmap,
|
||||||
|
pos = wxDefaultPosition, size = wxDefaultSize,
|
||||||
|
style = 0, validator = wxDefaultValidator,
|
||||||
|
name = "genbutton"):
|
||||||
|
wxGenButton.__init__(self, parent, ID, "", pos, size, style, validator, name)
|
||||||
|
|
||||||
|
self.bmpLabel = bitmap
|
||||||
|
self.bmpDisabled = None
|
||||||
|
self.bmpFocus = None
|
||||||
|
self.bmpSelected = None
|
||||||
|
|
||||||
|
def GetBitmapLabel(self):
|
||||||
|
return self.bmpLabel
|
||||||
|
def GetBitmapDisabled(self):
|
||||||
|
return self.bmpDisabled
|
||||||
|
def GetBitmapFocus(self):
|
||||||
|
return self.bmpFocus
|
||||||
|
def GetBitmapSelected(self):
|
||||||
|
return self.bmpSelected
|
||||||
|
|
||||||
|
def SetBitmapDisabled(self, bitmap):
|
||||||
|
self.bmpDisabled = bitmap
|
||||||
|
def SetBitmapFocus(self, bitmap):
|
||||||
|
self.bmpFocus = bitmap
|
||||||
|
self.SetUseFocusIndicator(false)
|
||||||
|
def SetBitmapSelected(self, bitmap):
|
||||||
|
self.bmpSelected = bitmap
|
||||||
|
def SetBitmapLabel(self, bitmap):
|
||||||
|
self.bmpLabel = bitmap
|
||||||
|
|
||||||
|
|
||||||
|
def DrawLabel(self, dc, width, height, dw=0, dy=0):
|
||||||
|
bmp = self.bmpLabel
|
||||||
|
if self.bmpDisabled and not self.IsEnabled():
|
||||||
|
bmp = self.bmpDisabled
|
||||||
|
if self.bmpFocus and self.hasFocus:
|
||||||
|
bmp = self.bmpFocus
|
||||||
|
if self.bmpSelected and not self.up:
|
||||||
|
bmp = self.bmpSelected
|
||||||
|
bw,bh = bmp.GetWidth(), bmp.GetHeight()
|
||||||
|
if not self.up:
|
||||||
|
dw = dy = 1
|
||||||
|
dc.DrawBitmap(bmp, (width-bw)/2+dw, (height-bh)/2+dy, true)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
class __ToggleMixin:
|
||||||
|
def OnLeftDown(self, event):
|
||||||
|
if not self.IsEnabled():
|
||||||
|
return
|
||||||
|
self.up = not self.up
|
||||||
|
self.CaptureMouse()
|
||||||
|
self.SetFocus()
|
||||||
|
self.Refresh()
|
||||||
|
|
||||||
|
def OnLeftUp(self, event):
|
||||||
|
if not self.IsEnabled():
|
||||||
|
return
|
||||||
|
self.Notify()
|
||||||
|
self.ReleaseMouse()
|
||||||
|
self.Refresh()
|
||||||
|
|
||||||
|
def OnKeyDown(self, event):
|
||||||
|
event.Skip()
|
||||||
|
|
||||||
|
def OnKeyUp(self, event):
|
||||||
|
if self.hasFocus and event.KeyCode() == ord(" "):
|
||||||
|
self.up = not self.up
|
||||||
|
self.Notify()
|
||||||
|
self.Refresh()
|
||||||
|
event.Skip()
|
||||||
|
|
||||||
|
|
||||||
|
class wxGenToggleButton(__ToggleMixin, wxGenButton):
|
||||||
|
pass
|
||||||
|
|
||||||
|
class wxGenBitmapToggleButton(__ToggleMixin, wxGenBitmapButton):
|
||||||
|
pass
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
@@ -12,13 +12,11 @@
|
|||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
In this module you will find wxGridSizer and wxFlexGridSizer.
|
In this module you will find wxGridSizer and wxFlexGridSizer.
|
||||||
wxGridSizer arrainges its items in a grid in which all the widths and
|
wxGridSizer arrainges its items in a grid in which all the widths and
|
||||||
heights are the same. wxFlexgridSizer allows different widths and
|
heights are the same. wxFlexgridSizer allows different widths and
|
||||||
heights, and you can also specify rows and/or columns that are
|
heights, and you can also specify rows and/or columns that are
|
||||||
growable. See the demo for a couple examples for how to use them.
|
growable. See the demo for a couple examples for how to use them.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
@@ -9,7 +9,7 @@ SWIGFILES = ['html.i', 'htmlhelp.i' ]
|
|||||||
OTHERSWIGFLAGS = '-I../utils'
|
OTHERSWIGFLAGS = '-I../utils'
|
||||||
|
|
||||||
# include path for htmlhelp's xpm bitmaps
|
# include path for htmlhelp's xpm bitmaps
|
||||||
OTHERCFLAGS = "-I%s/src/html" % (WXDIR,)
|
#OTHERCFLAGS = "-I%s/src/html" % (WXDIR,)
|
||||||
|
|
||||||
# There are no platform differences so we don't need separate code directories
|
# There are no platform differences so we don't need separate code directories
|
||||||
GENCODEDIR='.'
|
GENCODEDIR='.'
|
||||||
|
@@ -1 +1 @@
|
|||||||
ver = '2.1.11'
|
ver = '2.1.12'
|
||||||
|
@@ -666,6 +666,8 @@ wxPyDefaultSize.Set(-1,-1)
|
|||||||
wxDefaultPosition = wxPyDefaultPosition
|
wxDefaultPosition = wxPyDefaultPosition
|
||||||
wxDefaultSize = wxPyDefaultSize
|
wxDefaultSize = wxPyDefaultSize
|
||||||
|
|
||||||
|
# backwards compatibility
|
||||||
|
wxNoRefBitmap = wxBitmap
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
# This helper function will take a wxPython object and convert it to
|
# This helper function will take a wxPython object and convert it to
|
||||||
@@ -695,6 +697,7 @@ def wxPyTypeCast(obj, typeStr):
|
|||||||
newPtr = ptrcast(obj, typeStr+"_p")
|
newPtr = ptrcast(obj, typeStr+"_p")
|
||||||
theClass = globals()[typeStr+"Ptr"]
|
theClass = globals()[typeStr+"Ptr"]
|
||||||
theObj = theClass(newPtr)
|
theObj = theClass(newPtr)
|
||||||
|
if hasattr(obj, "this"):
|
||||||
theObj.thisown = obj.thisown
|
theObj.thisown = obj.thisown
|
||||||
return theObj
|
return theObj
|
||||||
|
|
||||||
@@ -780,6 +783,13 @@ class wxApp(wxPyApp):
|
|||||||
if self.stdioWin != None:
|
if self.stdioWin != None:
|
||||||
self.stdioWin.close()
|
self.stdioWin.close()
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class wxPySimpleApp(wxApp):
|
||||||
|
def __init__(self):
|
||||||
|
wxApp.__init__(self, 0)
|
||||||
|
def OnInit(self):
|
||||||
|
return true
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
@@ -376,6 +376,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
%{
|
%{
|
||||||
|
// See below in the init function...
|
||||||
wxClipboard* wxPyTheClipboard;
|
wxClipboard* wxPyTheClipboard;
|
||||||
%}
|
%}
|
||||||
%readonly
|
%readonly
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
#include <wx/spinbutt.h>
|
#include <wx/spinbutt.h>
|
||||||
#include <wx/dynarray.h>
|
#include <wx/dynarray.h>
|
||||||
#include <wx/statline.h>
|
#include <wx/statline.h>
|
||||||
|
//#include <wx/toggbutt.h>
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
#if wxUSE_OWNER_DRAWN
|
#if wxUSE_OWNER_DRAWN
|
||||||
@@ -59,6 +60,8 @@ wxValidator wxDefaultValidator;
|
|||||||
|
|
||||||
class wxControl : public wxWindow {
|
class wxControl : public wxWindow {
|
||||||
public:
|
public:
|
||||||
|
wxControl();
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
void Command(wxCommandEvent& event);
|
void Command(wxCommandEvent& event);
|
||||||
#endif
|
#endif
|
||||||
@@ -66,6 +69,35 @@ public:
|
|||||||
void SetLabel(const wxString& label);
|
void SetLabel(const wxString& label);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// %{
|
||||||
|
// class wxPyControl : public wxControl {
|
||||||
|
// public:
|
||||||
|
// wxPyControl(wxWindow *parent,
|
||||||
|
// wxWindowID id,
|
||||||
|
// const wxPoint& pos,
|
||||||
|
// const wxSize& size,
|
||||||
|
// long style,
|
||||||
|
// const wxValidator& validator,
|
||||||
|
// const wxString& name)
|
||||||
|
// : wxControl() {
|
||||||
|
// CreateControl(parent, id, pos, size, style, validator, name);
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
// %}
|
||||||
|
|
||||||
|
|
||||||
|
// class wxPyControl : public wxControl {
|
||||||
|
// public:
|
||||||
|
// wxPyControl(wxWindow* parent, wxWindowID id,
|
||||||
|
// const wxPoint& pos = wxPyDefaultPosition,
|
||||||
|
// const wxSize& size = wxPyDefaultSize,
|
||||||
|
// long style = 0,
|
||||||
|
// const wxValidator& validator = wxPyDefaultValidator,
|
||||||
|
// char* name = "control");
|
||||||
|
// };
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
class wxButton : public wxControl {
|
class wxButton : public wxControl {
|
||||||
@@ -82,6 +114,13 @@ public:
|
|||||||
void SetDefault();
|
void SetDefault();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
%inline %{
|
||||||
|
wxSize wxButton_GetDefaultSize() {
|
||||||
|
return wxButton::GetDefaultSize();
|
||||||
|
}
|
||||||
|
%}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
class wxBitmapButton : public wxButton {
|
class wxBitmapButton : public wxButton {
|
||||||
@@ -106,6 +145,31 @@ public:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
// class wxToggleButton : public wxControl {
|
||||||
|
// public:
|
||||||
|
// wxToggleButton(wxWindow *parent, wxWindowID id, const wxString& label,
|
||||||
|
// const wxPoint& pos = wxPyDefaultPosition,
|
||||||
|
// const wxSize& size = wxPyDefaultSize, long style = 0,
|
||||||
|
// const wxValidator& validator = wxPyDefaultValidator,
|
||||||
|
// const char* name = "toggle");
|
||||||
|
// void SetValue(bool value);
|
||||||
|
// bool GetValue() const ;
|
||||||
|
// void SetLabel(const wxString& label);
|
||||||
|
// };
|
||||||
|
|
||||||
|
// class wxBitmapToggleButton : public wxToggleButton {
|
||||||
|
// public:
|
||||||
|
// wxBitmapToggleButton(wxWindow *parent, wxWindowID id, const wxBitmap *label,
|
||||||
|
// const wxPoint& pos = wxPyDefaultPosition,
|
||||||
|
// const wxSize& size = wxPyDefaultSize, long style = 0,
|
||||||
|
// const wxValidator& validator = wxPyDefaultValidator,
|
||||||
|
// const char *name = "toggle");
|
||||||
|
// void SetLabel(const wxBitmap& bitmap);
|
||||||
|
// };
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
class wxCheckBox : public wxControl {
|
class wxCheckBox : public wxControl {
|
||||||
|
@@ -80,6 +80,10 @@ public:
|
|||||||
int GetSelection();
|
int GetSelection();
|
||||||
wxString GetString();
|
wxString GetString();
|
||||||
bool IsSelection();
|
bool IsSelection();
|
||||||
|
void SetString(const wxString& s);
|
||||||
|
void SetExtraLong(long extraLong);
|
||||||
|
void SetInt(int i);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -33,33 +33,43 @@
|
|||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
class wxBitmap {
|
class wxGDIImage {
|
||||||
|
public:
|
||||||
|
long GetHandle();
|
||||||
|
void SetHandle(long handle);
|
||||||
|
|
||||||
|
bool Ok();
|
||||||
|
|
||||||
|
int GetWidth();
|
||||||
|
int GetHeight();
|
||||||
|
int GetDepth();
|
||||||
|
|
||||||
|
void SetWidth(int w);
|
||||||
|
void SetHeight(int h);
|
||||||
|
void SetDepth(int d);
|
||||||
|
|
||||||
|
void SetSize(const wxSize& size);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class wxBitmap : public wxGDIImage {
|
||||||
public:
|
public:
|
||||||
wxBitmap(const wxString& name, long type);
|
wxBitmap(const wxString& name, long type);
|
||||||
~wxBitmap();
|
~wxBitmap();
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
|
||||||
void Create(int width, int height, int depth = -1);
|
|
||||||
#endif
|
|
||||||
int GetDepth();
|
|
||||||
int GetHeight();
|
|
||||||
wxPalette* GetPalette();
|
wxPalette* GetPalette();
|
||||||
wxMask* GetMask();
|
wxMask* GetMask();
|
||||||
int GetWidth();
|
|
||||||
bool LoadFile(const wxString& name, long flags);
|
bool LoadFile(const wxString& name, long flags);
|
||||||
bool Ok();
|
|
||||||
bool SaveFile(const wxString& name, int type, wxPalette* palette = NULL);
|
bool SaveFile(const wxString& name, int type, wxPalette* palette = NULL);
|
||||||
void SetDepth(int depth);
|
|
||||||
void SetHeight(int height);
|
|
||||||
void SetMask(wxMask* mask);
|
void SetMask(wxMask* mask);
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
void SetPalette(wxPalette& palette);
|
void SetPalette(wxPalette& palette);
|
||||||
#endif
|
#endif
|
||||||
void SetWidth(int width);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
%new wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1);
|
%new wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1);
|
||||||
wxBitmap* wxNoRefBitmap(char* name, long flags);
|
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
%new wxBitmap* wxBitmapFromData(char* data, long type,
|
%new wxBitmap* wxBitmapFromData(char* data, long type,
|
||||||
@@ -71,14 +81,6 @@ wxBitmap* wxNoRefBitmap(char* name, long flags);
|
|||||||
return new wxBitmap(width, height, depth);
|
return new wxBitmap(width, height, depth);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This one won't own the reference, so Python
|
|
||||||
// won't call the dtor, this is good for
|
|
||||||
// toolbars and such where the parent will
|
|
||||||
// manage the bitmap.
|
|
||||||
wxBitmap* wxNoRefBitmap(char* name, long flags) {
|
|
||||||
return new wxBitmap(name, flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
wxBitmap* wxBitmapFromData(char* data, long type,
|
wxBitmap* wxBitmapFromData(char* data, long type,
|
||||||
int width, int height, int depth = 1) {
|
int width, int height, int depth = 1) {
|
||||||
@@ -106,32 +108,24 @@ public:
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
class wxIcon : public wxBitmap {
|
class wxIcon : public wxGDIImage {
|
||||||
public:
|
public:
|
||||||
wxIcon(const wxString& name, long flags,
|
wxIcon(const wxString& name, long flags,
|
||||||
int desiredWidth = -1, int desiredHeight = -1);
|
int desiredWidth = -1, int desiredHeight = -1);
|
||||||
~wxIcon();
|
~wxIcon();
|
||||||
|
|
||||||
int GetDepth();
|
|
||||||
int GetHeight();
|
|
||||||
int GetWidth();
|
|
||||||
bool LoadFile(const wxString& name, long flags);
|
bool LoadFile(const wxString& name, long flags);
|
||||||
bool Ok();
|
|
||||||
void SetDepth(int depth);
|
|
||||||
void SetHeight(int height);
|
|
||||||
void SetWidth(int width);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
class wxCursor : public wxBitmap {
|
class wxCursor : public wxGDIImage {
|
||||||
public:
|
public:
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
wxCursor(const wxString& cursorName, long flags, int hotSpotX=0, int hotSpotY=0);
|
wxCursor(const wxString& cursorName, long flags, int hotSpotX=0, int hotSpotY=0);
|
||||||
#endif
|
#endif
|
||||||
~wxCursor();
|
~wxCursor();
|
||||||
bool Ok();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
%name(wxStockCursor) %new wxCursor* wxPyStockCursor(int id);
|
%name(wxStockCursor) %new wxCursor* wxPyStockCursor(int id);
|
||||||
@@ -269,7 +263,12 @@ public:
|
|||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifdef __WXMSW__
|
||||||
typedef unsigned long wxDash;
|
typedef unsigned long wxDash;
|
||||||
|
#else
|
||||||
|
typedef byte wxDash;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
class wxPen {
|
class wxPen {
|
||||||
public:
|
public:
|
||||||
@@ -295,11 +294,12 @@ public:
|
|||||||
void SetStyle(int style);
|
void SetStyle(int style);
|
||||||
void SetWidth(int width);
|
void SetWidth(int width);
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
|
||||||
// **** This one needs to return a list of ints (wxDash)
|
// **** This one needs to return a list of ints (wxDash)
|
||||||
int GetDashes(wxDash **dashes);
|
int GetDashes(wxDash **dashes);
|
||||||
wxBitmap* GetStipple();
|
|
||||||
void SetDashes(int LCOUNT, wxDash* LIST);
|
void SetDashes(int LCOUNT, wxDash* LIST);
|
||||||
|
|
||||||
|
#ifdef __WXMSW__
|
||||||
|
wxBitmap* GetStipple();
|
||||||
void SetStipple(wxBitmap& stipple);
|
void SetStipple(wxBitmap& stipple);
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
@@ -363,6 +363,7 @@ public:
|
|||||||
int fill_style=wxODDEVEN_RULE);
|
int fill_style=wxODDEVEN_RULE);
|
||||||
void DrawPoint(long x, long y);
|
void DrawPoint(long x, long y);
|
||||||
void DrawRectangle(long x, long y, long width, long height);
|
void DrawRectangle(long x, long y, long width, long height);
|
||||||
|
void DrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
|
||||||
void DrawRoundedRectangle(long x, long y, long width, long height, long radius=20);
|
void DrawRoundedRectangle(long x, long y, long width, long height, long radius=20);
|
||||||
void DrawSpline(int LCOUNT, wxPoint* LIST);
|
void DrawSpline(int LCOUNT, wxPoint* LIST);
|
||||||
void DrawText(const wxString& text, long x, long y);
|
void DrawText(const wxString& text, long x, long y);
|
||||||
@@ -611,7 +612,7 @@ enum {
|
|||||||
|
|
||||||
class wxImageList {
|
class wxImageList {
|
||||||
public:
|
public:
|
||||||
wxImageList(int width, int height, const bool mask=TRUE, int initialCount=1);
|
wxImageList(int width, int height, int mask=TRUE, int initialCount=1);
|
||||||
~wxImageList();
|
~wxImageList();
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
|
@@ -75,7 +75,7 @@ wxPyApp::~wxPyApp() {
|
|||||||
|
|
||||||
// This one isn't acutally called... See __wxStart()
|
// This one isn't acutally called... See __wxStart()
|
||||||
bool wxPyApp::OnInit(void) {
|
bool wxPyApp::OnInit(void) {
|
||||||
return false;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxPyApp::MainLoop(void) {
|
int wxPyApp::MainLoop(void) {
|
||||||
|
@@ -208,6 +208,7 @@ void wxPyBitmapDataObject::SetBitmap(const wxBitmap& bitmap) {
|
|||||||
wxPySaveThread(doSave);
|
wxPySaveThread(doSave);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// See below in the init function...
|
||||||
wxClipboard* wxPyTheClipboard;
|
wxClipboard* wxPyTheClipboard;
|
||||||
|
|
||||||
class wxPyDropSource : public wxDropSource {
|
class wxPyDropSource : public wxDropSource {
|
||||||
@@ -3444,6 +3445,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
|||||||
{ "_EBool","_wxWindowID",0},
|
{ "_EBool","_wxWindowID",0},
|
||||||
{ "_class_wxRegion","_wxRegion",0},
|
{ "_class_wxRegion","_wxRegion",0},
|
||||||
{ "_class_wxDataFormat","_wxDataFormat",0},
|
{ "_class_wxDataFormat","_wxDataFormat",0},
|
||||||
|
{ "_wxGDIImage","_class_wxGDIImage",0},
|
||||||
{ "_wxFont","_class_wxFont",0},
|
{ "_wxFont","_class_wxFont",0},
|
||||||
{ "_class_wxPyDropTarget","_class_wxPyFileDropTarget",SwigwxPyFileDropTargetTowxPyDropTarget},
|
{ "_class_wxPyDropTarget","_class_wxPyFileDropTarget",SwigwxPyFileDropTargetTowxPyDropTarget},
|
||||||
{ "_class_wxPyDropTarget","_wxPyFileDropTarget",SwigwxPyFileDropTargetTowxPyDropTarget},
|
{ "_class_wxPyDropTarget","_wxPyFileDropTarget",SwigwxPyFileDropTargetTowxPyDropTarget},
|
||||||
@@ -3512,6 +3514,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
|||||||
{ "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0},
|
{ "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0},
|
||||||
{ "_class_wxPyDropSource","_wxPyDropSource",0},
|
{ "_class_wxPyDropSource","_wxPyDropSource",0},
|
||||||
{ "_class_wxImageList","_wxImageList",0},
|
{ "_class_wxImageList","_wxImageList",0},
|
||||||
|
{ "_class_wxGDIImage","_wxGDIImage",0},
|
||||||
{ "_wxWindowID","_wxCoord",0},
|
{ "_wxWindowID","_wxCoord",0},
|
||||||
{ "_wxWindowID","_wxPrintQuality",0},
|
{ "_wxWindowID","_wxPrintQuality",0},
|
||||||
{ "_wxWindowID","_size_t",0},
|
{ "_wxWindowID","_size_t",0},
|
||||||
|
@@ -58,6 +58,7 @@ extern PyObject *SWIG_newvarlink(void);
|
|||||||
#include <wx/spinbutt.h>
|
#include <wx/spinbutt.h>
|
||||||
#include <wx/dynarray.h>
|
#include <wx/dynarray.h>
|
||||||
#include <wx/statline.h>
|
#include <wx/statline.h>
|
||||||
|
//#include <wx/toggbutt.h>
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
#if wxUSE_OWNER_DRAWN
|
#if wxUSE_OWNER_DRAWN
|
||||||
@@ -120,6 +121,10 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
|||||||
static char* wxStringErrorMsg = "string type is required for parameter";
|
static char* wxStringErrorMsg = "string type is required for parameter";
|
||||||
|
|
||||||
wxValidator wxPyDefaultValidator; // Non-const default because of SWIG
|
wxValidator wxPyDefaultValidator; // Non-const default because of SWIG
|
||||||
|
|
||||||
|
wxSize wxButton_GetDefaultSize() {
|
||||||
|
return wxButton::GetDefaultSize();
|
||||||
|
}
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@@ -138,6 +143,25 @@ static PyObject *_wrap_wxDefaultValidator_get() {
|
|||||||
return pyobj;
|
return pyobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static PyObject *_wrap_wxButton_GetDefaultSize(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxSize * _result;
|
||||||
|
char *_kwnames[] = { NULL };
|
||||||
|
char _ptemp[128];
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxButton_GetDefaultSize",_kwnames))
|
||||||
|
return NULL;
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
_result = new wxSize (wxButton_GetDefaultSize());
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p");
|
||||||
|
_resultobj = Py_BuildValue("s",_ptemp);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
static void *SwigwxControlTowxWindow(void *ptr) {
|
static void *SwigwxControlTowxWindow(void *ptr) {
|
||||||
wxControl *src;
|
wxControl *src;
|
||||||
wxWindow *dest;
|
wxWindow *dest;
|
||||||
@@ -154,6 +178,31 @@ static void *SwigwxControlTowxEvtHandler(void *ptr) {
|
|||||||
return (void *) dest;
|
return (void *) dest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define new_wxControl() (new wxControl())
|
||||||
|
static PyObject *_wrap_new_wxControl(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxControl * _result;
|
||||||
|
char *_kwnames[] = { NULL };
|
||||||
|
char _ptemp[128];
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxControl",_kwnames))
|
||||||
|
return NULL;
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
_result = (wxControl *)new_wxControl();
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} if (_result) {
|
||||||
|
SWIG_MakePtr(_ptemp, (char *) _result,"_wxControl_p");
|
||||||
|
_resultobj = Py_BuildValue("s",_ptemp);
|
||||||
|
} else {
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
}
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
#define wxControl_Command(_swigobj,_swigarg0) (_swigobj->Command(_swigarg0))
|
#define wxControl_Command(_swigobj,_swigarg0) (_swigobj->Command(_swigarg0))
|
||||||
static PyObject *_wrap_wxControl_Command(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_wxControl_Command(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
@@ -7175,6 +7224,8 @@ static PyMethodDef controlscMethods[] = {
|
|||||||
{ "wxControl_SetLabel", (PyCFunction) _wrap_wxControl_SetLabel, METH_VARARGS | METH_KEYWORDS },
|
{ "wxControl_SetLabel", (PyCFunction) _wrap_wxControl_SetLabel, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxControl_GetLabel", (PyCFunction) _wrap_wxControl_GetLabel, METH_VARARGS | METH_KEYWORDS },
|
{ "wxControl_GetLabel", (PyCFunction) _wrap_wxControl_GetLabel, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxControl_Command", (PyCFunction) _wrap_wxControl_Command, METH_VARARGS | METH_KEYWORDS },
|
{ "wxControl_Command", (PyCFunction) _wrap_wxControl_Command, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "new_wxControl", (PyCFunction) _wrap_new_wxControl, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxButton_GetDefaultSize", (PyCFunction) _wrap_wxButton_GetDefaultSize, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
@@ -7344,6 +7395,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
|||||||
{ "_class_wxDataFormat","_wxDataFormat",0},
|
{ "_class_wxDataFormat","_wxDataFormat",0},
|
||||||
{ "_class_wxDropFilesEvent","_wxDropFilesEvent",0},
|
{ "_class_wxDropFilesEvent","_wxDropFilesEvent",0},
|
||||||
{ "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0},
|
{ "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0},
|
||||||
|
{ "_wxGDIImage","_class_wxGDIImage",0},
|
||||||
{ "_wxStaticText","_class_wxStaticText",0},
|
{ "_wxStaticText","_class_wxStaticText",0},
|
||||||
{ "_wxFont","_class_wxFont",0},
|
{ "_wxFont","_class_wxFont",0},
|
||||||
{ "_class_wxPyDropTarget","_wxPyDropTarget",0},
|
{ "_class_wxPyDropTarget","_wxPyDropTarget",0},
|
||||||
@@ -7517,6 +7569,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
|||||||
{ "_class_wxSlider","_wxSlider",0},
|
{ "_class_wxSlider","_wxSlider",0},
|
||||||
{ "_class_wxImageList","_wxImageList",0},
|
{ "_class_wxImageList","_wxImageList",0},
|
||||||
{ "_class_wxBitmapButton","_wxBitmapButton",0},
|
{ "_class_wxBitmapButton","_wxBitmapButton",0},
|
||||||
|
{ "_class_wxGDIImage","_wxGDIImage",0},
|
||||||
{ "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0},
|
{ "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0},
|
||||||
{ "_wxWindowID","_wxCoord",0},
|
{ "_wxWindowID","_wxCoord",0},
|
||||||
{ "_wxWindowID","_wxPrintQuality",0},
|
{ "_wxWindowID","_wxPrintQuality",0},
|
||||||
|
@@ -27,8 +27,9 @@ class wxControlPtr(wxWindowPtr):
|
|||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<C wxControl instance at %s>" % (self.this,)
|
return "<C wxControl instance at %s>" % (self.this,)
|
||||||
class wxControl(wxControlPtr):
|
class wxControl(wxControlPtr):
|
||||||
def __init__(self,this):
|
def __init__(self,*_args,**_kwargs):
|
||||||
self.this = this
|
self.this = apply(controlsc.new_wxControl,_args,_kwargs)
|
||||||
|
self.thisown = 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -786,6 +787,11 @@ class wxSlider(wxSliderPtr):
|
|||||||
|
|
||||||
#-------------- FUNCTION WRAPPERS ------------------
|
#-------------- FUNCTION WRAPPERS ------------------
|
||||||
|
|
||||||
|
def wxButton_GetDefaultSize(*_args, **_kwargs):
|
||||||
|
val = apply(controlsc.wxButton_GetDefaultSize,_args,_kwargs)
|
||||||
|
if val: val = wxSizePtr(val); val.thisown = 1
|
||||||
|
return val
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#-------------- VARIABLE WRAPPERS ------------------
|
#-------------- VARIABLE WRAPPERS ------------------
|
||||||
|
@@ -6178,6 +6178,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
|||||||
{ "_class_wxDataFormat","_wxDataFormat",0},
|
{ "_class_wxDataFormat","_wxDataFormat",0},
|
||||||
{ "_class_wxDropFilesEvent","_wxDropFilesEvent",0},
|
{ "_class_wxDropFilesEvent","_wxDropFilesEvent",0},
|
||||||
{ "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0},
|
{ "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0},
|
||||||
|
{ "_wxGDIImage","_class_wxGDIImage",0},
|
||||||
{ "_wxStaticText","_class_wxStaticText",0},
|
{ "_wxStaticText","_class_wxStaticText",0},
|
||||||
{ "_wxFont","_class_wxFont",0},
|
{ "_wxFont","_class_wxFont",0},
|
||||||
{ "_class_wxPyDropTarget","_wxPyDropTarget",0},
|
{ "_class_wxPyDropTarget","_wxPyDropTarget",0},
|
||||||
@@ -6283,6 +6284,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
|||||||
{ "_class_wxSlider","_wxSlider",0},
|
{ "_class_wxSlider","_wxSlider",0},
|
||||||
{ "_class_wxImageList","_wxImageList",0},
|
{ "_class_wxImageList","_wxImageList",0},
|
||||||
{ "_class_wxBitmapButton","_wxBitmapButton",0},
|
{ "_class_wxBitmapButton","_wxBitmapButton",0},
|
||||||
|
{ "_class_wxGDIImage","_wxGDIImage",0},
|
||||||
{ "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0},
|
{ "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0},
|
||||||
{ "_wxWindowID","_wxCoord",0},
|
{ "_wxWindowID","_wxCoord",0},
|
||||||
{ "_wxWindowID","_wxPrintQuality",0},
|
{ "_wxWindowID","_wxPrintQuality",0},
|
||||||
|
@@ -931,6 +931,102 @@ static PyObject *_wrap_wxCommandEvent_IsSelection(PyObject *self, PyObject *args
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define wxCommandEvent_SetString(_swigobj,_swigarg0) (_swigobj->SetString(_swigarg0))
|
||||||
|
static PyObject *_wrap_wxCommandEvent_SetString(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxCommandEvent * _arg0;
|
||||||
|
wxString * _arg1;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
PyObject * _obj1 = 0;
|
||||||
|
char *_kwnames[] = { "self","s", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxCommandEvent_SetString",_kwnames,&_argo0,&_obj1))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCommandEvent_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_SetString. Expected _wxCommandEvent_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
if (!PyString_Check(_obj1)) {
|
||||||
|
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
_arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
wxCommandEvent_SetString(_arg0,*_arg1);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
{
|
||||||
|
if (_obj1)
|
||||||
|
delete _arg1;
|
||||||
|
}
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxCommandEvent_SetExtraLong(_swigobj,_swigarg0) (_swigobj->SetExtraLong(_swigarg0))
|
||||||
|
static PyObject *_wrap_wxCommandEvent_SetExtraLong(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxCommandEvent * _arg0;
|
||||||
|
long _arg1;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "self","extraLong", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxCommandEvent_SetExtraLong",_kwnames,&_argo0,&_arg1))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCommandEvent_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_SetExtraLong. Expected _wxCommandEvent_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
wxCommandEvent_SetExtraLong(_arg0,_arg1);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxCommandEvent_SetInt(_swigobj,_swigarg0) (_swigobj->SetInt(_swigarg0))
|
||||||
|
static PyObject *_wrap_wxCommandEvent_SetInt(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxCommandEvent * _arg0;
|
||||||
|
int _arg1;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "self","i", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxCommandEvent_SetInt",_kwnames,&_argo0,&_arg1))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCommandEvent_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_SetInt. Expected _wxCommandEvent_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
wxCommandEvent_SetInt(_arg0,_arg1);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
static void *SwigwxScrollEventTowxCommandEvent(void *ptr) {
|
static void *SwigwxScrollEventTowxCommandEvent(void *ptr) {
|
||||||
wxScrollEvent *src;
|
wxScrollEvent *src;
|
||||||
wxCommandEvent *dest;
|
wxCommandEvent *dest;
|
||||||
@@ -4982,6 +5078,9 @@ static PyMethodDef eventscMethods[] = {
|
|||||||
{ "wxScrollEvent_GetPosition", (PyCFunction) _wrap_wxScrollEvent_GetPosition, METH_VARARGS | METH_KEYWORDS },
|
{ "wxScrollEvent_GetPosition", (PyCFunction) _wrap_wxScrollEvent_GetPosition, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxScrollEvent_GetOrientation", (PyCFunction) _wrap_wxScrollEvent_GetOrientation, METH_VARARGS | METH_KEYWORDS },
|
{ "wxScrollEvent_GetOrientation", (PyCFunction) _wrap_wxScrollEvent_GetOrientation, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "new_wxScrollEvent", (PyCFunction) _wrap_new_wxScrollEvent, METH_VARARGS | METH_KEYWORDS },
|
{ "new_wxScrollEvent", (PyCFunction) _wrap_new_wxScrollEvent, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxCommandEvent_SetInt", (PyCFunction) _wrap_wxCommandEvent_SetInt, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxCommandEvent_SetExtraLong", (PyCFunction) _wrap_wxCommandEvent_SetExtraLong, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxCommandEvent_SetString", (PyCFunction) _wrap_wxCommandEvent_SetString, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxCommandEvent_IsSelection", (PyCFunction) _wrap_wxCommandEvent_IsSelection, METH_VARARGS | METH_KEYWORDS },
|
{ "wxCommandEvent_IsSelection", (PyCFunction) _wrap_wxCommandEvent_IsSelection, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxCommandEvent_GetString", (PyCFunction) _wrap_wxCommandEvent_GetString, METH_VARARGS | METH_KEYWORDS },
|
{ "wxCommandEvent_GetString", (PyCFunction) _wrap_wxCommandEvent_GetString, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxCommandEvent_GetSelection", (PyCFunction) _wrap_wxCommandEvent_GetSelection, METH_VARARGS | METH_KEYWORDS },
|
{ "wxCommandEvent_GetSelection", (PyCFunction) _wrap_wxCommandEvent_GetSelection, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
@@ -121,6 +121,15 @@ class wxCommandEventPtr(wxEventPtr):
|
|||||||
def IsSelection(self, *_args, **_kwargs):
|
def IsSelection(self, *_args, **_kwargs):
|
||||||
val = apply(eventsc.wxCommandEvent_IsSelection,(self,) + _args, _kwargs)
|
val = apply(eventsc.wxCommandEvent_IsSelection,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
|
def SetString(self, *_args, **_kwargs):
|
||||||
|
val = apply(eventsc.wxCommandEvent_SetString,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def SetExtraLong(self, *_args, **_kwargs):
|
||||||
|
val = apply(eventsc.wxCommandEvent_SetExtraLong,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def SetInt(self, *_args, **_kwargs):
|
||||||
|
val = apply(eventsc.wxCommandEvent_SetInt,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<C wxCommandEvent instance at %s>" % (self.this,)
|
return "<C wxCommandEvent instance at %s>" % (self.this,)
|
||||||
class wxCommandEvent(wxCommandEventPtr):
|
class wxCommandEvent(wxCommandEventPtr):
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -2,22 +2,56 @@
|
|||||||
import gdic
|
import gdic
|
||||||
|
|
||||||
from misc import *
|
from misc import *
|
||||||
class wxBitmapPtr :
|
class wxGDIImagePtr :
|
||||||
|
def __init__(self,this):
|
||||||
|
self.this = this
|
||||||
|
self.thisown = 0
|
||||||
|
def GetHandle(self, *_args, **_kwargs):
|
||||||
|
val = apply(gdic.wxGDIImage_GetHandle,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def SetHandle(self, *_args, **_kwargs):
|
||||||
|
val = apply(gdic.wxGDIImage_SetHandle,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def Ok(self, *_args, **_kwargs):
|
||||||
|
val = apply(gdic.wxGDIImage_Ok,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def GetWidth(self, *_args, **_kwargs):
|
||||||
|
val = apply(gdic.wxGDIImage_GetWidth,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def GetHeight(self, *_args, **_kwargs):
|
||||||
|
val = apply(gdic.wxGDIImage_GetHeight,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def GetDepth(self, *_args, **_kwargs):
|
||||||
|
val = apply(gdic.wxGDIImage_GetDepth,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def SetWidth(self, *_args, **_kwargs):
|
||||||
|
val = apply(gdic.wxGDIImage_SetWidth,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def SetHeight(self, *_args, **_kwargs):
|
||||||
|
val = apply(gdic.wxGDIImage_SetHeight,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def SetDepth(self, *_args, **_kwargs):
|
||||||
|
val = apply(gdic.wxGDIImage_SetDepth,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def SetSize(self, *_args, **_kwargs):
|
||||||
|
val = apply(gdic.wxGDIImage_SetSize,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def __repr__(self):
|
||||||
|
return "<C wxGDIImage instance at %s>" % (self.this,)
|
||||||
|
class wxGDIImage(wxGDIImagePtr):
|
||||||
|
def __init__(self,this):
|
||||||
|
self.this = this
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class wxBitmapPtr(wxGDIImagePtr):
|
||||||
def __init__(self,this):
|
def __init__(self,this):
|
||||||
self.this = this
|
self.this = this
|
||||||
self.thisown = 0
|
self.thisown = 0
|
||||||
def __del__(self,gdic=gdic):
|
def __del__(self,gdic=gdic):
|
||||||
if self.thisown == 1 :
|
if self.thisown == 1 :
|
||||||
gdic.delete_wxBitmap(self)
|
gdic.delete_wxBitmap(self)
|
||||||
def Create(self, *_args, **_kwargs):
|
|
||||||
val = apply(gdic.wxBitmap_Create,(self,) + _args, _kwargs)
|
|
||||||
return val
|
|
||||||
def GetDepth(self, *_args, **_kwargs):
|
|
||||||
val = apply(gdic.wxBitmap_GetDepth,(self,) + _args, _kwargs)
|
|
||||||
return val
|
|
||||||
def GetHeight(self, *_args, **_kwargs):
|
|
||||||
val = apply(gdic.wxBitmap_GetHeight,(self,) + _args, _kwargs)
|
|
||||||
return val
|
|
||||||
def GetPalette(self, *_args, **_kwargs):
|
def GetPalette(self, *_args, **_kwargs):
|
||||||
val = apply(gdic.wxBitmap_GetPalette,(self,) + _args, _kwargs)
|
val = apply(gdic.wxBitmap_GetPalette,(self,) + _args, _kwargs)
|
||||||
if val: val = wxPalettePtr(val)
|
if val: val = wxPalettePtr(val)
|
||||||
@@ -26,33 +60,18 @@ class wxBitmapPtr :
|
|||||||
val = apply(gdic.wxBitmap_GetMask,(self,) + _args, _kwargs)
|
val = apply(gdic.wxBitmap_GetMask,(self,) + _args, _kwargs)
|
||||||
if val: val = wxMaskPtr(val)
|
if val: val = wxMaskPtr(val)
|
||||||
return val
|
return val
|
||||||
def GetWidth(self, *_args, **_kwargs):
|
|
||||||
val = apply(gdic.wxBitmap_GetWidth,(self,) + _args, _kwargs)
|
|
||||||
return val
|
|
||||||
def LoadFile(self, *_args, **_kwargs):
|
def LoadFile(self, *_args, **_kwargs):
|
||||||
val = apply(gdic.wxBitmap_LoadFile,(self,) + _args, _kwargs)
|
val = apply(gdic.wxBitmap_LoadFile,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
def Ok(self, *_args, **_kwargs):
|
|
||||||
val = apply(gdic.wxBitmap_Ok,(self,) + _args, _kwargs)
|
|
||||||
return val
|
|
||||||
def SaveFile(self, *_args, **_kwargs):
|
def SaveFile(self, *_args, **_kwargs):
|
||||||
val = apply(gdic.wxBitmap_SaveFile,(self,) + _args, _kwargs)
|
val = apply(gdic.wxBitmap_SaveFile,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
def SetDepth(self, *_args, **_kwargs):
|
|
||||||
val = apply(gdic.wxBitmap_SetDepth,(self,) + _args, _kwargs)
|
|
||||||
return val
|
|
||||||
def SetHeight(self, *_args, **_kwargs):
|
|
||||||
val = apply(gdic.wxBitmap_SetHeight,(self,) + _args, _kwargs)
|
|
||||||
return val
|
|
||||||
def SetMask(self, *_args, **_kwargs):
|
def SetMask(self, *_args, **_kwargs):
|
||||||
val = apply(gdic.wxBitmap_SetMask,(self,) + _args, _kwargs)
|
val = apply(gdic.wxBitmap_SetMask,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
def SetPalette(self, *_args, **_kwargs):
|
def SetPalette(self, *_args, **_kwargs):
|
||||||
val = apply(gdic.wxBitmap_SetPalette,(self,) + _args, _kwargs)
|
val = apply(gdic.wxBitmap_SetPalette,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
def SetWidth(self, *_args, **_kwargs):
|
|
||||||
val = apply(gdic.wxBitmap_SetWidth,(self,) + _args, _kwargs)
|
|
||||||
return val
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<C wxBitmap instance at %s>" % (self.this,)
|
return "<C wxBitmap instance at %s>" % (self.this,)
|
||||||
class wxBitmap(wxBitmapPtr):
|
class wxBitmap(wxBitmapPtr):
|
||||||
@@ -77,37 +96,16 @@ class wxMask(wxMaskPtr):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class wxIconPtr(wxBitmapPtr):
|
class wxIconPtr(wxGDIImagePtr):
|
||||||
def __init__(self,this):
|
def __init__(self,this):
|
||||||
self.this = this
|
self.this = this
|
||||||
self.thisown = 0
|
self.thisown = 0
|
||||||
def __del__(self,gdic=gdic):
|
def __del__(self,gdic=gdic):
|
||||||
if self.thisown == 1 :
|
if self.thisown == 1 :
|
||||||
gdic.delete_wxIcon(self)
|
gdic.delete_wxIcon(self)
|
||||||
def GetDepth(self, *_args, **_kwargs):
|
|
||||||
val = apply(gdic.wxIcon_GetDepth,(self,) + _args, _kwargs)
|
|
||||||
return val
|
|
||||||
def GetHeight(self, *_args, **_kwargs):
|
|
||||||
val = apply(gdic.wxIcon_GetHeight,(self,) + _args, _kwargs)
|
|
||||||
return val
|
|
||||||
def GetWidth(self, *_args, **_kwargs):
|
|
||||||
val = apply(gdic.wxIcon_GetWidth,(self,) + _args, _kwargs)
|
|
||||||
return val
|
|
||||||
def LoadFile(self, *_args, **_kwargs):
|
def LoadFile(self, *_args, **_kwargs):
|
||||||
val = apply(gdic.wxIcon_LoadFile,(self,) + _args, _kwargs)
|
val = apply(gdic.wxIcon_LoadFile,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
def Ok(self, *_args, **_kwargs):
|
|
||||||
val = apply(gdic.wxIcon_Ok,(self,) + _args, _kwargs)
|
|
||||||
return val
|
|
||||||
def SetDepth(self, *_args, **_kwargs):
|
|
||||||
val = apply(gdic.wxIcon_SetDepth,(self,) + _args, _kwargs)
|
|
||||||
return val
|
|
||||||
def SetHeight(self, *_args, **_kwargs):
|
|
||||||
val = apply(gdic.wxIcon_SetHeight,(self,) + _args, _kwargs)
|
|
||||||
return val
|
|
||||||
def SetWidth(self, *_args, **_kwargs):
|
|
||||||
val = apply(gdic.wxIcon_SetWidth,(self,) + _args, _kwargs)
|
|
||||||
return val
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<C wxIcon instance at %s>" % (self.this,)
|
return "<C wxIcon instance at %s>" % (self.this,)
|
||||||
class wxIcon(wxIconPtr):
|
class wxIcon(wxIconPtr):
|
||||||
@@ -118,16 +116,13 @@ class wxIcon(wxIconPtr):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class wxCursorPtr(wxBitmapPtr):
|
class wxCursorPtr(wxGDIImagePtr):
|
||||||
def __init__(self,this):
|
def __init__(self,this):
|
||||||
self.this = this
|
self.this = this
|
||||||
self.thisown = 0
|
self.thisown = 0
|
||||||
def __del__(self,gdic=gdic):
|
def __del__(self,gdic=gdic):
|
||||||
if self.thisown == 1 :
|
if self.thisown == 1 :
|
||||||
gdic.delete_wxCursor(self)
|
gdic.delete_wxCursor(self)
|
||||||
def Ok(self, *_args, **_kwargs):
|
|
||||||
val = apply(gdic.wxCursor_Ok,(self,) + _args, _kwargs)
|
|
||||||
return val
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<C wxCursor instance at %s>" % (self.this,)
|
return "<C wxCursor instance at %s>" % (self.this,)
|
||||||
class wxCursor(wxCursorPtr):
|
class wxCursor(wxCursorPtr):
|
||||||
@@ -285,13 +280,13 @@ class wxPenPtr :
|
|||||||
def GetDashes(self, *_args, **_kwargs):
|
def GetDashes(self, *_args, **_kwargs):
|
||||||
val = apply(gdic.wxPen_GetDashes,(self,) + _args, _kwargs)
|
val = apply(gdic.wxPen_GetDashes,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
|
def SetDashes(self, *_args, **_kwargs):
|
||||||
|
val = apply(gdic.wxPen_SetDashes,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
def GetStipple(self, *_args, **_kwargs):
|
def GetStipple(self, *_args, **_kwargs):
|
||||||
val = apply(gdic.wxPen_GetStipple,(self,) + _args, _kwargs)
|
val = apply(gdic.wxPen_GetStipple,(self,) + _args, _kwargs)
|
||||||
if val: val = wxBitmapPtr(val)
|
if val: val = wxBitmapPtr(val)
|
||||||
return val
|
return val
|
||||||
def SetDashes(self, *_args, **_kwargs):
|
|
||||||
val = apply(gdic.wxPen_SetDashes,(self,) + _args, _kwargs)
|
|
||||||
return val
|
|
||||||
def SetStipple(self, *_args, **_kwargs):
|
def SetStipple(self, *_args, **_kwargs):
|
||||||
val = apply(gdic.wxPen_SetStipple,(self,) + _args, _kwargs)
|
val = apply(gdic.wxPen_SetStipple,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
@@ -406,6 +401,9 @@ class wxDCPtr :
|
|||||||
def DrawRectangle(self, *_args, **_kwargs):
|
def DrawRectangle(self, *_args, **_kwargs):
|
||||||
val = apply(gdic.wxDC_DrawRectangle,(self,) + _args, _kwargs)
|
val = apply(gdic.wxDC_DrawRectangle,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
|
def DrawRotatedText(self, *_args, **_kwargs):
|
||||||
|
val = apply(gdic.wxDC_DrawRotatedText,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
def DrawRoundedRectangle(self, *_args, **_kwargs):
|
def DrawRoundedRectangle(self, *_args, **_kwargs):
|
||||||
val = apply(gdic.wxDC_DrawRoundedRectangle,(self,) + _args, _kwargs)
|
val = apply(gdic.wxDC_DrawRoundedRectangle,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
@@ -765,11 +763,6 @@ def wxEmptyBitmap(*_args, **_kwargs):
|
|||||||
if val: val = wxBitmapPtr(val); val.thisown = 1
|
if val: val = wxBitmapPtr(val); val.thisown = 1
|
||||||
return val
|
return val
|
||||||
|
|
||||||
def wxNoRefBitmap(*_args, **_kwargs):
|
|
||||||
val = apply(gdic.wxNoRefBitmap,_args,_kwargs)
|
|
||||||
if val: val = wxBitmapPtr(val)
|
|
||||||
return val
|
|
||||||
|
|
||||||
def wxBitmapFromData(*_args, **_kwargs):
|
def wxBitmapFromData(*_args, **_kwargs):
|
||||||
val = apply(gdic.wxBitmapFromData,_args,_kwargs)
|
val = apply(gdic.wxBitmapFromData,_args,_kwargs)
|
||||||
if val: val = wxBitmapPtr(val); val.thisown = 1
|
if val: val = wxBitmapPtr(val); val.thisown = 1
|
||||||
|
@@ -631,6 +631,40 @@ static PyObject *_wrap_wxToolBarTool_GetHeight(PyObject *self, PyObject *args, P
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define wxToolBarTool_GetControl(_swigobj) (_swigobj->GetControl())
|
||||||
|
static PyObject *_wrap_wxToolBarTool_GetControl(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxControl * _result;
|
||||||
|
wxToolBarTool * _arg0;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "self", NULL };
|
||||||
|
char _ptemp[128];
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolBarTool_GetControl",_kwnames,&_argo0))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBarTool_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBarTool_GetControl. Expected _wxToolBarTool_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
_result = (wxControl *)wxToolBarTool_GetControl(_arg0);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} if (_result) {
|
||||||
|
SWIG_MakePtr(_ptemp, (char *) _result,"_wxControl_p");
|
||||||
|
_resultobj = Py_BuildValue("s",_ptemp);
|
||||||
|
} else {
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
}
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
#define wxToolBarTool_m_toolStyle_set(_swigobj,_swigval) (_swigobj->m_toolStyle = _swigval,_swigval)
|
#define wxToolBarTool_m_toolStyle_set(_swigobj,_swigval) (_swigobj->m_toolStyle = _swigval,_swigval)
|
||||||
static PyObject *_wrap_wxToolBarTool_m_toolStyle_set(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_wxToolBarTool_m_toolStyle_set(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
@@ -1698,6 +1732,42 @@ static PyObject *_wrap_new_wxToolBar(PyObject *self, PyObject *args, PyObject *k
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define wxToolBar_AddControl(_swigobj,_swigarg0) (_swigobj->AddControl(_swigarg0))
|
||||||
|
static PyObject *_wrap_wxToolBar_AddControl(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
bool _result;
|
||||||
|
wxToolBar * _arg0;
|
||||||
|
wxControl * _arg1;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
PyObject * _argo1 = 0;
|
||||||
|
char *_kwnames[] = { "self","control", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxToolBar_AddControl",_kwnames,&_argo0,&_argo1))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBar_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBar_AddControl. Expected _wxToolBar_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (_argo1) {
|
||||||
|
if (_argo1 == Py_None) { _arg1 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxControl_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxToolBar_AddControl. Expected _wxControl_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
_result = (bool )wxToolBar_AddControl(_arg0,_arg1);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} _resultobj = Py_BuildValue("i",_result);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
#define wxToolBar_AddSeparator(_swigobj) (_swigobj->AddSeparator())
|
#define wxToolBar_AddSeparator(_swigobj) (_swigobj->AddSeparator())
|
||||||
static PyObject *_wrap_wxToolBar_AddSeparator(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_wxToolBar_AddSeparator(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
@@ -1725,6 +1795,33 @@ static PyObject *_wrap_wxToolBar_AddSeparator(PyObject *self, PyObject *args, Py
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define wxToolBar_ClearTools(_swigobj) (_swigobj->ClearTools())
|
||||||
|
static PyObject *_wrap_wxToolBar_ClearTools(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxToolBar * _arg0;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "self", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolBar_ClearTools",_kwnames,&_argo0))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBar_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBar_ClearTools. Expected _wxToolBar_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
wxToolBar_ClearTools(_arg0);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
static wxToolBarTool * wxToolBar_AddTool(wxToolBar *self,int toolIndex,const wxBitmap & bitmap1,const wxBitmap & bitmap2,int isToggle,long xPos,long yPos,const wxString & shortHelpString,const wxString & longHelpString) {
|
static wxToolBarTool * wxToolBar_AddTool(wxToolBar *self,int toolIndex,const wxBitmap & bitmap1,const wxBitmap & bitmap2,int isToggle,long xPos,long yPos,const wxString & shortHelpString,const wxString & longHelpString) {
|
||||||
return self->AddTool(toolIndex, bitmap1, bitmap2,
|
return self->AddTool(toolIndex, bitmap1, bitmap2,
|
||||||
isToggle, xPos, yPos, NULL,
|
isToggle, xPos, yPos, NULL,
|
||||||
@@ -1925,14 +2022,14 @@ static PyObject *_wrap_wxToolBar_FindToolForPosition(PyObject *self, PyObject *a
|
|||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
wxToolBarTool * _result;
|
wxToolBarTool * _result;
|
||||||
wxToolBar * _arg0;
|
wxToolBar * _arg0;
|
||||||
float _arg1;
|
long _arg1;
|
||||||
float _arg2;
|
long _arg2;
|
||||||
PyObject * _argo0 = 0;
|
PyObject * _argo0 = 0;
|
||||||
char *_kwnames[] = { "self","x","y", NULL };
|
char *_kwnames[] = { "self","x","y", NULL };
|
||||||
char _ptemp[128];
|
char _ptemp[128];
|
||||||
|
|
||||||
self = self;
|
self = self;
|
||||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Off:wxToolBar_FindToolForPosition",_kwnames,&_argo0,&_arg1,&_arg2))
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oll:wxToolBar_FindToolForPosition",_kwnames,&_argo0,&_arg1,&_arg2))
|
||||||
return NULL;
|
return NULL;
|
||||||
if (_argo0) {
|
if (_argo0) {
|
||||||
if (_argo0 == Py_None) { _arg0 = NULL; }
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
@@ -2049,6 +2146,35 @@ static PyObject *_wrap_wxToolBar_SetToolBitmapSize(PyObject *self, PyObject *arg
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define wxToolBar_GetToolMargins(_swigobj) (_swigobj->GetToolMargins())
|
||||||
|
static PyObject *_wrap_wxToolBar_GetToolMargins(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxSize * _result;
|
||||||
|
wxToolBar * _arg0;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "self", NULL };
|
||||||
|
char _ptemp[128];
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolBar_GetToolMargins",_kwnames,&_argo0))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBar_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBar_GetToolMargins. Expected _wxToolBar_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
_result = new wxSize (wxToolBar_GetToolMargins(_arg0));
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p");
|
||||||
|
_resultobj = Py_BuildValue("s",_ptemp);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
#define wxToolBar_GetMaxSize(_swigobj) (_swigobj->GetMaxSize())
|
#define wxToolBar_GetMaxSize(_swigobj) (_swigobj->GetMaxSize())
|
||||||
static PyObject *_wrap_wxToolBar_GetMaxSize(PyObject *self, PyObject *args, PyObject *kwargs) {
|
static PyObject *_wrap_wxToolBar_GetMaxSize(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
@@ -2485,7 +2611,125 @@ static PyObject *_wrap_wxToolBar_ToggleTool(PyObject *self, PyObject *args, PyOb
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define wxToolBar_SetToggle(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetToggle(_swigarg0,_swigarg1))
|
||||||
|
static PyObject *_wrap_wxToolBar_SetToggle(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxToolBar * _arg0;
|
||||||
|
int _arg1;
|
||||||
|
bool _arg2;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
int tempbool2;
|
||||||
|
char *_kwnames[] = { "self","toolIndex","toggle", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxToolBar_SetToggle",_kwnames,&_argo0,&_arg1,&tempbool2))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBar_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBar_SetToggle. Expected _wxToolBar_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_arg2 = (bool ) tempbool2;
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
wxToolBar_SetToggle(_arg0,_arg1,_arg2);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxToolBar_SetMaxRowsCols(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetMaxRowsCols(_swigarg0,_swigarg1))
|
||||||
|
static PyObject *_wrap_wxToolBar_SetMaxRowsCols(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
wxToolBar * _arg0;
|
||||||
|
int _arg1;
|
||||||
|
int _arg2;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "self","rows","cols", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxToolBar_SetMaxRowsCols",_kwnames,&_argo0,&_arg1,&_arg2))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBar_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBar_SetMaxRowsCols. Expected _wxToolBar_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
wxToolBar_SetMaxRowsCols(_arg0,_arg1,_arg2);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} Py_INCREF(Py_None);
|
||||||
|
_resultobj = Py_None;
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxToolBar_GetMaxRows(_swigobj) (_swigobj->GetMaxRows())
|
||||||
|
static PyObject *_wrap_wxToolBar_GetMaxRows(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
int _result;
|
||||||
|
wxToolBar * _arg0;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "self", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolBar_GetMaxRows",_kwnames,&_argo0))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBar_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBar_GetMaxRows. Expected _wxToolBar_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
_result = (int )wxToolBar_GetMaxRows(_arg0);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} _resultobj = Py_BuildValue("i",_result);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wxToolBar_GetMaxCols(_swigobj) (_swigobj->GetMaxCols())
|
||||||
|
static PyObject *_wrap_wxToolBar_GetMaxCols(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
int _result;
|
||||||
|
wxToolBar * _arg0;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "self", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxToolBar_GetMaxCols",_kwnames,&_argo0))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxToolBar_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxToolBar_GetMaxCols. Expected _wxToolBar_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
_result = (int )wxToolBar_GetMaxCols(_arg0);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} _resultobj = Py_BuildValue("i",_result);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
static PyMethodDef stattoolcMethods[] = {
|
static PyMethodDef stattoolcMethods[] = {
|
||||||
|
{ "wxToolBar_GetMaxCols", (PyCFunction) _wrap_wxToolBar_GetMaxCols, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxToolBar_GetMaxRows", (PyCFunction) _wrap_wxToolBar_GetMaxRows, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxToolBar_SetMaxRowsCols", (PyCFunction) _wrap_wxToolBar_SetMaxRowsCols, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxToolBar_SetToggle", (PyCFunction) _wrap_wxToolBar_SetToggle, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxToolBar_ToggleTool", (PyCFunction) _wrap_wxToolBar_ToggleTool, METH_VARARGS | METH_KEYWORDS },
|
{ "wxToolBar_ToggleTool", (PyCFunction) _wrap_wxToolBar_ToggleTool, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxToolBar_SetToolSeparation", (PyCFunction) _wrap_wxToolBar_SetToolSeparation, METH_VARARGS | METH_KEYWORDS },
|
{ "wxToolBar_SetToolSeparation", (PyCFunction) _wrap_wxToolBar_SetToolSeparation, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxToolBar_SetToolPacking", (PyCFunction) _wrap_wxToolBar_SetToolPacking, METH_VARARGS | METH_KEYWORDS },
|
{ "wxToolBar_SetToolPacking", (PyCFunction) _wrap_wxToolBar_SetToolPacking, METH_VARARGS | METH_KEYWORDS },
|
||||||
@@ -2500,6 +2744,7 @@ static PyMethodDef stattoolcMethods[] = {
|
|||||||
{ "wxToolBar_GetToolLongHelp", (PyCFunction) _wrap_wxToolBar_GetToolLongHelp, METH_VARARGS | METH_KEYWORDS },
|
{ "wxToolBar_GetToolLongHelp", (PyCFunction) _wrap_wxToolBar_GetToolLongHelp, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxToolBar_GetToolEnabled", (PyCFunction) _wrap_wxToolBar_GetToolEnabled, METH_VARARGS | METH_KEYWORDS },
|
{ "wxToolBar_GetToolEnabled", (PyCFunction) _wrap_wxToolBar_GetToolEnabled, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxToolBar_GetMaxSize", (PyCFunction) _wrap_wxToolBar_GetMaxSize, METH_VARARGS | METH_KEYWORDS },
|
{ "wxToolBar_GetMaxSize", (PyCFunction) _wrap_wxToolBar_GetMaxSize, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxToolBar_GetToolMargins", (PyCFunction) _wrap_wxToolBar_GetToolMargins, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxToolBar_SetToolBitmapSize", (PyCFunction) _wrap_wxToolBar_SetToolBitmapSize, METH_VARARGS | METH_KEYWORDS },
|
{ "wxToolBar_SetToolBitmapSize", (PyCFunction) _wrap_wxToolBar_SetToolBitmapSize, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxToolBar_GetToolBitmapSize", (PyCFunction) _wrap_wxToolBar_GetToolBitmapSize, METH_VARARGS | METH_KEYWORDS },
|
{ "wxToolBar_GetToolBitmapSize", (PyCFunction) _wrap_wxToolBar_GetToolBitmapSize, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxToolBar_GetToolSize", (PyCFunction) _wrap_wxToolBar_GetToolSize, METH_VARARGS | METH_KEYWORDS },
|
{ "wxToolBar_GetToolSize", (PyCFunction) _wrap_wxToolBar_GetToolSize, METH_VARARGS | METH_KEYWORDS },
|
||||||
@@ -2507,7 +2752,9 @@ static PyMethodDef stattoolcMethods[] = {
|
|||||||
{ "wxToolBar_EnableTool", (PyCFunction) _wrap_wxToolBar_EnableTool, METH_VARARGS | METH_KEYWORDS },
|
{ "wxToolBar_EnableTool", (PyCFunction) _wrap_wxToolBar_EnableTool, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxToolBar_AddSimpleTool", (PyCFunction) _wrap_wxToolBar_AddSimpleTool, METH_VARARGS | METH_KEYWORDS },
|
{ "wxToolBar_AddSimpleTool", (PyCFunction) _wrap_wxToolBar_AddSimpleTool, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxToolBar_AddTool", (PyCFunction) _wrap_wxToolBar_AddTool, METH_VARARGS | METH_KEYWORDS },
|
{ "wxToolBar_AddTool", (PyCFunction) _wrap_wxToolBar_AddTool, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxToolBar_ClearTools", (PyCFunction) _wrap_wxToolBar_ClearTools, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxToolBar_AddSeparator", (PyCFunction) _wrap_wxToolBar_AddSeparator, METH_VARARGS | METH_KEYWORDS },
|
{ "wxToolBar_AddSeparator", (PyCFunction) _wrap_wxToolBar_AddSeparator, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxToolBar_AddControl", (PyCFunction) _wrap_wxToolBar_AddControl, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "new_wxToolBar", (PyCFunction) _wrap_new_wxToolBar, METH_VARARGS | METH_KEYWORDS },
|
{ "new_wxToolBar", (PyCFunction) _wrap_new_wxToolBar, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxToolBarTool_m_longHelpString_get", (PyCFunction) _wrap_wxToolBarTool_m_longHelpString_get, METH_VARARGS | METH_KEYWORDS },
|
{ "wxToolBarTool_m_longHelpString_get", (PyCFunction) _wrap_wxToolBarTool_m_longHelpString_get, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxToolBarTool_m_longHelpString_set", (PyCFunction) _wrap_wxToolBarTool_m_longHelpString_set, METH_VARARGS | METH_KEYWORDS },
|
{ "wxToolBarTool_m_longHelpString_set", (PyCFunction) _wrap_wxToolBarTool_m_longHelpString_set, METH_VARARGS | METH_KEYWORDS },
|
||||||
@@ -2541,6 +2788,7 @@ static PyMethodDef stattoolcMethods[] = {
|
|||||||
{ "wxToolBarTool_m_clientData_set", (PyCFunction) _wrap_wxToolBarTool_m_clientData_set, METH_VARARGS | METH_KEYWORDS },
|
{ "wxToolBarTool_m_clientData_set", (PyCFunction) _wrap_wxToolBarTool_m_clientData_set, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxToolBarTool_m_toolStyle_get", (PyCFunction) _wrap_wxToolBarTool_m_toolStyle_get, METH_VARARGS | METH_KEYWORDS },
|
{ "wxToolBarTool_m_toolStyle_get", (PyCFunction) _wrap_wxToolBarTool_m_toolStyle_get, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxToolBarTool_m_toolStyle_set", (PyCFunction) _wrap_wxToolBarTool_m_toolStyle_set, METH_VARARGS | METH_KEYWORDS },
|
{ "wxToolBarTool_m_toolStyle_set", (PyCFunction) _wrap_wxToolBarTool_m_toolStyle_set, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxToolBarTool_GetControl", (PyCFunction) _wrap_wxToolBarTool_GetControl, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxToolBarTool_GetHeight", (PyCFunction) _wrap_wxToolBarTool_GetHeight, METH_VARARGS | METH_KEYWORDS },
|
{ "wxToolBarTool_GetHeight", (PyCFunction) _wrap_wxToolBarTool_GetHeight, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxToolBarTool_GetWidth", (PyCFunction) _wrap_wxToolBarTool_GetWidth, METH_VARARGS | METH_KEYWORDS },
|
{ "wxToolBarTool_GetWidth", (PyCFunction) _wrap_wxToolBarTool_GetWidth, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxToolBarTool_SetSize", (PyCFunction) _wrap_wxToolBarTool_SetSize, METH_VARARGS | METH_KEYWORDS },
|
{ "wxToolBarTool_SetSize", (PyCFunction) _wrap_wxToolBarTool_SetSize, METH_VARARGS | METH_KEYWORDS },
|
||||||
@@ -2691,6 +2939,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
|||||||
{ "_class_wxDataFormat","_wxDataFormat",0},
|
{ "_class_wxDataFormat","_wxDataFormat",0},
|
||||||
{ "_class_wxDropFilesEvent","_wxDropFilesEvent",0},
|
{ "_class_wxDropFilesEvent","_wxDropFilesEvent",0},
|
||||||
{ "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0},
|
{ "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0},
|
||||||
|
{ "_wxGDIImage","_class_wxGDIImage",0},
|
||||||
{ "_wxStaticText","_class_wxStaticText",0},
|
{ "_wxStaticText","_class_wxStaticText",0},
|
||||||
{ "_wxFont","_class_wxFont",0},
|
{ "_wxFont","_class_wxFont",0},
|
||||||
{ "_class_wxPyDropTarget","_wxPyDropTarget",0},
|
{ "_class_wxPyDropTarget","_wxPyDropTarget",0},
|
||||||
@@ -2792,6 +3041,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
|||||||
{ "_class_wxSlider","_wxSlider",0},
|
{ "_class_wxSlider","_wxSlider",0},
|
||||||
{ "_class_wxImageList","_wxImageList",0},
|
{ "_class_wxImageList","_wxImageList",0},
|
||||||
{ "_class_wxBitmapButton","_wxBitmapButton",0},
|
{ "_class_wxBitmapButton","_wxBitmapButton",0},
|
||||||
|
{ "_class_wxGDIImage","_wxGDIImage",0},
|
||||||
{ "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0},
|
{ "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0},
|
||||||
{ "_wxWindowID","_wxCoord",0},
|
{ "_wxWindowID","_wxCoord",0},
|
||||||
{ "_wxWindowID","_wxPrintQuality",0},
|
{ "_wxWindowID","_wxPrintQuality",0},
|
||||||
|
@@ -72,6 +72,10 @@ class wxToolBarToolPtr :
|
|||||||
def GetHeight(self, *_args, **_kwargs):
|
def GetHeight(self, *_args, **_kwargs):
|
||||||
val = apply(stattoolc.wxToolBarTool_GetHeight,(self,) + _args, _kwargs)
|
val = apply(stattoolc.wxToolBarTool_GetHeight,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
|
def GetControl(self, *_args, **_kwargs):
|
||||||
|
val = apply(stattoolc.wxToolBarTool_GetControl,(self,) + _args, _kwargs)
|
||||||
|
if val: val = wxControlPtr(val)
|
||||||
|
return val
|
||||||
def __setattr__(self,name,value):
|
def __setattr__(self,name,value):
|
||||||
if name == "m_toolStyle" :
|
if name == "m_toolStyle" :
|
||||||
stattoolc.wxToolBarTool_m_toolStyle_set(self,value)
|
stattoolc.wxToolBarTool_m_toolStyle_set(self,value)
|
||||||
@@ -170,9 +174,15 @@ class wxToolBarPtr(wxControlPtr):
|
|||||||
def __init__(self,this):
|
def __init__(self,this):
|
||||||
self.this = this
|
self.this = this
|
||||||
self.thisown = 0
|
self.thisown = 0
|
||||||
|
def AddControl(self, *_args, **_kwargs):
|
||||||
|
val = apply(stattoolc.wxToolBar_AddControl,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
def AddSeparator(self, *_args, **_kwargs):
|
def AddSeparator(self, *_args, **_kwargs):
|
||||||
val = apply(stattoolc.wxToolBar_AddSeparator,(self,) + _args, _kwargs)
|
val = apply(stattoolc.wxToolBar_AddSeparator,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
|
def ClearTools(self, *_args, **_kwargs):
|
||||||
|
val = apply(stattoolc.wxToolBar_ClearTools,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
def AddTool(self, *_args, **_kwargs):
|
def AddTool(self, *_args, **_kwargs):
|
||||||
val = apply(stattoolc.wxToolBar_AddTool,(self,) + _args, _kwargs)
|
val = apply(stattoolc.wxToolBar_AddTool,(self,) + _args, _kwargs)
|
||||||
if val: val = wxToolBarToolPtr(val)
|
if val: val = wxToolBarToolPtr(val)
|
||||||
@@ -199,6 +209,10 @@ class wxToolBarPtr(wxControlPtr):
|
|||||||
def SetToolBitmapSize(self, *_args, **_kwargs):
|
def SetToolBitmapSize(self, *_args, **_kwargs):
|
||||||
val = apply(stattoolc.wxToolBar_SetToolBitmapSize,(self,) + _args, _kwargs)
|
val = apply(stattoolc.wxToolBar_SetToolBitmapSize,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
|
def GetToolMargins(self, *_args, **_kwargs):
|
||||||
|
val = apply(stattoolc.wxToolBar_GetToolMargins,(self,) + _args, _kwargs)
|
||||||
|
if val: val = wxSizePtr(val) ; val.thisown = 1
|
||||||
|
return val
|
||||||
def GetMaxSize(self, *_args, **_kwargs):
|
def GetMaxSize(self, *_args, **_kwargs):
|
||||||
val = apply(stattoolc.wxToolBar_GetMaxSize,(self,) + _args, _kwargs)
|
val = apply(stattoolc.wxToolBar_GetMaxSize,(self,) + _args, _kwargs)
|
||||||
if val: val = wxSizePtr(val) ; val.thisown = 1
|
if val: val = wxSizePtr(val) ; val.thisown = 1
|
||||||
@@ -242,6 +256,18 @@ class wxToolBarPtr(wxControlPtr):
|
|||||||
def ToggleTool(self, *_args, **_kwargs):
|
def ToggleTool(self, *_args, **_kwargs):
|
||||||
val = apply(stattoolc.wxToolBar_ToggleTool,(self,) + _args, _kwargs)
|
val = apply(stattoolc.wxToolBar_ToggleTool,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
|
def SetToggle(self, *_args, **_kwargs):
|
||||||
|
val = apply(stattoolc.wxToolBar_SetToggle,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def SetMaxRowsCols(self, *_args, **_kwargs):
|
||||||
|
val = apply(stattoolc.wxToolBar_SetMaxRowsCols,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def GetMaxRows(self, *_args, **_kwargs):
|
||||||
|
val = apply(stattoolc.wxToolBar_GetMaxRows,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
|
def GetMaxCols(self, *_args, **_kwargs):
|
||||||
|
val = apply(stattoolc.wxToolBar_GetMaxCols,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<C wxToolBar instance at %s>" % (self.this,)
|
return "<C wxToolBar instance at %s>" % (self.this,)
|
||||||
class wxToolBar(wxToolBarPtr):
|
class wxToolBar(wxToolBarPtr):
|
||||||
|
@@ -529,6 +529,40 @@ static PyObject *_wrap_wxEvtHandler_Connect(PyObject *self, PyObject *args, PyOb
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool wxEvtHandler_Disconnect(wxEvtHandler *self,int id,int lastId,wxEventType eventType) {
|
||||||
|
return self->Disconnect(id, lastId, eventType,
|
||||||
|
(wxObjectEventFunction)
|
||||||
|
&wxPyCallback::EventThunker);
|
||||||
|
}
|
||||||
|
static PyObject *_wrap_wxEvtHandler_Disconnect(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||||
|
PyObject * _resultobj;
|
||||||
|
bool _result;
|
||||||
|
wxEvtHandler * _arg0;
|
||||||
|
int _arg1;
|
||||||
|
int _arg2 = (int ) -1;
|
||||||
|
wxEventType _arg3 = (wxEventType ) wxEVT_NULL;
|
||||||
|
PyObject * _argo0 = 0;
|
||||||
|
char *_kwnames[] = { "self","id","lastId","eventType", NULL };
|
||||||
|
|
||||||
|
self = self;
|
||||||
|
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|ii:wxEvtHandler_Disconnect",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3))
|
||||||
|
return NULL;
|
||||||
|
if (_argo0) {
|
||||||
|
if (_argo0 == Py_None) { _arg0 = NULL; }
|
||||||
|
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxEvtHandler_p")) {
|
||||||
|
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxEvtHandler_Disconnect. Expected _wxEvtHandler_p.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
wxPy_BEGIN_ALLOW_THREADS;
|
||||||
|
_result = (bool )wxEvtHandler_Disconnect(_arg0,_arg1,_arg2,_arg3);
|
||||||
|
|
||||||
|
wxPy_END_ALLOW_THREADS;
|
||||||
|
} _resultobj = Py_BuildValue("i",_result);
|
||||||
|
return _resultobj;
|
||||||
|
}
|
||||||
|
|
||||||
static void *SwigwxValidatorTowxEvtHandler(void *ptr) {
|
static void *SwigwxValidatorTowxEvtHandler(void *ptr) {
|
||||||
wxValidator *src;
|
wxValidator *src;
|
||||||
wxEvtHandler *dest;
|
wxEvtHandler *dest;
|
||||||
@@ -8651,6 +8685,7 @@ static PyMethodDef windowscMethods[] = {
|
|||||||
{ "wxValidator_GetWindow", (PyCFunction) _wrap_wxValidator_GetWindow, METH_VARARGS | METH_KEYWORDS },
|
{ "wxValidator_GetWindow", (PyCFunction) _wrap_wxValidator_GetWindow, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxValidator_Clone", (PyCFunction) _wrap_wxValidator_Clone, METH_VARARGS | METH_KEYWORDS },
|
{ "wxValidator_Clone", (PyCFunction) _wrap_wxValidator_Clone, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "new_wxValidator", (PyCFunction) _wrap_new_wxValidator, METH_VARARGS | METH_KEYWORDS },
|
{ "new_wxValidator", (PyCFunction) _wrap_new_wxValidator, METH_VARARGS | METH_KEYWORDS },
|
||||||
|
{ "wxEvtHandler_Disconnect", (PyCFunction) _wrap_wxEvtHandler_Disconnect, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxEvtHandler_Connect", (PyCFunction) _wrap_wxEvtHandler_Connect, METH_VARARGS | METH_KEYWORDS },
|
{ "wxEvtHandler_Connect", (PyCFunction) _wrap_wxEvtHandler_Connect, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxEvtHandler_SetPreviousHandler", (PyCFunction) _wrap_wxEvtHandler_SetPreviousHandler, METH_VARARGS | METH_KEYWORDS },
|
{ "wxEvtHandler_SetPreviousHandler", (PyCFunction) _wrap_wxEvtHandler_SetPreviousHandler, METH_VARARGS | METH_KEYWORDS },
|
||||||
{ "wxEvtHandler_SetNextHandler", (PyCFunction) _wrap_wxEvtHandler_SetNextHandler, METH_VARARGS | METH_KEYWORDS },
|
{ "wxEvtHandler_SetNextHandler", (PyCFunction) _wrap_wxEvtHandler_SetNextHandler, METH_VARARGS | METH_KEYWORDS },
|
||||||
@@ -8769,6 +8804,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
|||||||
{ "_EBool","_wxWindowID",0},
|
{ "_EBool","_wxWindowID",0},
|
||||||
{ "_class_wxRegion","_wxRegion",0},
|
{ "_class_wxRegion","_wxRegion",0},
|
||||||
{ "_class_wxDataFormat","_wxDataFormat",0},
|
{ "_class_wxDataFormat","_wxDataFormat",0},
|
||||||
|
{ "_wxGDIImage","_class_wxGDIImage",0},
|
||||||
{ "_wxFont","_class_wxFont",0},
|
{ "_wxFont","_class_wxFont",0},
|
||||||
{ "_class_wxPyDropTarget","_wxPyDropTarget",0},
|
{ "_class_wxPyDropTarget","_wxPyDropTarget",0},
|
||||||
{ "_unsigned_long","_wxDash",0},
|
{ "_unsigned_long","_wxDash",0},
|
||||||
@@ -8844,6 +8880,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
|
|||||||
{ "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0},
|
{ "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0},
|
||||||
{ "_class_wxPyDropSource","_wxPyDropSource",0},
|
{ "_class_wxPyDropSource","_wxPyDropSource",0},
|
||||||
{ "_class_wxImageList","_wxImageList",0},
|
{ "_class_wxImageList","_wxImageList",0},
|
||||||
|
{ "_class_wxGDIImage","_wxGDIImage",0},
|
||||||
{ "_wxWindowID","_wxCoord",0},
|
{ "_wxWindowID","_wxCoord",0},
|
||||||
{ "_wxWindowID","_wxPrintQuality",0},
|
{ "_wxWindowID","_wxPrintQuality",0},
|
||||||
{ "_wxWindowID","_size_t",0},
|
{ "_wxWindowID","_size_t",0},
|
||||||
|
@@ -50,6 +50,9 @@ class wxEvtHandlerPtr :
|
|||||||
def Connect(self, *_args, **_kwargs):
|
def Connect(self, *_args, **_kwargs):
|
||||||
val = apply(windowsc.wxEvtHandler_Connect,(self,) + _args, _kwargs)
|
val = apply(windowsc.wxEvtHandler_Connect,(self,) + _args, _kwargs)
|
||||||
return val
|
return val
|
||||||
|
def Disconnect(self, *_args, **_kwargs):
|
||||||
|
val = apply(windowsc.wxEvtHandler_Disconnect,(self,) + _args, _kwargs)
|
||||||
|
return val
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<C wxEvtHandler instance at %s>" % (self.this,)
|
return "<C wxEvtHandler instance at %s>" % (self.this,)
|
||||||
class wxEvtHandler(wxEvtHandlerPtr):
|
class wxEvtHandler(wxEvtHandlerPtr):
|
||||||
|
@@ -57,8 +57,6 @@ public:
|
|||||||
void DrawFieldText(wxDC& dc, int i);
|
void DrawFieldText(wxDC& dc, int i);
|
||||||
void InitColours(void);
|
void InitColours(void);
|
||||||
|
|
||||||
// OnSysColourChanged(wxSysColourChangedEvent& event);
|
|
||||||
|
|
||||||
void SetFieldsCount(int number = 1);
|
void SetFieldsCount(int number = 1);
|
||||||
void SetStatusText(const wxString& text, int i = 0);
|
void SetStatusText(const wxString& text, int i = 0);
|
||||||
void SetStatusWidths(int LCOUNT, int* LIST);
|
void SetStatusWidths(int LCOUNT, int* LIST);
|
||||||
@@ -71,22 +69,19 @@ class wxToolBarTool {
|
|||||||
public:
|
public:
|
||||||
wxToolBarTool();
|
wxToolBarTool();
|
||||||
~wxToolBarTool();
|
~wxToolBarTool();
|
||||||
#ifdef __WXMSW__
|
|
||||||
void SetSize( long w, long h ) { m_width = w; m_height = h; }
|
void SetSize( long w, long h ) { m_width = w; m_height = h; }
|
||||||
long GetWidth () const { return m_width; }
|
long GetWidth () const { return m_width; }
|
||||||
long GetHeight () const { return m_height; }
|
long GetHeight () const { return m_height; }
|
||||||
#endif
|
wxControl *GetControl();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int m_toolStyle;
|
int m_toolStyle;
|
||||||
wxObject * m_clientData;
|
wxObject * m_clientData;
|
||||||
int m_index;
|
int m_index;
|
||||||
#ifdef __WXMSW__
|
|
||||||
long m_x;
|
long m_x;
|
||||||
long m_y;
|
long m_y;
|
||||||
long m_width;
|
long m_width;
|
||||||
long m_height;
|
long m_height;
|
||||||
#endif
|
|
||||||
bool m_toggleState;
|
bool m_toggleState;
|
||||||
bool m_isToggle;
|
bool m_isToggle;
|
||||||
bool m_deleteSecondBitmap;
|
bool m_deleteSecondBitmap;
|
||||||
@@ -114,7 +109,9 @@ public:
|
|||||||
%pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)"
|
%pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)"
|
||||||
|
|
||||||
|
|
||||||
|
bool AddControl(wxControl * control);
|
||||||
void AddSeparator();
|
void AddSeparator();
|
||||||
|
void ClearTools();
|
||||||
|
|
||||||
// Ignoge the clientData for now...
|
// Ignoge the clientData for now...
|
||||||
%addmethods {
|
%addmethods {
|
||||||
@@ -143,17 +140,14 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// void DrawTool(wxMemoryDC& memDC, wxToolBarTool* tool);
|
void EnableTool(int toolIndex, bool enable);
|
||||||
void EnableTool(int toolIndex, const bool enable);
|
wxToolBarTool* FindToolForPosition(long x, long y);
|
||||||
#ifdef __WXMSW__
|
|
||||||
wxToolBarTool* FindToolForPosition(const float x, const float y);
|
|
||||||
wxSize GetToolSize();
|
wxSize GetToolSize();
|
||||||
wxSize GetToolBitmapSize();
|
wxSize GetToolBitmapSize();
|
||||||
void SetToolBitmapSize(const wxSize& size);
|
void SetToolBitmapSize(const wxSize& size);
|
||||||
// wxSize GetMargins();
|
wxSize GetToolMargins();
|
||||||
wxSize GetMaxSize();
|
wxSize GetMaxSize();
|
||||||
// wxObject* GetToolClientData(int toolIndex);
|
// wxObject* GetToolClientData(int toolIndex);
|
||||||
#endif
|
|
||||||
bool GetToolEnabled(int toolIndex);
|
bool GetToolEnabled(int toolIndex);
|
||||||
wxString GetToolLongHelp(int toolIndex);
|
wxString GetToolLongHelp(int toolIndex);
|
||||||
int GetToolPacking();
|
int GetToolPacking();
|
||||||
@@ -161,10 +155,6 @@ public:
|
|||||||
wxString GetToolShortHelp(int toolIndex);
|
wxString GetToolShortHelp(int toolIndex);
|
||||||
bool GetToolState(int toolIndex);
|
bool GetToolState(int toolIndex);
|
||||||
|
|
||||||
// TODO: figure out how to handle these
|
|
||||||
//bool OnLeftClick(int toolIndex, bool toggleDown);
|
|
||||||
//void OnMouseEnter(int toolIndex);
|
|
||||||
//void OnRightClick(int toolIndex, float x, float y);
|
|
||||||
|
|
||||||
bool Realize();
|
bool Realize();
|
||||||
|
|
||||||
@@ -174,6 +164,12 @@ public:
|
|||||||
void SetToolPacking(int packing);
|
void SetToolPacking(int packing);
|
||||||
void SetToolSeparation(int separation);
|
void SetToolSeparation(int separation);
|
||||||
void ToggleTool(int toolIndex, const bool toggle);
|
void ToggleTool(int toolIndex, const bool toggle);
|
||||||
|
void SetToggle(int toolIndex, bool toggle);
|
||||||
|
|
||||||
|
void SetMaxRowsCols(int rows, int cols);
|
||||||
|
int GetMaxRows();
|
||||||
|
int GetMaxCols();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -55,6 +55,14 @@ public:
|
|||||||
new wxPyCallback(func));
|
new wxPyCallback(func));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Disconnect(int id, int lastId = -1,
|
||||||
|
wxEventType eventType = wxEVT_NULL) {
|
||||||
|
return self->Disconnect(id, lastId, eventType,
|
||||||
|
(wxObjectEventFunction)
|
||||||
|
&wxPyCallback::EventThunker);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user