Kirix Support Forums

Subclassing wxFloatingPane

Please post any wxAUI patches or modifications you've created here. Thanks!

Subclassing wxFloatingPane

Postby abligh on Thu Jan 26, 2006 2:43 pm

Ben et al,,

All this talk about adding custom event handlers etc. (a lot of infrastructure) made me sit back and wonder whether there is not an easier solution (at least when the panes are floating). It would only be a small patch for the wxPaneInfo class to take (as an optional paramater) a wxClassInfo*. This would represent a pointer to the class that Update() should create (which we would check is a subclass of wxFloatingPane). Apart from moving the definition of wxFloatingPane from the .cpp file to the .h file, this change would be minimally intrusive, but would give people an awful lot of flexibility in that it would be pretty trivial (for instance) to cleanly add event handlers for the floating pane windows (just roll your own subclass).

Would you take a patch that did this?

Alex
abligh
Registered User
 
Posts: 59
Joined: Sun Jan 01, 2006 2:31 pm

Re: Subclassing wxFloatingPane

Postby abligh on Fri Jan 27, 2006 5:40 am

abligh wrote:Ben et al,,

t would only be a small patch for the wxPaneInfo class to take (as an optional paramater) a wxClassInfo*

Would you take a patch that did this?

Alex


An alternative would be to allow easier subclassing of wxFrameManager itself. So, for instance, but the call to create a new wxFloatingPane class in a virtual function (wxFrameManager::GetNewFloatingPane) which could be overridden so it returned a subclass of wxFloatingPane. This is probably neater.

Alex
abligh
Registered User
 
Posts: 59
Joined: Sun Jan 01, 2006 2:31 pm

Return to wxAUI Patches & Modifications