bool PropertyFrame::Create( wxWindow* parent, wxWindowID id, const wxString & title, const wxPoint & pos /*= wxDefaultPosition*/, const wxSize & size /*= wxDefaultSize*/, long style /*= wxSYSTEM_MENU | wxCLOSE_BOX | wxCAPTION*/, const wxString & name /*= _T("Свойства тега")*/ ) { if ( !wxFrame::Create(parent, id, title, pos, size, style, name) ) { return false; } m_parentFrame = wxDynamicCast(parent, MainFrame); BOOST_ASSERT( m_parentFrame != NULL ); MakeModal(true); ////Connect( ID_Update, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnBrowseClicked) ); ////Connect( ID_TagList, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, wxCommandEventHandler( AddTagFrame::OnItemRigthClicked ) ); return true; }
void EDA_BASE_FRAME::SetModalMode( bool aModal ) { // Disable all other windows #if wxCHECK_VERSION(2, 9, 4) if( IsTopLevel() ) { wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetFirst(); while( node ) { wxWindow* win = node->GetData(); if( win != this ) win->Enable( !aModal ); node = node->GetNext(); } } #else // Deprecated since wxWidgets 2.9.4 MakeModal( aModal ); #endif }
PropertyFrame::~PropertyFrame() { MakeModal(false); m_parentFrame->SetFocus(); }