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 // Purpose: wxMenu and wxMenuBar implementation
// Author: David Elliott // Author: David Elliott
// Modified by: // Modified by:
// Created: 2002/12/09 // Created: 2002/12/09
// RCS-ID: $Id: // RCS-ID: $Id$
// Copyright: (c) 2002 David Elliott // Copyright: (c) 2002 David Elliott
// Licence: wxWidgets licence // Licence: wxWidgets licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -18,8 +18,10 @@
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/menu.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/menu.h"
#include "wx/log.h" #include "wx/log.h"
#endif // WX_PRECOMP #endif // WX_PRECOMP

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -26,9 +26,10 @@
#if wxUSE_MENUS #if wxUSE_MENUS
#include "wx/menu.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/menu.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"
@@ -875,7 +876,7 @@ WXHMENU wxMenuBar::Create()
HWND hCommandBar = (HWND) GetToolBar()->GetHWND(); HWND hCommandBar = (HWND) GetToolBar()->GetHWND();
HMENU hMenu = (HMENU)::SendMessage(hCommandBar, SHCMBM_GETMENU, (WPARAM)0, (LPARAM)0); HMENU hMenu = (HMENU)::SendMessage(hCommandBar, SHCMBM_GETMENU, (WPARAM)0, (LPARAM)0);
// hMenu may be zero on Windows Mobile 5. So add the menus anyway. // hMenu may be zero on Windows Mobile 5. So add the menus anyway.
if (1) // (hMenu) if (1) // (hMenu)
{ {
TBBUTTON tbButton; TBBUTTON tbButton;

View File

@@ -26,7 +26,7 @@
#if wxUSE_MENUS #if wxUSE_MENUS
#include "wx/menu.h" #include "wx/menuitem.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/font.h" #include "wx/font.h"
@@ -37,10 +37,9 @@
#include "wx/accel.h" #include "wx/accel.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/menu.h"
#endif #endif
#include "wx/menuitem.h"
#if wxUSE_ACCEL #if wxUSE_ACCEL
#include "wx/accel.h" #include "wx/accel.h"
#endif // wxUSE_ACCEL #endif // wxUSE_ACCEL
@@ -79,7 +78,7 @@ UINT GetMenuState(HMENU hMenu, UINT id, UINT flags) ;
bool wxMenuItemStreamingCallback( const wxObject *object, wxWriter * , wxPersister * , wxxVariantArray & ) bool wxMenuItemStreamingCallback( const wxObject *object, wxWriter * , wxPersister * , wxxVariantArray & )
{ {
const wxMenuItem * mitem = dynamic_cast<const wxMenuItem*>(object) ; 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 // 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 ) 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 // Purpose: wxMenu, wxMenuBar, wxMenuItem
// Author: David Webster // Author: David Webster
// Modified by: // Modified by:
@@ -12,10 +12,11 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/menu.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/app.h" #include "wx/app.h"
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/menu.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"
@@ -70,7 +71,7 @@ USHORT wxMenu::m_nextMenuId = 0;
// //
void wxMenu::Init() void wxMenu::Init()
{ {
m_bDoBreak = FALSE; m_bDoBreak = false;
m_nStartRadioGroup = -1; m_nStartRadioGroup = -1;
// //
@@ -265,7 +266,7 @@ bool wxMenu::DoInsertOrAppend( wxMenuItem* pItem,
if (m_bDoBreak) if (m_bDoBreak)
{ {
rItem.afStyle |= MIS_BREAK; rItem.afStyle |= MIS_BREAK;
m_bDoBreak = FALSE; m_bDoBreak = false;
} }
// //
@@ -594,10 +595,8 @@ void wxMenu::SetTitle( const wxString& rLabel )
// event processing // event processing
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
bool wxMenu::OS2Command( bool wxMenu::OS2Command( WXUINT WXUNUSED(uParam),
WXUINT WXUNUSED(uParam) WXWORD vId )
, WXWORD vId
)
{ {
// //
// Ignore commands from the menu title // Ignore commands from the menu title
@@ -613,7 +612,7 @@ bool wxMenu::OS2Command(
) )
); );
} }
return TRUE; return true;
} // end of wxMenu::OS2Command } // end of wxMenu::OS2Command
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
@@ -738,7 +737,7 @@ void wxMenuBar::Refresh()
WXHMENU wxMenuBar::Create() WXHMENU wxMenuBar::Create()
{ {
HWND hFrame; HWND hFrame;
if (m_hMenu != 0 ) if (m_hMenu != 0 )
return m_hMenu; return m_hMenu;
@@ -974,19 +973,17 @@ bool wxMenuBar::Insert( size_t nPos,
return true; return true;
} // end of wxMenuBar::Insert } // end of wxMenuBar::Insert
bool wxMenuBar::Append( bool wxMenuBar::Append( wxMenu* pMenu,
wxMenu* pMenu const wxString& rsTitle )
, const wxString& rsTitle
)
{ {
WXHMENU hSubmenu = pMenu ? pMenu->GetHMenu() : 0; 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); wxString sTitle = wxPMTextToLabel(rsTitle);
if (!wxMenuBarBase::Append(pMenu, sTitle)) if (!wxMenuBarBase::Append(pMenu, sTitle))
return FALSE; return false;
m_titles.Add(sTitle); m_titles.Add(sTitle);
@@ -1005,7 +1002,7 @@ bool wxMenuBar::Append(
#endif // wxUSE_ACCEL #endif // wxUSE_ACCEL
Refresh(); Refresh();
} }
return TRUE; return true;
} // end of wxMenuBar::Append } // end of wxMenuBar::Append
wxMenu* wxMenuBar::Remove( wxMenu* wxMenuBar::Remove(

View File

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

View File

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

View File

@@ -25,10 +25,11 @@
#if wxUSE_MENUS #if wxUSE_MENUS
#include "wx/menu.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/dynarray.h" #include "wx/dynarray.h"
#include "wx/control.h" // for FindAccelIndex() #include "wx/control.h" // for FindAccelIndex()
#include "wx/menu.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/accel.h" #include "wx/accel.h"
#include "wx/log.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 // Purpose: wxUniversal theme implementing Win32-like LNF
// Author: Vadim Zeitlin, Robert Roebling // Author: Vadim Zeitlin, Robert Roebling
// Modified by: // Modified by:
@@ -44,12 +45,12 @@
// for COLOR_* constants // for COLOR_* constants
#include "wx/msw/private.h" #include "wx/msw/private.h"
#endif #endif
#include "wx/menu.h"
#endif // WX_PRECOMP #endif // WX_PRECOMP
#include "wx/notebook.h" #include "wx/notebook.h"
#include "wx/spinbutt.h" #include "wx/spinbutt.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/menu.h"
#include "wx/artprov.h" #include "wx/artprov.h"
#include "wx/toplevel.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 // Purpose: wxUniversal theme implementing Win32-like LNF
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
@@ -48,12 +48,12 @@
// for COLOR_* constants // for COLOR_* constants
#include "wx/msw/private.h" #include "wx/msw/private.h"
#endif #endif
#include "wx/menu.h"
#endif // WX_PRECOMP #endif // WX_PRECOMP
#include "wx/notebook.h" #include "wx/notebook.h"
#include "wx/spinbutt.h" #include "wx/spinbutt.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/menu.h"
#include "wx/artprov.h" #include "wx/artprov.h"
#include "wx/toplevel.h" #include "wx/toplevel.h"
#include "wx/image.h" #include "wx/image.h"

View File

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

View File

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