2021-10-17 18:08:16 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <gtkmm/box.h>
|
|
|
|
#include <gtkmm/image.h>
|
|
|
|
|
|
|
|
#include "ALabel.hpp"
|
|
|
|
|
|
|
|
namespace waybar {
|
|
|
|
|
|
|
|
class AIconLabel : public ALabel {
|
|
|
|
public:
|
|
|
|
AIconLabel(const Json::Value &config, const std::string &name, const std::string &id,
|
|
|
|
const std::string &format, uint16_t interval = 0, bool ellipsize = false,
|
|
|
|
bool enable_click = false, bool enable_scroll = false);
|
|
|
|
virtual ~AIconLabel() = default;
|
2023-03-02 13:57:07 +00:00
|
|
|
auto update() -> void override;
|
2021-10-17 18:08:16 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
Gtk::Image image_;
|
2022-04-06 06:37:19 +00:00
|
|
|
Gtk::Box box_;
|
2021-10-17 18:08:16 +00:00
|
|
|
|
|
|
|
bool iconEnabled() const;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace waybar
|