1/*
2 * Copyright 2003-2007, Haiku. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 *		Jérôme Duval
7 */
8#ifndef DESK_BUTTON_H
9#define DESK_BUTTON_H
10
11
12#include <View.h>
13#include <List.h>
14#include <Entry.h>
15
16
17class DeskButton : public BView {
18	public:
19		DeskButton(BRect frame, entry_ref* ref, const char* name, BList& titleList,
20			BList& actionList, uint32 resizeMask = B_FOLLOW_ALL,
21			uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
22		DeskButton(BMessage* archive);
23		virtual ~DeskButton();
24
25		// archiving overrides
26		static DeskButton* Instantiate(BMessage *data);
27		virtual	status_t Archive(BMessage *data, bool deep = true) const;
28
29		// misc BView overrides
30		virtual void AttachedToWindow();
31		virtual void MouseDown(BPoint);
32		virtual void Draw(BRect updateRect);
33		virtual void MessageReceived(BMessage* message);
34
35	private:
36		BBitmap*	fSegments;
37		entry_ref	fRef;
38		BList 		fActionList, fTitleList;
39};
40
41#endif	// DESK_BUTTON_H
42