Files
MuditaOS/module-gui/gui/widgets/PageLayout.hpp
Adam Dobrowolski 1059543931 [BoxLayout] Added PageLayout & BoxLayout fixups
* Fixed Rect to always set maxSize and BoxLayout navigation
* removed commented out focusItem
* Removed redundant handling
* General BoxLayout fixes
2020-01-03 12:54:39 +01:00

30 lines
806 B
C++

#pragma once
#include <BoxLayout.hpp>
namespace gui
{
class PageLayout : public BoxLayout
{
virtual bool tryAddWidget(gui::Item *it) override
{
return BoxLayout::addWidget(it);
}
public:
PageLayout() = default;
virtual ~PageLayout() = default;
PageLayout(Item *parent, const uint32_t &x, const uint32_t &y, const uint32_t &w, const uint32_t &h);
PageLayout(Item *parent, const BoundingBox &box);
VBox *addPage();
virtual bool addWidget(Item *item) override;
/// switch page to page ∈ [0 ... (num of pages -1) )
/// set it's navigation and select first element as selected (in setVisible)
bool switchPage(unsigned int n, bool previous = false);
};
;
} // namespace gui