javauis/lcdui_akn/lcdui/src/CMIDDisplayable.cpp
branchRCL_3
changeset 46 4376525cdefb
parent 24 0fd27995241b
child 59 e5618cc85d74
equal deleted inserted replaced
34:71c436fe3ce0 46:4376525cdefb
   289 #ifdef RD_TACTILE_FEEDBACK
   289 #ifdef RD_TACTILE_FEEDBACK
   290         ,iPenInputServerConnected(EFalse)
   290         ,iPenInputServerConnected(EFalse)
   291 #endif //RD_TACTILE_FEEDBACK
   291 #endif //RD_TACTILE_FEEDBACK
   292         ,iIdOfMSKCommand(KErrNotFound)
   292         ,iIdOfMSKCommand(KErrNotFound)
   293 {
   293 {
       
   294 #ifdef RD_JAVA_S60_RELEASE_9_2
       
   295     iSplitScreenKeyboard = EFalse;
       
   296 #endif // RD_JAVA_S60_RELEASE_9_2
   294     iAppUi = (CMIDAppUi*)java::ui::CoreUiAvkonLcdui::getInstance().getJavaUiAppUi()->getLcduiChild();
   297     iAppUi = (CMIDAppUi*)java::ui::CoreUiAvkonLcdui::getInstance().getJavaUiAppUi()->getLcduiChild();
   295 }
   298 }
   296 
   299 
   297 CMIDDisplayable::~CMIDDisplayable()
   300 CMIDDisplayable::~CMIDDisplayable()
   298 {
   301 {
   984         CMIDForm* form = static_cast<CMIDForm*>(iContentControl);
   987         CMIDForm* form = static_cast<CMIDForm*>(iContentControl);
   985         ASSERT(form);
   988         ASSERT(form);
   986         form->HandleForegroundL(aForeground);
   989         form->HandleForegroundL(aForeground);
   987     }
   990     }
   988 
   991 
   989     HandleCanvasForeground(aForeground);   
   992     HandleCanvasForeground(aForeground);
   990 
   993 
   991     if (aForeground)
   994     if (aForeground)
   992     {
   995     {
   993         //If MIDlet is sent to foreground and JAD-attribute BackgroundEvent=Pause,
   996         //If MIDlet is sent to foreground and JAD-attribute BackgroundEvent=Pause,
   994         //then call startApp() method for the MIDlet.
   997         //then call startApp() method for the MIDlet.
  1035         }
  1038         }
  1036         UpdateDisplayableRect();
  1039         UpdateDisplayableRect();
  1037         SetRect(iDisplayableRect);
  1040         SetRect(iDisplayableRect);
  1038 
  1041 
  1039         // MIDlet icon is resized in cpane SizeChanged()
  1042         // MIDlet icon is resized in cpane SizeChanged()
  1040 
       
  1041         if (!iActive && iContentControl)
  1043         if (!iActive && iContentControl)
  1042         {//The active displayable already gets this call by the CONE framework but
  1044         {//The active displayable already gets this call by the CONE framework but
  1043             //background displayables don't, so for example a background form won't be
  1045             //background displayables don't, so for example a background form won't be
  1044             //re-laid-out if we don't call this here
  1046             //re-laid-out if we don't call this here
  1045             iContentControl->HandleResourceChange(aType);
  1047             iContentControl->HandleResourceChange(aType);
  1235                     canvasRect.LayoutRect(resultRect, AknLayoutScalable_Avkon::midp_canvas_pane(10).LayoutLine());
  1237                     canvasRect.LayoutRect(resultRect, AknLayoutScalable_Avkon::midp_canvas_pane(10).LayoutLine());
  1236                 }
  1238                 }
  1237                 else
  1239                 else
  1238                 {
  1240                 {
  1239 #ifdef RD_JAVA_S60_RELEASE_9_2
  1241 #ifdef RD_JAVA_S60_RELEASE_9_2
  1240                     canvasRect.LayoutRect( resultRect, AknLayoutScalable_Avkon::midp_canvas_pane(9).LayoutLine() );
  1242                     canvasRect.LayoutRect(resultRect, AknLayoutScalable_Avkon::midp_canvas_pane(9).LayoutLine());
  1241 #else
  1243 #else
  1242                     resultRect = TRect(80,0,560,360); // Layout data not defined in older releases.
  1244                     resultRect = TRect(80,0,560,360); // Layout data not defined in older releases.
  1243                     DEBUG("- CMIDDisplayable::GetCanvasRectFromLaf");
  1245                     DEBUG("- CMIDDisplayable::GetCanvasRectFromLaf");
  1244                     return resultRect;
  1246                     return resultRect;
  1245 #endif // RD_JAVA_S60_RELEASE_9_2
  1247 #endif // RD_JAVA_S60_RELEASE_9_2
  1793 }
  1795 }
  1794 
  1796 
  1795 void CMIDDisplayable::HandleOnScreenKeypadVisual()
  1797 void CMIDDisplayable::HandleOnScreenKeypadVisual()
  1796 {
  1798 {
  1797     DEBUG("+ CMIDDisplayable::HandleOnScreenKeypadVisual");
  1799     DEBUG("+ CMIDDisplayable::HandleOnScreenKeypadVisual");
       
  1800 #ifdef RD_JAVA_S60_RELEASE_9_2
       
  1801     if (iActive && !iSplitScreenKeyboard)
       
  1802 #else
  1798     if (iActive)
  1803     if (iActive)
       
  1804 #endif // RD_JAVA_S60_RELEASE_9_2
  1799     {
  1805     {
  1800         UpdateOnScreenKeypadSettings();
  1806         UpdateOnScreenKeypadSettings();
  1801         UpdateDisplayableRect();
  1807         UpdateDisplayableRect();
  1802         SetRect(iDisplayableRect);
  1808         SetRect(iDisplayableRect);
  1803         TRAP_IGNORE(UpdateVisualAppearanceL());
  1809         TRAP_IGNORE(UpdateVisualAppearanceL());
  2052         iFullscreenCanvasLabelCacheIsValid = EFalse;
  2058         iFullscreenCanvasLabelCacheIsValid = EFalse;
  2053     }
  2059     }
  2054 
  2060 
  2055     DEBUG("- CMIDDisplayable::SetFullScreenModeL");
  2061     DEBUG("- CMIDDisplayable::SetFullScreenModeL");
  2056 }
  2062 }
       
  2063 
       
  2064 #ifdef RD_JAVA_S60_RELEASE_9_2
       
  2065 // ---------------------------------------------------------------------------
       
  2066 // When partial screen keyboard is opened we need to
       
  2067 // get rid of status pane and resize Displayable.
       
  2068 // ---------------------------------------------------------------------------
       
  2069 void CMIDDisplayable::HandleSplitScreenKeyboard(TBool aOpened)
       
  2070 {
       
  2071     iSplitScreenKeyboard = aOpened;
       
  2072     if (aOpened)
       
  2073     {
       
  2074         iAppUi->StatusPane()->MakeVisible(EFalse);
       
  2075         TRect clientRect = iAppUi->ClientRect();
       
  2076         SetRect(clientRect);
       
  2077         if (iActive)
       
  2078         {
       
  2079             DrawDeferred();
       
  2080         }
       
  2081     }
       
  2082     else
       
  2083     {
       
  2084         if (iActive)
       
  2085         {
       
  2086             UpdateOnScreenKeypadSettings();
       
  2087             UpdateDisplayableRect();
       
  2088             SetRect(iDisplayableRect);
       
  2089             // Ignoring leave
       
  2090             // The method was already called at least once
       
  2091             // and must be called here.
       
  2092             TRAP_IGNORE(UpdateVisualAppearanceL());
       
  2093         }
       
  2094     }
       
  2095 }
       
  2096 #endif // RD_JAVA_S60_RELEASE_9_2
  2057 
  2097 
  2058 // ---------------------------------------------------------------------------
  2098 // ---------------------------------------------------------------------------
  2059 // Return true if we are in full screen mode (cavas), false otherwise.
  2099 // Return true if we are in full screen mode (cavas), false otherwise.
  2060 // @see iIsFullScreenMode
  2100 // @see iIsFullScreenMode
  2061 // @see SetFullScreenModeL().
  2101 // @see SetFullScreenModeL().
  3136     if (iCanvasKeypad)
  3176     if (iCanvasKeypad)
  3137     {
  3177     {
  3138         iCanvasKeypad->HandleApplicationBackground();
  3178         iCanvasKeypad->HandleApplicationBackground();
  3139     }
  3179     }
  3140 
  3180 
  3141     HandleCanvasForeground(EFalse);    
  3181     HandleCanvasForeground(EFalse);
  3142 }
  3182 }
  3143 
  3183 
  3144 void CMIDDisplayable::ProcessMSKCommandL()
  3184 void CMIDDisplayable::ProcessMSKCommandL()
  3145 {
  3185 {
  3146     if (iIdOfMSKCommand != KErrNotFound)
  3186     if (iIdOfMSKCommand != KErrNotFound)