03.01.2013 Views

Chapter 1

Chapter 1

Chapter 1

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Figure 12.4<br />

Key events are offered down the control stack, firstly in order of priority (highest to lowest),<br />

and secondly in stack order (most recently added to least recently added, within each<br />

priority). The priorities shown above are defined in an enumeration in coeaui.h.<br />

Using this stack structure, Symbian or an application programmer can insert something new<br />

into the GUI environment without having to rewrite the control environment or the existing<br />

GUI components.<br />

Exactly how a control on the stack handles a key event depends on the control:<br />

� Dialogs are general containers, and we've already seen how they offer keys around<br />

their component controls.<br />

� App views are often also containers, and they will use their own logic, including at least<br />

some of the patterns used by dialogs to offer keys to component controls.<br />

� The debug keys control is a single control without any components – it either<br />

consumes a key, or it doesn't.<br />

� The menu bar, when visible, includes at least two controls – the menu bar and a menu<br />

pane – and possibly more, since there may also be cascaded menus. The menu bar<br />

offers and handles keys among these controls to implement conventional menu<br />

navigation and item selection.<br />

� Most FEPs need to handle key events but how they do this depends on the type of<br />

FEP. UIQ's virtual keyboard FEP when active, consumes all key events but the ones it<br />

generates itself. FEPs activated by a key press or combination of key presses need to<br />

be on the control stack even when they are inactive, but when inactive they would<br />

typically not consume any other key events.<br />

We can see again how focus and key handling are usually – but not always – related:

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

Saved successfully!

Ooh no, something went wrong!