mulwidgets/alfviewwidget/src/alfviewwidget.cpp
branchRCL_3
changeset 7 c2c0f97004fc
parent 0 e83bab7cf002
equal deleted inserted replaced
3:4526337fb576 7:c2c0f97004fc
   335 	if(aIsActivated)
   335 	if(aIsActivated)
   336 		{
   336 		{
   337         // Update control pane, status pane and background according to state of the view.
   337         // Update control pane, status pane and background according to state of the view.
   338         updateStatusPane();
   338         updateStatusPane();
   339         updateControlPane();
   339         updateControlPane();
   340         updateBackGroundImage();
       
   341         // When a view is activated, it sets the size of the display to full screen
   340         // When a view is activated, it sets the size of the display to full screen
   342         // This is done so that the view widget gets pointer events in the entire screen
   341         // This is done so that the view widget gets pointer events in the entire screen
   343         TRect screenRect(TPoint(0,0), TSize(AlfUtil::ScreenSize()));
   342         TRect screenRect(TPoint(0,0), TSize(AlfUtil::ScreenSize()));
   344         control()->Env().PrimaryDisplay().SetVisibleArea(screenRect);
   343         control()->Env().PrimaryDisplay().SetVisibleArea(screenRect);
   345         setRect(mDisplayRect);
   344         setRect(mDisplayRect);
   438 	    
   437 	    
   439 	    // Update status pane and background image state if this view is active.
   438 	    // Update status pane and background image state if this view is active.
   440 	    if(getViewStackPosition() == 0)
   439 	    if(getViewStackPosition() == 0)
   441 	        {
   440 	        {
   442 	        updateStatusPane();
   441 	        updateStatusPane();
   443             updateBackGroundImage();
       
   444 	        }
   442 	        }
   445 		}
   443 		}
   446     }
   444     }
   447 
   445 
   448 void AlfViewWidget::enableControlPane(bool aEnable)
   446 void AlfViewWidget::enableControlPane(bool aEnable)
   453         
   451         
   454 	    // Update control pane and background image state if this view is active.
   452 	    // Update control pane and background image state if this view is active.
   455 	    if(getViewStackPosition() == 0)
   453 	    if(getViewStackPosition() == 0)
   456 	        {        
   454 	        {        
   457             updateControlPane();
   455             updateControlPane();
   458             updateBackGroundImage();
       
   459 	        }
   456 	        }
   460         }
   457         }
   461     }
   458     }
   462 
   459 
   463 void AlfViewWidget::useSkinBackground(bool aSkinBackground)
   460 void AlfViewWidget::useSkinBackground(bool aSkinBackground)
   673               {
   670               {
   674               TRect screenRect(TPoint(0,0), TSize(AlfUtil::ScreenSize()));
   671               TRect screenRect(TPoint(0,0), TSize(AlfUtil::ScreenSize()));
   675 
   672 
   676               // SetVisibleArea() only have an effect if the application is on foreground!
   673               // SetVisibleArea() only have an effect if the application is on foreground!
   677               control()->Env().PrimaryDisplay().SetVisibleArea(screenRect);
   674               control()->Env().PrimaryDisplay().SetVisibleArea(screenRect);
   678               updateBackGroundImage(); 
       
   679               }
   675               }
   680        
   676        
   681         }
   677         }
   682     
   678     
   683     else if(KAlfActionIdForegroundGained == aActionCommand.Id())
   679     else if(KAlfActionIdForegroundGained == aActionCommand.Id())
   687             
   683             
   688             // SetVisibleArea() only have an effect if the application is on foreground!
   684             // SetVisibleArea() only have an effect if the application is on foreground!
   689             
   685             
   690             control()->Env().PrimaryDisplay().SetVisibleArea(screenRect);
   686             control()->Env().PrimaryDisplay().SetVisibleArea(screenRect);
   691             
   687             
   692             updateBackGroundImage(); 
       
   693         
   688         
   694         } 
   689         } 
   695 
   690 
   696     }
   691     }
   697 
   692 
   731     if(visibleRect != screenRect && getViewStackPosition() == 0)
   726     if(visibleRect != screenRect && getViewStackPosition() == 0)
   732         {
   727         {
   733     	// the display area is required to be full screen, for the pointer grab to work
   728     	// the display area is required to be full screen, for the pointer grab to work
   734     	// check here whether the display area is full screen. If not, set it to full screen
   729     	// check here whether the display area is full screen. If not, set it to full screen
   735         control()->Env().PrimaryDisplay().SetVisibleArea(screenRect);
   730         control()->Env().PrimaryDisplay().SetVisibleArea(screenRect);
   736         updateBackGroundImage(); 
       
   737         }
   731         }
   738     }
   732     }
   739 
   733 
   740     } //Alf
   734     } //Alf
   741 
   735