2 * Copyright (c) 2019 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #include <dali-toolkit/dali-toolkit.h>
19 #include <dali/integration-api/scene.h>
20 #include <dali/devel-api/adaptor-framework/window-devel.h>
21 #include <dali/integration-api/debug.h>
24 using namespace Dali::Toolkit;
26 const int MARGIN = 50;
29 // This example shows how to create and display Hello World! using a simple TextActor
31 class WindowExampleController : public ConnectionTracker
34 WindowExampleController(Application &application)
35 : mApplication(application),
36 manual_rotation_flag(false),
41 // Connect to the Application's Init signal
42 mApplication.InitSignal().Connect(this, &WindowExampleController::Create);
43 mApplication.PauseSignal().Connect(this, &WindowExampleController::Pause);
44 mApplication.ResumeSignal().Connect(this, &WindowExampleController::Resume);
45 mApplication.DeviceOrientationChangedSignal().Connect(this, &WindowExampleController::OnDeviceOrientationChanged);
46 mApplication.LowMemorySignal().Connect(this, &WindowExampleController::OnLowMemory);
49 ~WindowExampleController() = default;
51 // The Init signal is received once (only) during the Application lifetime
52 void Create(Application &application)
54 // Get a handle to the window and set the background colour
55 Window window = application.GetWindow();
56 window.AddAuxiliaryHint("wm.policy.win.user.geometry", "1");
57 window.SetBackgroundColor(Color::WHITE);
58 window.SetTransparency(false);
60 window.SetType(WindowType::NOTIFICATION);
61 window.SetNotificationLevel(WindowNotificationLevel::MEDIUM);
63 currentOrientation = Dali::WindowOrientation::PORTRAIT;
65 bChangedOrientation = false;
66 manual_rotation_flag = false;
68 // Add a text label to the window
69 TextLabel textLabel = TextLabel::New("Window Example");
70 textLabel.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER);
71 textLabel.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER);
72 textLabel.SetProperty(Actor::Property::NAME, "WindowExampleLabel");
73 textLabel.SetBackgroundColor(Color::RED);
74 window.Add(textLabel);
76 // Create a clipping control and add a child to it
77 mClipControl = Control::New();
78 mClipControl.SetProperty(Actor::Property::SIZE, Vector2(250.0f, 100.0f));
79 mClipControl.SetProperty(Actor::Property::PARENT_ORIGIN, Vector3(0.75f, 0.75f, 0.5f));
80 mClipControl.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER);
81 mClipControl.SetBackgroundColor(Color::BLUE);
82 window.Add(mClipControl);
84 auto child = Control::New();
85 child.SetProperty(Actor::Property::SIZE, Vector2(100.0f, 250.0f));
86 child.SetProperty(Actor::Property::PARENT_ORIGIN, AnchorPoint::CENTER);
87 child.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER);
88 child.SetBackgroundColor(Color::GREEN);
89 mClipControl.Add(child);
91 // Respond to key events
92 window.KeyEventSignal().Connect(this, &WindowExampleController::OnKeyEvent);
94 // Respond to a click anywhere on the window
95 window.GetRootLayer().TouchedSignal().Connect(this, &WindowExampleController::OnTouch);
96 window.ResizeSignal().Connect(this, &WindowExampleController::OnWindowResized);
97 DevelWindow::MovedSignal(window).Connect(this, &WindowExampleController::OnWindowMoved);
98 DevelWindow::OrientationChangedSignal(window).Connect(this, &WindowExampleController::OnWindowOrientationChanged);
99 DevelWindow::MoveCompletedSignal(window).Connect(this, &WindowExampleController::OnWindowMovedByServer);
100 DevelWindow::ResizeCompletedSignal(window).Connect(this, &WindowExampleController::OnWindowResizedByServer);
103 window.AddAvailableOrientation(Dali::WindowOrientation::PORTRAIT);
104 window.AddAvailableOrientation(Dali::WindowOrientation::LANDSCAPE);
105 window.AddAvailableOrientation(Dali::WindowOrientation::PORTRAIT_INVERSE);
106 window.AddAvailableOrientation(Dali::WindowOrientation::LANDSCAPE_INVERSE);
110 mTimer = Timer::New(50);
111 mTimer.TickSignal().Connect(this, &WindowExampleController::OnTimerTick);
114 void Pause(Application &application)
116 DALI_LOG_RELEASE_INFO("Application is paused..***********************\n");
119 void Resume(Application &application)
121 DALI_LOG_RELEASE_INFO("Application is resumed..***********************\n");
124 void PresentedCallback( int frameId )
126 DALI_LOG_RELEASE_INFO("PresentedCallback: FrameId %d\n",frameId);
129 void OnDeviceOrientationChanged(DeviceStatus::Orientation::Status status)
131 DALI_LOG_RELEASE_INFO("orientation status: %d\n",status);
134 void OnLowMemory(DeviceStatus::Memory::Status status)
136 DALI_LOG_RELEASE_INFO("low memory status: %d\n",status);
141 Dali::Window window = mApplication.GetWindow();
144 if (DevelWindow::IsWindowRotating(window) == true)
147 DALI_LOG_RELEASE_INFO("Window is rotating!!!!\n");
151 DALI_LOG_RELEASE_INFO("Send AckWindowRotation in Timer\n");
152 DevelWindow::SendRotationCompletedAcknowledgement(window);
159 DALI_LOG_RELEASE_INFO("Window is not rotating!!!!\n");
164 void OnWindowMoved(Dali::Window winHandle, Dali::Window::WindowPosition position)
166 DALI_LOG_RELEASE_INFO("OnWindowMoved, x:%d, y:%d, width:%d\n", position.GetX(), position.GetY());
169 void OnWindowMovedByServer(Dali::Window winHandle, Dali::Window::WindowPosition position)
171 DALI_LOG_RELEASE_INFO("OnWindowMovedByServer, x:%d, y:%d, width:%d\n", position.GetX(), position.GetY());
174 void OnWindowResizedByServer(Dali::Window winHandle, Dali::Window::WindowSize size)
176 DALI_LOG_RELEASE_INFO("OnWindowResizedByServer, x:%d, y:%d, width:%d\n", size.GetWidth(), size.GetHeight());
179 void OnWindowOrientationChanged(Dali::Window window, Dali::WindowOrientation orientation)
181 DALI_LOG_RELEASE_INFO("OnWindowOrientationChanged, changed window orientation: %d\n", orientation);
184 void OnWindowResized(Dali::Window winHandle, Dali::Window::WindowSize size)
186 DALI_LOG_RELEASE_INFO("Resize finish %d x heigt %d\n", size.GetWidth(), size.GetHeight());
187 if(bChangedOrientation)
189 if( DevelWindow::GetCurrentOrientation(winHandle) == Dali::WindowOrientation::PORTRAIT)
191 DALI_LOG_RELEASE_INFO("DevelWindow::OnWindowResized, current orientation is Dali::WindowOrientation::PORTRAIT\n");
192 PositionSize newWindowPosition(0, 0, 400, 300);
193 DALI_LOG_RELEASE_INFO("DevelWindow::OnWindowResized, SetPositionSize(720 * 1280)\n");
194 DevelWindow::SetPositionSize(winHandle, newWindowPosition);
196 else if( DevelWindow::GetCurrentOrientation(winHandle) == Dali::WindowOrientation::LANDSCAPE)
198 DALI_LOG_RELEASE_INFO("DevelWindow::OnWindowResized, current orientation is Dali::WindowOrientation::LANDSCAPE\n");
199 PositionSize newWindowPosition(0, 0, 1280, 720);
200 DALI_LOG_RELEASE_INFO("DevelWindow::OnWindowResized, SetPositionSize(1280 * 720)\n");
201 DevelWindow::SetPositionSize(winHandle, newWindowPosition);
203 else if( DevelWindow::GetCurrentOrientation(winHandle) == Dali::WindowOrientation::PORTRAIT_INVERSE)
205 DALI_LOG_RELEASE_INFO("DevelWindow::OnWindowResized, current orientation is Dali::WindowOrientation::PORTRAIT_INVERSE\n");
206 PositionSize newWindowPosition(100, 100, 720, 1280);
207 DALI_LOG_RELEASE_INFO("DevelWindow::OnWindowResized, SetPositionSize(100, 100, 720 * 1280)\n");
208 DevelWindow::SetPositionSize(winHandle, newWindowPosition);
210 else if( DevelWindow::GetCurrentOrientation(winHandle) == Dali::WindowOrientation::LANDSCAPE_INVERSE)
212 DALI_LOG_RELEASE_INFO("DevelWindow::OnWindowResized, current orientation is Dali::WindowOrientation::LANDSCAPE_INVERSE\n");
213 PositionSize newWindowPosition(100, 100, 1280, 720);
214 DALI_LOG_RELEASE_INFO("DevelWindow::OnWindowResized, SetPositionSize(100, 100, 1280 * 720)\n");
215 DevelWindow::SetPositionSize(winHandle, newWindowPosition);
220 bool OnTouch(Actor actor, const TouchEvent &touch)
222 if (touch.GetState(0) == PointState::DOWN)
224 const int local_x = static_cast<int>(touch.GetLocalPosition(0).x);
225 const int local_y = static_cast<int>(touch.GetLocalPosition(0).y);
226 const int global_x = static_cast<int>(touch.GetScreenPosition(0).x);
227 const int global_y = static_cast<int>(touch.GetScreenPosition(0).y);
229 DALI_LOG_RELEASE_INFO("Main Window Touch Event : x:%d, y:%d\n", local_x, local_y);
230 DALI_LOG_RELEASE_INFO("global position: x:%d, y:%d\n", global_x, global_y);
232 Dali::Window window = mApplication.GetWindow();
233 Window::WindowSize windowSize = window.GetSize();
235 DALI_LOG_RELEASE_INFO("window size: w:%d, h:%d\n", windowSize.GetWidth(), windowSize.GetHeight());
236 DevelWindow::EnableFloatingMode(window, true);
238 if ((local_x < MARGIN) && (local_y < MARGIN)) // left top corner
240 DALI_LOG_RELEASE_INFO("RequestResizeToServer: TOP_LEFT\n", local_x, local_y);
241 DevelWindow::RequestResizeToServer(window, WindowResizeDirection::TOP_LEFT);
243 else if ((local_x > (windowSize.GetWidth() - MARGIN)) && (local_y < MARGIN)) // rigth top corner
245 DALI_LOG_RELEASE_INFO("RequestResizeToServer: TOP_RIGHT\n", local_x, local_y);
246 DevelWindow::RequestResizeToServer(window, WindowResizeDirection::TOP_RIGHT);
248 else if ((local_x > MARGIN) && (local_x < (windowSize.GetWidth() - MARGIN)) && (local_y < MARGIN))
250 DALI_LOG_RELEASE_INFO("RequestResizeToServer: TOP\n", local_x, local_y);
251 DevelWindow::RequestResizeToServer(window, WindowResizeDirection::TOP);
253 else if ((local_x < MARGIN) && (local_y < (windowSize.GetHeight() - MARGIN)) && (local_y > MARGIN))
255 DALI_LOG_RELEASE_INFO("RequestResizeToServer: TOP\n", local_x, local_y);
256 DevelWindow::RequestResizeToServer(window, WindowResizeDirection::LEFT);
258 else if ((local_x > (windowSize.GetWidth() - MARGIN)) && (local_y < (windowSize.GetHeight() - MARGIN)) && (local_y > MARGIN))
260 DALI_LOG_RELEASE_INFO("RequestResizeToServer: LEFT\n", local_x, local_y);
261 DevelWindow::RequestResizeToServer(window, WindowResizeDirection::RIGHT);
263 else if ((local_x < MARGIN) && (local_y > (windowSize.GetHeight() - MARGIN))) // left bottom corner
265 DALI_LOG_RELEASE_INFO("RequestResizeToServer: RIGHT\n", local_x, local_y);
266 DevelWindow::RequestResizeToServer(window, WindowResizeDirection::BOTTOM_LEFT);
268 else if ((local_x > (windowSize.GetWidth() - MARGIN)) && (local_y > (windowSize.GetHeight() - MARGIN))) // right bottom corner
270 DALI_LOG_RELEASE_INFO("RequestResizeToServer: BOTTOM_RIGHT\n", local_x, local_y);
271 DevelWindow::RequestResizeToServer(window, WindowResizeDirection::BOTTOM_RIGHT);
275 DALI_LOG_RELEASE_INFO("RequestMoveToServer\n", local_x, local_y);
276 DevelWindow::RequestMoveToServer(window);
282 //////////////////////////////////////////////////////////////////////////
283 // Test Sub Window Resize
285 void CreateSubWindow()
287 mSecondWindow = Window::New(PositionSize(0, 0, 600, 400), "", false);
288 mSecondWindow.SetTransparency(true);
289 mSecondWindow.SetBackgroundColor(Vector4(1.0, 0.3, 0.3, 0.5));
291 mTextLabel2 = TextLabel::New( "Second window" );
292 mTextLabel2.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
293 mTextLabel2.SetProperty( Actor::Property::NAME, "Second Window");
294 mSecondWindow.Add( mTextLabel2 );
296 mSecondWindow.GetRootLayer().TouchedSignal().Connect(this, &WindowExampleController::OnSubWindowTouch);
297 mSecondWindow.ResizeSignal().Connect(this, &WindowExampleController::OnSubWindowResized);
298 DevelWindow::MovedSignal(mSecondWindow).Connect(this, &WindowExampleController::OnSubWindowMoved);
299 DevelWindow::MoveCompletedSignal(mSecondWindow).Connect(this, &WindowExampleController::OnSubWindowMovedByServer);
300 DevelWindow::ResizeCompletedSignal(mSecondWindow).Connect(this, &WindowExampleController::OnSubWindowResizedByServer);
302 mSecondWindow.AddAvailableOrientation( Dali::WindowOrientation::PORTRAIT );
303 mSecondWindow.AddAvailableOrientation( Dali::WindowOrientation::LANDSCAPE );
304 mSecondWindow.AddAvailableOrientation( Dali::WindowOrientation::PORTRAIT_INVERSE );
305 mSecondWindow.AddAvailableOrientation( Dali::WindowOrientation::LANDSCAPE_INVERSE );
306 mSecondWindow.Show();
308 Rect<int> setInputRegion(0, 0, 1920, 1080);
309 //mSecondWindow.SetInputRegion(setInputRegion);
310 DevelWindow::ExcludeInputRegion(mSecondWindow, setInputRegion);
312 Dali::Window window = mApplication.GetWindow();
313 DevelWindow::SetParent(mSecondWindow, window);
316 void OnSubWindowMoved(Dali::Window winHandle, Dali::Window::WindowPosition position)
318 DALI_LOG_RELEASE_INFO("OnWindowMoved, x:%d, y:%d, width:%d\n", position.GetX(), position.GetY());
321 void OnSubWindowResized(Dali::Window winHandle, Dali::Window::WindowSize size)
323 DALI_LOG_RELEASE_INFO("OnSubWindowResized %d x heigt %d\n", size.GetWidth(), size.GetHeight());
326 void OnSubWindowMovedByServer(Dali::Window winHandle, Dali::Window::WindowPosition position)
328 DALI_LOG_RELEASE_INFO("OnWindowMovedByServer, x:%d, y:%d, width:%d\n", position.GetX(), position.GetY());
331 void OnSubWindowResizedByServer(Dali::Window winHandle, Dali::Window::WindowSize size)
333 DALI_LOG_RELEASE_INFO("OnWindowResizedByServer, x:%d, y:%d, width:%d\n", size.GetWidth(), size.GetHeight());
336 bool OnSubWindowTouch(Actor actor, const TouchEvent &touch)
338 if (touch.GetState(0) == PointState::DOWN)
340 const int local_x = static_cast<int>(touch.GetLocalPosition(0).x);
341 const int local_y = static_cast<int>(touch.GetLocalPosition(0).y);
342 const int global_x = static_cast<int>(touch.GetScreenPosition(0).x);
343 const int global_y = static_cast<int>(touch.GetScreenPosition(0).y);
345 DALI_LOG_RELEASE_INFO("SubWindow Touch Event : x:%d, y:%d\n", local_x, local_y);
346 DALI_LOG_RELEASE_INFO("global position: x:%d, y:%d\n", global_x, global_y);
348 Dali::Window window = mSecondWindow;
349 Window::WindowSize windowSize = window.GetSize();
351 DALI_LOG_RELEASE_INFO("window size: w:%d, h:%d\n", windowSize.GetWidth(), windowSize.GetHeight());
352 DevelWindow::EnableFloatingMode(window, true);
354 if ((local_x < MARGIN) && (local_y < MARGIN)) // left top corner
356 DALI_LOG_RELEASE_INFO("RequestResizeToServer: TOP_LEFT\n", local_x, local_y);
357 DevelWindow::RequestResizeToServer(window, WindowResizeDirection::TOP_LEFT);
359 else if ((local_x > (windowSize.GetWidth() - MARGIN)) && (local_y < MARGIN)) // rigth top corner
361 DALI_LOG_RELEASE_INFO("RequestResizeToServer: TOP_RIGHT\n", local_x, local_y);
362 DevelWindow::RequestResizeToServer(window, WindowResizeDirection::TOP_RIGHT);
364 else if ((local_x > MARGIN) && (local_x < (windowSize.GetWidth() - MARGIN)) && (local_y < MARGIN))
366 DALI_LOG_RELEASE_INFO("RequestResizeToServer: TOP\n", local_x, local_y);
367 DevelWindow::RequestResizeToServer(window, WindowResizeDirection::TOP);
369 else if ((local_x < MARGIN) && (local_y < (windowSize.GetHeight() - MARGIN)) && (local_y > MARGIN))
371 DALI_LOG_RELEASE_INFO("RequestResizeToServer: TOP\n", local_x, local_y);
372 DevelWindow::RequestResizeToServer(window, WindowResizeDirection::LEFT);
374 else if ((local_x > (windowSize.GetWidth() - MARGIN)) && (local_y < (windowSize.GetHeight() - MARGIN)) && (local_y > MARGIN))
376 DALI_LOG_RELEASE_INFO("RequestResizeToServer: LEFT\n", local_x, local_y);
377 DevelWindow::RequestResizeToServer(window, WindowResizeDirection::RIGHT);
379 else if ((local_x < MARGIN) && (local_y > (windowSize.GetHeight() - MARGIN))) // left bottom corner
381 DALI_LOG_RELEASE_INFO("RequestResizeToServer: RIGHT\n", local_x, local_y);
382 DevelWindow::RequestResizeToServer(window, WindowResizeDirection::BOTTOM_LEFT);
384 else if ((local_x > (windowSize.GetWidth() - MARGIN)) && (local_y > (windowSize.GetHeight() - MARGIN))) // right bottom corner
386 DALI_LOG_RELEASE_INFO("RequestResizeToServer: BOTTOM_RIGHT\n", local_x, local_y);
387 DevelWindow::RequestResizeToServer(window, WindowResizeDirection::BOTTOM_RIGHT);
391 DALI_LOG_RELEASE_INFO("RequestMoveToServer\n", local_x, local_y);
392 DevelWindow::RequestMoveToServer(window);
398 void OnKeyEvent(const KeyEvent &event)
400 Dali::Window window = mApplication.GetWindow();
401 if (event.GetState() == KeyEvent::DOWN)
403 if (IsKey(event, Dali::DALI_KEY_ESCAPE) || IsKey(event, Dali::DALI_KEY_BACK))
407 else if (event.GetKeyName() == "1")
409 DALI_LOG_RELEASE_INFO("Move/Resize Test ::: window move and resize (10, 10) (600 x 400)\n");
410 PositionSize windowPosition(10, 10, 600, 400);
411 DevelWindow::SetPositionSize(window, windowPosition);
413 else if (event.GetKeyName() == "2")
415 DALI_LOG_RELEASE_INFO("Present Callback Test\n");
417 Dali::Window window = mApplication.GetWindow();
420 window.SetBackgroundColor(Color::WHITE);
425 window.SetBackgroundColor(Color::BLACK);
429 DevelWindow::AddFramePresentedCallback(window, std::unique_ptr<Dali::CallbackBase>(MakeCallback(this, &WindowExampleController::PresentedCallback)), count);
431 else if (event.GetKeyName() == "3")
433 DALI_LOG_RELEASE_INFO("Send AckWindowRotation test\n");
434 if(manual_rotation_flag == true)
438 DALI_LOG_RELEASE_INFO("Send AckWindowRotation in Key Event Callback\n");
439 DevelWindow::SendRotationCompletedAcknowledgement(window);
440 manual_rotation_flag = false;
445 DALI_LOG_RELEASE_INFO("is not Rotating\n");
448 else if (event.GetKeyName() == "4")
450 DALI_LOG_RELEASE_INFO("Set Manual Window Rotation Test\n");
451 if(manual_rotation_flag)
459 DALI_LOG_RELEASE_INFO("call SetNeedsRotationCompletedAcknowledgement with flag %d\n", manual_rotation_flag);
460 DevelWindow::SetNeedsRotationCompletedAcknowledgement(window, manual_rotation_flag);
464 DALI_LOG_RELEASE_INFO("set flag %d\n", manual_rotation_flag);
465 manual_rotation_flag = true;
468 else if (event.GetKeyName() == "5")
470 DALI_LOG_RELEASE_INFO("Window Rotation and Resize test together\n");
471 if(!bChangedOrientation)
473 DALI_LOG_RELEASE_INFO("Both Window Rotation and Resize Test\n");
474 bChangedOrientation = true;
478 DALI_LOG_RELEASE_INFO("Only Window Rotation Test\n");
479 bChangedOrientation = false;
482 else if (event.GetKeyName() == "6")
484 DALI_LOG_RELEASE_INFO("Maximize Test\n");
485 if(DevelWindow::IsMaximized(window))
487 DevelWindow::Maximize(window, false);
491 DevelWindow::Maximize(window, true);
494 else if (event.GetKeyName() == "7")
496 DALI_LOG_RELEASE_INFO("Minimize Test\n");
497 if(DevelWindow::IsMinimized(window))
499 DevelWindow::Minimize(window, false);
503 DevelWindow::Minimize(window, true);
507 else if (event.GetKeyName() == "8")
509 DALI_LOG_RELEASE_INFO("Set/Get Full Screen window Test\n");
510 if(DevelWindow::GetFullScreen(window))
512 DevelWindow::SetFullScreen(window, false);
516 DevelWindow::SetFullScreen(window, true);
520 else if (event.GetKeyName() == "9")
522 DALI_LOG_RELEASE_INFO("Sub window Test\n");
525 else if(event.GetKeyName() == "0")
527 // scissor test for Window Rotation
528 // Toggle the clipping mode on mClippingControl if any other actor by pressing any key
529 DALI_LOG_RELEASE_INFO("Scissor Test\n");
530 ClippingMode::Type currentMode;
531 mClipControl.GetProperty( Actor::Property::CLIPPING_MODE ).Get( currentMode );
532 mClipControl.SetProperty( Actor::Property::CLIPPING_MODE,
533 ( ( currentMode == ClippingMode::DISABLED ) ? ClippingMode::CLIP_TO_BOUNDING_BOX : ClippingMode::DISABLED ) );
539 void OnAuxMessageEvent(const std::string &key, const std::string &value, const Property::Array &options)
543 std::cout << "Key: " << key << std::endl;
546 std::cout << "Value : " << value << std::endl;
549 if (!options.Empty())
551 uint32_t options_count = static_cast<uint32_t>(options.Count());
552 for (uint32_t i(0); i != options_count; ++i)
554 std::cout << "Option : " << options.GetElementAt(i) << std::endl;
561 Application &mApplication;
562 Control mClipControl;
563 bool manual_rotation_flag;
567 TextLabel mTextLabel2;
569 bool bChangedOrientation;
573 Dali::Window mSecondWindow;
574 Dali::WindowOrientation currentOrientation;
576 CallbackBase* mPresentCallback{};
579 int DALI_EXPORT_API main(int argc, char **argv)
581 Application application = Application::New(&argc, &argv);
582 WindowExampleController test(application);
583 application.MainLoop();