mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 16:42:44 +00:00 
			
		
		
		
	 c9e6afe6a8
			
		
	
	
		c9e6afe6a8
		
	
	
	
	
		
			
			This way we can feed it the values if we wanted to change an existing Guide and handle the default as before. That we have to pass a String here is a bit ugly.
		
			
				
	
	
		
			34 lines
		
	
	
	
		
			800 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
	
		
			800 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021, Tobias Christiansen <tobyase@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include "Guide.h"
 | |
| #include "ImageEditor.h"
 | |
| #include <LibGUI/Dialog.h>
 | |
| 
 | |
| namespace PixelPaint {
 | |
| 
 | |
| class EditGuideDialog final : public GUI::Dialog {
 | |
|     C_OBJECT(EditGuideDialog);
 | |
| 
 | |
| public:
 | |
|     String const offset() const { return m_offset; }
 | |
|     Guide::Orientation orientation() const { return m_orientation; }
 | |
| 
 | |
|     Optional<float> offset_as_pixel(ImageEditor const&);
 | |
| 
 | |
| private:
 | |
|     EditGuideDialog(GUI::Window* parent_window, String const& offset = {}, Guide::Orientation orientation = Guide::Orientation::Unset);
 | |
| 
 | |
|     String m_offset;
 | |
|     Guide::Orientation m_orientation;
 | |
| 
 | |
|     bool m_is_horizontal_checked { false };
 | |
|     bool m_is_vertical_checked { false };
 | |
| };
 | |
| 
 | |
| }
 |