mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-26 03:42:38 +00:00 
			
		
		
		
	 1682f0b760
			
		
	
	
		1682f0b760
		
	
	
	
	
		
			
			SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
		
			
				
	
	
		
			42 lines
		
	
	
	
		
			932 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
	
		
			932 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <LibGUI/Widget.h>
 | |
| 
 | |
| namespace GUI {
 | |
| 
 | |
| class Statusbar : public Widget {
 | |
|     C_OBJECT(Statusbar)
 | |
| public:
 | |
|     virtual ~Statusbar() override;
 | |
| 
 | |
|     String text() const;
 | |
|     String text(size_t index) const;
 | |
|     void set_text(String);
 | |
|     void set_text(size_t index, String);
 | |
|     void set_override_text(String);
 | |
|     void set_override_text(size_t index, String);
 | |
| 
 | |
| protected:
 | |
|     explicit Statusbar(int label_count = 1);
 | |
|     virtual void paint_event(PaintEvent&) override;
 | |
|     virtual void resize_event(ResizeEvent&) override;
 | |
| 
 | |
| private:
 | |
|     NonnullRefPtr<Label> create_label();
 | |
|     struct Segment {
 | |
|         NonnullRefPtr<GUI::Label> label;
 | |
|         String text;
 | |
|         String override_text;
 | |
|     };
 | |
|     void update_label(size_t);
 | |
|     Vector<Segment> m_segments;
 | |
|     RefPtr<ResizeCorner> m_corner;
 | |
| };
 | |
| 
 | |
| }
 |