2008-02-25 01:54:05 +00:00
|
|
|
/*
|
2010-09-21 23:31:50 +00:00
|
|
|
* Copyright 2006 - 2010, Haiku, Inc. All rights reserved.
|
2008-02-25 01:54:05 +00:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2008-02-06 10:51:44 +00:00
|
|
|
#ifndef X_TAB_H
|
|
|
|
#define X_TAB_H
|
|
|
|
|
2010-09-22 21:53:32 +00:00
|
|
|
|
2012-02-01 11:19:07 +13:00
|
|
|
#include <Archivable.h>
|
2011-11-30 17:55:36 +13:00
|
|
|
#include <Referenceable.h>
|
2012-01-17 14:28:01 +13:00
|
|
|
|
2008-02-06 10:51:44 +00:00
|
|
|
#include "Variable.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace BALM {
|
2010-09-20 22:47:13 +00:00
|
|
|
|
2008-02-06 10:51:44 +00:00
|
|
|
|
2011-11-30 17:55:36 +13:00
|
|
|
class BALMLayout;
|
|
|
|
|
|
|
|
|
2012-02-01 11:19:07 +13:00
|
|
|
class TabBase : public BArchivable {
|
2012-01-19 16:37:13 +13:00
|
|
|
private:
|
|
|
|
TabBase();
|
2012-02-01 11:19:07 +13:00
|
|
|
TabBase(BMessage* archive);
|
2012-01-19 16:37:13 +13:00
|
|
|
virtual ~TabBase();
|
|
|
|
|
|
|
|
friend class BALMLayout;
|
|
|
|
friend class XTab;
|
|
|
|
friend class YTab;
|
|
|
|
struct BALMLayoutList;
|
|
|
|
|
|
|
|
bool IsInLayout(BALMLayout* layout);
|
|
|
|
bool AddedToLayout(BALMLayout* layout);
|
|
|
|
void LayoutLeaving(BALMLayout* layout);
|
|
|
|
bool IsSuitableFor(BALMLayout* layout);
|
|
|
|
|
|
|
|
BALMLayoutList* fLayouts;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-02-06 10:51:44 +00:00
|
|
|
/**
|
|
|
|
* Vertical grid line (x-tab).
|
|
|
|
*/
|
2012-01-19 16:37:13 +13:00
|
|
|
class XTab : public Variable, public TabBase, public BReferenceable {
|
2010-09-30 01:32:48 +00:00
|
|
|
public:
|
2011-11-30 17:55:36 +13:00
|
|
|
virtual ~XTab();
|
2010-09-30 01:32:48 +00:00
|
|
|
|
2012-02-01 11:19:07 +13:00
|
|
|
static BArchivable* Instantiate(BMessage* archive);
|
2008-02-06 10:51:44 +00:00
|
|
|
protected:
|
2012-01-17 14:28:01 +13:00
|
|
|
friend class BALMLayout;
|
2011-11-30 17:55:36 +13:00
|
|
|
XTab(BALMLayout* layout);
|
2008-02-06 10:51:44 +00:00
|
|
|
|
2011-11-30 17:55:36 +13:00
|
|
|
private:
|
2012-02-01 11:19:07 +13:00
|
|
|
XTab(BMessage* archive);
|
2012-01-17 16:21:32 +13:00
|
|
|
uint32 _reserved[2];
|
2011-11-30 17:55:36 +13:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2012-01-19 16:37:13 +13:00
|
|
|
class YTab : public Variable, public TabBase, public BReferenceable {
|
2008-02-06 10:51:44 +00:00
|
|
|
public:
|
2011-11-30 17:55:36 +13:00
|
|
|
virtual ~YTab();
|
|
|
|
|
2012-02-01 11:19:07 +13:00
|
|
|
static BArchivable* Instantiate(BMessage* archive);
|
2011-11-30 17:55:36 +13:00
|
|
|
protected:
|
2012-01-17 14:28:01 +13:00
|
|
|
friend class BALMLayout;
|
2011-11-30 17:55:36 +13:00
|
|
|
YTab(BALMLayout* layout);
|
|
|
|
private:
|
2012-02-01 11:19:07 +13:00
|
|
|
YTab(BMessage* archive);
|
2012-01-17 16:21:32 +13:00
|
|
|
uint32 _reserved[2];
|
2008-02-06 10:51:44 +00:00
|
|
|
};
|
|
|
|
|
2010-09-30 01:32:48 +00:00
|
|
|
|
2008-02-06 10:51:44 +00:00
|
|
|
} // namespace BALM
|
|
|
|
|
2011-03-14 00:24:12 +00:00
|
|
|
|
2008-02-06 10:51:44 +00:00
|
|
|
using BALM::XTab;
|
2010-09-30 01:32:48 +00:00
|
|
|
using BALM::YTab;
|
2008-02-06 10:51:44 +00:00
|
|
|
|
2011-03-14 00:24:12 +00:00
|
|
|
typedef BObjectList<XTab> XTabList;
|
|
|
|
typedef BObjectList<YTab> YTabList;
|
|
|
|
|
|
|
|
|
2008-02-06 10:51:44 +00:00
|
|
|
#endif // X_TAB_H
|