forked from humdingerb/quicklaunch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDeskButton.h
46 lines (37 loc) · 977 Bytes
/
DeskButton.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
* Copyright 2003-2007, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Jérôme Duval
*/
#ifndef DESK_BUTTON_H
#define DESK_BUTTON_H
#include <View.h>
#include <Entry.h>
class DeskButton
:
public BView {
public:
DeskButton(BRect frame, entry_ref* ref, const char* name,
uint32 resizeMask = B_FOLLOW_ALL,
uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
DeskButton(BMessage* archive);
DeskButton();
virtual ~DeskButton();
// archiving overrides
static DeskButton* Instantiate(BMessage* data);
virtual status_t Archive(BMessage* data, bool deep = true) const;
// misc BView overrides
void AboutRequested();
virtual void AttachedToWindow();
virtual void MessageReceived(BMessage* message);
virtual void MouseDown(BPoint);
virtual void Draw(BRect updateRect);
private:
void _GetFavoriteList();
BBitmap* fIcon;
entry_ref fRef;
BList* fFavoriteList;
};
#endif // DESK_BUTTON_H