Various little tweaks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16223 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
249a57f443
commit
3b5ccda128
@ -280,8 +280,8 @@ class TestListCtrlPanel(wxPanel, wxColumnSorterMixin):
|
|||||||
|
|
||||||
def OnPopupOne(self, event):
|
def OnPopupOne(self, event):
|
||||||
self.log.WriteText("Popup one\n")
|
self.log.WriteText("Popup one\n")
|
||||||
print "FindItem:", self.list.FindItem(-1, "Billy Joel")
|
print "FindItem:", self.list.FindItem(-1, "Roxette")
|
||||||
print "FindItemData:", self.list.FindItemData(-1, 20)
|
print "FindItemData:", self.list.FindItemData(-1, 11)
|
||||||
|
|
||||||
def OnPopupTwo(self, event):
|
def OnPopupTwo(self, event):
|
||||||
self.log.WriteText("Popup two\n")
|
self.log.WriteText("Popup two\n")
|
||||||
|
@ -39,6 +39,7 @@ class MyCanvas(wxScrolledWindow):
|
|||||||
EVT_LEFT_UP(self, self.OnLeftButtonEvent)
|
EVT_LEFT_UP(self, self.OnLeftButtonEvent)
|
||||||
EVT_MOTION(self, self.OnLeftButtonEvent)
|
EVT_MOTION(self, self.OnLeftButtonEvent)
|
||||||
EVT_PAINT(self, self.OnPaint)
|
EVT_PAINT(self, self.OnPaint)
|
||||||
|
##EVT_MOUSEWHEEL(self, self.OnWheel)
|
||||||
|
|
||||||
|
|
||||||
def getWidth(self):
|
def getWidth(self):
|
||||||
@ -109,7 +110,8 @@ class MyCanvas(wxScrolledWindow):
|
|||||||
for style in [wxDOT, wxLONG_DASH, wxSHORT_DASH, wxDOT_DASH, wxUSER_DASH]:
|
for style in [wxDOT, wxLONG_DASH, wxSHORT_DASH, wxDOT_DASH, wxUSER_DASH]:
|
||||||
pen = wxPen("DARK ORCHID", 1, style)
|
pen = wxPen("DARK ORCHID", 1, style)
|
||||||
if style == wxUSER_DASH:
|
if style == wxUSER_DASH:
|
||||||
pen.SetDashes([1, 2, 3, 4, 5, 6, 7, 8])
|
pen.SetCap(wxCAP_BUTT)
|
||||||
|
pen.SetDashes([1,2])
|
||||||
pen.SetColour("RED")
|
pen.SetColour("RED")
|
||||||
dc.SetPen(pen)
|
dc.SetPen(pen)
|
||||||
dc.DrawLine(300, y, 400, y)
|
dc.DrawLine(300, y, 400, y)
|
||||||
@ -188,6 +190,7 @@ class MyCanvas(wxScrolledWindow):
|
|||||||
## delta = evt.GetWheelDelta()
|
## delta = evt.GetWheelDelta()
|
||||||
## rot = evt.GetWheelRotation()
|
## rot = evt.GetWheelRotation()
|
||||||
## linesPer = evt.GetLinesPerAction()
|
## linesPer = evt.GetLinesPerAction()
|
||||||
|
## print delta, rot, linesPer
|
||||||
## ws = self.wheelScroll
|
## ws = self.wheelScroll
|
||||||
## ws = ws + rot
|
## ws = ws + rot
|
||||||
## lines = ws / delta
|
## lines = ws / delta
|
||||||
|
@ -28,11 +28,9 @@ rem **** copy the docs into the tree
|
|||||||
md wxPython-%1\docs
|
md wxPython-%1\docs
|
||||||
md wxPython-%1\docs\wx
|
md wxPython-%1\docs\wx
|
||||||
md wxPython-%1\docs\ogl
|
md wxPython-%1\docs\ogl
|
||||||
copy %WXWIN%\docs\html\wx\*.gif wxPython-%1\docs\wx
|
copy %WXWIN%\docs\html\wx\*.* wxPython-%1\docs\wx
|
||||||
copy %WXWIN%\docs\html\wx\*.htm wxPython-%1\docs\wx
|
|
||||||
copy wxPython-%1\docs\wx\wx.htm wxPython-%1\docs\wx\index.htm
|
copy wxPython-%1\docs\wx\wx.htm wxPython-%1\docs\wx\index.htm
|
||||||
copy %WXWIN%\docs\html\ogl\*.gif wxPython-%1\docs\ogl
|
copy %WXWIN%\docs\html\ogl\*.* wxPython-%1\docs\ogl
|
||||||
copy %WXWIN%\docs\html\ogl\*.htm wxPython-%1\docs\ogl
|
|
||||||
copy wxPython-%1\docs\ogl\ogl.htm wxPython-%1\docs\ogl\index.htm
|
copy wxPython-%1\docs\ogl\ogl.htm wxPython-%1\docs\ogl\index.htm
|
||||||
|
|
||||||
rem **** zip up the docs
|
rem **** zip up the docs
|
||||||
|
@ -191,6 +191,7 @@ public:
|
|||||||
dataPtr = (unsigned char*) malloc(len);
|
dataPtr = (unsigned char*) malloc(len);
|
||||||
memcpy(dataPtr, PyString_AsString(data), len);
|
memcpy(dataPtr, PyString_AsString(data), len);
|
||||||
self->SetData(dataPtr);
|
self->SetData(dataPtr);
|
||||||
|
// wxImage takes ownership of dataPtr...
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -220,6 +220,8 @@ public:
|
|||||||
|
|
||||||
wxPoint GetPosition();
|
wxPoint GetPosition();
|
||||||
wxSize GetSize();
|
wxSize GetSize();
|
||||||
|
void SetPosition( const wxPoint &p );
|
||||||
|
void SetSize( const wxSize &s );
|
||||||
|
|
||||||
int GetLeft();
|
int GetLeft();
|
||||||
int GetTop();
|
int GetTop();
|
||||||
|
@ -159,8 +159,8 @@ class wxGenButton(wxPyControl):
|
|||||||
highlightClr = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNHIGHLIGHT)
|
highlightClr = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNHIGHLIGHT)
|
||||||
self.shadowPen = wxPen(shadowClr, 1, wxSOLID)
|
self.shadowPen = wxPen(shadowClr, 1, wxSOLID)
|
||||||
self.highlightPen = wxPen(highlightClr, 1, wxSOLID)
|
self.highlightPen = wxPen(highlightClr, 1, wxSOLID)
|
||||||
##self.focusIndPen = wxPen(textClr, 1, wxUSER_DASH)
|
self.focusIndPen = wxPen(textClr, 1, wxUSER_DASH)
|
||||||
self.focusIndPen = wxPen(textClr, 1, wxDOT)
|
##self.focusIndPen = wxPen(textClr, 1, wxDOT)
|
||||||
|
|
||||||
|
|
||||||
def SetBackgroundColour(self, colour):
|
def SetBackgroundColour(self, colour):
|
||||||
@ -231,7 +231,8 @@ class wxGenButton(wxPyControl):
|
|||||||
self.focusIndPen.SetColour(self.GetForegroundColour())
|
self.focusIndPen.SetColour(self.GetForegroundColour())
|
||||||
else:
|
else:
|
||||||
self.focusIndPen.SetColour(self.GetBackgroundColour())
|
self.focusIndPen.SetColour(self.GetBackgroundColour())
|
||||||
##self.focusIndPen.SetDashes([1,2,1,2]) # This isn't quite working the way I expected...
|
self.focusIndPen.SetDashes([1,1])
|
||||||
|
self.focusIndPen.SetCap(wxCAP_BUTT)
|
||||||
dc.SetPen(self.focusIndPen)
|
dc.SetPen(self.focusIndPen)
|
||||||
dc.SetBrush(wxTRANSPARENT_BRUSH)
|
dc.SetBrush(wxTRANSPARENT_BRUSH)
|
||||||
dc.DrawRectangle(bw+2,bw+2, w-bw*2-4, h-bw*2-4)
|
dc.DrawRectangle(bw+2,bw+2, w-bw*2-4, h-bw*2-4)
|
||||||
|
Loading…
Reference in New Issue
Block a user