/////////////////////////////////////////////////////////////////////////////
-// 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
/////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------
#include "wx/wxprec.h"
+
+#include "wx/menu.h"
+
#ifndef WX_PRECOMP
- #include "wx/menu.h"
#include "wx/log.h"
#endif // WX_PRECOMP
#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 )
#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
#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>
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/frame.h"
+ #include "wx/menu.h"
#endif
-#include "wx/menu.h"
-
#include <gdk/gdkx.h>
#ifdef __WXGTK20__
#include "wx/utils.h"
#include "wx/frame.h"
#include "wx/dcclient.h"
+ #include "wx/menu.h"
#endif
#include "wx/layout.h"
#include "wx/textctrl.h"
#endif
-#include "wx/menu.h"
#include "wx/statusbr.h"
#include "wx/settings.h"
#include "wx/fontutil.h"
#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
#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>
#include "wx/utils.h"
#include "wx/frame.h"
#include "wx/dcclient.h"
+ #include "wx/menu.h"
#endif
#include "wx/layout.h"
#include "wx/textctrl.h"
#endif
-#include "wx/menu.h"
#include "wx/statusbr.h"
#include "wx/settings.h"
#include "wx/fontutil.h"
#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
#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
#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
#include "wx/frame.h"
#include "wx/dc.h"
#include "wx/button.h"
+ #include "wx/menu.h"
#endif
#include "wx/gdicmn.h"
#include "wx/memory.h"
#include "wx/tooltip.h"
#include "wx/textctrl.h"
-#include "wx/menu.h"
#include "wx/docview.h"
#include "wx/filename.h"
#if wxUSE_CHOICE
#include "wx/choice.h"
-#include "wx/menu.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/menu.h"
+#endif
+
#include "wx/mac/uma.h"
extern MenuHandle NewUniqueMenu() ;
#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"
#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__
#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"
#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)
#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"
#include "wx/utils.h"
#include "wx/dc.h"
#include "wx/button.h"
+ #include "wx/menu.h"
#endif
#ifdef __DARWIN__
#include "wx/settings.h"
#include "wx/filefn.h"
#include "wx/sysopt.h"
-#include "wx/menu.h"
#if defined(__BORLANDC__) && !defined(__WIN32__)
#include <alloc.h>
#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"
#include "wx/frame.h"
#include "wx/dc.h"
#include "wx/button.h"
+ #include "wx/menu.h"
#endif
#include "wx/gdicmn.h"
#include "wx/memory.h"
#include "wx/tooltip.h"
#include "wx/textctrl.h"
-#include "wx/menu.h"
#include "wx/docview.h"
#include "wx/filename.h"
#if wxUSE_CHOICE
#include "wx/choice.h"
-#include "wx/menu.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/menu.h"
+#endif
+
#include "wx/mac/uma.h"
IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)
#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)
#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"
#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"
m_clientWindow = NULL;
m_currentChild = NULL;
m_windowMenu = (wxMenu*) NULL;
- m_parentFrameActive = TRUE;
+ m_parentFrameActive = true;
}
bool wxMDIParentFrame::Create(wxWindow *parent,
- wxWindowID id,
- const wxString& title,
- const wxPoint& pos,
- const wxSize& size,
- long style,
- const wxString& name)
+ wxWindowID id,
+ const wxString& title,
+ const wxPoint& pos,
+ const wxSize& size,
+ long style,
+ const wxString& name)
{
m_clientWindow = NULL;
m_currentChild = NULL;
}
wxFrame::Create( parent , id , title , pos , size , style , name ) ;
- m_parentFrameActive = TRUE;
+ m_parentFrameActive = true;
OnCreateClient();
- return TRUE;
+ return true;
}
wxMDIParentFrame::~wxMDIParentFrame()
{
SetName(name);
- if ( id > -1 )
+ if ( id != wxID_ANY )
m_windowId = id;
else
m_windowId = (int)NewControlId();
SetThemeWindowBackground( (WindowRef) m_macWindow , m_macWindowBackgroundTheme , false ) ;
wxModelessWindows.Append(this);
- return FALSE;
+ return false;
}
wxMDIChildFrame::~wxMDIChildFrame()
m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE);
wxModelessWindows.Append(this);
- return TRUE;
+ return true;
}
// Get size *available for subwindows* i.e. excluding menu bar.
#ifndef WX_PRECOMP
#include "wx/app.h"
+ #include "wx/menu.h"
#endif
-#include "wx/menu.h"
-
#include "wx/mac/uma.h"
// ============================================================================
// implementation
#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"
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/dcscreen.h"
+ #include "wx/menu.h"
#endif
#if wxUSE_DRAG_AND_DROP
dc.Clear();
}
-#include "wx/menu.h"
void wxWindowMGL::Refresh(bool eraseBack, const wxRect *rect)
{
if ( m_eraseBackground == -1 )
#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"
/////////////////////////////////////////////////////////////////////////////
-// Name: mdi.cpp
+// Name: src/motif/mdi.cpp
// Purpose: MDI classes
// Author: Julian Smart
// Modified by:
#endif
#include "wx/mdi.h"
-#include "wx/menu.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/menu.h"
+#endif
+
#include "wx/settings.h"
#include "wx/icon.h"
if (GetStatusBar())
{
if (event.GetMenuId() == -1)
- SetStatusText("");
+ SetStatusText(wxEmptyString);
else
{
wxMenuBar *menuBar = (wxMenuBar*) NULL;
if (menuBar)
{
wxString helpString(menuBar->GetHelpString(event.GetMenuId()));
- if (helpString != "")
+ if (!helpString.empty())
SetStatusText(helpString);
}
}
#ifndef WX_PRECOMP
#include "wx/utils.h"
#include "wx/frame.h"
+ #include "wx/menu.h"
#endif
-#include "wx/menu.h"
-
#ifdef __VMS__
#pragma message disable nosimpint
#endif
#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"
#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"
HWND hCommandBar = (HWND) GetToolBar()->GetHWND();
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)
{
TBBUTTON tbButton;
#if wxUSE_MENUS
-#include "wx/menu.h"
+#include "wx/menuitem.h"
#ifndef WX_PRECOMP
#include "wx/font.h"
#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
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 )
/////////////////////////////////////////////////////////////////////////////
-// Name: menu.cpp
+// Name: src/os2/menu.cpp
// Purpose: wxMenu, wxMenuBar, wxMenuItem
// Author: David Webster
// Modified by:
// 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"
//
void wxMenu::Init()
{
- m_bDoBreak = FALSE;
+ m_bDoBreak = false;
m_nStartRadioGroup = -1;
//
if (m_bDoBreak)
{
rItem.afStyle |= MIS_BREAK;
- m_bDoBreak = FALSE;
+ m_bDoBreak = false;
}
//
// event processing
// ---------------------------------------------------------------------------
-bool wxMenu::OS2Command(
- WXUINT WXUNUSED(uParam)
-, WXWORD vId
-)
+bool wxMenu::OS2Command( WXUINT WXUNUSED(uParam),
+ WXWORD vId )
{
//
// Ignore commands from the menu title
)
);
}
- return TRUE;
+ return true;
} // end of wxMenu::OS2Command
// ---------------------------------------------------------------------------
WXHMENU wxMenuBar::Create()
{
- HWND hFrame;
+ HWND hFrame;
if (m_hMenu != 0 )
return m_hMenu;
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;
+ 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))
- return FALSE;
+ return false;
m_titles.Add(sTitle);
#endif // wxUSE_ACCEL
Refresh();
}
- return TRUE;
+ return true;
} // end of wxMenuBar::Append
wxMenu* wxMenuBar::Remove(
#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"
#if wxUSE_MENUS
-#include "wx/menu.h"
+#include "wx/menuitem.h"
#ifndef WX_PRECOMP
#include "wx/font.h"
#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
#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"
-// 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:
// 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"
///////////////////////////////////////////////////////////////////////////////
-// Name: univ/themes/win32.cpp
+// Name: src/univ/themes/win32.cpp
// Purpose: wxUniversal theme implementing Win32-like LNF
// Author: Vadim Zeitlin
// Modified by:
// 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"
#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"
#ifndef WX_PRECOMP
#include "wx/frame.h"
+ #include "wx/menu.h"
#endif
-#include "wx/menu.h"
-
IMPLEMENT_DYNAMIC_CLASS(wxMenuXmlHandler, wxXmlResourceHandler)
wxMenuXmlHandler::wxMenuXmlHandler() :