1 //-------------------------------------------------------------------- 2 // 3 // BitmapMenuItem.h 4 // 5 // Written by: Owen Smith 6 // 7 //-------------------------------------------------------------------- 8 9 /* 10 Copyright 1999, Be Incorporated. All Rights Reserved. 11 This file may be used under the terms of the Be Sample Code License. 12 */ 13 14 #ifndef _BitmapMenuItem_h 15 #define _BitmapMenuItem_h 16 17 #include <Bitmap.h> 18 #include <MenuItem.h> 19 20 //==================================================================== 21 // CLASS: BitmapMenuItem 22 23 class BitmapMenuItem : public BMenuItem 24 { 25 //---------------------------------------------------------------- 26 // Constructors, destructors, operators 27 28 public: 29 BitmapMenuItem(const char* name, const BBitmap& bitmap, 30 BMessage* message, char shortcut = 0, 31 uint32 modifiers = 0); 32 33 34 //---------------------------------------------------------------- 35 // Virtual member function overrides 36 37 protected: 38 void Draw(void); 39 void GetContentSize(float* width, float* height); 40 41 //---------------------------------------------------------------- 42 // Accessors 43 44 public: 45 void GetBitmapSize(float* width, float* height); 46 47 //---------------------------------------------------------------- 48 // Member variables 49 50 private: 51 BBitmap m_bitmap; 52 }; 53 54 #endif /* _BitmapMenuItem_h */