29 lines
796 B
C++
29 lines
796 B
C++
#pragma once
|
|
|
|
#include <gtkmm/box.h>
|
|
#include <gtkmm/gestureclick.h>
|
|
#include <gtkmm/label.h>
|
|
#include <sigc++/connection.h>
|
|
|
|
#include "services/hyprland.hpp"
|
|
#include "gtkmm/overlay.h"
|
|
|
|
class WorkspaceIndicator : public Gtk::Box {
|
|
public:
|
|
WorkspaceIndicator(int monitorId);
|
|
~WorkspaceIndicator() override;
|
|
|
|
private:
|
|
HyprlandService *service = HyprlandService::getInstance();
|
|
int monitorId;
|
|
sigc::connection workspaceConnection;
|
|
sigc::connection monitorConnection;
|
|
std::map<int, Gtk::Overlay *> workspaceIndicators;
|
|
std::map<int, Glib::RefPtr<Gtk::GestureClick>> workspaceGestures;
|
|
|
|
void rebuild();
|
|
void on_workspace_update();
|
|
void on_monitor_update();
|
|
void refreshLabel(Gtk::Overlay *overlay, const HyprlandService::WorkspaceState &state);
|
|
};
|