#ifndef _WX_MENU_H_
#define _WX_MENU_H_
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma interface "menu.h"
-#endif
-
#if wxUSE_ACCEL
#include "wx/accel.h"
#include "wx/dynarray.h"
virtual ~wxMenu();
- // implement base class virtuals
- virtual wxMenuItem* DoAppend(wxMenuItem *item);
- virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item);
- virtual wxMenuItem* DoRemove(wxMenuItem *item);
-
virtual void Break();
virtual void SetTitle(const wxString& title);
- // deprecated functions
-#if wxUSE_MENU_CALLBACK
- wxMenu(const wxString& title, const wxFunction func)
- : wxMenuBase(title)
- {
- Init();
-
- Callback(func);
- }
-#endif // wxUSE_MENU_CALLBACK
-
// implementation only from now on
// -------------------------------
int FindAccel(int id) const;
#endif // wxUSE_ACCEL
+protected:
+ virtual wxMenuItem* DoAppend(wxMenuItem *item);
+ virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item);
+ virtual wxMenuItem* DoRemove(wxMenuItem *item);
+
private:
// common part of all ctors
void Init();
// unused under MSW
wxMenuBar(long style);
// menubar takes ownership of the menus arrays but copies the titles
- wxMenuBar(int n, wxMenu *menus[], const wxString titles[]);
+ wxMenuBar(size_t n, wxMenu *menus[], const wxString titles[], long style = 0);
virtual ~wxMenuBar();
// menubar construction
// get the accel table for all the menus
const wxAcceleratorTable& GetAccelTable() const { return m_accelTable; }
- // 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();
#endif // wxUSE_ACCEL