xref: /haiku/headers/libs/alm/Tab.h (revision 25a7b01d15612846f332751841da3579db313082)
170e20761SClemens Zeidler /*
270e20761SClemens Zeidler  * Copyright 2006 - 2010, Haiku, Inc. All rights reserved.
370e20761SClemens Zeidler  * Distributed under the terms of the MIT License.
470e20761SClemens Zeidler  */
570e20761SClemens Zeidler #ifndef	X_TAB_H
670e20761SClemens Zeidler #define	X_TAB_H
770e20761SClemens Zeidler 
870e20761SClemens Zeidler 
9*35bf0b5cSAlex Wilson #include <Archivable.h>
1057014d1fSczeidler #include <Referenceable.h>
11a25ffa4fSAlex Wilson 
1270e20761SClemens Zeidler #include "Variable.h"
1370e20761SClemens Zeidler 
1470e20761SClemens Zeidler 
1570e20761SClemens Zeidler namespace BALM {
1670e20761SClemens Zeidler 
1770e20761SClemens Zeidler 
1857014d1fSczeidler class BALMLayout;
1957014d1fSczeidler 
2057014d1fSczeidler 
21*35bf0b5cSAlex Wilson class TabBase : public BArchivable {
2257014d1fSczeidler private:
23708a298eSAlex Wilson 								TabBase();
24*35bf0b5cSAlex Wilson 								TabBase(BMessage* archive);
25708a298eSAlex Wilson 	virtual						~TabBase();
26708a298eSAlex Wilson 
27708a298eSAlex Wilson 			friend class BALMLayout;
28708a298eSAlex Wilson 			friend class XTab;
29708a298eSAlex Wilson 			friend class YTab;
30c761a8a6SAlex Wilson 			struct BALMLayoutList;
31c761a8a6SAlex Wilson 
32c761a8a6SAlex Wilson 			bool				IsInLayout(BALMLayout* layout);
33c761a8a6SAlex Wilson 			bool				AddedToLayout(BALMLayout* layout);
34c761a8a6SAlex Wilson 			void				LayoutLeaving(BALMLayout* layout);
35c761a8a6SAlex Wilson 			bool				IsSuitableFor(BALMLayout* layout);
36c761a8a6SAlex Wilson 
37c761a8a6SAlex Wilson 			BALMLayoutList*		fLayouts;
38708a298eSAlex Wilson };
39324ce285SAlex Wilson 
40708a298eSAlex Wilson 
41708a298eSAlex Wilson /**
42708a298eSAlex Wilson  * Vertical grid line (x-tab).
43708a298eSAlex Wilson  */
44708a298eSAlex Wilson class XTab : public Variable, public TabBase, public BReferenceable {
45708a298eSAlex Wilson public:
46708a298eSAlex Wilson 	virtual						~XTab();
47708a298eSAlex Wilson 
48*35bf0b5cSAlex Wilson 	static 	BArchivable*		Instantiate(BMessage* archive);
49708a298eSAlex Wilson protected:
50708a298eSAlex Wilson 	friend	class				BALMLayout;
51708a298eSAlex Wilson 								XTab(BALMLayout* layout);
52708a298eSAlex Wilson 
53708a298eSAlex Wilson private:
54*35bf0b5cSAlex Wilson 								XTab(BMessage* archive);
55324ce285SAlex Wilson 			uint32				_reserved[2];
5670e20761SClemens Zeidler };
5770e20761SClemens Zeidler 
5870e20761SClemens Zeidler 
59708a298eSAlex Wilson class YTab : public Variable, public TabBase, public BReferenceable {
6070e20761SClemens Zeidler public:
6157014d1fSczeidler 	virtual						~YTab();
6257014d1fSczeidler 
63*35bf0b5cSAlex Wilson 	static 	BArchivable*		Instantiate(BMessage* archive);
6457014d1fSczeidler protected:
65a25ffa4fSAlex Wilson 	friend	class				BALMLayout;
6657014d1fSczeidler 								YTab(BALMLayout* layout);
6757014d1fSczeidler private:
68*35bf0b5cSAlex Wilson 								YTab(BMessage* archive);
69324ce285SAlex Wilson 			uint32				_reserved[2];
7070e20761SClemens Zeidler };
7170e20761SClemens Zeidler 
7270e20761SClemens Zeidler 
7370e20761SClemens Zeidler }	// namespace BALM
7470e20761SClemens Zeidler 
75ef93b55dSClemens Zeidler 
7670e20761SClemens Zeidler using BALM::XTab;
7770e20761SClemens Zeidler using BALM::YTab;
7870e20761SClemens Zeidler 
79ef93b55dSClemens Zeidler typedef BObjectList<XTab> XTabList;
80ef93b55dSClemens Zeidler typedef BObjectList<YTab> YTabList;
81ef93b55dSClemens Zeidler 
82ef93b55dSClemens Zeidler 
8370e20761SClemens Zeidler #endif	// X_TAB_H
84