idlehomescreen/widgetmanager/inc/wmdetailsdlg.h
changeset 1 5315654608de
child 2 08c6ee43b396
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/idlehomescreen/widgetmanager/inc/wmdetailsdlg.h	Thu Jan 07 12:39:41 2010 +0200
@@ -0,0 +1,147 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies)..
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Declares widget details dialog for WidgetManager
+*
+*/
+
+#ifndef ___WMDETAILSDLG_H__
+#define ___WMDETAILSDLG_H__
+
+// INCLUDES
+#include <e32base.h>
+#include <AknDialog.h>
+
+// FORWARD DECLARATIONS
+class CEikRichTextEditor;
+class CAknsBasicBackgroundControlContext;
+
+// CLASS DECLARATIONS
+/**
+ * CWmDetailsDlg
+ */
+NONSHARABLE_CLASS( CWmDetailsDlg ): public CAknDialog
+	{
+public:
+    
+    /**
+     * Two-phased constructor.
+     */
+	static CWmDetailsDlg* NewL(
+	        const TDesC& aName,
+	        const TDesC& aDescription,
+	        TBool  aCanBeAdded,
+            const CFbsBitmap* aLogoBmp,
+            const CFbsBitmap* aLogoMask,
+            CAknsBasicBackgroundControlContext* aBgContext );
+
+    /** Destructor. */
+    ~CWmDetailsDlg();
+
+public: // New functions
+    /** From CAknDialog Initializes the dialog and calls
+        CAknDialog's ExecuteLD() */
+    TInt ExecuteLD();
+
+private: // Functions from base classes
+
+	
+	/** From CEikDialog Initializes dialog before layout*/
+	void PreLayoutDynInitL();
+	
+	/** From CEikDialog Handles button events and looks 
+		if the dialog can be closed */
+	TBool OkToExitL(TInt aButtonId);
+	
+	/** From CCoeControl Handles key events */
+	TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,TEventCode aType );
+
+	/** From CEikDialog Called by framework when dialog is activated */
+	void ActivateL();
+
+	/** From CAknDialog called to provide access to the contorols */	
+	TTypeUid::Ptr MopSupplyObject( TTypeUid aId );
+	
+	/** From CAknDialog */
+    void SetSizeAndPosition( const TSize& aSize );
+
+	/** From CCoeControl */
+	void SizeChanged();
+    
+    /** From CCoeControl */
+    TInt CountComponentControls() const;
+    CCoeControl* ComponentControl(TInt aIndex) const;
+    void Draw( const TRect& aRect ) const;
+    
+    /** Desired rect for dialog */
+    TRect WmDetailsDialogRect();
+
+    /** Insert and format content */
+    void InsertAndFormatContentL();
+    
+private:
+
+  	 /** Constructor for performing 1st stage construction */
+    CWmDetailsDlg( TBool  aCanBeAdded );
+
+    /** 2nd phase constructor */
+    void ConstructL(
+	        const TDesC& aName,
+	        const TDesC& aDescription,
+            const CFbsBitmap* aLogoBmp,
+            const CFbsBitmap* aLogoMask,
+            CAknsBasicBackgroundControlContext* aBgContext );
+
+private:
+	
+	/**
+     * Background context (not owned)
+     */
+	CAknsBasicBackgroundControlContext* iBgContext;
+	
+	/**
+     * Richtext editor
+     */
+	CEikRichTextEditor* iRtEditor;
+
+	/** 
+     * Name of widget 
+     */
+    HBufC*              iName;
+
+	/** 
+     * Description of widget 
+     */
+    HBufC*              iDescription;
+
+	/** 
+     * Logo image
+     */
+    CFbsBitmap*         iLogoBmp;
+
+	/** 
+     * Logo mask
+     */
+    CFbsBitmap*         iLogoMask;
+
+    /** 
+     * ETrue if widget can be added to HS 
+     */
+    TBool               iCanBeAdded;
+    
+	};
+
+#endif ___WMDETAILSDLG_H__
+
+// End of File