widgets/widgetapp/src/WidgetUiWindowContainer.cpp
branchRCL_3
changeset 48 79859ed3eea9
parent 47 e1bea15f9a39
child 49 919f36ff910f
equal deleted inserted replaced
47:e1bea15f9a39 48:79859ed3eea9
    21 #include "WidgetUiWindowView.h"
    21 #include "WidgetUiWindowView.h"
    22 #include "WidgetUiWindow.h"
    22 #include "WidgetUiWindow.h"
    23 
    23 
    24 #include <WidgetUi.rsg>
    24 #include <WidgetUi.rsg>
    25 
    25 
    26 #include <widgetregistryconstants.h>
    26 #include <WidgetRegistryConstants.h>
    27 
    27 
    28 #include <brctlinterface.h>
    28 #include <brctlinterface.h>
    29 #include <ApUtils.h>
    29 #include <ApUtils.h>
    30 #include <internetconnectionmanager.h>
    30 #include <InternetConnectionManager.h>
    31 #include <ActiveApDb.h>
    31 #include <ActiveApDb.h>
    32 #include <avkon.hrh>
    32 #include <avkon.hrh>
    33 #include <aknsdrawutils.h>
    33 #include <AknsDrawUtils.h>
    34 #include <AknsBasicBackgroundControlContext.h>
    34 #include <AknsBasicBackgroundControlContext.h>
    35 
    35 
    36  // CAknMessageQueryDialog
    36  // CAknMessageQueryDialog
    37 #include <AknMessageQueryDialog.h>
    37 #include <aknmessagequerydialog.h>
    38 #include <aknnotewrappers.h>
    38 #include <aknnotewrappers.h>
    39 #include <AknNoteDialog.h>
    39 #include <aknnotedialog.h>
    40 #include <browserdialogsprovider.h>
    40 #include <BrowserDialogsProvider.h>
    41 
    41 
    42 // EXTERNAL DATA STRUCTURES
    42 // EXTERNAL DATA STRUCTURES
    43 
    43 
    44 // EXTERNAL FUNCTION PROTOTYPES
    44 // EXTERNAL FUNCTION PROTOTYPES
    45 
    45 
   152 //
   152 //
   153 // -----------------------------------------------------------------------------
   153 // -----------------------------------------------------------------------------
   154 //
   154 //
   155 void CWidgetUiWindowContainer::SizeChanged()
   155 void CWidgetUiWindowContainer::SizeChanged()
   156     {
   156     {
       
   157     TInt offset( 0 );
       
   158 
   157     if( Engine() && (Engine()->Rect() != Rect()) )
   159     if( Engine() && (Engine()->Rect() != Rect()) )
   158         {
   160         {
   159         TRect rect( Rect() );
   161         TRect rect( Rect() );
   160         //rect.iBr.iY-=offset;
   162         //rect.iBr.iY-=offset;
   161         Engine()->SetRect( rect );
   163         Engine()->SetRect( rect );
   276     {
   278     {
   277     // Handle RED End Key (EKeyNo)
   279     // Handle RED End Key (EKeyNo)
   278     if (aKeyEvent.iCode == EKeyNo)
   280     if (aKeyEvent.iCode == EKeyNo)
   279         {
   281         {
   280         // Close the current active widget
   282         // Close the current active widget
   281         //iWindowManager.CloseWindowsAsync(EFalse);
   283         iWindowManager.CloseWindowsAsync(EFalse);
   282         return EKeyWasConsumed;
   284         return EKeyWasConsumed;
   283         }
   285         }
   284 
   286 
   285     //Ignore application keys(EKeyApplication0-EKeyApplication1F)
       
   286     if( (aKeyEvent.iCode>=EKeyApplication0 && aKeyEvent.iCode<= EKeyApplicationF) || 
       
   287         (aKeyEvent.iCode>=EKeyApplication10 && aKeyEvent.iCode<= EKeyApplication1F) )
       
   288         {
       
   289         return EKeyWasNotConsumed;
       
   290         }
       
   291     TKeyResponse resp(EKeyWasNotConsumed);
   287     TKeyResponse resp(EKeyWasNotConsumed);
   292     TBool editing(EFalse);
   288     TBool editing(EFalse);
   293 	//Reset the iIsOptionsMenuActivated if enabled
   289 	//Reset the iIsOptionsMenuActivated if enabled
   294 	iWindowManager.View()->DeActivateOptionsMenu();
   290 	iWindowManager.View()->DeActivateOptionsMenu();
   295 
   291 
   296     if (Engine())
   292     if (Engine())
   297         {
   293         {
       
   294         TBool showStausPane(EFalse);
   298         TBrCtlDefs::TBrCtlElementType eType = Engine()->FocusedElementType();
   295         TBrCtlDefs::TBrCtlElementType eType = Engine()->FocusedElementType();
   299         switch(eType)
   296         switch(eType)
   300             {
   297             {
   301             case TBrCtlDefs::EElementInputBox:
   298             case TBrCtlDefs::EElementInputBox:
   302             case TBrCtlDefs::EElementActivatedInputBox:
   299             case TBrCtlDefs::EElementActivatedInputBox:
   303             case TBrCtlDefs::EElementTextAreaBox:
   300             case TBrCtlDefs::EElementTextAreaBox:
       
   301                 // status pane is needed for editing
       
   302                 showStausPane = ETrue;
       
   303                 // fall through
   304             case TBrCtlDefs::EElementObjectBox:
   304             case TBrCtlDefs::EElementObjectBox:
   305             case TBrCtlDefs::EElementActivatedObjectBox:
   305             case TBrCtlDefs::EElementActivatedObjectBox:
   306                 {
   306                 {
   307                 // Status pane must be shown before input is activated because resizing de-activates
   307                 // Status pane must be shown before input is activated because resizing de-activates
   308                 // the input box.
   308                 // the input box.