]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cocoa/mbarman.h
Remove unused wxLocale::GetUntranslatedString().
[wxWidgets.git] / include / wx / cocoa / mbarman.h
CommitLineData
268bec5a
DE
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/cocoa/mbarman.h
3// Purpose: wxMenuBarManager class
4// Author: David Elliott
5// Modified by:
6// Created: 2003/09/04
268bec5a 7// Copyright: (c) 2003 David Elliott
65571936 8// Licence: wxWindows licence
268bec5a
DE
9///////////////////////////////////////////////////////////////////////////////
10
11#ifndef __WX_COCOA_MBARMAN_H__
12#define __WX_COCOA_MBARMAN_H__
13
14#if wxUSE_MENUS
15
16#include "wx/toplevel.h"
17
f1d04a42
DE
18DECLARE_WXCOCOA_OBJC_CLASS(wxMenuBarManagerObserver);
19
268bec5a
DE
20// ========================================================================
21// wxMenuBarManager
22// ========================================================================
53a2db12 23class WXDLLIMPEXP_CORE wxMenuBarManager : public wxObject
268bec5a
DE
24{
25// ------------------------------------------------------------------------
26// initialization/destruction
27// ------------------------------------------------------------------------
28public:
29 wxMenuBarManager();
30 virtual ~wxMenuBarManager();
31// ------------------------------------------------------------------------
32// Single instance
33// ------------------------------------------------------------------------
34public:
35 static wxMenuBarManager *GetInstance() { return sm_mbarmanInstance; }
36 static void CreateInstance();
37 static void DestroyInstance();
38protected:
39 static wxMenuBarManager *sm_mbarmanInstance;
40// ------------------------------------------------------------------------
41// Implementation
42// ------------------------------------------------------------------------
43public:
44 void SetMainMenuBar(wxMenuBar* menubar);
f1d04a42
DE
45 void WindowDidBecomeKey(NSNotification *notification);
46#if 0
47 void WindowDidResignKey(NSNotification *notification);
48 void WindowDidBecomeMain(NSNotification *notification);
49 void WindowDidResignMain(NSNotification *notification);
50 void WindowWillClose(NSNotification *notification);
51#endif // 0
243f5c2d 52 void UpdateMenuBar();
268bec5a
DE
53protected:
54 void SetMenuBar(wxMenuBar* menubar);
f1d04a42 55 void InstallMenuBarForWindow(wxCocoaNSWindow *win);
268bec5a
DE
56 void InstallMainMenu();
57 WX_NSMenu m_menuApp;
58 WX_NSMenu m_menuServices;
59 WX_NSMenu m_menuWindows;
60 WX_NSMenu m_menuMain;
268bec5a
DE
61 // Is main menu bar the current one
62 bool m_mainMenuBarInstalled;
63 // Main menu (if app provides one)
64 wxMenuBar *m_mainMenuBar;
f1d04a42 65 wxMenuBarManagerObserver *m_observer;
af849107 66 WX_NSWindow m_currentNSWindow;
268bec5a
DE
67};
68
69#endif // wxUSE_MENUS
70#endif // _WX_COCOA_MBARMAN_H_