idlehomescreen/widgetmanager/inc/wmmaincontainer.h
branchRCL_3
changeset 102 ba63c83f4716
parent 93 b01126ce0bec
equal deleted inserted replaced
93:b01126ce0bec 102:ba63c83f4716
    36 class CAknsBasicBackgroundControlContext;
    36 class CAknsBasicBackgroundControlContext;
    37 class CAknViewAppUi;
    37 class CAknViewAppUi;
    38 class CAknSearchField;
    38 class CAknSearchField;
    39 class CCoeControl;
    39 class CCoeControl;
    40 class CAknSearchField;
    40 class CAknSearchField;
    41 class CWmStore;
    41 class CWmPortalButton;
    42 class CWmMainContainerView;
    42 class CWmMainContainerView;
    43 class CWmConfiguration;
    43 class CWmConfiguration;
    44 
    44 
    45 /**
    45 /**
    46  * Container class for WmMainContainer
    46  * Container class for WmMainContainer
    92      * @return true, if widgets loading operation is ongoing. 
    92      * @return true, if widgets loading operation is ongoing. 
    93      */
    93      */
    94     TBool IsLoadingWidgets();
    94     TBool IsLoadingWidgets();
    95     
    95     
    96     /** 
    96     /** 
       
    97      * @return true, if portal button is currently selected 
       
    98      */
       
    99     TBool PortalSelected();
       
   100     
       
   101     /** 
    97      * @return true, if a widget in list is currently selected 
   102      * @return true, if a widget in list is currently selected 
    98      */
   103      */
    99     TBool WidgetSelected();
   104     TBool WidgetSelected();
   100     
   105     
   101     /** 
   106     /** 
   167      * executes widget uninstall 
   172      * executes widget uninstall 
   168      */
   173      */
   169     void UninstallWidgetL();
   174     void UninstallWidgetL();
   170 
   175 
   171     /**
   176     /**
   172      * Store menu command.
   177      * opens currently selected portal
   173      */
   178      */
   174     void HandleStoreCommandL();
   179     void OpenPortalL();
       
   180 
       
   181     /**
       
   182      * Selection key (middle soft key)
       
   183      */
       
   184     void SelectL();
   175     
   185     
   176     /**
   186     /**
   177      * Show widget manager help
   187      * Show widget manager help
   178      */
   188      */
   179     void ShowHelpL();
   189     void ShowHelpL();
   214      * Handles pointer events.
   224      * Handles pointer events.
   215      * 
   225      * 
   216      * @see CCoeControl::HandlePointerEventL
   226      * @see CCoeControl::HandlePointerEventL
   217      */
   227      */
   218     void HandlePointerEventL( const TPointerEvent& aPointerEvent );
   228     void HandlePointerEventL( const TPointerEvent& aPointerEvent );
       
   229     
       
   230     /**
       
   231      * Moves focus to the OVI button
       
   232      * @param aIndex 0=first button, 1=second (if it exists)
       
   233      */
       
   234     void SetFocusToPortalButton( TInt aIndex );
   219 
   235 
   220     /**
   236     /**
   221      * Moves focus to the widgets list, alternatively also setting the currently
   237      * Moves focus to the widgets list, alternatively also setting the currently
   222      * selected item.
   238      * selected item.
   223      * @param aIndex the item in widgets list to highlight during setting focus.
   239      * @param aIndex the item in widgets list to highlight during setting focus.
   234         
   250         
   235     /*
   251     /*
   236      * To set iClosingDown. See above.
   252      * To set iClosingDown. See above.
   237      */
   253      */
   238     void SetClosingDown( TBool aClosingDown );
   254     void SetClosingDown( TBool aClosingDown );
       
   255 
       
   256     /**
       
   257      * access to WM configuration
       
   258      */
       
   259     CWmConfiguration& Configuration();
       
   260     
       
   261     /**
       
   262      * Process foregound events.
       
   263      * @param aForeground ETrue indicates foreground
       
   264      */
       
   265     void ProcessForegroundEvent( TBool aForeground );
   239     
   266     
   240     /**
   267     /**
   241      * access to WM list
   268      * access to WM list
   242      */
   269      */
   243     CWmListBox& WmListBox();
   270     CWmListBox& WmListBox();
   285      */
   312      */
   286     void AdaptiveSearchTextChanged( CAknSearchField* aSearchField );
   313     void AdaptiveSearchTextChanged( CAknSearchField* aSearchField );
   287     
   314     
   288 private: // New functions
   315 private: // New functions
   289     
   316     
   290     void DisplayAndLaunchStoresL();
       
   291     static void CleanupIconArray( TAny* aIconArray );
       
   292 
       
   293     void AddControlL( CCoeControl* aControl, TInt aControlId );
   317     void AddControlL( CCoeControl* aControl, TInt aControlId );
   294     void InitializeControlsL( const TRect& aRect );
   318     void InitializeControlsL( const TRect& aRect );
   295     void LayoutControls();
   319     void LayoutControls();
   296     void StartLoadingWidgetsL();
   320     void StartLoadingWidgetsL();
   297     void RemoveCtrlsFromStack();
   321     void RemoveCtrlsFromStack();
       
   322     void UpdateFocusMode();
       
   323     void ResetFocus( TDrawNow aDrawNow = ENoDrawNow );
   298     CCoeControl* FindChildControlByPoint( const TPoint& aPoint );
   324     CCoeControl* FindChildControlByPoint( const TPoint& aPoint );
   299     void HandleFindSizeChanged();
   325     void HandleFindSizeChanged();
       
   326     TKeyResponse MoveFocusByKeys(
       
   327             const TKeyEvent& aKeyEvent, 
       
   328             TEventCode aType );
       
   329     TKeyResponse HandleButtonKeyEventL( 
       
   330             const TKeyEvent& aKeyEvent, 
       
   331             TEventCode aType );
   300     TKeyResponse HandleListKeyEventL( 
   332     TKeyResponse HandleListKeyEventL( 
   301             const TKeyEvent& aKeyEvent, 
   333             const TKeyEvent& aKeyEvent, 
   302             TEventCode aType );
   334             TEventCode aType );
   303     TKeyResponse HandleSearchKeyEventL( 
   335     TKeyResponse HandleSearchKeyEventL( 
   304             const TKeyEvent& aKeyEvent, 
   336             const TKeyEvent& aKeyEvent, 
   305             TEventCode aType );
   337             TEventCode aType );
       
   338     TInt OperatorButtonHigherPriority( TInt aIndex );
   306     
   339     
   307 public: // from MWmWidgetloaderObserver
   340 public: // from MWmWidgetloaderObserver
   308     void LoadDoneL( TBool aWidgetListChanged );
   341     void LoadDoneL( TBool aWidgetListChanged );
   309     
   342     
   310 private:
   343 private:
   331     
   364     
   332     /**
   365     /**
   333      * background
   366      * background
   334      */
   367      */
   335     CAknsBasicBackgroundControlContext* iBgContext;
   368     CAknsBasicBackgroundControlContext* iBgContext;
   336 
   369     
       
   370     /**
       
   371      * portal button
       
   372      * (if there is only one button, this is it)
       
   373      */
       
   374     CWmPortalButton*         iPortalButtonOne;
       
   375 
       
   376     /**
       
   377      * portal button
       
   378      * (if there is only one button, this is NULL)
       
   379      */
       
   380     CWmPortalButton*         iPortalButtonTwo;
       
   381 
       
   382     /** whether we are orientated in landscape */
       
   383     TBool                   iLandscape;
       
   384 
       
   385     /** whether we have mirrored layout */
       
   386     TBool                   iMirrored;
       
   387 
       
   388     /** focus modes */
       
   389     enum TWmFocusMode
       
   390         {
       
   391         ENowhere,
       
   392         EPortal,
       
   393         EList,
       
   394         EFind
       
   395         };
       
   396 
       
   397     /**
       
   398      * current widget manager focus mode
       
   399      */
       
   400     TWmFocusMode            iFocusMode;
       
   401     
   337     /**
   402     /**
   338      * AO for loading widgets into the list UI
   403      * AO for loading widgets into the list UI
   339      */
   404      */
   340     CWmWidgetLoaderAo*      iWidgetLoader;
   405     CWmWidgetLoaderAo*      iWidgetLoader;
   341 
   406     
   342     /**
       
   343      * Currectly selected store.
       
   344      */
       
   345     CWmStore*               iSelectedStore;
       
   346 
       
   347     /**
   407     /**
   348      * If this is set to ETrue it means wmview is closing and all user inputs
   408      * If this is set to ETrue it means wmview is closing and all user inputs
   349      * should be ignored.
   409      * should be ignored.
   350      */
   410      */
   351     TBool                   iClosingDown;
   411     TBool                   iClosingDown;
       
   412     
       
   413     /**
       
   414      * The configuration
       
   415      */
       
   416     CWmConfiguration*       iConfiguration;
   352     
   417     
   353 #ifdef _WM_UNIT_TEST
   418 #ifdef _WM_UNIT_TEST
   354     friend class CWmUnitTest;
   419     friend class CWmUnitTest;
   355 #endif
   420 #endif
   356     };
   421     };