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