// headers
// ---------------------------------------------------------------------------
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "mdig.h"
#endif
IMPLEMENT_DYNAMIC_CLASS(wxGenericMDIParentFrame, wxFrame)
BEGIN_EVENT_TABLE(wxGenericMDIParentFrame, wxFrame)
+#if wxUSE_MENUS
EVT_MENU (-1, wxGenericMDIParentFrame::DoHandleMenu)
+#endif
END_EVENT_TABLE()
wxGenericMDIParentFrame::wxGenericMDIParentFrame()
{
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;
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);
}
}
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)
#endif // wxUSE_STATUSBAR
}
-void wxGenericMDIChildFrame::OnActivate(wxActivateEvent& event)
+void wxGenericMDIChildFrame::OnActivate(wxActivateEvent& WXUNUSED(event))
{
// Do mothing.
}
{
// do we have _exactly_ one child?
wxWindow *child = (wxWindow *)NULL;
- for ( wxWindowList::Node *node = GetChildren().GetFirst();
+ for ( wxWindowList::compatibility_iterator node = GetChildren().GetFirst();
node;
node = node->GetNext() )
{
return FALSE;
}
-int wxGenericMDIClientWindow::SetSelection(int nPage)
+int wxGenericMDIClientWindow::SetSelection(size_t nPage)
{
int oldSelection = wxNotebook::SetSelection(nPage);
{
wxNotebook::OnSize(event);
- int pos;
+ size_t pos;
for (pos = 0; pos < GetPageCount(); pos++)
{
((wxGenericMDIChildFrame *)GetPage(pos))->ApplyMDIChildFrameRect();