equal
deleted
inserted
replaced
122 } |
122 } |
123 |
123 |
124 return NULL; |
124 return NULL; |
125 } |
125 } |
126 |
126 |
|
127 TIRViewId IRViewManager::getExitingView() |
|
128 { |
|
129 if(0 == views().count()) |
|
130 { |
|
131 return EIRView_InvalidId; |
|
132 } |
|
133 else |
|
134 { |
|
135 IRBaseView* lastView = static_cast<IRBaseView*>(currentView()); |
|
136 if(lastView->testFlag(IRBaseView::EViewFlag_StickyViewEnabled)) |
|
137 { |
|
138 return lastView->id(); |
|
139 } |
|
140 |
|
141 if(iViewStack.empty()) |
|
142 { |
|
143 return EIRView_InvalidId; |
|
144 } |
|
145 |
|
146 for(int i = iViewStack.size()-1; i >= 0 ; i--) |
|
147 { |
|
148 IRBaseView* lastView = iViewStack.at(i); |
|
149 if(lastView->testFlag(IRBaseView::EViewFlag_StickyViewEnabled)) |
|
150 { |
|
151 return lastView->id(); |
|
152 } |
|
153 } |
|
154 |
|
155 return EIRView_InvalidId; |
|
156 } |
|
157 } |
|
158 |
127 /* |
159 /* |
128 * Description : Judge if a view is in the view stack. |
160 * Description : Judge if a view is in the view stack. |
129 * Parameters : aViewId : the view's id |
161 * Parameters : aViewId : the view's id |
130 * Return : true : the view is in view stack |
162 * Return : true : the view is in view stack |
131 * false : the view is not in view stack |
163 * false : the view is not in view stack |
174 |
206 |
175 IRBaseView *view = getView(aViewId, true); |
207 IRBaseView *view = getView(aViewId, true); |
176 |
208 |
177 if (view) |
209 if (view) |
178 { |
210 { |
179 if (EViewFlag_ClearStackWhenActivate == view->flag()) |
211 if (view->testFlag(IRBaseView::EViewFlag_ClearStackWhenActivate)) |
180 { |
212 { |
181 clearStack(); |
213 clearStack(); |
182 } |
214 } |
183 else |
215 else |
184 { if (aPushCurrentView) |
216 { if (aPushCurrentView) |
185 { |
217 { |
186 if (baseView && EViewFlag_UnStackable != baseView->flag()) |
218 if (baseView && !baseView->testFlag(IRBaseView::EViewFlag_UnStackable)) |
187 { |
219 { |
188 iViewStack.push(baseView); |
220 iViewStack.push(baseView); |
189 } |
221 } |
190 } |
222 } |
191 |
223 |
446 void IRViewManager::updateSoftkey() |
478 void IRViewManager::updateSoftkey() |
447 { |
479 { |
448 IRBaseView *topView = static_cast<IRBaseView*>(currentView()); |
480 IRBaseView *topView = static_cast<IRBaseView*>(currentView()); |
449 if (topView) |
481 if (topView) |
450 { |
482 { |
451 if (EViewFlag_ClearStackWhenActivate == topView->flag()) |
483 if (topView->testFlag(IRBaseView::EViewFlag_ClearStackWhenActivate)) |
452 { |
484 { |
453 topView->setNavigationAction(iExitAction); |
485 topView->setNavigationAction(iExitAction); |
454 } |
486 } |
455 else |
487 else |
456 { |
488 { |