mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:42:44 +00:00 
			
		
		
		
	GTextEditor: Add selected_text() function.
I don't have a clipboard to actually put the copied selection onto yet, so just print the selected text to stdout so we can see what it is.
This commit is contained in:
		
							parent
							
								
									77359a5360
								
							
						
					
					
						commit
						6576ac8332
					
				
					 3 changed files with 33 additions and 5 deletions
				
			
		|  | @ -83,7 +83,7 @@ int main(int argc, char** argv) | |||
|     }); | ||||
| 
 | ||||
|     auto copy_action = GAction::create("Copy", { Mod_Ctrl, Key_C }, GraphicsBitmap::load_from_file(GraphicsBitmap::Format::RGBA32, "/res/icons/copyfile16.rgb", { 16, 16 }), [&] (const GAction&) { | ||||
|         dbgprintf("FIXME: Implement Edit/Copy"); | ||||
|         printf("Copy: \"%s\"\n", text_editor->selected_text().characters()); | ||||
|     }); | ||||
| 
 | ||||
|     auto paste_action = GAction::create("Paste", { Mod_Ctrl, Key_V }, GraphicsBitmap::load_from_file(GraphicsBitmap::Format::RGBA32, "/res/icons/paste16.rgb", { 16, 16 }), [&] (const GAction&) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling