/////////////////////////////////////////////////////////////////////////////
-// Name: menu.h
+// Name: wx/os2/menu.h
// Purpose: wxMenu, wxMenuBar classes
// Author: David Webster
// Modified by:
// Created: 10/10/99
-// RCS-ID: $Id$
// Copyright: (c) David Webster
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/list.h" // for "template" list classes
#include "wx/dynarray.h"
- WX_DEFINE_EXPORTED_ARRAY(wxAcceleratorEntry *, wxAcceleratorArray);
+ WX_DEFINE_EXPORTED_ARRAY_PTR(wxAcceleratorEntry *, wxAcceleratorArray);
#endif // wxUSE_ACCEL
-class WXDLLEXPORT wxFrame;
+class WXDLLIMPEXP_FWD_CORE wxFrame;
void wxSetShortCutKey(wxChar* zText);
// Menu
// ----------------------------------------------------------------------------
-class WXDLLEXPORT wxMenu : public wxMenuBase
+class WXDLLIMPEXP_CORE wxMenu : public wxMenuBase
{
public:
//
//
// Implement base class virtuals
//
- virtual bool DoAppend(wxMenuItem* pItem);
- virtual bool DoInsert( size_t nPos
+ virtual wxMenuItem* DoAppend(wxMenuItem* pItem);
+ virtual wxMenuItem* DoInsert( size_t nPos
,wxMenuItem* pItem
);
virtual wxMenuItem* DoRemove(wxMenuItem* pItem);
void EndRadioGroup(void);
//
- // If TRUE, insert a breal before appending the next item
+ // If true, insert a breal before appending the next item
//
- bool m_bDoBreak;
+ bool m_bDoBreak;
//
// The menu handle of this menu
// Menu Bar (a la Windows)
// ----------------------------------------------------------------------------
-class WXDLLEXPORT wxMenuBar : public wxMenuBarBase
+class WXDLLIMPEXP_CORE wxMenuBar : public wxMenuBarBase
{
public:
//
wxMenuBar( int n
,wxMenu* vMenus[]
,const wxString sTitles[]
+ ,long lStyle = 0
);
virtual ~wxMenuBar();
virtual void EnableTop( size_t nPos
,bool bFlag
);
- virtual void SetLabelTop( size_t nPos
+ virtual void SetMenuLabel( size_t nPos
,const wxString& rLabel
);
- virtual wxString GetLabelTop(size_t nPos) const;
-
- //
- // Compatibility: these functions are deprecated
- //
-#if WXWIN_COMPATIBILITY
- void SetEventHandler(wxEvtHandler* pHandler) { m_pEventHandler = pHandler; }
- wxEvtHandler* GetEventHandler(void) { return m_pEventHandler; }
- bool Enabled(int nId) const { return IsEnabled(nId); }
- bool Checked(int nId) const { return IsChecked(nId); }
-#endif // WXWIN_COMPATIBILITY
+ virtual wxString GetMenuLabel(size_t nPos) const;
//
// Implementation from now on
const wxAcceleratorTable& GetAccelTable(void) const { return m_vAccelTable; }
//
- // Update the accel table (must be called after adding/deletign a menu)
+ // Update the accel table (must be called after adding/deleting a menu)
//
void RebuildAccelTable(void);
#endif // wxUSE_ACCEL
//
void Init(void);
-#if WXWIN_COMPATIBILITY
- wxEvtHandler* m_pEventHandler;
-#endif // WXWIN_COMPATIBILITY
-
wxArrayString m_titles;
WXHMENU m_hMenu;