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
17class BEntry;
18
19namespace BPrivate {
20	class IconMenuItem;
21}
22
23
24class BookmarkBar: public BMenuBar {
25public:
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
37private:
38	void							_AddItem(ino_t inode, BEntry* entry);
39
40private:
41	node_ref						fNodeRef;
42	std::map<ino_t, BPrivate::IconMenuItem*>	fItemsMap;
43	BMenu*							fOverflowMenu;
44	// True if fOverflowMenu is currently added to BookmarkBar
45	bool							fOverflowMenuAdded;
46};
47
48
49#endif // BOOKMARK_BAR_H
50