29 #ifndef Pt_Forms_Cursor_h
30 #define Pt_Forms_Cursor_h
32 #include <Pt/Forms/Api.h>
33 #include <Pt/Gfx/Image.h>
34 #include <Pt/Gfx/Color.h>
44 class PT_FORMS_API Cursor
51 const std::vector<Pt::uint8_t>& andRgb888()
const
56 const std::vector<Pt::uint8_t>& xorRgb888()
const
71 size_t xHotspot()
const
76 size_t yHotspot()
const
81 void setXHotspot(
size_t v)
86 void setYHotspot(
size_t v)
91 void setName(
const std::string& n)
96 const std::string& name()
const
103 return _andMask.empty() || _width == 0 || _height == 0;
115 static const Cursor& defaultCursor();
116 static const Cursor& arrowCursor();
117 static const Cursor& waitCursor();
118 static const Cursor& sizeNWSECursor();
119 static const Cursor& sizeNESWCursor();
120 static const Cursor& sizeWECursor();
121 static const Cursor& sizeNSCursor();
122 static const Cursor& moveCursor();
125 static void fromImage(
const Gfx::Image& image, Cursor& cursor );
126 static void loadCursor(
const char* pngFile,
const Gfx::Color& alphaColor, Cursor& cursor );
127 static void loadCursor( std::istream& pngStream,
const Gfx::Color& alphaColor, Cursor& cursor );
128 static void loadCursor(
const Pt::uint8_t* pngBuffer,
const size_t streamSize,
const Gfx::Color& alphaColor, Cursor& cursor );
131 std::vector<Pt::uint8_t> _andMask;
132 std::vector<Pt::uint8_t> _xorMask;
144 #endif // include guard
uint_type uint8_t
Unsigned 8-bit integer type.
Definition: Types.h:18