icon.hpp 356 B

123456789101112131415161718192021222324252627
  1. #ifndef _UI_ICON_H_
  2. #define _UI_ICON_H_
  3. #include <gtkmm.h>
  4. namespace ui
  5. {
  6. class IconWidget: public Gtk::Image
  7. {
  8. public:
  9. IconWidget(char const * const name): Gtk::Image()
  10. {
  11. set_from_icon_name(name);
  12. }
  13. };
  14. IconWidget & Icon(char const * const name)
  15. {
  16. auto icon = Gtk::manage(new IconWidget(name));
  17. return *icon;
  18. }
  19. }
  20. #endif