vfs: check userland buffers before reading them.
[haiku.git] / headers / private / shared / ToolBar.h
blobb5468859ecda3739aa8bb9fdc81ada2d22966ca6
1 /*
2 * Copyright 2011-2015, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _TOOLBAR_H
6 #define _TOOLBAR_H
8 #include <GroupView.h>
11 class BButton;
13 namespace BPrivate {
15 class BToolBar : public BGroupView {
16 public:
17 BToolBar(BRect frame,
18 orientation ont = B_HORIZONTAL);
19 BToolBar(orientation ont = B_HORIZONTAL);
20 virtual ~BToolBar();
22 virtual void Hide();
24 void AddAction(uint32 command, BHandler* target,
25 const BBitmap* icon,
26 const char* toolTipText = NULL,
27 const char* text = NULL,
28 bool lockable = false);
29 void AddAction(BMessage* message, BHandler* target,
30 const BBitmap* icon,
31 const char* toolTipText = NULL,
32 const char* text = NULL,
33 bool lockable = false);
34 void AddSeparator();
35 void AddGlue();
36 void AddView(BView* view);
38 void SetActionEnabled(uint32 command, bool enabled);
39 void SetActionPressed(uint32 command, bool pressed);
40 void SetActionVisible(uint32 command, bool visible);
42 BButton* FindButton(uint32 command) const;
44 private:
45 virtual void Pulse();
46 virtual void FrameResized(float width, float height);
48 void _Init();
49 void _HideToolTips() const;
51 orientation fOrientation;
54 } // namespace BPrivate
56 using BPrivate::BToolBar;
58 #endif // _TOOLBAR_H