No longer needed after hrev59533 Change-Id: Iefcc9d1a4d1481a42a9abfb8174f886ff7735a0b Reviewed-on: https://review.haiku-os.org/c/haiku/+/10616 Haiku-Format: Haiku-format Bot <[email protected]> Tested-by: Commit checker robot <[email protected]> Reviewed-by: nephele nephele <[email protected]>
79 lines
1.8 KiB
C++
79 lines
1.8 KiB
C++
/*
|
|
* Copyright (C) 2010 Stephan Aßmus <[email protected]>
|
|
* All rights reserved. Distributed under the terms of the MIT License.
|
|
*/
|
|
|
|
#ifndef TAB_MANAGER_H
|
|
#define TAB_MANAGER_H
|
|
|
|
#include <Messenger.h>
|
|
#include <TabView.h>
|
|
|
|
enum {
|
|
TAB_CHANGED = 'tcha',
|
|
CLOSE_TAB = 'cltb'
|
|
};
|
|
|
|
class BBitmap;
|
|
class BCardLayout;
|
|
class BGroupView;
|
|
class BGroupLayout;
|
|
class BMenu;
|
|
class TabContainerGroup;
|
|
class TabContainerView;
|
|
class TabManagerController;
|
|
|
|
#define INTEGRATE_MENU_INTO_TAB_BAR 0
|
|
|
|
|
|
class TabManager {
|
|
public:
|
|
TabManager(const BMessenger& target,
|
|
BMessage* newTabMessage);
|
|
virtual ~TabManager();
|
|
|
|
void SetTarget(const BMessenger& target);
|
|
const BMessenger& Target() const;
|
|
|
|
#if INTEGRATE_MENU_INTO_TAB_BAR
|
|
BGroupLayout* MenuContainerLayout() const;
|
|
#endif
|
|
|
|
BView* TabGroup() const;
|
|
BView* GetTabContainerView() const;
|
|
BView* ContainerView() const;
|
|
|
|
BView* ViewForTab(int32 tabIndex) const;
|
|
int32 TabForView(const BView* containedView) const;
|
|
bool HasView(const BView* containedView) const;
|
|
|
|
void SelectTab(int32 tabIndex);
|
|
void SelectTab(const BView* containedView);
|
|
int32 SelectedTabIndex() const;
|
|
void CloseTab(int32 tabIndex);
|
|
|
|
void AddTab(BView* view, const char* label,
|
|
int32 index = -1);
|
|
BView* RemoveTab(int32 index);
|
|
int32 CountTabs() const;
|
|
|
|
void SetTabLabel(int32 tabIndex, const char* label);
|
|
const BString& TabLabel(int32);
|
|
void SetTabIcon(const BView* containedView,
|
|
const BBitmap* icon);
|
|
|
|
private:
|
|
#if INTEGRATE_MENU_INTO_TAB_BAR
|
|
BGroupView* fMenuContainer;
|
|
#endif
|
|
TabContainerGroup* fTabContainerGroup;
|
|
TabContainerView* fTabContainerView;
|
|
BView* fContainerView;
|
|
BCardLayout* fCardLayout;
|
|
TabManagerController* fController;
|
|
|
|
BMessenger fTarget;
|
|
};
|
|
|
|
#endif // TAB_MANAGER_H
|