00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _upix_hpp_
00022 #define _upix_hpp_
00023
00024 #include <ubit/uima.hpp>
00025 namespace ubit {
00026
00027
00033 class UPix: public UIma {
00034 public:
00035 UBIT_DATA_ELEMENT_CLASS(UPix,UIma)
00036
00037 static UPix
00038 folder, ofolder, doc, diskette, plus, minus, ellipsis, rball,
00039 select, edit, cross, check, zoom, undo, stop, question, hslider, vslider,
00040 left, right, up, down, leftarrow, rightarrow, uparrow, downarrow,
00041 bigFolder, bigDoc, bigText, bigIma, bigUp, bigDown, bigLeft, bigRight,
00042 ray, eyes, windows, book, colors, metal, velin;
00050 UPix(const UStr& filename, bool load_now = false);
00051 UPix(const char* filename = null, bool load_now = false);
00052 UPix(const char** xpm_data, bool load_now = false);
00060 UPix(const char** xpm_data, UMask);
00062
00063 friend UPix& upix(const UStr& filename) {return *new UPix(filename);}
00064 friend UPix& upix(const char* filename) {return *new UPix(filename);}
00065 friend UPix& upix(const char** xpm_data) {return *new UPix(xpm_data);}
00067
00068 virtual ~UPix();
00069
00070
00071
00072
00073 std::vector<UNatPix*>& getNatPixs() const {return natpixs;}
00074
00075
00076 virtual UNatPix* getOrCreatePix(UNatDisp*, float xyscale) const;
00077
00078 #ifndef NO_DOC
00079 virtual void cleanCache();
00080 virtual void getSize(UContext&, int& w, int& h) const;
00081 virtual void paint(UGraph&, UContext&, const URegion&) const;
00082 #endif
00083
00084 private:
00085 mutable std::vector<UNatPix*> natpixs;
00086 };
00087 }
00088 #endif
00089
00090