/* * Copyright 2012, Haiku, Inc. All rights reserved. * Copyright 2010, Clemens Zeidler * Distributed under the terms of the MIT License. */ #ifndef ALMGROUP_H #define ALMGROUP_H #include #include // for enum orientation #include #include "Tab.h" class BLayoutItem; class BView; namespace BALM { class BALMLayout; class ALMGroup { public: ALMGroup(BLayoutItem* item); ALMGroup(BView* view); BLayoutItem* LayoutItem() const; BView* View() const; const std::vector& Groups() const; enum orientation Orientation() const; ALMGroup& operator|(const ALMGroup& right); ALMGroup& operator/(const ALMGroup& bottom); void BuildLayout(BALMLayout* layout, XTab* left = NULL, YTab* top = NULL, XTab* right = NULL, YTab* bottom = NULL); private: ALMGroup(); void _Init(BLayoutItem* item, BView* view, enum orientation orien = B_HORIZONTAL); ALMGroup& _AddItem(const ALMGroup& item, enum orientation orien); void _Build(BALMLayout* layout, BReference left, BReference top, BReference right, BReference bottom) const; BLayoutItem* fLayoutItem; BView* fView; std::vector fGroups; enum orientation fOrientation; uint32 _reserved[4]; }; }; using BALM::ALMGroup; #endif