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

@@ -2741,11 +2741,13 @@ void wxWidgetImpl::RemoveAssociation(WXWidget control)
wxIMPLEMENT_ABSTRACT_CLASS(wxWidgetImpl, wxObject);
wxWidgetImpl::wxWidgetImpl( wxWindowMac* peer , bool isRootControl, bool isUserPane )
wxWidgetImpl::wxWidgetImpl( wxWindowMac* peer , int flags )
{
Init();
m_isRootControl = isRootControl;
m_wantsUserKey = m_isUserPane = isUserPane;
Init();
m_isRootControl = flags & Widget_IsRoot;
m_isUserPane = flags & Widget_IsUserPane;
m_wantsUserKey = m_isUserPane || (flags & Widget_UserKeyEvents);
m_wantsUserMouse = m_isUserPane || (flags & Widget_UserMouseEvents);
m_wxPeer = peer;
m_shouldSendEvents = true;
}
@@ -2773,6 +2775,8 @@ wxWidgetImpl::~wxWidgetImpl()
void wxWidgetImpl::Init()
{
m_isRootControl = false;
m_wantsUserKey = false;
m_wantsUserMouse = false;
m_wxPeer = NULL;
m_needsFocusRect = false;
m_needsFrame = true;