1 /* 2 * Copyright 2006 - 2010, Haiku, Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef X_TAB_H 6 #define X_TAB_H 7 8 9 #include <Referenceable.h> 10 11 #include "Variable.h" 12 13 14 namespace BALM { 15 16 17 class BALMLayout; 18 19 20 class TabBase { 21 private: 22 TabBase(); 23 virtual ~TabBase(); 24 25 friend class BALMLayout; 26 friend class XTab; 27 friend class YTab; 28 struct BALMLayoutList; 29 30 bool IsInLayout(BALMLayout* layout); 31 bool AddedToLayout(BALMLayout* layout); 32 void LayoutLeaving(BALMLayout* layout); 33 bool IsSuitableFor(BALMLayout* layout); 34 35 BALMLayoutList* fLayouts; 36 }; 37 38 39 /** 40 * Vertical grid line (x-tab). 41 */ 42 class XTab : public Variable, public TabBase, public BReferenceable { 43 public: 44 virtual ~XTab(); 45 46 protected: 47 friend class BALMLayout; 48 XTab(BALMLayout* layout); 49 50 private: 51 uint32 _reserved[2]; 52 }; 53 54 55 class YTab : public Variable, public TabBase, public BReferenceable { 56 public: 57 virtual ~YTab(); 58 59 protected: 60 friend class BALMLayout; 61 YTab(BALMLayout* layout); 62 private: 63 uint32 _reserved[2]; 64 }; 65 66 67 } // namespace BALM 68 69 70 using BALM::XTab; 71 using BALM::YTab; 72 73 typedef BObjectList<XTab> XTabList; 74 typedef BObjectList<YTab> YTabList; 75 76 77 #endif // X_TAB_H 78