[wx-dev] Re: CVS: [AMB] wxWidgets/src/aui framemanager.cpp, 1.14, 1.15

Alex Bligh alex at alex.org.uk
Tue Jul 4 13:12:47 PDT 2006


ABX,

> Is it what happens when user clicks on [X] area in the corner? If so is it
> really cancelation? Why not reuse wxCloseEvent which could be vetoed?
> http://www.wxwindows.org/manuals/2.6.3/wx_wxcloseevent.html#wxcloseevent

There were two patches I sent. The first one which was mislabeled as
being for floating windows is actually for docked windows with the
hand-drawn title bars (I'm not sure what the terminology for them is).
The second one does something similar for floating panes.

Both patches I've had working for 6 months and I was really just sending
in reasonably obvious stuff.

I think it would probably be better to use wxCloseEvent and handle veto
as well, but:
* You need to cope with the floating pane situation in the same way.
   I thought wxCloseEvent normally only got sent to TLWs and didn't want
   to confuse things as the window close stuff is a bit hairy.
* We would need to think whether we need to do anything like the
   wxDialog default handler (i.e. send an ID_CANCEL click, which is
   what I'm doing).
* I was slightly concerned about it propagating back up the window
   hierarchy and causing chaos (perhaps it doesn't propagate).
* It wasn't the tried-and-tested patch I had to hand

I'd support using wxCloseEvent instead (provided it's done in
both places) if you want to do that, and if it works on non-TLWs.

Alex




More information about the wx-dev mailing list