summaryrefslogtreecommitdiff
path: root/src/ui/include/modal.hpp
blob: a5ac69b86dffdd0016e6c649a2ccbc495eaf656a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
 * Copyright 2023 jacqueline <me@jacqueline.id.au>
 *
 * SPDX-License-Identifier: GPL-3.0-only
 */

#pragma once

#include <memory>

#include "core/lv_group.h"
#include "core/lv_obj.h"
#include "core/lv_obj_tree.h"
#include "lvgl.h"
#include "widget_top_bar.hpp"

#include "screen.hpp"

namespace ui {

class Modal {
 public:
  Modal(Screen* host);
  virtual ~Modal();

  auto root() -> lv_obj_t* { return root_; }
  auto group() -> lv_group_t* { return group_; }

 protected:
  lv_obj_t* const root_;
  lv_group_t* const group_;

 private:
  Screen* host_;
};

}  // namespace ui