photosgallery/viewframework/views/cloudview/inc/glxtagscontextmenucontrol.h
branchRCL_3
changeset 25 191387a8b767
parent 22 2dac0fdba72b
child 32 78ad99c24f08
equal deleted inserted replaced
22:2dac0fdba72b 25:191387a8b767
    38      * @param aCommand command to be handled
    38      * @param aCommand command to be handled
    39      */
    39      */
    40     virtual void HandleGridMenuListL(TInt aCommand) = 0;
    40     virtual void HandleGridMenuListL(TInt aCommand) = 0;
    41     };
    41     };
    42 
    42 
    43 class CGlxTagsContextMenuControl  : public CAlfControl, public MGlxTimerNotifier
    43 class CGlxTagsContextMenuControl : public CAlfControl,
    44         
    44         public MGlxTimerNotifier
       
    45 
    45     {
    46     {
    46 public:
    47 public:
    47     /**     
    48     /**     
    48      *  Perform the two phase construction
    49      *  Perform the two phase construction
    49      *  @param aItemMenuObserver - handles the menu items in grid layout
    50      *  @param aItemMenuObserver - handles the menu items in grid layout
    50      *  @return Pointer to newly created object
    51      *  @return Pointer to newly created object
    51      */
    52      */
    52     static CGlxTagsContextMenuControl* NewL( MGlxItemMenuObserver& aItemMenuObserver );
    53     static CGlxTagsContextMenuControl* NewL(
       
    54             MGlxItemMenuObserver& aItemMenuObserver);
    53     /**     
    55     /**     
    54      *  Perform the two phase construction
    56      *  Perform the two phase construction
    55      *  @param aItemMenuObserver - handles the menu items in grid layout
    57      *  @param aItemMenuObserver - handles the menu items in grid layout
    56      *  @return Pointer to newly created object
    58      *  @return Pointer to newly created object
    57      */
    59      */
    58     static CGlxTagsContextMenuControl* NewLC( MGlxItemMenuObserver& aItemMenuObserver );
    60     static CGlxTagsContextMenuControl* NewLC(
       
    61             MGlxItemMenuObserver& aItemMenuObserver);
    59     /**
    62     /**
    60      * Destroy the object and release all memory objects
    63      * Destroy the object and release all memory objects
    61      */
    64      */
    62     ~CGlxTagsContextMenuControl();
    65     ~CGlxTagsContextMenuControl();
    63     
    66 
    64 public://MGlxTimernotifier
    67 public:
       
    68     //MGlxTimernotifier
    65     /**
    69     /**
    66      * Virtual Function from MGlxTimernotifier
    70      * Virtual Function from MGlxTimernotifier
    67      */
    71      */
    68     void TimerComplete();
    72     void TimerComplete();
    69     
    73 
    70 public:
    74 public:
    71     /**
    75     /**
    72      * Sets the grid layout on the screen with the Point specified
    76      * Sets the grid layout on the screen with the Point specified
    73      * @param aPoint - Point from which grid has to be displayed
    77      * @param aPoint - Point from which grid has to be displayed
    74      */
    78      */
    75     void SetDisplay(const TPoint& aPoint);  
    79     void SetDisplay(const TPoint& aPoint);
    76     /**
    80     /**
    77      * Hides/shows the grid layout
    81      * Hides/shows the grid layout
    78      * @param aOpacity - Opacity value
    82      * @param aOpacity - Opacity value
    79      */
    83      */
    80     void ShowItemMenu(TBool aOpacity);
    84     void ShowItemMenu(TBool aOpacity);
    83      * @return value of menu's visibility
    87      * @return value of menu's visibility
    84      */
    88      */
    85     TBool ItemMenuVisibility();
    89     TBool ItemMenuVisibility();
    86 
    90 
    87     /**
    91     /**
    88     * Sets the drawable screen rect 
    92      * Sets the drawable screen rect 
    89     * It also handles coordinates changed from Orientation
    93      * It also handles coordinates changed from Orientation
    90     * @param aRect - rect area where the Tags are drawn
    94      * @param aRect - rect area where the Tags are drawn
    91     */
    95      */
    92     void SetViewableRect(TRect aRect);
    96     void SetViewableRect(TRect aRect);
    93     
    97 
    94 private:
    98 private:
    95     /**     
    99     /**     
    96      *  constructor 
   100      *  constructor 
    97      *  @param aItemMenuObserver - handles the menu items in grid layout
   101      *  @param aItemMenuObserver - handles the menu items in grid layout
    98      */
   102      */
    99     CGlxTagsContextMenuControl( MGlxItemMenuObserver& aItemMenuObserver );
   103     CGlxTagsContextMenuControl(MGlxItemMenuObserver& aItemMenuObserver);
   100 
   104 
   101     /** 
   105     /** 
   102      *  Perform the second phase of two phase construction
   106      *  Perform the second phase of two phase construction
   103      */
   107      */
   104     void ConstructL();
   108     void ConstructL();
   105     
   109 
   106     /** 
   110     /** 
   107      *  Creates the font 
   111      *  Creates the font 
   108      *  @return the fontId
   112      *  @return the fontId
   109      */
   113      */
   110     TInt CreateFontL();
   114     TInt CreateFontL();
   111     /** 
   115     /** 
   112      *  Creates the menulist and sets the Text style 
   116      *  Creates the menulist and sets the Text style 
   113      *  @param aFontId - Sets the text style
   117      *  @param aFontId - Sets the text style
   114      */
   118      */
   115     void CreateMenuListL(TInt aFontId);
   119     void CreateMenuListL(TInt aFontId);
   116     
   120 
   117     /** 
   121     /** 
   118     *  Calculates the maximum text width of menu items 
   122      *  Calculates the maximum text width of menu items 
   119     */
   123      */
   120     void CalculateMaxWidth();
   124     void CalculateMaxWidth();
       
   125     /** 
       
   126      *  Draws the line separators in Stylus menu
       
   127      */
       
   128     void DrawLineSeparatorsL();
   121     /**     
   129     /**     
   122      *  Perform the two phase construction
   130      *  Perform the two phase construction
   123      *  @param  aEvent - key Event to handle
   131      *  @param  aEvent - key Event to handle
   124      *  @return EKeyWasConsumed if key event is processed,
   132      *  @return EKeyWasConsumed if key event is processed,
   125      *         otherwise EKeyWasNotConsumed
   133      *         otherwise EKeyWasNotConsumed
   126      */
   134      */
   127     TBool OfferEventL(const TAlfEvent& aEvent);
   135     TBool OfferEventL(const TAlfEvent& aEvent);
   128 
   136 
   129 private:
   137 private:
   130     
   138 
   131     //Observer to handle the menu items in grid layout
   139     //Observer to handle the menu items in grid layout
   132     MGlxItemMenuObserver& iItemMenuObserver;          
   140     MGlxItemMenuObserver& iItemMenuObserver;
   133     
   141 
   134     //Grid layout, not owning
   142     //Grid layout, not owning
   135     CAlfGridLayout* iGrid;
   143     CAlfGridLayout* iGrid;
   136     /** The Alf environment*/
   144     /** The Alf environment*/
   137     CAlfEnv* iAlfEnv;
   145     CAlfEnv* iAlfEnv;
   138     
   146 
   139     //Slideshow text, not owning
   147     //Slideshow text, not owning
   140     CAlfTextVisual* iSlideshowTextVisual;     
   148     CAlfTextVisual* iSlideshowTextVisual;
   141     
   149 
   142     //Delete text, not owning
   150     //Delete text, not owning
   143     CAlfTextVisual* iDeleteTextVisual;
   151     CAlfTextVisual* iDeleteTextVisual;
   144     
   152 
   145     //Rename text, not owning
   153     //Rename text, not owning
   146     CAlfTextVisual* iRenameTextVisual;        
   154     CAlfTextVisual* iRenameTextVisual;
   147     
   155 
   148     // Anchor Layout
   156     // Anchor Layout
   149     CAlfAnchorLayout* iMainVisual;                
   157     CAlfAnchorLayout* iMainVisual;
   150    
   158 
   151     //variable used for providing delay
   159     //variable used for providing delay
   152     CGlxBubbleTimer* iTimer;                                 
   160     CGlxBubbleTimer* iTimer;
   153    
   161 
   154     //Viewable rect
   162     //Viewable rect
   155     TRect iViewableRect;                                    
   163     TRect iViewableRect;
   156     
   164 
   157     //flag for stylus menu visibility
   165     //flag for stylus menu visibility
   158     TBool iItemMenuVisibility;                                         
   166     TBool iItemMenuVisibility;
   159     //Maximum text width of a menu item
   167     //Maximum text width of a menu item
   160     TInt iMaxTextWidth;
   168     TInt iMaxTextWidth;
   161     };
   169     };
   162 
   170 
   163 #endif /* GLXTAGSCONTEXTMENUCONTROL_H_ */
   171 #endif /* GLXTAGSCONTEXTMENUCONTROL_H_ */