这篇教程C++ GetActiveChild函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetActiveChild函数的典型用法代码示例。如果您正苦于以下问题:C++ GetActiveChild函数的具体用法?C++ GetActiveChild怎么用?C++ GetActiveChild使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetActiveChild函数的22个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: while//---------------------------------------------------------void CSAGA_Frame::On_Frame_Close_All(wxCommandEvent &WXUNUSED(event)){ while( GetActiveChild() != NULL ) { delete(GetActiveChild()); }}
开发者ID:johanvdw,项目名称:saga-debian,代码行数:8,
示例2: GetActiveChild//---------------------------------------------------------void CSAGA_Frame::On_Frame_Close(wxCommandEvent &WXUNUSED(event)){ if( GetActiveChild() != NULL ) { GetActiveChild()->Close(); }}
开发者ID:johanvdw,项目名称:saga-debian,代码行数:8,
示例3: wxGetApp// Make sure the correct toolbars are showing for the active viewvoid csFrame::OnIdle(wxIdleEvent& event){ wxSashLayoutWindow* paletteWin = wxGetApp().GetDiagramPaletteSashWindow(); wxSashLayoutWindow* diagramToolBarWin = wxGetApp().GetDiagramToolBarSashWindow(); if (!paletteWin || !diagramToolBarWin) return; bool doLayout = false; if (GetActiveChild()) { if (!paletteWin->IsShown() || !diagramToolBarWin->IsShown()) { paletteWin->Show(true); diagramToolBarWin->Show(true); doLayout = true; } } else { if (paletteWin->IsShown() || diagramToolBarWin->IsShown()) { paletteWin->Show(false); diagramToolBarWin->Show(false); doLayout = true; } } if (doLayout) { wxLayoutAlgorithm layout; layout.LayoutMDIFrame(this);#if defined(__WXMSW__) // Need to do something else to get it to refresh properly // when a client frame is first displayed; moving the client // window doesn't cause the proper refresh. Just refreshing the // client doesn't work (presumably because it's clipping the // children). // FIXED in wxWidgets, by intercepting wxMDIClientWindow::DoSetSize // and checking if the position has changed, before redrawing the // child windows.#if 0 wxMDIChildFrame* childFrame = GetActiveChild(); if (childFrame) { HWND hWnd = (HWND) childFrame->GetHWND(); ::RedrawWindow(hWnd, NULL, NULL, RDW_FRAME|RDW_ALLCHILDREN|RDW_INVALIDATE ); }#endif#endif // __WXMSW__ } event.Skip();}
开发者ID:nealey,项目名称:vera,代码行数:54,
示例4: GetActiveChildwxMenuItem *wxMDIParentFrame::FindItemInMenuBar(int menuId) const{ wxMenuItem *item = wxFrame::FindItemInMenuBar(menuId); if ( !item && GetActiveChild() ) { item = GetActiveChild()->FindItemInMenuBar(menuId); } if ( !item && m_windowMenu ) item = m_windowMenu->FindItem(menuId); return item;}
开发者ID:DumaGit,项目名称:winsparkle,代码行数:13,
示例5: GetActiveChildvoid wxMDIParentFrame::DoMenuUpdates(wxMenu* menu){ wxMDIChildFrame *child = GetActiveChild(); if ( child ) { wxEvtHandler* source = child->GetEventHandler(); wxMenuBar* bar = child->GetMenuBar(); if (menu) { menu->UpdateUI(source); } else { if ( bar != NULL ) { int nCount = bar->GetMenuCount(); for (int n = 0; n < nCount; n++) bar->GetMenu(n)->UpdateUI(source); } } } else { wxFrameBase::DoMenuUpdates(menu); }}
开发者ID:HackLinux,项目名称:chandler-1,代码行数:27,
示例6: GetActiveChildwxMenuItem *wxMDIParentFrame::FindItemInMenuBar(int menuId) const{ // We must look in the child menu first: if it has an item with the same ID // as in our own menu bar, the child item should be used to determine // whether it's currently enabled. wxMenuItem *item = GetActiveChild() ? GetActiveChild()->FindItemInMenuBar(menuId) : NULL; if ( !item ) item = wxFrame::FindItemInMenuBar(menuId); if ( !item && m_windowMenu ) item = m_windowMenu->FindItem(menuId); return item;}
开发者ID:0ryuO,项目名称:dolphin-avsync,代码行数:16,
示例7: On_Command_Child_UIvoid CSAGA_Frame::On_Command_Child_UI(wxUpdateUIEvent &event){ CVIEW_Base *pChild; if( (pChild = wxDynamicCast(GetActiveChild(), CVIEW_Base)) != NULL ) { pChild->On_Command_UI(event); }}
开发者ID:johanvdw,项目名称:saga-debian,代码行数:9,
示例8: On_Command_Child//---------------------------------------------------------void CSAGA_Frame::On_Command_Child(wxCommandEvent &event){ wxMDIChildFrame *pChild; if( (pChild = GetActiveChild()) != NULL ) { pChild->GetEventHandler()->AddPendingEvent(event); }}
开发者ID:johanvdw,项目名称:saga-debian,代码行数:10,
示例9: SetStatusText// Default menu selection behaviour - display a help stringvoid wxMDIParentFrame::OnMenuHighlight(wxMenuEvent& event){ if (GetStatusBar()) { if (event.GetMenuId() == -1) SetStatusText(""); else { wxMenuBar *menuBar = (wxMenuBar*) NULL; if (GetActiveChild()) menuBar = GetActiveChild()->GetMenuBar(); else menuBar = GetMenuBar(); if (menuBar) { wxString helpString(menuBar->GetHelpString(event.GetMenuId())); if (helpString != "") SetStatusText(helpString); } } }}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:23,
示例10: InternalSetMenuBarvoid wxMDIParentFrame::InternalSetMenuBar(){ if ( GetActiveChild() ) { AddWindowMenu(); } else // we don't have any MDI children yet { // wait until we do to add the window menu but do set the main menu for // now (this is done by AddWindowMenu() as a side effect) MDISetMenu(GetClientWindow(), (HMENU)m_hMenu, NULL); }}
开发者ID:DumaGit,项目名称:winsparkle,代码行数:13,
示例11: eventbool wxMDIParentFrame::HandleActivate(int state, bool minimized, WXHWND activate){ bool processed = false; if ( wxWindow::HandleActivate(state, minimized, activate) ) { // already processed processed = true; } // If this window is an MDI parent, we must also send an OnActivate message // to the current child. if ( GetActiveChild() && ((state == WA_ACTIVE) || (state == WA_CLICKACTIVE)) ) { wxActivateEvent event(wxEVT_ACTIVATE, true, GetActiveChild()->GetId()); event.SetEventObject( GetActiveChild() ); if ( GetActiveChild()->HandleWindowEvent(event) ) processed = true; } return processed;}
开发者ID:DumaGit,项目名称:winsparkle,代码行数:23,
示例12: GetActiveChildvoid wxMDIParentFrame::GtkOnSize( int x, int y, int width, int height ){ wxFrame::GtkOnSize( x, y, width, height ); wxMDIChildFrame *child_frame = GetActiveChild(); if (!child_frame) return; wxMenuBar *menu_bar = child_frame->m_menuBar; if (!menu_bar) return; if (!menu_bar->m_widget) return; menu_bar->m_x = 0; menu_bar->m_y = 0; menu_bar->m_width = m_width; menu_bar->m_height = wxMENU_HEIGHT; gtk_pizza_set_size( GTK_PIZZA(m_mainWidget), menu_bar->m_widget, 0, 0, m_width, wxMENU_HEIGHT );}
开发者ID:gitrider,项目名称:wxsj2,代码行数:19,
示例13: GetActiveChildvoid wxMDIParentFrame::DoGetClientSize(int* width, int* height) const{ wxFrame::DoGetClientSize(width, height); if (height) { wxMDIChildFrame* active_child_frame = GetActiveChild(); if (active_child_frame) { wxMenuBar* menubar = active_child_frame->m_menuBar; if (menubar && menubar->IsShown()) { GtkRequisition req; gtk_widget_size_request(menubar->m_widget, &req); *height -= req.height; if (*height < 0) *height = 0; } } }}
开发者ID:beanhome,项目名称:dev,代码行数:20,
示例14: WXUNUSEDvoid MyFrame::FileSavePicture (wxCommandEvent & WXUNUSED(event) ){#if wxUSE_FILEDLG MyChild * pChild = (MyChild *)GetActiveChild(); if (pChild == NULL) { return; } wxFileDialog dialog(this, wxT("Save Picture as"), wxEmptyString, pChild->GetTitle(), wxT("SVG vector picture files (*.svg)|*.svg"), wxFD_SAVE|wxFD_OVERWRITE_PROMPT); if (dialog.ShowModal() == wxID_OK) { if (!pChild->OnSave ( dialog.GetPath() )) { return; } } return;#endif // wxUSE_FILEDLG}
开发者ID:ExperimentationBox,项目名称:Edenite,代码行数:23,
示例15: On_Frame_Previous_UIvoid CSAGA_Frame::On_Frame_Previous_UI(wxUpdateUIEvent &event){ event.Enable(GetActiveChild() != NULL);}
开发者ID:johanvdw,项目名称:saga-debian,代码行数:4,
示例16: boolwxGenericMDIParentFrame::WXIsActiveChild(wxGenericMDIChildFrame *child) const{ return static_cast<wxMDIChildFrameBase *>(GetActiveChild()) == child;}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:5,
示例17: On_Frame_ArrangeIcons_UIvoid CSAGA_Frame::On_Frame_ArrangeIcons_UI(wxUpdateUIEvent &event){ event.Enable(GetActiveChild() != NULL);}
开发者ID:johanvdw,项目名称:saga-debian,代码行数:4,
示例18: GTK_NOTEBOOKvoid wxMDIParentFrame::OnInternalIdle(){ /* if a an MDI child window has just been inserted it has to be brought to the top in idle time. we simply set the last notebook page active as new pages can only be appended at the end */ if (m_justInserted) { GtkNotebook *notebook = GTK_NOTEBOOK(m_clientWindow->m_widget); gtk_notebook_set_page( notebook, g_list_length( notebook->children ) - 1 ); /* need to set the menubar of the child */ wxMDIChildFrame *active_child_frame = GetActiveChild(); if (active_child_frame != NULL) { wxMenuBar *menu_bar = active_child_frame->m_menuBar; if (menu_bar) { menu_bar->m_width = m_width; menu_bar->m_height = wxMENU_HEIGHT; gtk_pizza_set_size( GTK_PIZZA(m_mainWidget), menu_bar->m_widget, 0, 0, m_width, wxMENU_HEIGHT ); menu_bar->SetInvokingWindow(active_child_frame); } } m_justInserted = false; return; } wxFrame::OnInternalIdle(); wxMDIChildFrame *active_child_frame = GetActiveChild(); bool visible_child_menu = false; wxWindowList::compatibility_iterator node = m_clientWindow->GetChildren().GetFirst(); while (node) { wxMDIChildFrame *child_frame = wxDynamicCast( node->GetData(), wxMDIChildFrame ); if ( child_frame ) { wxMenuBar *menu_bar = child_frame->m_menuBar; if ( menu_bar ) { if (child_frame == active_child_frame) { if (menu_bar->Show(true)) { menu_bar->m_width = m_width; menu_bar->m_height = wxMENU_HEIGHT; gtk_pizza_set_size( GTK_PIZZA(m_mainWidget), menu_bar->m_widget, 0, 0, m_width, wxMENU_HEIGHT ); menu_bar->SetInvokingWindow( child_frame ); } visible_child_menu = true; } else { if (menu_bar->Show(false)) { menu_bar->UnsetInvokingWindow( child_frame ); } } } } node = node->GetNext(); } /* show/hide parent menu bar as required */ if ((m_frameMenuBar) && (m_frameMenuBar->IsShown() == visible_child_menu)) { if (visible_child_menu) { m_frameMenuBar->Show( false ); m_frameMenuBar->UnsetInvokingWindow( this ); } else { m_frameMenuBar->Show( true ); m_frameMenuBar->SetInvokingWindow( this ); m_frameMenuBar->m_width = m_width; m_frameMenuBar->m_height = wxMENU_HEIGHT; gtk_pizza_set_size( GTK_PIZZA(m_mainWidget), m_frameMenuBar->m_widget, 0, 0, m_width, wxMENU_HEIGHT ); } }}
开发者ID:gitrider,项目名称:wxsj2,代码行数:94,
示例19: OnSaveUpdatevoid csFrame::OnSaveUpdate(wxUpdateUIEvent& event){ event.Enable( (GetActiveChild() != NULL) );}
开发者ID:nealey,项目名称:vera,代码行数:4,
示例20: GetActiveChildvoid DeviceFrame::OnDeviceCloseCurrentWindow(wxCommandEvent&) { wxMDIChildFrame* frame = GetActiveChild(); if (frame) { frame->Close(); }}
开发者ID:NovaCygni,项目名称:aur-mirror,代码行数:6,
示例21: GTK_NOTEBOOKvoid wxMDIParentFrame::OnInternalIdle(){ /* if a MDI child window has just been inserted it has to be brought to the top in idle time. we simply set the last notebook page active as new pages can only be appended at the end */ if (m_justInserted) { GtkNotebook *notebook = GTK_NOTEBOOK(m_clientWindow->m_widget); gtk_notebook_set_current_page(notebook, -1); /* need to set the menubar of the child */ wxMDIChildFrame *active_child_frame = GetActiveChild(); if (active_child_frame != NULL) { wxMenuBar *menu_bar = active_child_frame->m_menuBar; if (menu_bar) { menu_bar->Attach(active_child_frame); } } m_justInserted = false; return; } wxFrame::OnInternalIdle(); wxMDIChildFrame *active_child_frame = GetActiveChild(); bool visible_child_menu = false; wxWindowList::compatibility_iterator node = m_clientWindow->GetChildren().GetFirst(); while (node) { wxMDIChildFrame *child_frame = wxDynamicCast( node->GetData(), wxMDIChildFrame ); if ( child_frame ) { wxMenuBar *menu_bar = child_frame->m_menuBar; if ( menu_bar ) { if (child_frame == active_child_frame) { if (menu_bar->Show(true)) { // Attach() asserts if we call it for an already // attached menu bar so don't do it if we're already // associated with this frame (it would be nice to get // rid of this check and ensure that this doesn't // happen...) if ( menu_bar->GetFrame() != child_frame ) menu_bar->Attach( child_frame ); } visible_child_menu = true; } else { if (menu_bar->Show(false)) { menu_bar->Detach(); } } } } node = node->GetNext(); } /* show/hide parent menu bar as required */ if ((m_frameMenuBar) && (m_frameMenuBar->IsShown() == visible_child_menu)) { if (visible_child_menu) { m_frameMenuBar->Show( false ); m_frameMenuBar->Detach(); } else { m_frameMenuBar->Show( true ); m_frameMenuBar->Attach( this ); } }}
开发者ID:beanhome,项目名称:dev,代码行数:84,
示例22: On_Frame_Close_All_UIvoid CSAGA_Frame::On_Frame_Close_All_UI(wxUpdateUIEvent &event){ event.Enable(GetActiveChild() != NULL);}
开发者ID:johanvdw,项目名称:saga-debian,代码行数:4,
注:本文中的GetActiveChild函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GetActiveProject函数代码示例 C++ GetAction函数代码示例 |