ToolBarView: rename to BToolbar and move to libshared.
Also adjust ShowImage for this, it's the only thing that's using ToolBarView right now. Signed-off-by: Jessica Hamilton <[email protected]>
This commit is contained in:
committed by
Jessica Hamilton
parent
361f5a857f
commit
6d93638b37
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2011 Stephan Aßmus <[email protected]>
|
||||
* All rights reserved. Distributed under the terms of the MIT license.
|
||||
*/
|
||||
#ifndef _TOOLBAR_H
|
||||
#define _TOOLBAR_H
|
||||
|
||||
#include <GroupView.h>
|
||||
|
||||
|
||||
class BButton;
|
||||
|
||||
|
||||
class BToolbar : public BGroupView {
|
||||
public:
|
||||
BToolbar(BRect frame);
|
||||
virtual ~BToolbar();
|
||||
|
||||
virtual void Hide();
|
||||
|
||||
void AddAction(uint32 command, BHandler* target,
|
||||
const BBitmap* icon,
|
||||
const char* toolTipText = NULL,
|
||||
bool lockable = false);
|
||||
void AddAction(BMessage* message, BHandler* target,
|
||||
const BBitmap* icon,
|
||||
const char* toolTipText = NULL,
|
||||
bool lockable = false);
|
||||
void AddSeparator();
|
||||
void AddGlue();
|
||||
|
||||
void SetActionEnabled(uint32 command, bool enabled);
|
||||
void SetActionPressed(uint32 command, bool pressed);
|
||||
void SetActionVisible(uint32 command, bool visible);
|
||||
|
||||
private:
|
||||
virtual void Pulse();
|
||||
virtual void FrameResized(float width, float height);
|
||||
|
||||
void _AddView(BView* view);
|
||||
BButton* _FindButton(uint32 command) const;
|
||||
void _HideToolTips() const;
|
||||
};
|
||||
|
||||
#endif // _TOOLBAR_H
|
||||
Reference in New Issue
Block a user