1 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
3 // Copyright (c) 2004, Haiku
5 // This software is part of the Haiku distribution and is covered
6 // by the Haiku license.
9 // File: MethodMenuItem.h
10 // Authors: Jérôme Duval,
12 // Description: Input Server
13 // Created: October 19, 2004
15 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
17 #ifndef METHOD_MENUITEM_H_
18 #define METHOD_MENUITEM_H_
23 #define MENUITEM_ICON_SIZE 16
25 class MethodMenuItem
: public BMenuItem
{
27 MethodMenuItem(int32 cookie
, const char *label
, const uchar
*icon
, BMenu
*subMenu
, BMessenger
&messenger
);
28 MethodMenuItem(int32 cookie
, const char *label
, const uchar
*icon
);
30 virtual ~MethodMenuItem();
32 virtual void DrawContent();
33 virtual void GetContentSize(float *width
, float *height
);
35 void SetName(const char *name
);
36 const char *Name() { return Label(); };
38 void SetIcon(const uchar
*icon
);
39 const uchar
*Icon() { return(uchar
*)fIcon
.Bits(); };
41 int32
Cookie() { return fCookie
; };
45 BMessenger fMessenger
;