mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 21:12:43 +00:00 
			
		
		
		
	 cbd28c9110
			
		
	
	
		cbd28c9110
		
	
	
	
	
		
			
			Allow the user to highlight sections of the edited document, giving them arbitrary background colors. These annotations can be created from a selection, or by manually specifying the start and end offsets. Annotations can be edited or deleted by right-clicking them. Any color can be used for the background. Dark colors automatically make the text white for easier readability. When creating a new annotation, we use whatever color the user last picked as this is slightly more likely to be the one they want. Icons contributed by Cubic Love. Co-authored-by: Cubic Love <7754483+cubiclove@users.noreply.github.com>
		
			
				
	
	
		
			23 lines
		
	
	
	
		
			455 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
	
		
			455 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2024, Sam Atkins <atkinssj@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <LibGUI/Widget.h>
 | |
| 
 | |
| namespace HexEditor {
 | |
| 
 | |
| class EditAnnotationWidget : public GUI::Widget {
 | |
|     C_OBJECT_ABSTRACT(GoToOffsetWidget)
 | |
| public:
 | |
|     static ErrorOr<NonnullRefPtr<EditAnnotationWidget>> try_create();
 | |
|     virtual ~EditAnnotationWidget() override = default;
 | |
| 
 | |
| private:
 | |
|     EditAnnotationWidget() = default;
 | |
| };
 | |
| 
 | |
| }
 |