1 /* 2 * gnote 3 * 4 * Copyright (C) 2012-2013,2017,2019 Aurimas Cernius 5 * 6 * This program is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation, either version 3 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 20 #include <map> 21 22 #include <gdkmm/pixbuf.h> 23 #include <glibmm/refptr.h> 24 #include <gtkmm/iconinfo.h> 25 26 27 namespace gnote { 28 29 class IconManager 30 { 31 public: 32 static const char *BUG; 33 static const char *EMBLEM_PACKAGE; 34 static const char *FILTER_NOTE_ALL; 35 static const char *FILTER_NOTE_UNFILED; 36 static const char *GNOTE; 37 static const char *NOTE; 38 static const char *NOTE_NEW; 39 static const char *NOTEBOOK; 40 static const char *NOTEBOOK_NEW; 41 static const char *PIN_ACTIVE; 42 static const char *PIN_DOWN; 43 static const char *PIN_UP; 44 static const char *ACTIVE_NOTES; 45 static const char *SPECIAL_NOTES; 46 47 Glib::RefPtr<Gdk::Pixbuf> get_icon(const Glib::ustring &, int); 48 Gtk::IconInfo lookup_icon(const Glib::ustring &, int); 49 private: 50 typedef std::pair<Glib::ustring, int> IconDef; 51 typedef std::map<IconDef, Glib::RefPtr<Gdk::Pixbuf> > IconMap; 52 53 IconMap m_icons; 54 }; 55 56 } 57 58