Refactor wxButton and wxToggleButton to derive from wxAnyButton.
Introduce wxAnyButton class, a common base class for wxButton and wxToggleButton, allowing to reuse the same implementation for them. This also allows to implement support for bitmaps in wxToggleButton for all platforms and make wxBitmapToggleButton a trivial subclass of it everywhere, similarly to wxBitmapButton and wxButton. Closes #13198. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
#if wxUSE_TOGGLEBTN
|
||||
|
||||
#include "wx/event.h"
|
||||
#include "wx/control.h" // base class
|
||||
#include "wx/anybutton.h" // base class
|
||||
|
||||
extern WXDLLIMPEXP_DATA_CORE(const char) wxCheckBoxNameStr[];
|
||||
|
||||
@@ -28,7 +28,7 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TOGGLEBUTTON_CLICKED,
|
||||
// wxToggleButtonBase
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxToggleButtonBase : public wxControl
|
||||
class WXDLLIMPEXP_CORE wxToggleButtonBase : public wxAnyButton
|
||||
{
|
||||
public:
|
||||
wxToggleButtonBase() { }
|
||||
|
Reference in New Issue
Block a user