1/* 2 * Copyright 2000, Georges-Edouard Berenger. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5#ifndef _ICON_MENU_ITEM_H_ 6#define _ICON_MENU_ITEM_H_ 7 8#include <MenuItem.h> 9 10 11class BBitmap; 12 13 14class IconMenuItem : public BMenuItem { 15 public: 16 IconMenuItem(BBitmap*, const char* title, 17 BMessage*, bool drawText = true, bool purge = false); 18 IconMenuItem(BBitmap*, BMenu*, bool drawText = true, 19 bool purge = false); 20 virtual ~IconMenuItem(); 21 22 void Reset(BBitmap*, bool purge = false); 23 24 virtual void DrawContent(); 25 virtual void Highlight(bool isHighlighted); 26 virtual void GetContentSize(float* width, float* height); 27 28 protected: 29 void DrawIcon(); 30 31 private: 32 BBitmap* fIcon; 33 bool fDrawText; 34 bool fPurge; 35}; 36 37#endif // _ICON_MENU_ITEM_H_ 38