|
1 /* |
|
2 * Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "aknblankwin.h" |
|
19 |
|
20 CAknServBlankWin::CAknServBlankWin(CEikServStatusPane* aSp) |
|
21 : iSp(aSp) |
|
22 { |
|
23 if (iSp) |
|
24 { |
|
25 iSp->SetBlankWinObserver(this); |
|
26 } |
|
27 } |
|
28 |
|
29 CAknServBlankWin::~CAknServBlankWin() |
|
30 { |
|
31 if (iSp) |
|
32 { |
|
33 iSp->SetBlankWinObserver(NULL); |
|
34 } |
|
35 } |
|
36 |
|
37 CAknServBlankWin* CAknServBlankWin::NewL(RWindowGroup& aParent, CEikServStatusPane* aSp) |
|
38 { |
|
39 CAknServBlankWin* self = new(ELeave) CAknServBlankWin(aSp); |
|
40 CleanupStack::PushL(self); |
|
41 // We set ordinal param value to 0 (not -1) because we want to blank also serverside |
|
42 // statuspane panes. |
|
43 self->ConstructL(aParent, 0, ETrue); |
|
44 CleanupStack::Pop(); // self |
|
45 return(self); |
|
46 } |
|
47 |
|
48 void CAknServBlankWin::HandleStatusPaneSizeChange() |
|
49 { |
|
50 TRAP_IGNORE( HandleStatusPaneSizeChangeL()); |
|
51 // Statuspane should be ready at this point. We can set ordinal param to -1 now |
|
52 // to avoid wierd situations if unblank is delayed for some reason. |
|
53 if (!iLayoutBlank) |
|
54 { |
|
55 DrawableWindow()->SetOrdinalPosition(-1); |
|
56 } |
|
57 } |
|
58 |
|
59 void CAknServBlankWin::SetLayoutBlank(TBool aLayoutBlank) |
|
60 { |
|
61 iLayoutBlank = aLayoutBlank; |
|
62 |
|
63 if ( !iSp ) |
|
64 { |
|
65 return; |
|
66 } |
|
67 |
|
68 if ( iLayoutBlank ) |
|
69 { |
|
70 iSp->SetBlankWinObserver(this); |
|
71 } |
|
72 else |
|
73 { |
|
74 iSp->SetBlankWinObserver(NULL); |
|
75 } |
|
76 } |
|
77 |
|
78 // End of file |