13.07.2015 Views

Mali GPU User Interface Engine Application Development Guide

Mali GPU User Interface Engine Application Development Guide

Mali GPU User Interface Engine Application Development Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Tutorial on the Lotion <strong>User</strong> <strong>Interface</strong> Classes5.5 The Theme class and blue.cppThe Theme class:• displays the controls and applet icons• manages user input• runs an applet if it is selected• is the parent class for the Blue, Minimal, and Robot classes.There are several themes available for use in the application. This section uses example codefrom lotion\themes\blue.cpp:• Theme namespace and includes• Theme onCreate() method• Theme update methods on page 5-34• Handling user interface events in the Theme class on page 5-36• Theme addApplet() method on page 5-36• Theme createWidgetGroup() method on page 5-37• Theme runApplet() and closeApplet() methods on page 5-37• Theme draw() method on page 5-38.5.5.1 Theme namespace and includesThe Theme methods use the Themes, Lotion, and MDE namespaces. See Example 5-27:Example 5-26 Theme namespace and includes#include "blue.h"#include "../../application.h"#include "blue_widget_group.h"#include "../../transitions/puzzle.h"#include "../../transitions/slime.h"#include "../../transitions/cube.h"using namespace MDE;namespace Lotion{namespace Themes{...}}5.5.2 Theme onCreate() methodExample 5-27 shows the start of the blue.cpp file and the onCreate() method:Example 5-27 Theme onCreate() method...void Blue::onCreate(Widget* w){printf("Blue: Loading shader\n");state = StateBrowsing;ARM DUI 0527A-02a Copyright © 2010 ARM. All rights reserved. 5-32ID070710Non-Confidential - Draft - Beta

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!