wxToolBarToolBase * wxToolBarBase::InsertControl(size_t pos, wxControl *control, const wxString& label) { wxCHECK_MSG( control, NULL, _T("toolbar: can't insert NULL control") ); wxCHECK_MSG( control->GetParent() == this, NULL, _T("control must have toolbar as parent") ); wxCHECK_MSG( pos <= GetToolsCount(), NULL, _T("invalid position in wxToolBar::InsertControl()") ); wxToolBarToolBase *tool = CreateTool(control, label); if ( !InsertTool(pos, tool) ) { delete tool; return NULL; } return tool; }
wxToolBarToolBase *wxToolBarBase::InsertTool(size_t pos, int id, const wxString& label, const wxBitmap& bitmap, const wxBitmap& bmpDisabled, wxItemKind kind, const wxString& shortHelp, const wxString& longHelp, wxObject *clientData) { wxCHECK_MSG( pos <= GetToolsCount(), NULL, _T("invalid position in wxToolBar::InsertTool()") ); wxToolBarToolBase *tool = CreateTool(id, label, bitmap, bmpDisabled, kind, clientData, shortHelp, longHelp); if ( !InsertTool(pos, tool) ) { delete tool; return NULL; } return tool; }
void AGameplayDebuggingReplicator::OnRep_AutoActivate() { #if !(UE_BUILD_SHIPPING || UE_BUILD_TEST) // we are already replicated so let's activate tool if (GetWorld() && GetNetMode() == ENetMode::NM_Client && !IsToolCreated() && !IsGlobalInWorld()) { CreateTool(); EnableTool(); } #endif }
wxToolBarToolBase * wxToolBarBase::InsertControl(size_t pos, wxControl *control, const wxString& label) { wxCHECK_MSG( control, NULL, wxT("toolbar: can't insert NULL control") ); wxCHECK_MSG( control->GetParent() == this, NULL, wxT("control must have toolbar as parent") ); return DoInsertNewTool(pos, CreateTool(control, label)); }
wxToolBarToolBase *wxToolBarBase::InsertTool(size_t pos, int toolid, const wxString& label, const wxBitmap& bitmap, const wxBitmap& bmpDisabled, wxItemKind kind, const wxString& shortHelp, const wxString& longHelp, wxObject *clientData) { wxCHECK_MSG( pos <= GetToolsCount(), NULL, wxT("invalid position in wxToolBar::InsertTool()") ); return DoInsertNewTool(pos, CreateTool(toolid, label, bitmap, bmpDisabled, kind, clientData, shortHelp, longHelp)); }
wxToolBarToolBase *wxToolBarBase::InsertSeparator(size_t pos) { wxCHECK_MSG( pos <= GetToolsCount(), NULL, _T("invalid position in wxToolBar::InsertSeparator()") ); wxToolBarToolBase *tool = CreateTool(wxID_SEPARATOR, wxEmptyString, wxNullBitmap, wxNullBitmap, wxITEM_SEPARATOR, NULL, wxEmptyString, wxEmptyString); if ( !tool || !DoInsertTool(pos, tool) ) { delete tool; return NULL; } m_tools.Insert(pos, tool); return tool; }