BEGIN_EVENT_TABLE(wxGenericMDIParentFrame, wxFrame)
#if wxUSE_MENUS
- EVT_MENU (-1, wxGenericMDIParentFrame::DoHandleMenu)
+ EVT_MENU (wxID_ANY, wxGenericMDIParentFrame::DoHandleMenu)
#endif
END_EVENT_TABLE()
OnCreateClient();
- return TRUE;
+ return true;
}
#if wxUSE_MENUS
// Stops the same event being processed repeatedly
static wxEventType inEvent = wxEVT_NULL;
if (inEvent == event.GetEventType())
- return FALSE;
+ return false;
inEvent = event.GetEventType();
// Let the active child (if any) process the event first.
- bool res = FALSE;
+ bool res = false;
if (m_pActiveChild && event.IsKindOf(CLASSINFO(wxCommandEvent))
#if 0
/* This is sure to not give problems... */
{
if (m_pClientWindow && m_pClientWindow->GetSelection() != -1)
{
- int active = m_pClientWindow->GetSelection() + 1;
+ size_t active = m_pClientWindow->GetSelection() + 1;
if (active >= m_pClientWindow->GetPageCount())
active = 0;
if (pParentFrame != NULL)
{
- bool bActive = FALSE;
+ bool bActive = false;
if (pParentFrame->GetActiveChild() == this)
{
pParentFrame->SetActiveChild((wxGenericMDIChildFrame*) NULL);
pParentFrame->SetChildMenuBar((wxGenericMDIChildFrame*) NULL);
- bActive = TRUE;
+ bActive = true;
}
wxGenericMDIClientWindow *pClientWindow = pParentFrame->GetClientWindow();
// Remove page if still there
- int pos;
+ size_t pos;
for (pos = 0; pos < pClientWindow->GetPageCount(); pos++)
{
if (pClientWindow->GetPage(pos) == this)
}
else
{
- if (pClientWindow->GetPageCount() - 1 >= 0)
+ if ((int)pClientWindow->GetPageCount() - 1 >= 0)
pClientWindow->SetSelection(pClientWindow->GetPageCount() - 1);
}
}
m_Title = title;
- pClientWindow->AddPage(this, title, TRUE);
+ pClientWindow->AddPage(this, title, true);
ApplyMDIChildFrameRect(); // Ok confirme the size change!
pClientWindow->Refresh();
- return TRUE;
+ return true;
}
#if wxUSE_MENUS
if (pClientWindow != NULL)
{
- int pos;
+ size_t pos;
for (pos = 0; pos < pClientWindow->GetPageCount(); pos++)
{
if (pClientWindow->GetPage(pos) == this)
if (pClientWindow != NULL)
{
- int pos;
+ size_t pos;
for (pos = 0; pos < pClientWindow->GetPageCount(); pos++)
{
if (pClientWindow->GetPage(pos) == this)
// but may be the MDI frame does?
m_pMDIParentFrame->OnMenuHighlight(event);
}
+#else
+ wxUnusedVar(event);
#endif // wxUSE_STATUSBAR
}
GetTabView()->SetTabSize(120, 18);
GetTabView()->SetTabSelectionHeight(20);
*/
- return TRUE;
+ return true;
}
else
- return FALSE;
+ return false;
}
-int wxGenericMDIClientWindow::SetSelection(int nPage)
+int wxGenericMDIClientWindow::SetSelection(size_t nPage)
{
int oldSelection = wxNotebook::SetSelection(nPage);
wxGenericMDIChildFrame* oldChild = (wxGenericMDIChildFrame *)GetPage(OldSelection);
if (oldChild)
{
- wxActivateEvent event(wxEVT_ACTIVATE, FALSE, oldChild->GetId());
+ wxActivateEvent event(wxEVT_ACTIVATE, false, oldChild->GetId());
event.SetEventObject( oldChild );
oldChild->GetEventHandler()->ProcessEvent(event);
}
wxGenericMDIChildFrame* activeChild = (wxGenericMDIChildFrame *)GetPage(newSelection);
if (activeChild)
{
- wxActivateEvent event(wxEVT_ACTIVATE, TRUE, activeChild->GetId());
+ wxActivateEvent event(wxEVT_ACTIVATE, true, activeChild->GetId());
event.SetEventObject( activeChild );
activeChild->GetEventHandler()->ProcessEvent(event);
{
wxNotebook::OnSize(event);
- int pos;
+ size_t pos;
for (pos = 0; pos < GetPageCount(); pos++)
{
((wxGenericMDIChildFrame *)GetPage(pos))->ApplyMDIChildFrameRect();