examples/SFExamples/Wikipedia/inc/RecCountContainer.h

00001 // 
00002 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
00003 // All rights reserved.
00004 // This component and the accompanying materials are made available
00005 // under the terms of the License "Eclipse Public License v1.0"
00006 // which accompanies this distribution, and is available
00007 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
00008 // 
00009 // Initial Contributors:
00010 // Nokia Corporation - initial contribution.
00011 // 
00012 // Contributors:
00013 // 
00014 // Description:
00015 // 
00016 
00017 
00018 
00019 #ifndef __RECCOUNT_CONTAINER_H__
00020 #define __RECCOUNT_CONTAINER_H__
00021 
00022 
00023 
00024 // INCLUDES
00025 #include <aknview.h>
00026 #include <akndef.h>
00027 #include "WikiDb.h"
00028 
00029 // FORWARD DECLARATION
00030 class CSearchView;
00031 class CWikiDb;
00032 class CAknsBasicBackgroundControlContext;
00033 
00034 // CLASS DECLARATION
00035 
00041 class CRecCountContainer : public CCoeControl
00042     {
00043     public: // Constructors and destructor
00044 
00052         static CRecCountContainer* NewL( const TRect& aRect, CSearchView& aView );
00053 
00061         static CRecCountContainer* NewLC( const TRect& aRect, CSearchView& aView );
00062 
00068         void ConstructL( const TRect& aRect );
00069                 
00074         ~CRecCountContainer();
00075 
00076     private: // Constructor
00077     
00082         CRecCountContainer( CSearchView& aView );    
00083         
00084     public: // from CoeControl
00085 
00090         void Draw( const TRect& aRect ) const;    
00091     
00096         TInt CountComponentControls() const;
00097 
00103         CCoeControl* ComponentControl( TInt aIndex ) const;
00104         
00108         void SizeChanged();
00109          
00113         void HandleResourceChange( TInt aType );    
00114         
00118         TTypeUid::Ptr MopSupplyObject( TTypeUid aId );        
00119         
00120     public: // New functions
00121 
00122                 void SetTextL( TInt aNumRecords );
00123         
00124     private: // New functions
00125 
00126         HBufC* FormatStringL( const TDesC& aString, const TInt aNumRecords );
00127     
00128     public: // Member data
00129     
00130         CAknsBasicBackgroundControlContext* iBackground;
00131         
00132     private: // Member data
00133 
00137         CSearchView& iView;
00138         
00142         CWikiDb& iWikiEngine;
00143         
00147         HBufC* iText;
00148     };
00149 
00150 #endif // __RECCOUNT_CONTAINER_H__
00151 
00152 
00153 // End of File

Generated by  doxygen 1.6.2