summaryrefslogtreecommitdiff
path: root/components/cellrendererpixbufanimation.hpp
diff options
context:
space:
mode:
authorDylam De La Torre <DyXel04@gmail.com>2021-11-23 05:21:56 +0100
committerGitHub <noreply@github.com>2021-11-23 04:21:56 +0000
commita51a54bc5979a2491f152abc47ad54e6b63f27c8 (patch)
treece67092b2f6df366033a65a6111e4650866766b2 /components/cellrendererpixbufanimation.hpp
parentd88079000a79e6bcbe51c5a2868d57b303b5fcb6 (diff)
downloadabaddon-portaudio-a51a54bc5979a2491f152abc47ad54e6b63f27c8.tar.gz
abaddon-portaudio-a51a54bc5979a2491f152abc47ad54e6b63f27c8.zip
Restructure source and resource files (#46)
importantly, res is now res/res and css is now res/css
Diffstat (limited to 'components/cellrendererpixbufanimation.hpp')
-rw-r--r--components/cellrendererpixbufanimation.hpp41
1 files changed, 0 insertions, 41 deletions
diff --git a/components/cellrendererpixbufanimation.hpp b/components/cellrendererpixbufanimation.hpp
deleted file mode 100644
index f47e928..0000000
--- a/components/cellrendererpixbufanimation.hpp
+++ /dev/null
@@ -1,41 +0,0 @@
-#pragma once
-#include <gtkmm.h>
-#include <unordered_map>
-
-// handles both static and animated
-class CellRendererPixbufAnimation : public Gtk::CellRenderer {
-public:
- CellRendererPixbufAnimation();
- virtual ~CellRendererPixbufAnimation();
-
- Glib::PropertyProxy<Glib::RefPtr<Gdk::Pixbuf>> property_pixbuf();
- Glib::PropertyProxy<Glib::RefPtr<Gdk::PixbufAnimation>> property_pixbuf_animation();
-
-protected:
- void get_preferred_width_vfunc(Gtk::Widget &widget, int &minimum_width, int &natural_width) const override;
-
- void get_preferred_width_for_height_vfunc(Gtk::Widget &widget, int height, int &minimum_width, int &natural_width) const override;
-
- void get_preferred_height_vfunc(Gtk::Widget &widget, int &minimum_height, int &natural_height) const override;
-
- void get_preferred_height_for_width_vfunc(Gtk::Widget &widget, int width, int &minimum_height, int &natural_height) const override;
-
- void render_vfunc(const Cairo::RefPtr<Cairo::Context> &cr,
- Gtk::Widget &widget,
- const Gdk::Rectangle &background_area,
- const Gdk::Rectangle &cell_area,
- Gtk::CellRendererState flag) override;
-
-private:
- Glib::Property<Glib::RefPtr<Gdk::Pixbuf>> m_property_pixbuf;
- Glib::Property<Glib::RefPtr<Gdk::PixbufAnimation>> m_property_pixbuf_animation;
- /* one cellrenderer is used for every animation and i dont know how to
- store data per-pixbuf (in this case the iter) so this little map thing will have to do
- i would try set_data on the pixbuf but i dont know if that will cause memory leaks
- this would mean if a row's pixbuf animation is changed more than once then it wont be released immediately
- but thats not a problem for me in this case
-
- unordered_map doesnt compile cuz theres no hash overload, i guess
- */
- std::map<Glib::RefPtr<Gdk::PixbufAnimation>, Glib::RefPtr<Gdk::PixbufAnimationIter>> m_pixbuf_animation_iters;
-};