Include wx/menu.h according to precompiled headers of wx/wx.h (with other minor cleaning).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2006-05-18 07:13:20 +00:00
parent 85855db1c4
commit 3b3dc8019a
43 changed files with 99 additions and 91 deletions

View File

@@ -1,10 +1,10 @@
/////////////////////////////////////////////////////////////////////////////
// Name: cocoa/menu.cpp
// Name: src/cocoa/menu.cpp
// Purpose: wxMenu and wxMenuBar implementation
// Author: David Elliott
// Modified by:
// Created: 2002/12/09
// RCS-ID: $Id:
// RCS-ID: $Id$
// Copyright: (c) 2002 David Elliott
// Licence: wxWidgets licence
/////////////////////////////////////////////////////////////////////////////
@@ -18,8 +18,10 @@
// ----------------------------------------------------------------------------
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "wx/menu.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif // WX_PRECOMP

View File

@@ -20,13 +20,12 @@
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/menu.h"
#endif
// DLL options compatibility check:
WX_CHECK_BUILD_OPTIONS("wxAdvanced")
#include "wx/menu.h"
#include "wx/taskbar.h"
DEFINE_EVENT_TYPE( wxEVT_TASKBAR_MOVE )

View File

@@ -23,11 +23,11 @@
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/dcclient.h"
#include "wx/menu.h"
#endif // WX_PRECOMP
#include "wx/dialog.h"
#include "wx/control.h"
#include "wx/menu.h"
#if wxUSE_TOOLBAR
#include "wx/toolbar.h"
#endif

View File

@@ -16,11 +16,11 @@
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/menu.h"
#endif
#include "wx/notebook.h"
#include "wx/dialog.h"
#include "wx/menu.h"
#include "wx/gtk/private.h"
#include <glib.h>

View File

@@ -17,9 +17,8 @@
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/frame.h"
#endif
#include "wx/menu.h"
#endif
#include <gdk/gdkx.h>

View File

@@ -23,6 +23,7 @@
#include "wx/utils.h"
#include "wx/frame.h"
#include "wx/dcclient.h"
#include "wx/menu.h"
#endif
#include "wx/layout.h"
@@ -50,7 +51,6 @@
#include "wx/textctrl.h"
#endif
#include "wx/menu.h"
#include "wx/statusbr.h"
#include "wx/settings.h"
#include "wx/fontutil.h"

View File

@@ -23,11 +23,11 @@
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/dcclient.h"
#include "wx/menu.h"
#endif // WX_PRECOMP
#include "wx/dialog.h"
#include "wx/control.h"
#include "wx/menu.h"
#if wxUSE_TOOLBAR
#include "wx/toolbar.h"
#endif

View File

@@ -16,11 +16,11 @@
#ifndef WX_PRECOMP
#include "wx/intl.h"
#include "wx/menu.h"
#endif
#include "wx/notebook.h"
#include "wx/dialog.h"
#include "wx/menu.h"
#include "wx/gtk1/private.h"
#include <glib.h>

View File

@@ -23,6 +23,7 @@
#include "wx/utils.h"
#include "wx/frame.h"
#include "wx/dcclient.h"
#include "wx/menu.h"
#endif
#include "wx/layout.h"
@@ -47,7 +48,6 @@
#include "wx/textctrl.h"
#endif
#include "wx/menu.h"
#include "wx/statusbr.h"
#include "wx/settings.h"
#include "wx/fontutil.h"

View File

@@ -28,10 +28,10 @@
#include "wx/bmpbuttn.h"
#include "wx/statbox.h"
#include "wx/radiobox.h"
#include "wx/menu.h"
#endif // WXPRECOMP
#ifdef __WXMAC__
#include "wx/menu.h"
#include "wx/msgdlg.h"
#endif

View File

@@ -33,10 +33,10 @@
#include "wx/bmpbuttn.h"
#include "wx/statbox.h"
#include "wx/radiobox.h"
#include "wx/menu.h"
#endif // WXPRECOMP
#ifdef __WXMAC__
#include "wx/menu.h"
#include "wx/msgdlg.h"
#endif

View File

@@ -33,10 +33,10 @@
#include "wx/bmpbuttn.h"
#include "wx/statbox.h"
#include "wx/radiobox.h"
#include "wx/menu.h"
#endif // WXPRECOMP
#ifdef __WXMAC__
#include "wx/menu.h"
#include "wx/msgdlg.h"
#endif

View File

@@ -21,6 +21,7 @@
#include "wx/frame.h"
#include "wx/dc.h"
#include "wx/button.h"
#include "wx/menu.h"
#endif
#include "wx/gdicmn.h"
@@ -35,7 +36,6 @@
#include "wx/memory.h"
#include "wx/tooltip.h"
#include "wx/textctrl.h"
#include "wx/menu.h"
#include "wx/docview.h"
#include "wx/filename.h"

View File

@@ -14,7 +14,11 @@
#if wxUSE_CHOICE
#include "wx/choice.h"
#ifndef WX_PRECOMP
#include "wx/menu.h"
#endif
#include "wx/mac/uma.h"
extern MenuHandle NewUniqueMenu() ;

View File

@@ -17,9 +17,9 @@
#ifndef WX_PRECOMP
#include "wx/button.h"
#include "wx/menu.h"
#endif
#include "wx/menu.h"
#include "wx/containr.h"
#include "wx/mac/uma.h"

View File

@@ -15,9 +15,9 @@
#ifndef WX_PRECOMP
#include "wx/button.h"
#include "wx/menu.h"
#endif
#include "wx/menu.h"
#include "wx/mac/uma.h"
#if TARGET_API_MAC_OSX
#ifndef __HIVIEW__

View File

@@ -16,12 +16,12 @@
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/dcclient.h"
#include "wx/menu.h"
#endif // WX_PRECOMP
#include "wx/statusbr.h"
#include "wx/toolbar.h"
#include "wx/menuitem.h"
#include "wx/menu.h"
#include "wx/dialog.h"
#include "wx/settings.h"

View File

@@ -15,9 +15,9 @@
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/menu.h"
#endif // WX_PRECOMP
#include "wx/menu.h"
#include "wx/mac/uma.h"
IMPLEMENT_DYNAMIC_CLASS(wxMenuItem, wxObject)

View File

@@ -17,11 +17,11 @@
#ifndef WX_PRECOMP
#include "wx/dcmemory.h"
#include "wx/menu.h"
#endif
#include "wx/mac/private.h"
#include "wx/menu.h"
#include "wx/icon.h"

View File

@@ -21,6 +21,7 @@
#include "wx/utils.h"
#include "wx/dc.h"
#include "wx/button.h"
#include "wx/menu.h"
#endif
#ifdef __DARWIN__
@@ -44,7 +45,6 @@
#include "wx/settings.h"
#include "wx/filefn.h"
#include "wx/sysopt.h"
#include "wx/menu.h"
#if defined(__BORLANDC__) && !defined(__WIN32__)
#include <alloc.h>

View File

@@ -22,9 +22,9 @@
#include "wx/dc.h"
#include "wx/dcclient.h"
#include "wx/button.h"
#include "wx/menu.h"
#endif
#include "wx/menu.h"
#include "wx/layout.h"
#include "wx/dialog.h"
#include "wx/scrolbar.h"

View File

@@ -25,6 +25,7 @@
#include "wx/frame.h"
#include "wx/dc.h"
#include "wx/button.h"
#include "wx/menu.h"
#endif
#include "wx/gdicmn.h"
@@ -39,7 +40,6 @@
#include "wx/memory.h"
#include "wx/tooltip.h"
#include "wx/textctrl.h"
#include "wx/menu.h"
#include "wx/docview.h"
#include "wx/filename.h"

View File

@@ -14,7 +14,11 @@
#if wxUSE_CHOICE
#include "wx/choice.h"
#ifndef WX_PRECOMP
#include "wx/menu.h"
#endif
#include "wx/mac/uma.h"
IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)

View File

@@ -15,9 +15,9 @@
#ifndef WX_PRECOMP
#include "wx/button.h"
#include "wx/menu.h"
#endif
#include "wx/menu.h"
#include "wx/mac/uma.h"
IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl)

View File

@@ -16,12 +16,12 @@
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/dcclient.h"
#include "wx/menu.h"
#endif // WX_PRECOMP
#include "wx/statusbr.h"
#include "wx/toolbar.h"
#include "wx/menuitem.h"
#include "wx/menu.h"
#include "wx/dialog.h"
#include "wx/settings.h"

View File

@@ -15,9 +15,9 @@
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/menu.h"
#endif
#include "wx/menu.h"
#include "wx/settings.h"
#include "wx/mac/private.h"
@@ -60,7 +60,7 @@ wxMDIParentFrame::wxMDIParentFrame()
m_clientWindow = NULL;
m_currentChild = NULL;
m_windowMenu = (wxMenu*) NULL;
m_parentFrameActive = TRUE;
m_parentFrameActive = true;
}
bool wxMDIParentFrame::Create(wxWindow *parent,
@@ -94,11 +94,11 @@ bool wxMDIParentFrame::Create(wxWindow *parent,
}
wxFrame::Create( parent , id , title , pos , size , style , name ) ;
m_parentFrameActive = TRUE;
m_parentFrameActive = true;
OnCreateClient();
return TRUE;
return true;
}
wxMDIParentFrame::~wxMDIParentFrame()
@@ -252,7 +252,7 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent,
{
SetName(name);
if ( id > -1 )
if ( id != wxID_ANY )
m_windowId = id;
else
m_windowId = (int)NewControlId();
@@ -265,7 +265,7 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent,
SetThemeWindowBackground( (WindowRef) m_macWindow , m_macWindowBackgroundTheme , false ) ;
wxModelessWindows.Append(this);
return FALSE;
return false;
}
wxMDIChildFrame::~wxMDIChildFrame()
@@ -378,7 +378,7 @@ bool wxMDIClientWindow::CreateClient(wxMDIParentFrame *parent, long style)
m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE);
wxModelessWindows.Append(this);
return TRUE;
return true;
}
// Get size *available for subwindows* i.e. excluding menu bar.

View File

@@ -19,9 +19,8 @@
#ifndef WX_PRECOMP
#include "wx/app.h"
#endif
#include "wx/menu.h"
#endif
#include "wx/mac/uma.h"
// ============================================================================

View File

@@ -22,9 +22,9 @@
#include "wx/dc.h"
#include "wx/dcclient.h"
#include "wx/button.h"
#include "wx/menu.h"
#endif
#include "wx/menu.h"
#include "wx/layout.h"
#include "wx/dialog.h"
#include "wx/listbox.h"

View File

@@ -36,6 +36,7 @@
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/dcscreen.h"
#include "wx/menu.h"
#endif
#if wxUSE_DRAG_AND_DROP
@@ -1095,7 +1096,6 @@ void wxWindowMGL::Clear()
dc.Clear();
}
#include "wx/menu.h"
void wxWindowMGL::Refresh(bool eraseBack, const wxRect *rect)
{
if ( m_eraseBackground == -1 )

View File

@@ -32,11 +32,11 @@
#include "wx/log.h"
#include "wx/app.h"
#include "wx/utils.h"
#include "wx/menu.h"
#endif
#include "wx/statusbr.h"
#include "wx/toolbar.h"
#include "wx/menu.h"
#include "wx/settings.h"
#include "wx/icon.h"

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: mdi.cpp
// Name: src/motif/mdi.cpp
// Purpose: MDI classes
// Author: Julian Smart
// Modified by:
@@ -18,7 +18,11 @@
#endif
#include "wx/mdi.h"
#ifndef WX_PRECOMP
#include "wx/menu.h"
#endif
#include "wx/settings.h"
#include "wx/icon.h"
@@ -299,7 +303,7 @@ void wxMDIParentFrame::OnMenuHighlight(wxMenuEvent& event)
if (GetStatusBar())
{
if (event.GetMenuId() == -1)
SetStatusText("");
SetStatusText(wxEmptyString);
else
{
wxMenuBar *menuBar = (wxMenuBar*) NULL;
@@ -310,7 +314,7 @@ void wxMDIParentFrame::OnMenuHighlight(wxMenuEvent& event)
if (menuBar)
{
wxString helpString(menuBar->GetHelpString(event.GetMenuId()));
if (helpString != "")
if (!helpString.empty())
SetStatusText(helpString);
}
}

View File

@@ -25,9 +25,8 @@
#ifndef WX_PRECOMP
#include "wx/utils.h"
#include "wx/frame.h"
#endif
#include "wx/menu.h"
#endif
#ifdef __VMS__
#pragma message disable nosimpint

View File

@@ -35,9 +35,9 @@
#include "wx/dc.h"
#include "wx/dcclient.h"
#include "wx/button.h"
#include "wx/menu.h"
#endif
#include "wx/menu.h"
#include "wx/layout.h"
#include "wx/settings.h"
#include "wx/scrolwin.h"

View File

@@ -26,9 +26,10 @@
#if wxUSE_MENUS
#include "wx/menu.h"
#ifndef WX_PRECOMP
#include "wx/frame.h"
#include "wx/menu.h"
#include "wx/utils.h"
#include "wx/intl.h"
#include "wx/log.h"

View File

@@ -26,7 +26,7 @@
#if wxUSE_MENUS
#include "wx/menu.h"
#include "wx/menuitem.h"
#ifndef WX_PRECOMP
#include "wx/font.h"
@@ -37,10 +37,9 @@
#include "wx/accel.h"
#include "wx/string.h"
#include "wx/log.h"
#include "wx/menu.h"
#endif
#include "wx/menuitem.h"
#if wxUSE_ACCEL
#include "wx/accel.h"
#endif // wxUSE_ACCEL
@@ -79,7 +78,7 @@ UINT GetMenuState(HMENU hMenu, UINT id, UINT flags) ;
bool wxMenuItemStreamingCallback( const wxObject *object, wxWriter * , wxPersister * , wxxVariantArray & )
{
const wxMenuItem * mitem = dynamic_cast<const wxMenuItem*>(object) ;
if ( mitem->GetMenu() && !mitem->GetMenu()->GetTitle().IsEmpty() )
if ( mitem->GetMenu() && !mitem->GetMenu()->GetTitle().empty() )
{
// we don't stream out the first two items for menus with a title, they will be reconstructed
if ( mitem->GetMenu()->FindItemByPosition(0) == mitem || mitem->GetMenu()->FindItemByPosition(1) == mitem )

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: menu.cpp
// Name: src/os2/menu.cpp
// Purpose: wxMenu, wxMenuBar, wxMenuItem
// Author: David Webster
// Modified by:
@@ -12,10 +12,11 @@
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#include "wx/menu.h"
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/frame.h"
#include "wx/menu.h"
#include "wx/utils.h"
#include "wx/intl.h"
#include "wx/log.h"
@@ -70,7 +71,7 @@ USHORT wxMenu::m_nextMenuId = 0;
//
void wxMenu::Init()
{
m_bDoBreak = FALSE;
m_bDoBreak = false;
m_nStartRadioGroup = -1;
//
@@ -265,7 +266,7 @@ bool wxMenu::DoInsertOrAppend( wxMenuItem* pItem,
if (m_bDoBreak)
{
rItem.afStyle |= MIS_BREAK;
m_bDoBreak = FALSE;
m_bDoBreak = false;
}
//
@@ -594,10 +595,8 @@ void wxMenu::SetTitle( const wxString& rLabel )
// event processing
// ---------------------------------------------------------------------------
bool wxMenu::OS2Command(
WXUINT WXUNUSED(uParam)
, WXWORD vId
)
bool wxMenu::OS2Command( WXUINT WXUNUSED(uParam),
WXWORD vId )
{
//
// Ignore commands from the menu title
@@ -613,7 +612,7 @@ bool wxMenu::OS2Command(
)
);
}
return TRUE;
return true;
} // end of wxMenu::OS2Command
// ---------------------------------------------------------------------------
@@ -974,19 +973,17 @@ bool wxMenuBar::Insert( size_t nPos,
return true;
} // end of wxMenuBar::Insert
bool wxMenuBar::Append(
wxMenu* pMenu
, const wxString& rsTitle
)
bool wxMenuBar::Append( wxMenu* pMenu,
const wxString& rsTitle )
{
WXHMENU hSubmenu = pMenu ? pMenu->GetHMenu() : 0;
wxCHECK_MSG(hSubmenu, FALSE, wxT("can't append invalid menu to menubar"));
wxCHECK_MSG(hSubmenu, false, wxT("can't append invalid menu to menubar"));
wxString sTitle = wxPMTextToLabel(rsTitle);
if (!wxMenuBarBase::Append(pMenu, sTitle))
return FALSE;
return false;
m_titles.Add(sTitle);
@@ -1005,7 +1002,7 @@ bool wxMenuBar::Append(
#endif // wxUSE_ACCEL
Refresh();
}
return TRUE;
return true;
} // end of wxMenuBar::Append
wxMenu* wxMenuBar::Remove(

View File

@@ -26,9 +26,10 @@
#if wxUSE_MENUS
#include "wx/menu.h"
#ifndef WX_PRECOMP
#include "wx/frame.h"
#include "wx/menu.h"
#include "wx/utils.h"
#include "wx/intl.h"
#include "wx/log.h"

View File

@@ -26,7 +26,7 @@
#if wxUSE_MENUS
#include "wx/menu.h"
#include "wx/menuitem.h"
#ifndef WX_PRECOMP
#include "wx/font.h"
@@ -37,10 +37,9 @@
#include "wx/accel.h"
#include "wx/string.h"
#include "wx/log.h"
#include "wx/menu.h"
#endif
#include "wx/menuitem.h"
#if wxUSE_ACCEL
#include "wx/accel.h"
#endif // wxUSE_ACCEL

View File

@@ -25,10 +25,11 @@
#if wxUSE_MENUS
#include "wx/menu.h"
#ifndef WX_PRECOMP
#include "wx/dynarray.h"
#include "wx/control.h" // for FindAccelIndex()
#include "wx/menu.h"
#include "wx/settings.h"
#include "wx/accel.h"
#include "wx/log.h"

View File

@@ -1,4 +1,5 @@
// Name: univ/themes/metal.cpp
///////////////////////////////////////////////////////////////////////////////
// Name: src/univ/themes/metal.cpp
// Purpose: wxUniversal theme implementing Win32-like LNF
// Author: Vadim Zeitlin, Robert Roebling
// Modified by:
@@ -44,12 +45,12 @@
// for COLOR_* constants
#include "wx/msw/private.h"
#endif
#include "wx/menu.h"
#endif // WX_PRECOMP
#include "wx/notebook.h"
#include "wx/spinbutt.h"
#include "wx/settings.h"
#include "wx/menu.h"
#include "wx/artprov.h"
#include "wx/toplevel.h"

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////////
// Name: univ/themes/win32.cpp
// Name: src/univ/themes/win32.cpp
// Purpose: wxUniversal theme implementing Win32-like LNF
// Author: Vadim Zeitlin
// Modified by:
@@ -48,12 +48,12 @@
// for COLOR_* constants
#include "wx/msw/private.h"
#endif
#include "wx/menu.h"
#endif // WX_PRECOMP
#include "wx/notebook.h"
#include "wx/spinbutt.h"
#include "wx/settings.h"
#include "wx/menu.h"
#include "wx/artprov.h"
#include "wx/toplevel.h"
#include "wx/image.h"

View File

@@ -36,9 +36,9 @@
#include "wx/dc.h"
#include "wx/dcclient.h"
#include "wx/button.h"
#include "wx/menu.h"
#endif
#include "wx/menu.h"
#include "wx/layout.h"
#include "wx/dialog.h"
#include "wx/listbox.h"

View File

@@ -21,9 +21,8 @@
#ifndef WX_PRECOMP
#include "wx/frame.h"
#endif
#include "wx/menu.h"
#endif
IMPLEMENT_DYNAMIC_CLASS(wxMenuXmlHandler, wxXmlResourceHandler)