26 lines
643 B
C++
26 lines
643 B
C++
#pragma once
|
|
|
|
#include <gtkmm/box.h>
|
|
#include <gtkmm/label.h>
|
|
#include <sigc++/connection.h>
|
|
|
|
#include "services/hyprland.hpp"
|
|
|
|
class WorkspaceIndicator : public Gtk::Box {
|
|
public:
|
|
WorkspaceIndicator(HyprlandService &service, int monitorId);
|
|
~WorkspaceIndicator() override;
|
|
|
|
private:
|
|
HyprlandService &service;
|
|
int monitorId;
|
|
sigc::connection workspaceConnection;
|
|
sigc::connection monitorConnection;
|
|
std::map<int, Gtk::Label *> workspaceLabels;
|
|
|
|
void rebuild();
|
|
void on_workspace_update();
|
|
void on_monitor_update();
|
|
void refreshLabel(Gtk::Label *label, HyprlandService::WorkspaceState state);
|
|
};
|