AGW Revamped

Hi All,

I have just committed some fairly large changes to the AGW library,
and I hope I am going to explain myself clearly enough about what I
have done.

First of all, I would like to apologize to those (3 or 4) wxPython
users/developers who are actually using AGW. If you update your copy
of AGW from SVN, you will be forced to make (relatively small) changes
to your applications.

As you may know, for some widgets in AGW (most notably CustomTreeCtrl,
AuiNotebook, HyperTreeList, FlatNotebook, UltimateListCtrl), the
AGW-specific window style conflicted with the underlying wx.Window
window styles (one mention is in bug #11861 at the tracker:
http://trac.wxwidgets.org/ticket/11861). So, my approach has been the
following:

1) For all the AGW widgets in which the "style" keyword used mixed
wx.Window styles and AGW styles, I have added a new keyword for their
constructor (termed "agwStyle"). So, if you were using CustomTreeCtrl
like this before:

class CustomTreeCtrl(CT.CustomTreeCtrl):

    def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition,
                 size=wx.DefaultSize,
                 style=wx.SUNKEN_BORDER | CT.TR_HAS_BUTTONS
                          > CT.TR_HAS_VARIABLE_ROW_HEIGHT):

        CT.CustomTreeCtrl.__init__(self, parent, id, pos, size, style)

Now you should construct it like this:

class CustomTreeCtrl(CT.CustomTreeCtrl):

    def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition,
                 size=wx.DefaultSize,
                 style=wx.SUNKEN_BORDER,
                 agwStyle=CT.TR_HAS_BUTTONS | CT.TR_HAS_VARIABLE_ROW_HEIGHT):

        CT.CustomTreeCtrl.__init__(self, parent, id, pos, size, style, agwStyle)

Which means, the "style" keyword is now reserved for the underlying
wx.Window only and it's left untouched by AGW.

2) As the constructors have been modified, methods like HasFlag,
SetWindowStyle, SetWindowStyleFlag, GetWindowStyle, GetWindowStyleFlag
and so on do *not* return the AGW style anymore. For these modified
widgets, you should use:

- SetAGWWindowStyleFlag;
- GetAGWWindowStyleFlag;
- HasAGWFlag (this method is not present everywhere)

3) There are no more "extra styles" in UltimateListCtrl (everything is
clamped inside the "agwStyle" keyword);

4) There are no more limitations on the number of styles a widget can
have (this is a positive outcome).

The AGW widgets affected by these changes are:

- AdvancedSplash
- AUI
- ButtonPanel
- CubeColourDialog
- CustomTreeCtrl
- FlatNotebook
- FloatSpin
- FourWaySplitter
- GenericMessageDialog
- HyperTreeList
- KnobCtrl
- LabelBook
- MultiDirDialog
- PeakMeter
- PyProgress
- RibbonBar
- SpeedMeter
- UltimateListCtrl

In the meanwhile, I believe I have managed to fix tickets #11825
(AuiNotebook), #11861 (FlatNotebook), #11953 (AuiNotebook), #11954
(HyperTreeList).

The updated documentation for AGW is here:

http://xoomer.virgilio.it/infinity77/AGW_Docs/index.html

If you encounter any issue/problem, please let me know. I have tested
the changes quite a bit but it was a huge commit and something may
have slipped in.

Sorry for the disruption, happy wxPython hacking.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

==> Never *EVER* use RemovalGroup for your house removal. You'll
regret it forever.
http://thedoomedcity.blogspot.com/2010/03/removal-group-nightmare.html <==

···

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

Hey Andrea,

···

On 16 April 2010 13:04, Andrea Gavana <andrea.gavana@gmail.com> wrote:

Hi All,

I have just committed some fairly large changes to the AGW library,
and I hope I am going to explain myself clearly enough about what I
have done.

First of all, I would like to apologize to those (3 or 4) wxPython
users/developers who are actually using AGW.

I'm sure there's more users than that :smiley:
Thanks for the update - I'm currently using flatnotebook but since
I've done some edits to it I'm basically importing a custom version of
the module

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

Hi Andrea,

···

On Apr 16, 7:04 am, Andrea Gavana <andrea.gav...@gmail.com> wrote:

Hi All,

I have just committed some fairly large changes to the AGW library,
and I hope I am going to explain myself clearly enough about what I
have done.

First of all, I would like to apologize to those (3 or 4) wxPython
users/developers who are actually using AGW. If you update your copy
of AGW from SVN, you will be forced to make (relatively small) changes
to your applications.

I agree with Steven...give yourself more credit. The blog post I wrote
about your controls has had over 150 views and I'm sure its mirror on
the wiki has had plenty of views too.

Of course, your changes break the tutorials, but I'll get them fixed
on the wiki and probably just do a special post about it on my blog.
Thanks for the good work!

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

Andrea,

Thanks for sharing all your hard work with the rest of the wxPython
community - great stuff!!!

Sorry to hear about your Removal Group problems. I spent a year in the
UK and have a similar horror story.

Cheers,

Malcolm

···

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

There must be a bug in your counter :wink: .

Would also like to thank you for all the great widgets and the excellent support you provide for them!

Werner

···

On 16/04/2010 14:04, Andrea Gavana wrote:

Hi All,

I have just committed some fairly large changes to the AGW library,
and I hope I am going to explain myself clearly enough about what I
have done.

First of all, I would like to apologize to those (3 or 4) wxPython
users/developers who are actually using AGW.

--
To unsubscribe, send email to wxPython-dev+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-dev?hl=en

First of all, I would like to apologize to those (3 or 4) wxPython
users/developers who are actually using AGW.

There must be a bug in your counter :wink: .

Indeed. Also don't forget about users of software that use your
widgets. Task Coach alone has thousands of users that use your widgets
every day!

Would also like to thank you for all the great widgets and the excellent
support you provide for them!

Hear hear.

Cheers, Frank

···

2010/4/16, werner <wbruhin@free.fr>:

On 16/04/2010 14:04, Andrea Gavana wrote:

--
To unsubscribe, send email to wxPython-dev+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-dev?hl=en