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

Alex Bligh alex at alex.org.uk
Wed Jul 5 04:50:31 PDT 2006


ABX,

> 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.

Yep

>> * 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?

No. But we do cancel our galleries (tool pane like things) - sort of.
But that's no problem, we can do that in the app.

> 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.

Sorry I wrote that wrong. I meant "if you want it done like that". I was
just looking at doing it myself actually but I wanted to make sure it
wasn't going to break things as I agree it would be a neater solution if
people don't object to wxCloseEvent on non-TLWs.

Alex




More information about the wx-dev mailing list