macOS wxWidgetImpl constructor with flags

replacing bools with int flag
This commit is contained in:
Stefan Csomor
2019-01-03 20:02:24 +01:00
parent 66a9e55f3b
commit e5e6ee7e77
8 changed files with 32 additions and 37 deletions

View File

@@ -216,8 +216,16 @@ protected :
class WXDLLIMPEXP_CORE wxWidgetImpl : public wxObject
{
public :
enum WidgetFlags
{
Widget_IsRoot = 0x0001,
Widget_IsUserPane = 0x0002,
Widget_UserKeyEvents = 0x0004,
Widget_UserMouseEvents = 0x0008,
};
wxWidgetImpl( wxWindowMac* peer , bool isRootControl, bool isUserPane, bool wantsUserKey );
wxWidgetImpl( wxWindowMac* peer , bool isRootControl = false, bool isUserPane = false );
wxWidgetImpl( wxWindowMac* peer , int flags = 0 );
wxWidgetImpl();
virtual ~wxWidgetImpl();
@@ -225,15 +233,14 @@ public :
bool IsRootControl() const { return m_isRootControl; }
// is a completely control that has all events handled in wx code, no built-ins
// is a custom control that has all events handled in wx code, no built-ins
bool IsUserPane() const { return m_isUserPane; }
// we are doing keyboard handling in wx code, other events might be handled natively
virtual bool HasUserKeyHandling() const { return m_wantsUserKey; }
// we are doing mouse handling in wx code, other events might be handled natively
// right now this is always in sync with HasUserKeyHandling
virtual bool HasUserMouseHandling() const { return m_wantsUserKey; }
virtual bool HasUserMouseHandling() const { return m_wantsUserMouse; }
wxWindowMac* GetWXPeer() const { return m_wxPeer; }
@@ -582,6 +589,7 @@ protected :
bool m_isRootControl;
bool m_isUserPane;
bool m_wantsUserKey;
bool m_wantsUserMouse;
wxWindowMac* m_wxPeer;
bool m_needsFocusRect;
bool m_needsFrame;