2011-03-20 15:53:38 +03:00
|
|
|
/*
|
|
|
|
* Copyright 2011 Stephan Aßmus <superstippi@gmx.de>
|
|
|
|
* All rights reserved. Distributed under the terms of the MIT license.
|
|
|
|
*/
|
|
|
|
#ifndef TOOL_BAR_VIEW_H
|
|
|
|
#define TOOL_BAR_VIEW_H
|
|
|
|
|
|
|
|
#include <GroupView.h>
|
|
|
|
|
|
|
|
|
2014-04-28 20:13:20 +04:00
|
|
|
class BButton;
|
2011-03-20 15:53:38 +03:00
|
|
|
|
|
|
|
|
|
|
|
class ToolBarView : public BGroupView {
|
|
|
|
public:
|
|
|
|
ToolBarView(BRect frame);
|
|
|
|
virtual ~ToolBarView();
|
|
|
|
|
2011-03-21 13:59:10 +03:00
|
|
|
virtual void Hide();
|
|
|
|
|
2011-03-20 15:53:38 +03:00
|
|
|
void AddAction(uint32 command, BHandler* target,
|
|
|
|
const BBitmap* icon,
|
|
|
|
const char* toolTipText = NULL);
|
|
|
|
void AddAction(BMessage* message, BHandler* target,
|
|
|
|
const BBitmap* icon,
|
|
|
|
const char* toolTipText = NULL);
|
|
|
|
void AddSeparator();
|
2011-04-08 18:59:54 +04:00
|
|
|
void AddGlue();
|
2011-03-20 15:53:38 +03:00
|
|
|
|
|
|
|
void SetActionEnabled(uint32 command, bool enabled);
|
|
|
|
void SetActionPressed(uint32 command, bool pressed);
|
2011-04-08 18:59:54 +04:00
|
|
|
void SetActionVisible(uint32 command, bool visible);
|
2011-03-20 15:53:38 +03:00
|
|
|
|
|
|
|
private:
|
2011-03-21 13:59:10 +03:00
|
|
|
virtual void Pulse();
|
|
|
|
virtual void FrameResized(float width, float height);
|
|
|
|
|
2011-03-20 15:53:38 +03:00
|
|
|
void _AddView(BView* view);
|
2014-04-28 20:13:20 +04:00
|
|
|
BButton* _FindButton(uint32 command) const;
|
2011-03-21 13:59:10 +03:00
|
|
|
void _HideToolTips() const;
|
2011-03-20 15:53:38 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TOOL_BAR_VIEW_H
|