S60 3rd Edition API Reference: aknmessagequerycontrol.h Source File

aknmessagequerycontrol.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name     : aknmessagequerycontrol.h
00004 *  Part of  : AVKON
00005 *
00006 *  Description:
00007 *  Interface to control to implement message queries, 
00008 *  to be contained within CAknMessageQueryDialog
00009 * 
00010 *  Version  : %version: e003sa01#21 %
00011 *
00012 *  Copyright © 2002 - 2006 Nokia Corporation.
00013 *  This material, including documentation and any related 
00014 *  computer programs, is protected by copyright controlled by 
00015 *  Nokia Corporation. All rights are reserved. Copying, 
00016 *  including reproducing, storing,  adapting or translating, any 
00017 *  or all of this material requires the prior written consent of 
00018 *  Nokia Corporation. This material also contains confidential 
00019 *  information which may not be disclosed to others without the 
00020 *  prior written consent of Nokia Corporation.
00021 */
00022 
00023 #ifndef AKNMESSAGEQUERYCONTROL_H
00024 #define AKNMESSAGEQUERYCONTROL_H
00025 
00026 // INCLUDES
00027 
00028 #include <AknControl.h>
00029 #include <aknutils.h>
00030 
00031 // FORWARD DECLARATIONS
00032 
00033 class CEikEdwin;
00034 class CEikScrollBarFrame;
00035 class CEikRichTextEditor;
00036 class CRichText;
00037 
00038 
00039 // CLASS DECLARATION
00040 
00047 NONSHARABLE_CLASS(CAknMessageQueryControl) : public CAknControl
00048     {
00049 public: 
00050 
00054     CAknMessageQueryControl();
00055     
00059     ~CAknMessageQueryControl();
00060     
00061     
00067     IMPORT_C void ConstructFromResourceL( TResourceReader& aReader );
00068   
00073     IMPORT_C void SetMessageTextL( TDesC* aMessage );
00074 
00079     inline TInt Lines() const;
00080     
00086     TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode );
00087             
00088 #start_choice IN_3_1_SDK
00089 
00096     void SetMessageTextWithLinksL( TDesC* aMessage, RArray<TDesC*>* aLinkTextArray, 
00097         RArray<TInt>* aLinkTextLocationArray );
00098 #end_choice IN_3_1_SDK
00099 
00105     TInt CurrentLink() const;
00106 
00112     TBool LinkHighLighted();    
00113 #start_choice IN_3_1_SDK
00114 
00121     void SkipBGDraw(TBool aSkipBGDraw);
00122 #end_choice IN_3_1_SDK
00123     
00124 #start_since SINCE_3_1_SDK
00125 
00130     void SetListQLayout(TBool aListQLayout);
00131 #end_since SINCE_3_1_SDK
00132 
00133 public:  // from CCoeControl
00134     
00139     TSize MinimumSize();
00140     
00146     TInt CountComponentControls() const;
00147     
00154     CCoeControl* ComponentControl( TInt anIndex ) const;
00155     
00160     void SizeChanged();
00161     
00166     virtual void ActivateL();
00167 
00172     void HandlePointerEventL( const TPointerEvent& aPointerEvent );
00173     
00174 private:
00175     void CalculateNumberOfScreens();
00176     void UpdateScrollIndicatorL();
00177     
00178     void SetHighlightOnL( TBool aOn );   
00179     TBool IsLinkVisible( TInt aIndex ) const;    
00180         
00181     /*
00182     * Fetches the visible links from the links array
00183     * 
00184     */
00185     void CountCurrentVisible();
00186 
00187     /*
00188     *  Moves between visible links on the screen
00189     */
00190     TBool FirstVisible();    
00191     TBool LastVisible();
00192     TBool NextVisible();
00193     TBool PreviousVisible();
00194     
00195     /*
00196     *  Initialisation functions
00197     */    
00198     void CreateEditorL();
00199     void LayoutEditorL();        
00200     
00201 private:
00202     /*
00203     * changed editor from CEikEdwin to CEikRichTextEditor
00204     * 
00205     */
00206     CEikRichTextEditor* iEdwin;
00207     TInt iNumberOfLines;
00208     TInt iCurrentScreen;
00209     TInt iNumberOfScreens;
00210 
00211     CEikScrollBarFrame* iSBFrame;
00212     TInt iRowsPerPage; // Number of rows that fits to the dialog 
00213     TBool iListQLayout; // If ETrue, used by listqueryDialog
00214 
00215     //
00216     // with link extension introduced 
00217     TBool iHighlightOn;
00218     TBool iHLBeforePrevScrollDown;
00219     TBool iHLBeforePrevScrollUp;
00220     TCharFormatMask iCharFormatMask;
00221     TCharFormat iCharFormat;
00222     
00223     //
00224     // with multiple link support 
00225     RArray<TInt> iLinkTextLocationArray;
00226     RArray<TDesC*> iLinkTextArray;
00227     RArray <TInt> iVisibleLinkArray;
00228     TInt iCurrentLink;
00229     TInt iLinkCount;
00230     
00231 protected:
00237     IMPORT_C void Draw( const TRect& aRect ) const;
00238 
00239 
00240 protected:
00246     TRect LayoutRect() const;
00247     };
00248 
00249 inline TInt CAknMessageQueryControl::Lines() const
00250     {
00251     return iNumberOfLines;
00252     }
00253 
00254 // AKNMESSAGEQUERYCONTROL_H
00255 #endif
00256 
00257 // End of file

Copyright © Nokia Corporation 2001-2007
Back to top