Files
MuditaOS/module-gui/gui/widgets/SideListView.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.2 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 "ListViewEngine.hpp"
#include "ListItemProvider.hpp"
#include "BoxLayout.hpp"
#include <apps-common/widgets/BarGraph.hpp>
namespace gui
{
enum class PageBarType
{
None,
Round,
};
class SideListView : public Rect, public ListViewEngine
{
protected:
HBarGraph *pageBar = nullptr;
HBox *arrowsOverlay = nullptr;
VBox *bodyOverlay = nullptr;
auto createArrowsOverlay(unsigned int x, unsigned y, unsigned int w, unsigned int h) -> void;
auto createPageBar() -> void;
auto setFocus() -> void override;
auto applyScrollCallbacks() -> void;
public:
SideListView(Item *parent,
unsigned int x,
unsigned int y,
unsigned int w,
unsigned int h,
std::shared_ptr<ListItemProvider> prov,
PageBarType pageBarType = PageBarType::None);
auto onInput(const InputEvent &inputEvent) -> bool override;
};
} /* namespace gui */