8 #ifndef Guit_Cursor_hpp
9 #define Guit_Cursor_hpp
11 #include <gproplist.hpp>
19 using Shape = uint32_t;
60 unsigned int channel()
const {
return id_;}
70 GPoint
const&
pos()
const;
71 float x()
const {
return pos().x;}
72 float y()
const {
return pos().y;}
79 float wx()
const {
return wpos().x;}
80 float wy()
const {
return wpos().y;}
90 void show(
bool state);
107 Shape
shape()
const {
return shape_;}
122 std::function<
void(
GCursor&)>
const& onDrop,
147 GCursor(
unsigned int channel_id);
151 static void drawCursors(GRenderGraphics&);
158 bool shown_{}, pressed_{}, dragging_{}, nativecursor_{};
159 int32_t derive_{}, maxderive_{}, derivecount_{};
161 gprotect<GColor> color_;
162 gprotect<GWindow> window_;
166 GWindow *fromwin_{}, *targetwin_{};
167 Gadget *fromg_{}, *target_{};
168 std::function<void(GCursor&)> onend_;
169 std::function<bool(GMouseEvent&)> buttonhandler_{};
170 std::function<bool(GMouseEvent&)> movehandler_{};
171 std::function<bool(GMouseEvent&)> wheelhandler_{};
172 std::function<bool(GKeyEvent&)> keyhandler_{};