mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 20:42:43 +00:00 
			
		
		
		
	LibGUI+WindowServer: Allow specifying an optional drag bitmap
This bitmap is displayed alongside the dragged text underneath the mouse cursor while dragging. This will be a perfect fit for dragging e.g files around. :^)
This commit is contained in:
		
							parent
							
								
									183ee5847c
								
							
						
					
					
						commit
						f5dfb29607
					
				
					 5 changed files with 36 additions and 6 deletions
				
			
		|  | @ -3,6 +3,7 @@ | |||
| #include <LibCore/CEventLoop.h> | ||||
| #include <LibCore/CObject.h> | ||||
| 
 | ||||
| class GraphicsBitmap; | ||||
| class GWindowServerConnection; | ||||
| 
 | ||||
| class GDragOperation : public CObject { | ||||
|  | @ -17,6 +18,7 @@ public: | |||
|     virtual ~GDragOperation() override; | ||||
| 
 | ||||
|     void set_text(const String& text) { m_text = text; } | ||||
|     void set_bitmap(const GraphicsBitmap* bitmap) { m_bitmap = bitmap; } | ||||
| 
 | ||||
|     Outcome exec(); | ||||
|     Outcome outcome() const { return m_outcome; } | ||||
|  | @ -33,4 +35,5 @@ private: | |||
|     OwnPtr<CEventLoop> m_event_loop; | ||||
|     Outcome m_outcome { Outcome::None }; | ||||
|     String m_text; | ||||
|     RefPtr<GraphicsBitmap> m_bitmap; | ||||
| }; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling