1 /* 2 * Copyright 2014, Adrien Destugues <pulkomandy@pulkomandy.tk>. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef BOOKMARK_BAR_H 6 #define BOOKMARK_BAR_H 7 8 9 #include <map> 10 11 #include <MenuBar.h> 12 #include <Node.h> 13 #include <NodeMonitor.h> 14 #include <Size.h> 15 16 17 class BEntry; 18 19 namespace BPrivate { 20 class IconMenuItem; 21 } 22 23 24 class BookmarkBar: public BMenuBar { 25 public: 26 BookmarkBar(const char* title, 27 BHandler* target, 28 const entry_ref* navDir); 29 ~BookmarkBar(); 30 31 void AttachedToWindow(); 32 void MessageReceived(BMessage* message); 33 34 void FrameResized(float width, float height); 35 BSize MinSize(); 36 37 private: 38 void _AddItem(ino_t inode, BEntry* entry); 39 40 private: 41 node_ref fNodeRef; 42 std::map<ino_t, BPrivate::IconMenuItem*> fItemsMap; 43 BMenu* fOverflowMenu; 44 }; 45 46 47 #endif // BOOKMARK_BAR_H 48