2235 } |
2287 } |
2236 |
2288 |
2237 case R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT: |
2289 case R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT: |
2238 case R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE_FLAT: // fallthrough |
2290 case R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE_FLAT: // fallthrough |
2239 { |
2291 { |
|
2292 if ( aContextNumber == 0 ) |
|
2293 { |
|
2294 // We use frame as layered context so that we can avoid having |
|
2295 // two separate background contexts in this class. |
|
2296 // In any case frame context is implemented using layered |
|
2297 // context so this should be quite ok thing to do. |
|
2298 |
|
2299 TAknLayoutRect layoutRect; |
|
2300 layoutRect.LayoutRect( |
|
2301 application_window, |
|
2302 AknLayoutScalable_Avkon::area_top_pane( 2 ) ); |
|
2303 TRect topLayoutRect( layoutRect.Rect() ); |
|
2304 |
|
2305 layoutRect.LayoutRect( |
|
2306 topLayoutRect, |
|
2307 AknLayoutScalable_Avkon::status_pane( 1 ) ); |
|
2308 TRect spRect( layoutRect.Rect() ); |
|
2309 |
|
2310 layoutRect.LayoutRect( |
|
2311 spRect, |
|
2312 AknLayoutScalable_Avkon::bg_status_flat_pane( 0 ) ); |
|
2313 TRect bgRect( layoutRect.Rect() ); |
|
2314 |
|
2315 if ( aLayoutId == R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE_FLAT ) |
|
2316 { |
|
2317 TAknLayoutRect extension; |
|
2318 extension.LayoutRect( |
|
2319 application_window, |
|
2320 AknLayoutScalable_Avkon::main_pane( 4 ) ); |
|
2321 |
|
2322 // Wallpaper |
|
2323 aBgContext->SetLayerImage( ELayerFlatWallpaper, |
|
2324 KAknsIIDWallpaper ); |
|
2325 aBgContext->SetLayerRect( ELayerFlatWallpaper, screen ); |
|
2326 |
|
2327 // Main pane |
|
2328 aBgContext->SetLayerImage( ELayerFlatMain, |
|
2329 KAknsIIDQsnBgAreaMainIdle ); |
|
2330 aBgContext->SetLayerRect( ELayerFlatMain, |
|
2331 extension.Rect() ); |
|
2332 |
|
2333 // Skin background, transparency support |
|
2334 aBgContext->SetLayerImage( ELayerFlatBackground, |
|
2335 KAknsIIDQsnBgScreenIdle ); |
|
2336 aBgContext->SetLayerRect( ELayerFlatBackground, |
|
2337 topLayoutRect ); |
|
2338 |
|
2339 // CBA area |
|
2340 aBgContext->SetLayerImage( ELayerFlatCba, |
|
2341 KAknsIIDQsnBgAreaControlIdle ); |
|
2342 aBgContext->SetLayerRect( ELayerFlatCba, cbaRect ); |
|
2343 } |
|
2344 else |
|
2345 { // Not Idle. |
|
2346 // Main pane |
|
2347 aBgContext->SetLayerImage( ELayerFlatMain, KAknsIIDNone ); |
|
2348 |
|
2349 // Wallpaper |
|
2350 aBgContext->SetLayerImage( ELayerFlatWallpaper, |
|
2351 KAknsIIDNone ); |
|
2352 |
|
2353 // Skin background, transparency support |
|
2354 aBgContext->SetLayerImage( ELayerFlatBackground, |
|
2355 KAknsIIDQsnBgScreen ); |
|
2356 aBgContext->SetLayerRect( ELayerFlatBackground, screen ); |
|
2357 |
|
2358 // CBA area |
|
2359 aBgContext->SetLayerImage( ELayerFlatCba, aCbaBgID ); |
|
2360 aBgContext->SetLayerRect( ELayerFlatCba, cbaRect ); |
|
2361 } |
|
2362 |
|
2363 MAknsSkinInstance* si = AknsUtils::SkinInstance(); |
|
2364 CAknsItemData* idata = NULL; |
|
2365 if ( si ) |
|
2366 { |
|
2367 TRAP_IGNORE( |
|
2368 idata = si->CreateUncachedItemDataL( |
|
2369 KAknsIIDQsnFrStatusFlat, EAknsITImageTable ) ); |
|
2370 } |
|
2371 |
|
2372 if ( idata ) // 9 piece frame used |
|
2373 { |
|
2374 layoutRect.LayoutRect( bgRect, AknLayoutScalable_Avkon::bg_status_flat_pane_g2() ); |
|
2375 aBgContext->SetLayerImage( ELayerFlatTl, KAknsIIDQsnFrStatusFlatCornerTl ); |
|
2376 aBgContext->SetLayerRect( ELayerFlatTl, layoutRect.Rect() ); |
|
2377 |
|
2378 layoutRect.LayoutRect( bgRect, AknLayoutScalable_Avkon::bg_status_flat_pane_g3() ); |
|
2379 aBgContext->SetLayerImage( ELayerFlatTr, KAknsIIDQsnFrStatusFlatCornerTr ); |
|
2380 aBgContext->SetLayerRect( ELayerFlatTr, layoutRect.Rect() ); |
|
2381 |
|
2382 layoutRect.LayoutRect( bgRect, AknLayoutScalable_Avkon::bg_status_flat_pane_g4() ); |
|
2383 aBgContext->SetLayerImage( ELayerFlatBl, KAknsIIDQsnFrStatusFlatCornerBl ); |
|
2384 aBgContext->SetLayerRect( ELayerFlatBl, layoutRect.Rect() ); |
|
2385 |
|
2386 layoutRect.LayoutRect( bgRect, AknLayoutScalable_Avkon::bg_status_flat_pane_g5() ); |
|
2387 aBgContext->SetLayerImage( ELayerFlatBr, KAknsIIDQsnFrStatusFlatCornerBr ); |
|
2388 aBgContext->SetLayerRect( ELayerFlatBr, layoutRect.Rect() ); |
|
2389 |
|
2390 layoutRect.LayoutRect( bgRect, AknLayoutScalable_Avkon::bg_status_flat_pane_g6() ); |
|
2391 aBgContext->SetLayerImage( ELayerFlatT, KAknsIIDQsnFrStatusFlatSideT); |
|
2392 aBgContext->SetLayerRect( ELayerFlatT, layoutRect.Rect() ); |
|
2393 |
|
2394 layoutRect.LayoutRect( bgRect, AknLayoutScalable_Avkon::bg_status_flat_pane_g7() ); |
|
2395 aBgContext->SetLayerImage( ELayerFlatB, KAknsIIDQsnFrStatusFlatSideB ); |
|
2396 aBgContext->SetLayerRect( ELayerFlatB, layoutRect.Rect() ); |
|
2397 |
|
2398 layoutRect.LayoutRect( bgRect, AknLayoutScalable_Avkon::bg_status_flat_pane_g9() ); |
|
2399 aBgContext->SetLayerImage( ELayerFlatR, KAknsIIDQsnFrStatusFlatSideR ); |
|
2400 aBgContext->SetLayerRect( ELayerFlatR, layoutRect.Rect() ); |
|
2401 |
|
2402 layoutRect.LayoutRect( bgRect, AknLayoutScalable_Avkon::bg_status_flat_pane_g8() ); |
|
2403 aBgContext->SetLayerImage( ELayerFlatL, KAknsIIDQsnFrStatusFlatSideL ); |
|
2404 aBgContext->SetLayerRect( ELayerFlatL, layoutRect.Rect() ); |
|
2405 |
|
2406 layoutRect.LayoutRect( bgRect, AknLayoutScalable_Avkon::bg_status_flat_pane_g1() ); |
|
2407 aBgContext->SetLayerImage( ELayerFlatCenter, KAknsIIDQsnFrStatusFlatCenter ); |
|
2408 aBgContext->SetLayerRect( ELayerFlatCenter, layoutRect.Rect() ); |
|
2409 |
|
2410 if ( aLayoutId == R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE_FLAT ) |
|
2411 { |
|
2412 maskIID = KAknsIIDQgnGrafBgLscTopMaskIcon; |
|
2413 maskRect = spRect; |
|
2414 } |
|
2415 } |
|
2416 else // handle one piece version here |
|
2417 { |
|
2418 if ( aLayoutId == R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE_FLAT ) |
|
2419 { |
|
2420 // Wallpaper |
|
2421 aBgContext->SetLayerImage( ELayerFlatWallpaper, |
|
2422 KAknsIIDWallpaper ); |
|
2423 aBgContext->SetLayerRect( ELayerFlatWallpaper, |
|
2424 staconTop ); |
|
2425 |
|
2426 // Skin background |
|
2427 aBgContext->SetLayerImage( ELayerFlatBackground, |
|
2428 KAknsIIDQsnFrStatusFlat ); |
|
2429 aBgContext->SetLayerRect( ELayerFlatBackground, |
|
2430 bgRect ); |
|
2431 |
|
2432 // Set all other frame parts empty as they |
|
2433 // might already be filled with something |
|
2434 for ( TInt n = ELayerFlatBackground + 1; n <= ELayerFlatCenter; n++ ) |
|
2435 { |
|
2436 aBgContext->SetLayerImage( n, KAknsIIDNone ); |
|
2437 } |
|
2438 |
|
2439 maskIID = KAknsIIDQgnGrafBgLscTopMaskIcon; |
|
2440 maskRect = spRect; |
|
2441 } |
|
2442 else |
|
2443 { |
|
2444 aBgContext->SetLayerImage( ELayerFlatWallpaper, |
|
2445 KAknsIIDQsnFrStatusFlat ); |
|
2446 aBgContext->SetLayerRect( ELayerFlatWallpaper, |
|
2447 bgRect ); |
|
2448 |
|
2449 // Set all other frame parts empty as they |
|
2450 // might already be filled with something |
|
2451 for ( TInt n = ELayerFlatBackground; n <= ELayerFlatCenter; n++ ) |
|
2452 { |
|
2453 aBgContext->SetLayerImage( n, KAknsIIDNone ); |
|
2454 } |
|
2455 } |
|
2456 } |
|
2457 |
|
2458 delete idata; |
|
2459 } |
|
2460 else // context == 1 - this is the area removed from CBA for clock |
|
2461 // and indicator panes. |
|
2462 { |
|
2463 if ( aLayoutId == R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE_FLAT ) |
|
2464 { |
|
2465 aBgContext->SetLayerImage( ELayerFlatCbaWp, |
|
2466 KAknsIIDWallpaper ); |
|
2467 aBgContext->SetLayerRect( ELayerFlatCbaWp, screen ); |
|
2468 |
|
2469 maskIID = KAknsIIDQgnGrafBgLscBottomMaskIcon; |
|
2470 maskRect = cbaRect; |
|
2471 } |
|
2472 else |
|
2473 { |
|
2474 aBgContext->SetLayerImage( ELayerFlatCbaWp, KAknsIIDNone ); |
|
2475 } |
|
2476 |
|
2477 aBgContext->SetLayerImage( ELaterFlatCbaSkin, |
|
2478 KAknsIIDQsnBgAreaControlIdle ); |
|
2479 aBgContext->SetLayerRect( ELaterFlatCbaSkin, cbaRect ); |
|
2480 } |
|
2481 |
|
2482 break; |
|
2483 } |
|
2484 |
|
2485 case R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT_NO_SOFTKEYS: |
|
2486 case R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE_FLAT_NO_SOFTKEYS: // fallthrough |
|
2487 { |
2240 TBool idleLayout = |
2488 TBool idleLayout = |
2241 aLayoutId == R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE_FLAT; |
2489 aLayoutId == R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE_FLAT_NO_SOFTKEYS; |
2242 |
2490 |
2243 TAknLayoutRect flatWideStatusPane; |
2491 TAknLayoutRect flatWideStatusPane; |
2244 flatWideStatusPane.LayoutRect( |
2492 flatWideStatusPane.LayoutRect( |
2245 application_window, |
2493 application_window, |
2246 DoCompose( AknLayoutScalable_Avkon::area_top_pane( 19 ), |
2494 DoCompose( AknLayoutScalable_Avkon::area_top_pane( 20 ), |
2247 AknLayoutScalable_Avkon::status_pane( 4 ) ).LayoutLine() ); |
2495 AknLayoutScalable_Avkon::status_pane( 5 ) ).LayoutLine() ); |
2248 TRect spRect( flatWideStatusPane.Rect() ); |
2496 TRect spRect( flatWideStatusPane.Rect() ); |
2249 |
2497 |
2250 if ( idleLayout ) |
2498 if ( idleLayout ) |
2251 { |
2499 { |
2252 aBgContext->SetLayerImage( ELayerFlatWallpaper, KAknsIIDWallpaper ); |
2500 aBgContext->SetLayerImage( ELayerFlatWallpaper, KAknsIIDWallpaper ); |
2258 aBgContext->SetLayerImage( ELayerFlatMain, KAknsIIDNone ); |
2506 aBgContext->SetLayerImage( ELayerFlatMain, KAknsIIDNone ); |
2259 |
2507 |
2260 aBgContext->SetLayerImage( ELayerFlatCba, KAknsIIDNone ); |
2508 aBgContext->SetLayerImage( ELayerFlatCba, KAknsIIDNone ); |
2261 |
2509 |
2262 MAknsSkinInstance* si = AknsUtils::SkinInstance(); |
2510 MAknsSkinInstance* si = AknsUtils::SkinInstance(); |
2263 CAknsItemData* idata = NULL; |
2511 CAknsItemData* idata = NULL; |
2264 if ( si ) |
2512 if ( si ) |
2265 { |
2513 { |
2266 TRAP_IGNORE( |
2514 TRAP_IGNORE( |
2267 idata = si->CreateUncachedItemDataL( KAknsIIDQsnFrStatusFlat, |
2515 idata = si->CreateUncachedItemDataL( KAknsIIDQsnFrStatusFlat, |
2268 EAknsITImageTable ) ); |
2516 EAknsITImageTable ) ); |
2269 } |
2517 } |
2270 |
2518 |
2271 if ( idata ) // 9 piece frame used |
2519 if ( idata ) // 9 piece frame used |
2272 { |
2520 { |
2273 if ( aCbaBgID == KAknsIIDQsnBgAreaControlMp ) |
2521 aBgContext->SetLayerImage( |
2274 { |
2522 ELayerFlatBackground, |
2275 aBgContext->SetLayerImage( ELayerFlatBackground, |
2523 idleLayout ? KAknsIIDQsnBgScreenIdle : |
2276 KAknsIIDQsnBgScreenMp ); |
2524 KAknsIIDQsnBgScreen ); |
2277 } |
|
2278 else |
|
2279 { |
|
2280 aBgContext->SetLayerImage( |
|
2281 ELayerFlatBackground, |
|
2282 idleLayout ? KAknsIIDQsnBgScreenIdle : |
|
2283 KAknsIIDQsnBgScreen ); |
|
2284 } |
|
2285 aBgContext->SetLayerRect( ELayerFlatBackground, screen ); |
2525 aBgContext->SetLayerRect( ELayerFlatBackground, screen ); |
2286 |
2526 |
2287 TAknWindowLineLayout layout( AknLayoutScalable_Avkon::bg_status_flat_pane_g2().LayoutLine() ); |
2527 TAknWindowLineLayout layout( AknLayoutScalable_Avkon::bg_status_flat_pane_g2().LayoutLine() ); |
2288 layoutRect.LayoutRect( spRect, layout ); |
2528 layoutRect.LayoutRect( spRect, layout ); |
2289 aBgContext->SetLayerImage( ELayerFlatTl, KAknsIIDQsnFrStatusFlatCornerTl ); |
2529 aBgContext->SetLayerImage( ELayerFlatTl, KAknsIIDQsnFrStatusFlatCornerTl ); |
2290 aBgContext->SetLayerRect( ELayerFlatTl, layoutRect.Rect() ); |
2530 aBgContext->SetLayerRect( ELayerFlatTl, layoutRect.Rect() ); |
2291 |
2531 |
2292 layout = AknLayoutScalable_Avkon::bg_status_flat_pane_g3().LayoutLine(); |
2532 layout = AknLayoutScalable_Avkon::bg_status_flat_pane_g3().LayoutLine(); |
2293 layoutRect.LayoutRect( spRect, AknLayoutScalable_Avkon::bg_status_flat_pane_g3() ); |
2533 layoutRect.LayoutRect( spRect, layout ); |
2294 aBgContext->SetLayerImage( ELayerFlatTr, KAknsIIDQsnFrStatusFlatCornerTr ); |
2534 aBgContext->SetLayerImage( ELayerFlatTr, KAknsIIDQsnFrStatusFlatCornerTr ); |
2295 aBgContext->SetLayerRect( ELayerFlatTr, layoutRect.Rect()); |
2535 aBgContext->SetLayerRect( ELayerFlatTr, layoutRect.Rect()); |
2296 |
2536 |
2297 layout = AknLayoutScalable_Avkon::bg_status_flat_pane_g4().LayoutLine(); |
2537 layout = AknLayoutScalable_Avkon::bg_status_flat_pane_g4().LayoutLine(); |
2298 layoutRect.LayoutRect( spRect, layout ); |
2538 layoutRect.LayoutRect( spRect, layout ); |
2339 } |
2579 } |
2340 |
2580 |
2341 break; |
2581 break; |
2342 } |
2582 } |
2343 |
2583 |
2344 case R_AVKON_WIDESCREEN_PANE_LAYOUT_USUAL_FLAT_NO_SOFTKEYS: |
|
2345 case R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE_FLAT_NO_SOFTKEYS: // fallthrough |
|
2346 { |
|
2347 TBool idleLayout = |
|
2348 aLayoutId == R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE_FLAT_NO_SOFTKEYS; |
|
2349 |
|
2350 TAknLayoutRect flatWideStatusPane; |
|
2351 flatWideStatusPane.LayoutRect( |
|
2352 application_window, |
|
2353 DoCompose( AknLayoutScalable_Avkon::area_top_pane( 20 ), |
|
2354 AknLayoutScalable_Avkon::status_pane( 5 ) ).LayoutLine() ); |
|
2355 TRect spRect( flatWideStatusPane.Rect() ); |
|
2356 |
|
2357 if ( idleLayout ) |
|
2358 { |
|
2359 aBgContext->SetLayerImage( ELayerFlatWallpaper, KAknsIIDWallpaper ); |
|
2360 aBgContext->SetLayerRect( ELayerFlatWallpaper, screen ); |
|
2361 maskIID = KAknsIIDQgnGrafBgLscTopMaskIcon; |
|
2362 maskRect = spRect; |
|
2363 } |
|
2364 |
|
2365 aBgContext->SetLayerImage( ELayerFlatMain, KAknsIIDNone ); |
|
2366 |
|
2367 aBgContext->SetLayerImage( ELayerFlatCba, KAknsIIDNone ); |
|
2368 |
|
2369 MAknsSkinInstance* si = AknsUtils::SkinInstance(); |
|
2370 CAknsItemData* idata = NULL; |
|
2371 if ( si ) |
|
2372 { |
|
2373 TRAP_IGNORE( |
|
2374 idata = si->CreateUncachedItemDataL( KAknsIIDQsnFrStatusFlat, |
|
2375 EAknsITImageTable ) ); |
|
2376 } |
|
2377 |
|
2378 if ( idata ) // 9 piece frame used |
|
2379 { |
|
2380 aBgContext->SetLayerImage( |
|
2381 ELayerFlatBackground, |
|
2382 idleLayout ? KAknsIIDQsnBgScreenIdle : |
|
2383 KAknsIIDQsnBgScreen ); |
|
2384 aBgContext->SetLayerRect( ELayerFlatBackground, screen ); |
|
2385 |
|
2386 TAknWindowLineLayout layout( AknLayoutScalable_Avkon::bg_status_flat_pane_g2().LayoutLine() ); |
|
2387 layoutRect.LayoutRect( spRect, layout ); |
|
2388 aBgContext->SetLayerImage( ELayerFlatTl, KAknsIIDQsnFrStatusFlatCornerTl ); |
|
2389 aBgContext->SetLayerRect( ELayerFlatTl, layoutRect.Rect() ); |
|
2390 |
|
2391 layout = AknLayoutScalable_Avkon::bg_status_flat_pane_g3().LayoutLine(); |
|
2392 layoutRect.LayoutRect( spRect, layout ); |
|
2393 aBgContext->SetLayerImage( ELayerFlatTr, KAknsIIDQsnFrStatusFlatCornerTr ); |
|
2394 aBgContext->SetLayerRect( ELayerFlatTr, layoutRect.Rect()); |
|
2395 |
|
2396 layout = AknLayoutScalable_Avkon::bg_status_flat_pane_g4().LayoutLine(); |
|
2397 layoutRect.LayoutRect( spRect, layout ); |
|
2398 aBgContext->SetLayerImage( ELayerFlatBl, KAknsIIDQsnFrStatusFlatCornerBl ); |
|
2399 aBgContext->SetLayerRect( ELayerFlatBl, layoutRect.Rect() ); |
|
2400 |
|
2401 layout = AknLayoutScalable_Avkon::bg_status_flat_pane_g5().LayoutLine(); |
|
2402 layoutRect.LayoutRect( spRect, layout ); |
|
2403 aBgContext->SetLayerImage( ELayerFlatBr, KAknsIIDQsnFrStatusFlatCornerBr ); |
|
2404 aBgContext->SetLayerRect( ELayerFlatBr, layoutRect.Rect() ); |
|
2405 |
|
2406 layout = AknLayoutScalable_Avkon::bg_status_flat_pane_g6().LayoutLine(); |
|
2407 layoutRect.LayoutRect( spRect, layout ); |
|
2408 aBgContext->SetLayerImage( ELayerFlatT, KAknsIIDQsnFrStatusFlatSideT); |
|
2409 aBgContext->SetLayerRect( ELayerFlatT, layoutRect.Rect() ); |
|
2410 |
|
2411 layout = AknLayoutScalable_Avkon::bg_status_flat_pane_g7().LayoutLine(); |
|
2412 layoutRect.LayoutRect( spRect, layout ); |
|
2413 aBgContext->SetLayerImage( ELayerFlatB, KAknsIIDQsnFrStatusFlatSideB ); |
|
2414 aBgContext->SetLayerRect( ELayerFlatB, layoutRect.Rect() ); |
|
2415 |
|
2416 layout = AknLayoutScalable_Avkon::bg_status_flat_pane_g9().LayoutLine(); |
|
2417 layoutRect.LayoutRect( spRect, layout ); |
|
2418 aBgContext->SetLayerImage( ELayerFlatR, KAknsIIDQsnFrStatusFlatSideR ); |
|
2419 aBgContext->SetLayerRect( ELayerFlatR, layoutRect.Rect() ); |
|
2420 |
|
2421 layout = AknLayoutScalable_Avkon::bg_status_flat_pane_g8().LayoutLine(); |
|
2422 layoutRect.LayoutRect( spRect, layout ); |
|
2423 aBgContext->SetLayerImage( ELayerFlatL, KAknsIIDQsnFrStatusFlatSideL ); |
|
2424 aBgContext->SetLayerRect( ELayerFlatL, layoutRect.Rect() ); |
|
2425 |
|
2426 layout = AknLayoutScalable_Avkon::bg_status_flat_pane_g1().LayoutLine(); |
|
2427 layoutRect.LayoutRect( spRect, layout ); |
|
2428 aBgContext->SetLayerImage( ELayerFlatCenter, KAknsIIDQsnFrStatusFlatCenter ); |
|
2429 aBgContext->SetLayerRect( ELayerFlatCenter, layoutRect.Rect() ); |
|
2430 |
|
2431 delete idata; |
|
2432 } |
|
2433 else |
|
2434 { |
|
2435 aBgContext->SetLayerImage( ELayerFlatBackground, |
|
2436 KAknsIIDQsnFrStatusFlat ); |
|
2437 aBgContext->SetLayerRect( ELayerFlatBackground, spRect ); |
|
2438 } |
|
2439 |
|
2440 break; |
|
2441 } |
|
2442 |
|
2443 default: |
2584 default: |
2444 { |
2585 { |
2445 for ( TInt n = 0; n < ELayerFlatN; n++ ) |
2586 for ( TInt n = 0; n < ELayerFlatN; n++ ) |
2446 { |
2587 { |
2447 aBgContext->SetLayerImage( n, KAknsIIDNone ); |
2588 aBgContext->SetLayerImage( n, KAknsIIDNone ); |
2468 |
2609 |
2469 if ( iControl ) |
2610 if ( iControl ) |
2470 { |
2611 { |
2471 iControl->HandleResourceChange( aType ); |
2612 iControl->HandleResourceChange( aType ); |
2472 } |
2613 } |
|
2614 } |
|
2615 |
|
2616 |
|
2617 // --------------------------------------------------------------------------- |
|
2618 // Sets the parent window of the container control and the child controls |
|
2619 // inside it. |
|
2620 // --------------------------------------------------------------------------- |
|
2621 // |
|
2622 void CEikStatusPaneContainer::SetParentWindowL( |
|
2623 RWindowGroup* aParentWindowGroup, |
|
2624 CCoeControl* aParentControl, |
|
2625 CRedrawStoreHandler* aRedrawStoreHandler ) |
|
2626 { |
|
2627 if ( aParentWindowGroup ) |
|
2628 { |
|
2629 MakeVisible( EFalse ); |
|
2630 |
|
2631 SetMopParent( iEikonEnv->EikAppUi() ); |
|
2632 SetParent( NULL ); |
|
2633 |
|
2634 if ( OwnsWindow() ) |
|
2635 { |
|
2636 CloseWindow(); |
|
2637 } |
|
2638 |
|
2639 CreateWindowL( aParentWindowGroup ); |
|
2640 |
|
2641 // Enable the transparency only in HomeScreen where it's needed |
|
2642 // for performance reasons. |
|
2643 if ( InIdleApplication() ) |
|
2644 { |
|
2645 EnableWindowTransparency(); |
|
2646 } |
|
2647 else |
|
2648 { |
|
2649 Window().SetBackgroundColor( |
|
2650 iEikonEnv->ControlColor( EColorStatusPaneBackground, *this ) ); |
|
2651 } |
|
2652 |
|
2653 RWindow& window = Window(); |
|
2654 if ( aRedrawStoreHandler ) |
|
2655 { |
|
2656 aRedrawStoreHandler->SetStore( &window, KEnableRedrawStoring ); |
|
2657 } |
|
2658 |
|
2659 window.SetPointerGrab( ETrue ); |
|
2660 window.SetShadowDisabled( ETrue ); |
|
2661 window.SetNonFading( !LafStatusPaneContainer::AllowFading() ); |
|
2662 EnableDragEvents(); |
|
2663 |
|
2664 SetContainersL( *iControl, *this ); |
|
2665 |
|
2666 ActivateL(); |
|
2667 } |
|
2668 else if ( aParentControl ) |
|
2669 { |
|
2670 SetContainersL( *this, *aParentControl ); |
|
2671 } |
|
2672 } |
|
2673 |
|
2674 |
|
2675 // --------------------------------------------------------------------------- |
|
2676 // Sets the background drawer for the container control. |
|
2677 // --------------------------------------------------------------------------- |
|
2678 // |
|
2679 void CEikStatusPaneContainer::SetBackgroundDrawer( |
|
2680 MCoeControlBackground* aBackground ) |
|
2681 { |
|
2682 if ( aBackground && InIdleApplication() ) |
|
2683 { |
|
2684 // In Home Screen the application draws also the status |
|
2685 // pane background. |
|
2686 aBackground = NULL; |
|
2687 } |
|
2688 |
|
2689 SetBackground( aBackground ); |
|
2690 } |
|
2691 |
|
2692 |
|
2693 // --------------------------------------------------------------------------- |
|
2694 // Checks if the status pane container is in the Home Screen application. |
|
2695 // --------------------------------------------------------------------------- |
|
2696 // |
|
2697 TBool CEikStatusPaneContainer::InIdleApplication() |
|
2698 { |
|
2699 TBool retVal( EFalse ); |
|
2700 |
|
2701 CEikApplication* app = iEikonEnv->EikAppUi()->Application(); |
|
2702 if ( app && app->AppDllUid() == KActiveIdle2Uid ) |
|
2703 { |
|
2704 retVal = ETrue; |
|
2705 } |
|
2706 |
|
2707 return retVal; |
2473 } |
2708 } |
2474 |
2709 |
2475 |
2710 |
2476 // --------------------------------------------------------------------------- |
2711 // --------------------------------------------------------------------------- |
2477 // CEikStatusPaneContainer::Draw |
2712 // CEikStatusPaneContainer::Draw |