CVS: [AMB] wxWidgets/src/aui framemanager.cpp,1.14,1.15
ABX
abx at abx.art.pl
Tue Jul 4 14:56:47 PDT 2006
Alex Bligh <alex at ...> writes:
> 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.
OTOH button event send from button-less pane isn't obvious. You are closing
pane, not cancel it. Floating panes flying across screen are nearly like wxTLWs.
> * 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).
wxDialog is special case. ShowModal needs return value and wxCANCEL is one of
results from showing wxDialog. You show dialog to get some input which can be
cancelled. Panes are more like toolbars. Do you cancel toolbar?
> 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.
I don't want to do that. I just take my liberty to present opinion that I don't
like such design with button events send without any button created and that
using EVT_BUTTON() to handle closing event of the pane looks like dirty hack.
Just because it worked 6 moths in private-like code, doesn't automatically made
it ideal solution especially if there are other alternatives in the API. But if
noone else objects, I can live with it too. Asking has no cost.
ABX
More information about the wx-dev
mailing list