news download themes documentation links










FbTk::Image Class Reference

loads images More...

#include <Image.hh>

List of all members.

Static Public Member Functions

PixmapWithMask * load (const std::string &filename, int screen_num)
 an instance of PixmapWithMask on success, 0 on failure

bool registerType (const std::string &type, ImageBase &base)
void remove (ImageBase &base)
void addSearchPath (const std::string &search_path)
 adds a path to search images from

void removeSearchPath (const std::string &search_path)
 removes a path to search images from

void removeAllSearchPaths ()
 adds a path to search images from


Detailed Description

loads images

Definition at line 37 of file Image.hh.


Member Function Documentation

bool FbTk::Image::registerType const std::string &  type,
ImageBase base
[static]
 

for register file type and imagebase

Returns:
false on failure

Definition at line 83 of file Image.cc.

00083                                                                {
00084 
00085     string ucase_type = StringUtil::toUpper(type);
00086 
00087     // not empty and not this base?
00088     if (s_image_map[ucase_type] != 0 &&
00089         s_image_map[ucase_type] != &base) 
00090         return false;
00091     // already registered?
00092     if (s_image_map[ucase_type] == &base)
00093         return true;
00094 
00095     s_image_map[ucase_type] = &base;
00096 
00097     return true;
00098 }

void FbTk::Image::remove ImageBase base  )  [static]
 

removes a imagebase class from register

Returns:
false on failure

Definition at line 100 of file Image.cc.

00100                                   {
00101     // find and remove all referenses to base
00102     ImageMap::iterator it = s_image_map.begin();
00103     ImageMap::iterator it_end = s_image_map.end();
00104     std::list<std::string> remove_list;
00105     for (; it != it_end; ++it) {
00106         if (it->second == &base)
00107             remove_list.push_back(it->first);
00108     }
00109 
00110     while (!remove_list.empty()) {
00111         s_image_map.erase(remove_list.back());
00112         remove_list.pop_back();
00113     }
00114 }


The documentation for this class was generated from the following files:

Fluxbox CVS-Jan-2003




      



Got comments about the page? Send them to webmaster.
If you have general Fluxbox related questions ask them on our irc channel or mailing lists.

Show Source








Designed by aLEczapKA