|
PieDock 1.4.3
|
#include <IconMap.h>
Public Types | |
| typedef std::vector< std::string > | Paths |
Public Member Functions | |
| virtual | ~IconMap () |
| virtual void | addPath (std::string p) |
| virtual const Paths & | getPath () const |
| virtual void | setFileForMissing (std::string f) |
| virtual const std::string & | getFileForMissing () const |
| virtual void | setFileForFiller (std::string f) |
| virtual const std::string & | getFileForFiller () const |
| virtual void | reset () |
| virtual void | addNameAlias (std::string, std::string) |
| virtual void | addClassAlias (std::string, std::string) |
| virtual void | addTitleAlias (std::string, std::string) |
| virtual Icon * | getIcon (std::string, std::string, std::string) |
| virtual Icon * | getIconByName (std::string) |
| virtual Icon * | getIconByClass (std::string) |
| virtual Icon * | getIconByTitle (std::string) |
| virtual Icon * | getMissingIcon (std::string) |
| virtual Icon * | getFillerIcon () |
| virtual Icon * | createIcon (ArgbSurface &, std::string, Icon::Type) |
Protected Types | |
|
typedef std::map< std::string, std::string > | AliasToFile |
|
typedef std::map< std::string, Icon * > | FileToIcon |
Protected Member Functions | |
| virtual void | freeIcons () |
Icon map
| IconMap::~IconMap | ( | ) | [virtual] |
Free resources
References freeIcons().
| void IconMap::addClassAlias | ( | std::string | a, |
| std::string | n | ||
| ) | [virtual] |
| void IconMap::addNameAlias | ( | std::string | a, |
| std::string | n | ||
| ) | [virtual] |
| void IconMap::addTitleAlias | ( | std::string | a, |
| std::string | n | ||
| ) | [virtual] |
| Icon * IconMap::createIcon | ( | ArgbSurface & | s, |
| std::string | n, | ||
| Icon::Type | t | ||
| ) | [virtual] |
Create icon and return it
| s | - ARGB surface for icon |
| n | - resource name of window |
| t | - icon type |
Referenced by getFillerIcon(), getIconByName(), getMissingIcon(), and PieDock::Menu::update().
| void IconMap::freeIcons | ( | ) | [protected, virtual] |
Free icons
Referenced by reset(), and ~IconMap().
| Icon * IconMap::getFillerIcon | ( | ) | [virtual] |
| Icon * IconMap::getIcon | ( | std::string | t, |
| std::string | c, | ||
| std::string | n | ||
| ) | [virtual] |
Return icon for given window properties
| t | - window title |
| c | - resource class |
| n | - resource name |
References getIconByClass(), getIconByName(), and getIconByTitle().
Referenced by PieDock::Menu::update().
| Icon * IconMap::getIconByClass | ( | std::string | c | ) | [virtual] |
Return icon for a window by class
| c | - resource class of window |
References getIconByName().
Referenced by getIcon().
| Icon * IconMap::getIconByName | ( | std::string | n | ) | [virtual] |
Return icon for a window by name
| n | - resource name of window |
References createIcon().
Referenced by getIcon(), getIconByClass(), getIconByTitle(), PieDock::Settings::load(), and PieDock::Menu::update().
| Icon * IconMap::getIconByTitle | ( | std::string | t | ) | [virtual] |
Return icon for a window by window title; this is by far the slowest method and probably prone to error too; use it only as a fallback ! Unfortunately, most Java applications have invalid resource names like "SWT" or the like; to identify those windows there's just one possibility: the window title
| t | - window title (may contain wildcards) |
References getIconByName(), and PieDock::WildcardCompare::match().
Referenced by getIcon().
| Icon * IconMap::getMissingIcon | ( | std::string | n | ) | [virtual] |
Create and return a new icon for missing icons
| n | - resource name of window for which there is no icon |
References createIcon().
Referenced by PieDock::Menu::update().
| void IconMap::reset | ( | ) | [virtual] |
1.7.3