I am a wxPython user, and I have translated (long time ago) wxAUI 0.9.2 to Python. Now that wxAUI is wrapped into wxPython, I don't need the Python version anymore.
However, there were a couple of nice patches for which I would like to ask if it is possible to integrate them in wxAUI:
1) The first one was created by astigsen and it was related to ModernDockArt, which basically uses wxUxTheme to draw theme-compliant buttons, backgrounds and so on. It is posted here:
http://www.kirix.com/community/forums/v ... c.php?t=77
As for "standard" wxPython users it is very complicated to modify wxWidgets source and then compile wxPython using SWIG, would it be possible to integrate it in wxAUI, please?
2) I don't remember if this patch was posted or it was my Python implementation of it: sometimes it may be nice to draw "grips" within sashes to enphasize the sashes themselves. So I defined this style:
AUI_ART_DRAW_SASH_GRIP = 17
Then, in the DrawSash method:
- Code: Select all
def DrawSash(self, dc, orient, rect):
dc.SetPen(wx.TRANSPARENT_PEN)
dc.SetBrush(self._sash_brush)
dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height)
draw_sash = self.GetMetric(AUI_ART_DRAW_SASH_GRIP)
if draw_sash:
self.DrawSashGripper(dc, orient, rect)
The method DrawSashGripper is very easy:
- Code: Select all
def DrawSashGripper(self, dc, orient, rect):
dc.SetBrush(self._gripper_brush)
if orient == wx.HORIZONTAL: # horizontal sash
x = rect.x + int((1.0/4.0)*rect.width)
xend = rect.x + int((3.0/4.0)*rect.width)
y = rect.y + (rect.height/2) - 1
while 1:
dc.SetPen(self._gripper_pen3)
dc.DrawRectangle(x, y, 2, 2)
dc.SetPen(self._gripper_pen2)
dc.DrawPoint(x+1, y+1)
x = x + 5
if x >= xend:
break
else:
y = rect.y + int((1.0/4.0)*rect.height)
yend = rect.y + int((3.0/4.0)*rect.height)
x = rect.x + (rect.width/2) - 1
while 1:
dc.SetPen(self._gripper_pen3)
dc.DrawRectangle(x, y, 2, 2)
dc.SetPen(self._gripper_pen2)
dc.DrawPoint(x+1, y+1)
y = y + 5
if y >= yend:
break
You basically get this effect:
http://xoomer.alice.it/infinity77/pyaui ... pment.jpeg
I know that maybe the effect is small, but it might be useful. Sorry for the Python code, my knowledge of C++ is very limited.
Thank you for reading this.
Andrea.