## Events

Most GUI applications are event driven. Control flow in an event driven application is determined by user actions and system generated events.

#### User Initiated Events

Symbian OS handles the top level routing for all events. User initiated events are sent to the application which has focus at the time they occur. It is up to the application to determine which element should receive the event.

The UI Designer simplifies the work you must do to implement event handling within your application. It sets up shell methods that will be invoked when an object's default event occurs. It also provides an Events View tool to help you add the less commonly used events and manage all events.

Generally you must write code to respond to the events that are generated when a user interacts with an interface element in your application. The code generated by the UI Designer will provide a shell for the method(s) which will be invoked for each event you have specified and wish to process, but it is your responsibility to provide the application-specific code within each method to process each event.

#### Redraw Events

You seldom need to do anything to respond to or process redraw events. Redraw events are directed by the OS, SDK framework code, and code generated by the Carbide.c++ UI Designer to each screen element when it requires a screen refresh.

You do not need to write code to manage or implement the initial display or refresh your individual visual elements during application runtime when using standard components. You will need to provide code to display any custom components you create, though it may be as simple as a call to the drawing code of its parent class.

When your code brings up a new UI Design screen, or displays or dismisses a Note or Dialog, each element in your UI design will receive appropriate redraw commands, and will implement their associated code to refresh the display.

Tasks

- Inspecting/Modifying Event Handlers

##### Related references

- Events View