03.01.2013 Views

Chapter 1

Chapter 1

Chapter 1

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

case 2: return EAmountOfControls;<br />

}<br />

return 0;<br />

}<br />

A dialog is also a compound control with typically only a single window. A dialog has an<br />

unpredictable number of component controls, so instead of hardcoding the answers to<br />

CountComponentControls()and ComponentControl() as I did above, CEikDialog<br />

uses a variable-sized array to store dialog lines and calculates the answers for these<br />

functions.<br />

11.5.4 More on Drawing<br />

Drawing to a window is easy for programs but involves complex processing by Symbian OS<br />

as you can see in Figure 11.12.<br />

Figure 11.12<br />

On the client side, an application uses a CWindowGc to draw to a window. CWindowGc's<br />

functions are implemented by encoding and storing commands in the window server's clientside<br />

buffer. When the buffer is full, or when the client requests it, the instructions in the buffer<br />

are all sent to the window server, which decodes and executes them by drawing directly onto<br />

the screen, using a CFbsBitGc – a CGraphicsContext-derived class for drawing onto<br />

bitmapped devices. Prior to drawing, the window server sets up a clipping region to ensure<br />

that only the correct region of the correct window can be changed, whatever the current<br />

state of overlapping windows on the screen. The window server uses the BITGDI to<br />

'rasterize' the drawing commands.

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

Saved successfully!

Ooh no, something went wrong!