Files
haiku-beta6/headers/private/shared/ToolBar.h
T

59 lines
1.4 KiB
C++
Raw Normal View History

/*
2015-02-11 22:54:48 -05:00
* Copyright 2011-2015, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _TOOLBAR_H
#define _TOOLBAR_H
#include <GroupView.h>
2014-04-28 18:13:20 +02:00
class BButton;
namespace BPrivate {
2015-02-11 22:54:48 -05:00
class BToolBar : public BGroupView {
public:
2015-02-11 22:54:48 -05:00
BToolBar(BRect frame,
orientation ont = B_HORIZONTAL);
2015-02-11 23:06:21 -05:00
BToolBar(orientation ont = B_HORIZONTAL);
2015-02-11 22:54:48 -05:00
virtual ~BToolBar();
virtual void Hide();
void AddAction(uint32 command, BHandler* target,
const BBitmap* icon,
const char* toolTipText = NULL,
2015-07-22 12:16:31 -04:00
const char* text = NULL,
bool lockable = false);
void AddAction(BMessage* message, BHandler* target,
const BBitmap* icon,
const char* toolTipText = NULL,
2015-07-22 12:16:31 -04:00
const char* text = NULL,
bool lockable = false);
void AddSeparator();
void AddGlue();
2015-02-11 23:06:21 -05:00
void AddView(BView* view);
void SetActionEnabled(uint32 command, bool enabled);
void SetActionPressed(uint32 command, bool pressed);
void SetActionVisible(uint32 command, bool visible);
2015-09-02 21:31:09 +02:00
BButton* FindButton(uint32 command) const;
private:
virtual void Pulse();
virtual void FrameResized(float width, float height);
2015-02-11 23:06:21 -05:00
void _Init();
void _HideToolTips() const;
2015-02-11 22:54:48 -05:00
orientation fOrientation;
};
} // namespace BPrivate
2015-02-11 22:54:48 -05:00
using BPrivate::BToolBar;
#endif // _TOOLBAR_H