mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 11:12:45 +00:00 
			
		
		
		
	LibDraw: Put all classes in the Gfx namespace
I started adding things to a Draw namespace, but it somehow felt really wrong seeing Draw::Rect and Draw::Bitmap, etc. So instead, let's rename the library to LibGfx. :^)
This commit is contained in:
		
							parent
							
								
									939a605334
								
							
						
					
					
						commit
						11580babbf
					
				
					 269 changed files with 1513 additions and 1315 deletions
				
			
		|  | @ -29,7 +29,9 @@ | |||
| #include <LibDraw/TextAlignment.h> | ||||
| #include <LibGUI/GFrame.h> | ||||
| 
 | ||||
| class GraphicsBitmap; | ||||
| namespace Gfx { | ||||
| class Bitmap; | ||||
| } | ||||
| 
 | ||||
| namespace GUI { | ||||
| 
 | ||||
|  | @ -41,12 +43,12 @@ public: | |||
|     String text() const { return m_text; } | ||||
|     void set_text(const StringView&); | ||||
| 
 | ||||
|     void set_icon(GraphicsBitmap*); | ||||
|     const GraphicsBitmap* icon() const { return m_icon.ptr(); } | ||||
|     GraphicsBitmap* icon() { return m_icon.ptr(); } | ||||
|     void set_icon(Gfx::Bitmap*); | ||||
|     const Gfx::Bitmap* icon() const { return m_icon.ptr(); } | ||||
|     Gfx::Bitmap* icon() { return m_icon.ptr(); } | ||||
| 
 | ||||
|     TextAlignment text_alignment() const { return m_text_alignment; } | ||||
|     void set_text_alignment(TextAlignment text_alignment) { m_text_alignment = text_alignment; } | ||||
|     Gfx::TextAlignment text_alignment() const { return m_text_alignment; } | ||||
|     void set_text_alignment(Gfx::TextAlignment text_alignment) { m_text_alignment = text_alignment; } | ||||
| 
 | ||||
|     bool should_stretch_icon() const { return m_should_stretch_icon; } | ||||
|     void set_should_stretch_icon(bool b) { m_should_stretch_icon = b; } | ||||
|  | @ -61,8 +63,8 @@ protected: | |||
| 
 | ||||
| private: | ||||
|     String m_text; | ||||
|     RefPtr<GraphicsBitmap> m_icon; | ||||
|     TextAlignment m_text_alignment { TextAlignment::Center }; | ||||
|     RefPtr<Gfx::Bitmap> m_icon; | ||||
|     Gfx::TextAlignment m_text_alignment { Gfx::TextAlignment::Center }; | ||||
|     bool m_should_stretch_icon { false }; | ||||
| }; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling