agw.aui.AUIManager floating and docking questions

Hello,

I am using wx.lib.agw.aui.AuiManager to manage the top level frame of my wx GUI but am having trouble when floating and re-docking panels.

I have attached an example program which exhibits the problem. You can also see my layout here http://i.imgur.com/OQcqd.png

If I float the “Center” panel I cannot redock it in it’s original position. This is not the case with the “Bottom” and “Right” panels (although, if I float both the “Center” and “Right” panels, neither can be redocked in their original positions). The docking guides are not shown when I drag the floating pane over it’s original position, but guides are displayed when I float the pane over a docked pane. However, when the docking guides that are shown the top and left guides do not display a docking hint, and do not allow the panel to be re-docked. Floating panes can only be docked where a pane is already docked. See http://i.imgur.com/581Bu.png for a crude illustration of this.

I have another small problem related to docking of AuiPanes. I want to maintain the size of my panes when they are floated, docked, and closed/reopened (via pane close buttons and wx.Menus I have created). I have hacked together a solution which uses AuiManager.SavePreviousDockSizes, AuiManager.RestorePane, and hooks on EVT_AUI_PANE_DOCKING and EVT_AUI_PANE_FLOATING, but the when re-docking the hint shows the default size, not the pane.previousDockSize which I want. Is there a more elegant solution to this problem that I have missed? (I am not using Minimize/Maximize because I don’t want to use toolbars).

Thanks for any help and/or insights,
Craig

AUImanager_docking_example.py (891 Bytes)

Windows 6.1.7600
Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit
(Intel)]
Wx Version 2.8.11.0
Wx Pltform ('__WXMSW__', 'wxMSW', 'unicode', 'wx-assertions-on',
'SWIG-1.3.29')

Even the Center panel undocks and re-docks for me by double-clicking
its title bar. Perhaps you have a platform issue.

Ray

···

On Jan 25, 1:26 pm, Craig Lang <serotonins.g...@gmail.com> wrote:

Hello,

I am using wx.lib.agw.aui.AuiManager to manage the top level frame of my wx
GUI but am having trouble when floating and re-docking panels.

I have attached an example program which exhibits the problem. You can also
see my layout herehttp://i.imgur.com/OQcqd.png

If I float the "Center" panel I cannot redock it in it's original position.

Thanks for any help and/or insights,
Craig

The Center panel also redocks for me by double clicking the title bar
(I wasn't aware of this feature).
Just to confirm, do the top and left docking guides work for you (not
double clicking)?

We seem to be running similar platforms:

Microsoft Windows [Version 6.1.7600]
Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit
(Intel)] on win32
wx.version() -> '2.8.11.0 (msw-unicode)'
wx.PlatformInfo ->('__WXMSW__', 'wxMSW', 'unicode', 'wx-assertions-
on', 'SWIG-1.3.29')

I am using the latest version for of agw from SVN (r66750)

Thanks,
Craig

···

On Jan 26, 1:10 am, Ray Pasco <pascor22...@gmail.com> wrote:

Windows 6.1.7600
Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit
(Intel)]
Wx Version 2.8.11.0
Wx Pltform ('__WXMSW__', 'wxMSW', 'unicode', 'wx-assertions-on',
'SWIG-1.3.29')

Even the Center panel undocks and re-docks for me by double-clicking
its title bar. Perhaps you have a platform issue.

Ray

Hi,

Windows 6.1.7600
Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit
(Intel)]
Wx Version 2.8.11.0
Wx Pltform ('__WXMSW__', 'wxMSW', 'unicode', 'wx-assertions-on',
'SWIG-1.3.29')

Even the Center panel undocks and re-docks for me by double-clicking
its title bar. Perhaps you have a platform issue.

Ray

The Center panel also redocks for me by double clicking the title bar
(I wasn't aware of this feature).

It's a feature that has almost always been there, but almost no one
notices it because it's not easy (at least for me) to give a visual
clue (from the AuiManager code point of view) that this possibility
exists. I am always open to suggestions on how to actually implement
it so that the users will be aware of this feature. In any case, the
double-clicking effect works only if you're not using the
AUI_MGR_USE_NATIVE_MINIFRAMES style.

Just to confirm, do the top and left docking guides work for you (not
double clicking)?

We seem to be running similar platforms:

Microsoft Windows [Version 6.1.7600]
Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit
(Intel)] on win32
wx.version() -> '2.8.11.0 (msw-unicode)'
wx.PlatformInfo ->('__WXMSW__', 'wxMSW', 'unicode', 'wx-assertions-
on', 'SWIG-1.3.29')

I am using the latest version for of agw from SVN (r66750)

Docking-undocking the Center pane has always been against the
philosophy of AUI (and wxAUI as well), as the Center pane is there as
a reference for the entire UI layout. That said, it could be possible
to subclass AuiManager to do what you want, just like one of the AUI
user provided a patch to make AUI work even without the Center pane
itself (inside framemanager.py, the AuiManager_DCP class).

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.
The Doomed City: Removal Group: the nightmare <==

···

On 26 January 2011 13:57, Craig Lang wrote:

On Jan 26, 1:10 am, Ray Pasco <pascor22...@gmail.com> wrote:

Is there any document or thread or anything that gives a broad view of
the philosophy of AUI? That would be incredibly useful. I was able to
intuit that the center panel is designed to be more or less the
omnipresent focal point of the app. It would be nice to see a page or
two overview of the assumptions that drive the design of AUI.

···

On Wed, Jan 26, 2011 at 8:10 AM, Andrea Gavana <andrea.gavana@gmail.com> wrote:

Docking-undocking the Center pane has always been against the
philosophy of AUI (and wxAUI as well), as the Center pane is there as
a reference for the entire UI layout. That said, it could be possible
to subclass AuiManager to do what you want, just like one of the AUI
user provided a patch to make AUI work even without the Center pane
itself (inside framemanager.py, the AuiManager_DCP class).

Replacing AuiManager with AuiManager_DCP "fixes" my problem and allows
the Center Pane to be redocked. (N.B. instantiating AuiManager_DCP
fails with the latest version from SVN... there is a diff with the
minor fixes here if anybody is interested : Index: framemanager.py======================================================== - Pastebin.com)

Thanks for the tip and insights into the AUI philosophy (and for whole
agw lib... I use a lot of your widgets). Like Bryan, I also feel that
a broad overview of the Aui philosophy would be extremely useful. Is
there a wiki page/central location where the community can collaborate
on this? I would be more than happy to help with simple examples/
documentation.

Craig

···

On Jan 26, 2:10 pm, Andrea Gavana <andrea.gav...@gmail.com> wrote:

Docking-undocking the Center pane has always been against the
philosophy of AUI (and wxAUI as well), as the Center pane is there as
a reference for the entire UI layout. That said, it could be possible
to subclass AuiManager to do what you want, just like one of the AUI
user provided a patch to make AUI work even without the Center pane
itself (inside framemanager.py, the AuiManager_DCP class).

I don't think there's a wiki page, but there should be. Andrea has a
fair bit of info just on his version here:

http://xoomer.virgilio.it/infinity77/AGW_Docs/aui_module.html#aui

Perhaps we can use that along with these wxWidgets specific pages as
guidelines for our own wiki page:

http://wiki.wxwidgets.org/WxAUI
http://docs.wxwidgets.org/trunk/overview_aui.html

···

On Jan 26, 9:20 am, Craig Lang <serotonins.g...@gmail.com> wrote:

On Jan 26, 2:10 pm, Andrea Gavana <andrea.gav...@gmail.com> wrote:

> Docking-undocking the Center pane has always been against the
> philosophy of AUI (and wxAUI as well), as the Center pane is there as
> a reference for the entire UI layout. That said, it could be possible
> to subclass AuiManager to do what you want, just like one of the AUI
> user provided a patch to make AUI work even without the Center pane
> itself (inside framemanager.py, the AuiManager_DCP class).

Replacing AuiManager with AuiManager_DCP "fixes" my problem and allows
the Center Pane to be redocked. (N.B. instantiating AuiManager_DCP
fails with the latest version from SVN... there is a diff with the
minor fixes here if anybody is interested :Index: framemanager.py======================================================== - Pastebin.com)

Thanks for the tip and insights into the AUI philosophy (and for whole
agw lib... I use a lot of your widgets). Like Bryan, I also feel that
a broad overview of the Aui philosophy would be extremely useful. Is
there a wiki page/central location where the community can collaborate
on this? I would be more than happy to help with simple examples/
documentation.

Craig

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

Blog: http://blog.pythonlibrary.org

Hi Craig,

Docking-undocking the Center pane has always been against the
philosophy of AUI (and wxAUI as well), as the Center pane is there as
a reference for the entire UI layout. That said, it could be possible
to subclass AuiManager to do what you want, just like one of the AUI
user provided a patch to make AUI work even without the Center pane
itself (inside framemanager.py, the AuiManager_DCP class).

Replacing AuiManager with AuiManager_DCP "fixes" my problem and allows
the Center Pane to be redocked. (N.B. instantiating AuiManager_DCP
fails with the latest version from SVN... there is a diff with the
minor fixes here if anybody is interested : Index: framemanager.py======================================================== - Pastebin.com)

Thank you for the patch, I had completely overlooked this (this is why
I said I didn't use it...). I have applied your patch to SVN, it
should be fixed now.

Thanks for the tip and insights into the AUI philosophy (and for whole
agw lib... I use a lot of your widgets). Like Bryan, I also feel that
a broad overview of the Aui philosophy would be extremely useful. Is
there a wiki page/central location where the community can collaborate
on this? I would be more than happy to help with simple examples/
documentation.

Apart from Mike's excellent suggestions, all the information regarding
AUI/wxAUI is scattered around the web, with no central Wiki page or
help. As far as I know, the best sources for this are the AGW docs and
the Kirix website. I will be starting working on rotation in a few
days, but if someone starts putting together some notes about AUI I'd
be happy to contribute as much as I can.

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.
The Doomed City: Removal Group: the nightmare <==

···

On 26 January 2011 17:20, Craig Lang wrote:

On Jan 26, 2:10 pm, Andrea Gavana <andrea.gav...@gmail.com> wrote: