mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-30 05:42:37 +00:00 
			
		
		
		
	 898e9492f7
			
		
	
	
		898e9492f7
		
	
	
	
	
		
			
			I noticed this was miss-formated when fixing up the clang-format error in a different PR. I just ran `pre-commit run --all-files`
		
			
				
	
	
		
			26 lines
		
	
	
	
		
			615 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
	
		
			615 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include <LibGUI/Application.h>
 | |
| #include <LibGUI/Button.h>
 | |
| #include <LibGUI/MessageBox.h>
 | |
| #include <LibGUI/Window.h>
 | |
| #include <stdio.h>
 | |
| 
 | |
| int main(int argc, char** argv)
 | |
| {
 | |
|     auto app = GUI::Application::construct(argc, argv);
 | |
| 
 | |
|     auto window = GUI::Window::construct();
 | |
|     window->set_title("Hello friends!");
 | |
|     window->resize(200, 100);
 | |
| 
 | |
|     auto button = GUI::Button::construct();
 | |
|     button->set_text("Click me!");
 | |
|     button->on_click = [&](auto) {
 | |
|         GUI::MessageBox::show(window, "Hello friends!", ":^)");
 | |
|     };
 | |
| 
 | |
|     window->set_main_widget(button);
 | |
| 
 | |
|     window->show();
 | |
| 
 | |
|     return app->exec();
 | |
| }
 |