idlehomescreen/widgetmanager/inc/wmdetailsdlg.h
changeset 5 c743ef5928ba
parent 2 08c6ee43b396
child 38 79311d856354
equal deleted inserted replaced
4:4d54b72983ae 5:c743ef5928ba
    22 // INCLUDES
    22 // INCLUDES
    23 #include <e32base.h>
    23 #include <e32base.h>
    24 #include <AknDialog.h>
    24 #include <AknDialog.h>
    25 
    25 
    26 // FORWARD DECLARATIONS
    26 // FORWARD DECLARATIONS
       
    27 class CAknMarqueeControl;
    27 class CEikRichTextEditor;
    28 class CEikRichTextEditor;
    28 class CAknsBasicBackgroundControlContext;
    29 class CAknsBasicBackgroundControlContext;
    29 
    30 
    30 // CLASS DECLARATIONS
    31 // CLASS DECLARATIONS
    31 /**
    32 /**
    41 	static CWmDetailsDlg* NewL(
    42 	static CWmDetailsDlg* NewL(
    42 	        const TDesC& aName,
    43 	        const TDesC& aName,
    43 	        const TDesC& aDescription,
    44 	        const TDesC& aDescription,
    44 	        TBool  aCanBeAdded,
    45 	        TBool  aCanBeAdded,
    45             const CFbsBitmap* aLogoBmp,
    46             const CFbsBitmap* aLogoBmp,
    46             const CFbsBitmap* aLogoMask,
    47             const CFbsBitmap* aLogoMask );
    47             CAknsBasicBackgroundControlContext* aBgContext );
       
    48 
    48 
    49     /** Destructor. */
    49     /** Destructor. */
    50     ~CWmDetailsDlg();
    50     ~CWmDetailsDlg();
    51 
    51 
    52 public: // New functions
    52 public: // New functions
    53     /** From CAknDialog Initializes the dialog and calls
    53     /** From CAknDialog Initializes the dialog and calls
    54         CAknDialog's ExecuteLD() */
    54         CAknDialog's ExecuteLD() */
    55     TInt ExecuteLD();
    55     TInt ExecuteLD();
    56 
    56 
    57 private: // Functions from base classes
    57 private: // Functions from base classes
    58 
       
    59 	
    58 	
    60 	/** From CEikDialog Initializes dialog before layout*/
    59 	/** From CEikDialog Initializes dialog before layout*/
    61 	void PreLayoutDynInitL();
    60 	void PreLayoutDynInitL();
    62 	
    61 	
    63 	/** From CEikDialog Handles button events and looks 
    62 	/** From CEikDialog Handles button events and looks 
    64 		if the dialog can be closed */
    63 		if the dialog can be closed */
    65 	TBool OkToExitL(TInt aButtonId);
    64 	TBool OkToExitL(TInt aButtonId);
    66 	
    65 	
    67 	/** From CCoeControl Handles key events */
    66 	/** From CCoeControl Handles key events */
    68 	TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,TEventCode aType );
    67 	TKeyResponse OfferKeyEventL( 
       
    68 	        const TKeyEvent& aKeyEvent,TEventCode aType );
    69 
    69 
    70 	/** From CEikDialog Called by framework when dialog is activated */
    70 	/** From CEikDialog Called by framework when dialog is activated */
    71 	void ActivateL();
    71 	void ActivateL();
    72 
    72 
    73 	/** From CAknDialog called to provide access to the contorols */	
    73 	/** From CAknDialog called to provide access to the contorols */	
    81     
    81     
    82     /** From CCoeControl */
    82     /** From CCoeControl */
    83     TInt CountComponentControls() const;
    83     TInt CountComponentControls() const;
    84     CCoeControl* ComponentControl(TInt aIndex) const;
    84     CCoeControl* ComponentControl(TInt aIndex) const;
    85     void Draw( const TRect& aRect ) const;
    85     void Draw( const TRect& aRect ) const;
       
    86     void FocusChanged( TDrawNow aDrawNow );
       
    87 
       
    88 private: // new functions
    86     
    89     
    87     /** Desired rect for dialog */
       
    88     TRect WmDetailsDialogRect();
       
    89 
       
    90     /** Insert and format content */
    90     /** Insert and format content */
    91     void InsertAndFormatContentL();
    91     void InsertAndFormatContentL();
    92     
    92     
       
    93     /** Redraw call back for marque control */
       
    94     static TInt RedrawCallback( TAny* aPtr );
       
    95     
       
    96     /** start marque control */
       
    97     void StartMarquee();
       
    98     
       
    99     /** stop marque control */
       
   100     void StopMarquee();
       
   101 
    93 private:
   102 private:
    94 
   103 
    95   	 /** Constructor for performing 1st stage construction */
   104   	 /** Constructor for performing 1st stage construction */
    96     CWmDetailsDlg( TBool  aCanBeAdded );
   105     CWmDetailsDlg( TBool  aCanBeAdded );
    97 
   106 
    98     /** 2nd phase constructor */
   107     /** 2nd phase constructor */
    99     void ConstructL(
   108     void ConstructL(
   100 	        const TDesC& aName,
   109 	        const TDesC& aName,
   101 	        const TDesC& aDescription,
   110 	        const TDesC& aDescription,
   102             const CFbsBitmap* aLogoBmp,
   111             const CFbsBitmap* aLogoBmp,
   103             const CFbsBitmap* aLogoMask,
   112             const CFbsBitmap* aLogoMask );
   104             CAknsBasicBackgroundControlContext* aBgContext );
       
   105 
   113 
   106 private:
   114 private:
   107 	
   115 	
   108 	/**
   116 	/**
   109      * Background context (not owned)
   117      * Background context (not owned)
   112 	
   120 	
   113 	/**
   121 	/**
   114      * Richtext editor
   122      * Richtext editor
   115      */
   123      */
   116 	CEikRichTextEditor* iRtEditor;
   124 	CEikRichTextEditor* iRtEditor;
       
   125 
       
   126     /**
       
   127      * Marquee control
       
   128      */
       
   129 	CAknMarqueeControl* iMarquee;
   117 
   130 
   118 	/** 
   131 	/** 
   119      * Name of widget 
   132      * Name of widget 
   120      */
   133      */
   121     HBufC*              iName;
   134     HBufC*              iName;
   137 
   150 
   138     /** 
   151     /** 
   139      * ETrue if widget can be added to HS 
   152      * ETrue if widget can be added to HS 
   140      */
   153      */
   141     TBool               iCanBeAdded;
   154     TBool               iCanBeAdded;
       
   155 
       
   156     /** 
       
   157      * ETrue if widget name needs to be scrolled. 
       
   158      */
       
   159     TBool               iNeedToScroll;
   142 	};
   160 	};
   143 
   161 
   144 #endif ___WMDETAILSDLG_H__
   162 #endif ___WMDETAILSDLG_H__
   145 
   163 
   146 // End of File
   164 // End of File