Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef EV_COCOAMENUBAR_H
00024 #define EV_COCOAMENUBAR_H
00025
00026 #import <Cocoa/Cocoa.h>
00027
00028 #include "ev_CocoaMenu.h"
00029
00030 class AV_View;
00031 class AP_CocoaFrame;
00032 class EV_CocoaMenuBar;
00033
00034 #if 0
00035
00036 #define EV_COCOAMENU_MODSHIFT 0x080
00037 #define EV_COCOAMENU_MODCONTROL 0x100
00038 #define EV_COCOAMENU_MODALTERNATE 0x200
00039 #define EV_COCOAMENU_MODCOMMAND 0x400
00040
00041 struct EV_CocoaCommandKeyRef
00042 {
00043 id target;
00044 SEL action;
00045
00046 XAP_Menu_Id menuid;
00047
00048 UT_uint32 key;
00049 };
00050
00051 @class EV_CocoaPaletteMenuItem;
00052
00053 @interface EV_CocoaMenuDelegate : NSObject
00054 {
00055 EV_CocoaMenuBar * m_MenuBar;
00056
00057 struct EV_CocoaCommandKeyRef m_KeyRef;
00058 }
00059 - (id)initWithMenuBar:(EV_CocoaMenuBar *)menuBar;
00060 - (BOOL)menuHasKeyEquivalent:(NSMenu *)menu forEvent:(NSEvent *)event target:(id *)target action:(SEL *)action;
00061 - (BOOL)queryCommandKey:(char)c withModifierFlags:(unsigned int)modifierFlags;
00062 @end
00063
00064 @interface EV_CocoaDockMenu : NSMenu
00065 {
00066 int m_numberOfFrames;
00067
00068 EV_CocoaPaletteMenuItem * m_pMenuItem_Palette;
00069 EV_CocoaPaletteMenuItem * m_pMenuItem_Preview;
00070 }
00071 -(id)initWithNumberOfFrames:(int)numberOfFrames;
00072 -(void)setMenuItem_Palette:(EV_CocoaPaletteMenuItem *)pMenuItem_Palette;
00073 -(void)setMenuItem_Preview:(EV_CocoaPaletteMenuItem *)pMenuItem_Preview;
00074 -(void)menuNeedsUpdate;
00075 @end
00076
00077 #endif
00078
00079
00080
00081 class EV_CocoaMenuBar : public EV_CocoaMenu
00082 {
00083 public:
00084 EV_CocoaMenuBar(const char * szMenuLayoutName, const char * szMenuLabelSetName);
00085
00086 virtual ~EV_CocoaMenuBar();
00087
00088 #if 0
00089 NSMenu * getMenuBar() const { return m_wMenuBar; }
00090
00091 bool lookupCommandKey (struct EV_CocoaCommandKeyRef * keyRef) const;
00092 void addCommandKey (const struct EV_CocoaCommandKeyRef * keyRef);
00093
00094 static EV_CocoaDockMenu * synthesizeDockMenu(const UT_Vector & vecDocs);
00095 static void releaseDockMenu(EV_CocoaDockMenu * pMenu);
00096 private:
00097 static NSMenuItem * s_pMenuItem_FileNew;
00098 static NSMenuItem * s_pMenuItem_FileOpen;
00099 static EV_CocoaPaletteMenuItem * s_pMenuItem_Palette;
00100 static EV_CocoaPaletteMenuItem * s_pMenuItem_Preview;
00101 protected:
00102 NSMenu * m_wMenuBar;
00103 UT_Vector m_vecKeyRef;
00104 #endif
00105 };
00106
00107 #endif