wx.AuiManager and Center() info

Alle 09:12, martedì 30 gennaio 2007, giuseppe massimo bertani ha scritto:

Alle 21:25, lunedì 29 gennaio 2007, Robin Dunn ha scritto:
> Andrea Gavana wrote:
> > Hi Massimo,
> >
> >> what I desire is to be able to resize the center panes when more than
> >> one is
> >> opened, while now the panes are both not moveable (and this could be
> >> ok, since it's not terribly useful to move them) but neither
> >> resizable, despite
> >> the fact that AuiPaneInfo says the opposite
> >
> > I have no idea why it doesn't work. I have tried with a simple example
> > and indeed it's impossible to resize or to undock them. Curiously
> > enough, it works with PyAUI (development version). Maybe Robin can
> > share some comments on this.
>
> Sorry, I don't know either, however it's always been my impression that
> the center pane is not floatable, and that docking rules for the other
> panes are always relative to the center pane.
>
> When you say it is also not resizable do you mean that manipulating the
> sashes between it and the neighboring panes does not result in it being
> resized?

the sashes between Centered and non-Centered panes works as expected, while
between Centered panes cannot move.

> It's not behaving that way for me, so if yours does please
> tell us what is in your center pane?

the center panes contain a AuiNotebook with 2 pages: the first one contains
another auinotebook, while the other an OGL window (see attachment)
If I open more panes like that, they will be stacked vertically, with no
way no resize them.

>Does it have any sizers or min/max
>
> sizes set?

Sure. Nested Vboxes and Hboxes. But if I place these panes in any other
direction, for instance Right, they resize as expected. Obviously in the
center of the frame remains a hole, that is ugly to see.

I'm quoting myself to add other observations:
I can see both in my app than in the demo (AUI_DockingWindowMgr.py) that the
center panes cannot be selected with the mouse: I click on their captions and
they remain grayed.
If I click into the embedded textctrl, they receive the input focus. If you
create 2 textboxes from the demo, this is easy to try.

Despite this, if I call FindFocus() from the managed window, no window is
returned. This become a problem when I want to save to disk the content of a
pane: which pane must be saved? the active one, but there aren't!

For Andrea: I've seen on your demo that, if you drag a pane near a main
frame's side, that side is evidenced.
I thought this behavior was a default, but this does not happen in my app:
could you tell me how you activated this effect?

Thanks you all
Massimo

HI Massimo,

For Andrea: I've seen on your demo that, if you drag a pane near a main
frame's side, that side is evidenced.
I thought this behavior was a default, but this does not happen in my app:
could you tell me how you activated this effect?

Are you talking about PyAUI? If this is the case, this effect is
available only to Windows users that have Mark Hammond's win32all
extensions or ctypes installed in the site-packages. Chris Mellon has
adapted the code to work also on Mac, but Mac users also need to have
ctypes installed. GTK? No way, I am sorry.
wxAUI behaves differently because they could directly talk to the
underline platform using C++ (with a bunch of platform specific code),
so the implementation of the hint rectangle is far easier. In
Python/wxPython, there is no way to implement this feature without
win32all or ctypes library.

I hope to have understood your question correctly...

Andrea.

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

Alle 15:55, martedì 30 gennaio 2007, Andrea Gavana ha scritto:

HI Massimo,

> For Andrea: I've seen on your demo that, if you drag a pane near a main
> frame's side, that side is evidenced.
> I thought this behavior was a default, but this does not happen in my
> app: could you tell me how you activated this effect?

Are you talking about PyAUI? If this is the case, this effect is
available only to Windows users that have Mark Hammond's win32all
extensions or ctypes installed in the site-packages. Chris Mellon has
adapted the code to work also on Mac, but Mac users also need to have
ctypes installed. GTK? No way, I am sorry.
wxAUI behaves differently because they could directly talk to the
underline platform using C++ (with a bunch of platform specific code),
so the implementation of the hint rectangle is far easier. In
Python/wxPython, there is no way to implement this feature without
win32all or ctypes library.

I mean the effect showed in the picture. As you can see, it's not windows
neither mac, but Suse10.1 :slight_smile:

Ciao
Massimo

Hi Massimo,

I mean the effect showed in the picture. As you can see, it's not windows
neither mac, but Suse10.1 :slight_smile:

Sorry, I thought you were talking about PyAUI. PyAUI is a different
thing from wxAUI, is the implementation of wxAUI completely in
Python/wxPython: I have abandoned it a while ago when wxAUI has been
integrated in wxWidgets and wrapped in wxPython. The effect you are
seeing should be (in theory) the default for GTK, as far as I
remember. Anyway, it's called "venetian blinds hint", and you can get
it by doing:

flag = wx.aui.AUI_MGR_VENETIAN_BLINDS_HINT
self._mgr.SetFlags(self._mgr.GetFlags() ^ flag)

Andrea.

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

Unless I am very much mistaken, the transparency hints either won't
work under Gtk, or will only work if you have a composite manager and
appropriate support in X and your window manager. I don't think any
Linux distro currently ships in such a state.

···

On 1/30/07, Andrea Gavana <andrea.gavana@gmail.com> wrote:

Hi Massimo,

> I mean the effect showed in the picture. As you can see, it's not windows
> neither mac, but Suse10.1 :slight_smile:

Sorry, I thought you were talking about PyAUI. PyAUI is a different
thing from wxAUI, is the implementation of wxAUI completely in
Python/wxPython: I have abandoned it a while ago when wxAUI has been
integrated in wxWidgets and wrapped in wxPython. The effect you are
seeing should be (in theory) the default for GTK, as far as I
remember. Anyway, it's called "venetian blinds hint", and you can get
it by doing:

flag = wx.aui.AUI_MGR_VENETIAN_BLINDS_HINT
self._mgr.SetFlags(self._mgr.GetFlags() ^ flag)

Andrea.

Hi Chris,

Unless I am very much mistaken, the transparency hints either won't
work under Gtk, or will only work if you have a composite manager and
appropriate support in X and your window manager. I don't think any
Linux distro currently ships in such a state.

Uhm, I know nothing about GTK, but as far as I can see the "venetial
blinds hint" is simply a transparent frame with its own OnPaint event.
Looking at the source, it is a very simple implementation which
currently works on GTK (or at least this is what it seems to me, there
are few GTK specific if switches).
But I am surely missing something.

···

--
Andrea.

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

Alle 16:36, martedì 30 gennaio 2007, Chris Mellon ha scritto:

···

On 1/30/07, Andrea Gavana <andrea.gavana@gmail.com> wrote:
> Hi Massimo,
>
> > I mean the effect showed in the picture. As you can see, it's not
> > windows neither mac, but Suse10.1 :slight_smile:
>
> Sorry, I thought you were talking about PyAUI. PyAUI is a different
> thing from wxAUI, is the implementation of wxAUI completely in
> Python/wxPython: I have abandoned it a while ago when wxAUI has been
> integrated in wxWidgets and wrapped in wxPython. The effect you are
> seeing should be (in theory) the default for GTK, as far as I
> remember. Anyway, it's called "venetian blinds hint", and you can get
> it by doing:
>
> flag = wx.aui.AUI_MGR_VENETIAN_BLINDS_HINT
> self._mgr.SetFlags(self._mgr.GetFlags() ^ flag)
>
> Andrea.

Unless I am very much mistaken, the transparency hints either won't
work under Gtk, or will only work if you have a composite manager and
appropriate support in X and your window manager. I don't think any
Linux distro currently ships in such a state.

wxAUI_MGR_TRANSPARENT_HINT it's another flag. I didn't tried it, but I tried
the 2 lines from Andrea and they behave as I asked.

thanx
Massimo

Alle 15:43, martedì 30 gennaio 2007, giuseppe massimo bertani ha scritto:

For Robin: ok.

about this issue:

Despite this, if I call FindFocus() from the managed window, no window is
returned. This become a problem when I want to save to disk the content of
a pane: which pane must be saved? the active one, but there aren't!

I discovered from the sources that exists a property "wxAuiPaneInfo.state"
that, ANDed with a "optionActive" mask, tells about the activity state of a
pane.

IMHO an IsActive() method in wxAuiPaneInfo to extract this information in a
more polite way could be a good idea. Obviously it's more matter of wxWidgets
than wxPython, I know.

Massimo