mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-27 14:02:07 +00:00 
			
		
		
		
	 6e19ab2bbc
			
		
	
	
		6e19ab2bbc
		
	
	
	
	
		
			
			We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
		
			
				
	
	
		
			49 lines
		
	
	
	
		
			1.1 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			49 lines
		
	
	
	
		
			1.1 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
 | |
|  * Copyright (c) 2022, the SerenityOS developers.
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <LibGUI/Dialog.h>
 | |
| #include <LibGfx/Font/Font.h>
 | |
| #include <LibGfx/Forward.h>
 | |
| 
 | |
| namespace GUI {
 | |
| 
 | |
| class FontPicker final : public GUI::Dialog {
 | |
|     C_OBJECT(FontPicker);
 | |
| 
 | |
| public:
 | |
|     virtual ~FontPicker() override = default;
 | |
| 
 | |
|     RefPtr<Gfx::Font> font() const { return m_font; }
 | |
|     void set_font(Gfx::Font const*);
 | |
| 
 | |
| private:
 | |
|     FontPicker(Window* parent_window = nullptr, Gfx::Font const* current_font = nullptr, bool fixed_width_only = false);
 | |
| 
 | |
|     void update_font();
 | |
| 
 | |
|     bool const m_fixed_width_only;
 | |
| 
 | |
|     RefPtr<Gfx::Font> m_font;
 | |
| 
 | |
|     RefPtr<ListView> m_family_list_view;
 | |
|     RefPtr<ListView> m_variant_list_view;
 | |
|     RefPtr<ListView> m_size_list_view;
 | |
|     RefPtr<SpinBox> m_size_spin_box;
 | |
|     RefPtr<Label> m_sample_text_label;
 | |
| 
 | |
|     Vector<DeprecatedString> m_families;
 | |
|     Vector<DeprecatedString> m_variants;
 | |
|     Vector<int> m_sizes;
 | |
| 
 | |
|     Optional<DeprecatedString> m_family;
 | |
|     Optional<DeprecatedString> m_variant;
 | |
|     Optional<int> m_size;
 | |
| };
 | |
| 
 | |
| }
 |