43 lines
1.3 KiB
C++
43 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include <gtk4-layer-shell/gtk4-layer-shell.h>
|
|
#include <gtkmm.h>
|
|
#include <memory>
|
|
|
|
#include "widgets/clock.hpp"
|
|
#include "widgets/date.hpp"
|
|
#include "widgets/tray.hpp"
|
|
#include "widgets/volumeWidget.hpp"
|
|
#include "widgets/webWidget.hpp"
|
|
#include "widgets/controlCenter/controlCenter.hpp"
|
|
|
|
class Bar : public Gtk::Window {
|
|
public:
|
|
Bar(GdkMonitor *monitor);
|
|
|
|
void addLeftWidget(std::shared_ptr<Gtk::Widget> widget) { left_box.append(*widget); }
|
|
void addCenterWidget(std::shared_ptr<Gtk::Widget> widget) { center_box.append(*widget); }
|
|
void addRightWidget(std::shared_ptr<Gtk::Widget> widget) { right_box.append(*widget); }
|
|
|
|
private:
|
|
Gtk::CenterBox main_box{};
|
|
Gtk::Box left_box{Gtk::Orientation::HORIZONTAL};
|
|
Gtk::Box center_box{Gtk::Orientation::HORIZONTAL};
|
|
Gtk::Box right_box{Gtk::Orientation::HORIZONTAL};
|
|
|
|
Clock clock;
|
|
Date date;
|
|
WebWidget homeAssistant{"\ue88a", "Home Assistant", "https://home.rivercry.com"};
|
|
ControlCenter controlCenter{"\ue88a", "Control Center"};
|
|
|
|
std::shared_ptr<TrayWidget> trayWidget = nullptr;
|
|
std::shared_ptr<VolumeWidget> volumeWidget = nullptr;
|
|
|
|
|
|
void setup_ui();
|
|
void setup_left_box();
|
|
void setup_center_box();
|
|
void setup_right_box();
|
|
void load_css();
|
|
};
|