1 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 2 // 3 // Copyright (c) 2003, OpenBeOS 4 // 5 // This software is part of the OpenBeOS distribution and is covered 6 // by the OpenBeOS license. 7 // 8 // 9 // Program: desklink 10 // Author: Jérôme DUVAL 11 // Description: VolumeControl and link items in Deskbar 12 // Created : October 20, 2003 13 // Modified by: Jérome Duval 14 // 15 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 16 #ifndef DESKBUTTON_H 17 #define DESKBUTTON_H 18 19 #include <View.h> 20 #include <List.h> 21 #include <Entry.h> 22 23 class DeskButton : public BView { 24 public: 25 DeskButton(BRect frame, entry_ref *ref, const char *name, BList &titleList, BList &actionList, 26 uint32 resizeMask = B_FOLLOW_ALL, 27 uint32 flags = B_WILL_DRAW | B_NAVIGABLE); 28 29 DeskButton(BMessage *); 30 // BMessage * based constructor needed to support archiving 31 virtual ~DeskButton(); 32 33 // archiving overrides 34 static DeskButton *Instantiate(BMessage *data); 35 virtual status_t Archive(BMessage *data, bool deep = true) const; 36 37 // misc BView overrides 38 virtual void MouseDown(BPoint); 39 40 virtual void Draw(BRect ); 41 42 virtual void MessageReceived(BMessage *); 43 private: 44 BBitmap * segments; 45 entry_ref ref; 46 BList actionList, titleList; 47 }; 48 49 50 #endif 51