repository_infos: Enable automatic updates on the main Haiku repostiory.
[haiku.git] / src / apps / processcontroller / IconMenuItem.h
blobafcc1e1330a4bad2ff27cf5ba89f872fd87e9821
1 /*
3 IconMenuItem.h
5 ProcessController
6 (c) 2000, Georges-Edouard Berenger, All Rights Reserved.
7 Copyright (C) 2004 beunited.org
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Lesser General Public
11 License as published by the Free Software Foundation; either
12 version 2.1 of the License, or (at your option) any later version.
14 This library is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
19 You should have received a copy of the GNU Lesser General Public
20 License along with this library; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 #ifndef _ICON_MENU_ITEM_H_
25 #define _ICON_MENU_ITEM_H_
27 #include <MenuItem.h>
30 class BBitmap;
33 class IconMenuItem : public BMenuItem {
34 public:
35 IconMenuItem(BBitmap*, const char* title,
36 BMessage*, bool drawText = true, bool purge = false);
38 IconMenuItem(BBitmap*, BMenu*, bool drawText = true,
39 bool purge = false);
41 IconMenuItem(const char* mime, const char* title, BMessage*,
42 bool drawText = true);
44 virtual ~IconMenuItem();
45 virtual void DrawContent();
46 virtual void Highlight(bool isHighlighted);
47 virtual void GetContentSize(float* width, float* height);
49 static int MinHeight();
51 private:
52 void DefaultIcon(const char* mime);
53 void DrawIcon();
55 BBitmap* fIcon;
56 bool fDrawText;
57 bool fPurge;
60 #endif // _ICON_MENU_ITEM_H_