本文整理汇总了C++中GetActiveChild函数的典型用法代码示例。如果您正苦于以下问题:C++ GetActiveChild函数的具体用法?C++ GetActiveChild怎么用?C++ GetActiveChild使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetActiveChild函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: while
//---------------------------------------------------------
void CSAGA_Frame::On_Frame_Close_All(wxCommandEvent &WXUNUSED(event))
{
while( GetActiveChild() != NULL )
{
delete(GetActiveChild());
}
}
开发者ID:johanvdw,项目名称:saga-debian,代码行数:8,代码来源:saga_frame.cpp
示例2: GetActiveChild
//---------------------------------------------------------
void CSAGA_Frame::On_Frame_Close(wxCommandEvent &WXUNUSED(event))
{
if( GetActiveChild() != NULL )
{
GetActiveChild()->Close();
}
}
开发者ID:johanvdw,项目名称:saga-debian,代码行数:8,代码来源:saga_frame.cpp
示例3: wxGetApp
// Make sure the correct toolbars are showing for the active view
void 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,代码来源:mainfrm.cpp
示例4: GetActiveChild
wxMenuItem *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,代码来源:mdi.cpp
示例5: GetActiveChild
void 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,代码来源:mdi.cpp
示例6: GetActiveChild
wxMenuItem *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,代码来源:mdi.cpp
示例7: On_Command_Child_UI
void 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,代码来源:saga_frame.cpp
示例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,代码来源:saga_frame.cpp
示例9: SetStatusText
// Default menu selection behaviour - display a help string
void 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,代码来源:mdi.cpp
示例10: InternalSetMenuBar
void 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,代码来源:mdi.cpp
示例11: event
bool 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,代码来源:mdi.cpp
示例12: GetActiveChild
void 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,代码来源:mdi.cpp
示例13: GetActiveChild
void 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,代码来源:mdi.cpp
示例14: WXUNUSED
void 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,代码来源:svgtest.cpp
示例15: On_Frame_Previous_UI
void CSAGA_Frame::On_Frame_Previous_UI(wxUpdateUIEvent &event)
{
event.Enable(GetActiveChild() != NULL);
}
开发者ID:johanvdw,项目名称:saga-debian,代码行数:4,代码来源:saga_frame.cpp
示例16:
bool
wxGenericMDIParentFrame::WXIsActiveChild(wxGenericMDIChildFrame *child) const
{
return static_cast<wxMDIChildFrameBase *>(GetActiveChild()) == child;
}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:5,代码来源:mdig.cpp
示例17: On_Frame_ArrangeIcons_UI
void CSAGA_Frame::On_Frame_ArrangeIcons_UI(wxUpdateUIEvent &event)
{
event.Enable(GetActiveChild() != NULL);
}
开发者ID:johanvdw,项目名称:saga-debian,代码行数:4,代码来源:saga_frame.cpp
示例18: GTK_NOTEBOOK
void 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,代码来源:mdi.cpp
示例19: OnSaveUpdate
void csFrame::OnSaveUpdate(wxUpdateUIEvent& event)
{
event.Enable( (GetActiveChild() != NULL) );
}
开发者ID:nealey,项目名称:vera,代码行数:4,代码来源:mainfrm.cpp
示例20: GetActiveChild
void DeviceFrame::OnDeviceCloseCurrentWindow(wxCommandEvent&) {
wxMDIChildFrame* frame = GetActiveChild();
if (frame) {
frame->Close();
}
}
开发者ID:NovaCygni,项目名称:aur-mirror,代码行数:6,代码来源:DeviceFrame.cpp
注:本文中的GetActiveChild函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论