refactor and shizz
This commit is contained in:
18
include/components/base/button.hpp
Normal file
18
include/components/base/button.hpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include <gtkmm/button.h>
|
||||
#include "gtkmm/image.h"
|
||||
#include "sigc++/signal.h"
|
||||
|
||||
class Button : public Gtk::Button {
|
||||
public:
|
||||
Button(const std::string label);
|
||||
Button(Gtk::Image &image);
|
||||
|
||||
sigc::signal<void()> onClickedSignal;
|
||||
|
||||
private:
|
||||
void on_clicked() {
|
||||
onClickedSignal.emit();
|
||||
}
|
||||
};
|
||||
@@ -3,10 +3,11 @@
|
||||
#include <gtkmm/button.h>
|
||||
#include <gtkmm/popover.h>
|
||||
#include <string>
|
||||
#include "components/base/button.hpp"
|
||||
|
||||
class Popover : public Gtk::Button {
|
||||
class Popover : public Button {
|
||||
public:
|
||||
Popover(std::string icon, std::string name);
|
||||
Popover(const std::string icon, std::string name);
|
||||
~Popover() override;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
class TodoEntry : public Gtk::Box {
|
||||
public:
|
||||
TodoEntry(int id, std::string text, sigc::signal<void(int)> signal_dismissed, sigc::signal<void(int, std::string)> signal_edited);
|
||||
~TodoEntry() override;
|
||||
|
||||
int get_id() const { return id; }
|
||||
std::string get_text() const { return text; }
|
||||
|
||||
Reference in New Issue
Block a user