Files
MuditaOS/module-gui/gui/widgets/header/Header.hpp
Przemyslaw Brudny df1d1cdfe2 [BH-723] Added ThreeBox and BellBaseLayout
Added ThreeBox template layout type. Applied it to Pure header.
Created BellBaseLayout for most of Bell windows. Modified
SideListView to proper handle new layout with page bar on/off.
2021-08-09 12:56:46 +02:00

43 lines
1.1 KiB
C++

// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
#include <ThreeBox.hpp>
#include <Label.hpp>
#include <Image.hpp>
namespace gui::header
{
enum class BoxSelection
{
Left,
Center,
Right
};
class Header : public HThreeBox<HBox, HBox, HBox>
{
private:
Label *title = nullptr;
Item *createTitle(const UTF8 &text);
void hideOuterBoxes();
void showOuterBoxes();
void addToLeftBox(Item *item);
void addToCenterBox(Item *item);
void addToRightBox(Item *item);
public:
Header(Item *parent, Position x, Position y, Length w, Length h);
void setTitle(const UTF8 &text);
[[nodiscard]] UTF8 getTitle();
void setTitleVisibility(bool visibility);
void navigationIndicatorAdd(Item *item, BoxSelection position);
void navigationIndicatorRemove(BoxSelection position);
[[nodiscard]] bool navigationIndicatorVisible(BoxSelection position);
};
} // namespace gui::header