summaryrefslogtreecommitdiff
path: root/src/components/channelscellrenderer.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/channelscellrenderer.hpp')
-rw-r--r--src/components/channelscellrenderer.hpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/components/channelscellrenderer.hpp b/src/components/channelscellrenderer.hpp
index ce8da54..95ff4fe 100644
--- a/src/components/channelscellrenderer.hpp
+++ b/src/components/channelscellrenderer.hpp
@@ -3,6 +3,7 @@
#include <gdkmm/pixbufanimation.h>
#include <glibmm/property.h>
#include <map>
+#include "discord/snowflake.hpp"
enum class RenderType : uint8_t {
Guild,
@@ -20,6 +21,7 @@ public:
virtual ~CellRendererChannels();
Glib::PropertyProxy<RenderType> property_type();
+ Glib::PropertyProxy<uint64_t> property_id();
Glib::PropertyProxy<Glib::ustring> property_name();
Glib::PropertyProxy<Glib::RefPtr<Gdk::Pixbuf>> property_icon();
Glib::PropertyProxy<Glib::RefPtr<Gdk::PixbufAnimation>> property_icon_animation();
@@ -103,11 +105,15 @@ protected:
const Gdk::Rectangle &cell_area,
Gtk::CellRendererState flags);
+ static void cairo_path_rounded_rect(const Cairo::RefPtr<Cairo::Context> &cr, double x, double y, double w, double h, double r);
+ void unread_render_mentions(const Cairo::RefPtr<Cairo::Context> &cr, Gtk::Widget &widget, int mentions, int edge, const Gdk::Rectangle &cell_area);
+
private:
Gtk::CellRendererText m_renderer_text;
- Glib::Property<RenderType> m_property_type; // all
- Glib::Property<Glib::ustring> m_property_name; // all
+ Glib::Property<RenderType> m_property_type; // all
+ Glib::Property<Glib::ustring> m_property_name; // all
+ Glib::Property<uint64_t> m_property_id;
Glib::Property<Glib::RefPtr<Gdk::Pixbuf>> m_property_pixbuf; // guild, dm
Glib::Property<Glib::RefPtr<Gdk::PixbufAnimation>> m_property_pixbuf_animation; // guild
Glib::Property<bool> m_property_expanded; // category