⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aknexeditorcontainer.h

📁 一个S60V3 FP1 的编辑软件
💻 H
字号:
/*
* ==============================================================================
*  Name        : aknexeditorcontainer.h
*  Part of     : Editor example
*  Interface   :
*  Description :
*  Version     :
*
*  Copyright (c) 2004 - 2006 Nokia Corporation.
*  This material, including documentation and any related
*  computer programs, is protected by copyright controlled by
*  Nokia Corporation.
* ==============================================================================
*/

#ifndef __AKNEXEDITORCONTAINER_H__
#define __AKNEXEDITORCONTAINER_H__

// INCLUDES
#include <aknview.h>

// Definitions

// Constants
const TInt KNumberOfControls    = 2;
const TInt KBufLength           = 64;
_LIT( KAknExEditorFilePath, "text.txt");

// Enumerations
enum TControls
    {
    EGTextEdPrompt,
    EGTextEd
    };

// FORWARD DECLARATIONS
class CEikLabel;        // for example labels
class CEikEdwin;
class CEikGlobalTextEditor;

// CLASS DECLARATION

/**
*  CAknExEditorContainer  container control class.
*/
class CAknExEditorContainer : public CCoeControl, MCoeControlObserver
    {
    public: // Constructors and destructor
        /**
        * CAknExEditorContainer
        * C++ default constructor.
        */
        CAknExEditorContainer();

        /**
        * ConstructL
        * Default constructor.
        * @param aRect Frame rectangle for container.
        */
        void ConstructL( const TRect& aRect );

        /**
        * ~CAknExEditorContainer
        * Destructor.
        */
        virtual ~CAknExEditorContainer();

    public: // New functions

        /**
        * SetSystemFontL
        * Change font style using system font
        * @param aFontEnum Enumeration for system font in avkon.hrh
        */
        void SetSystemFontL( TInt aFontEnum );

        /**
        * TestSelectedCase
        * @param aCommand selected case
        */
        void TestSelectedCase( TInt aCommand );

        /**
        * ClearTextL
        * Clears the text
        */
        void ClearTextL();

        /**
        * ScrollTextL
        * Scrolls text
        * @param aCommand selected command
        */
        void ScrollTextL( TInt aCommand );

        /**
        * SaveToFileL
        * Saves current text into a file.
        */
        void SaveToFileL();

        /**
        * SaveToFileL
        * Opens a text from a file.
        */
        void OpenFileL();


    private: // Functions from base classes

        /**
        * From CoeControl,SizeChanged.
        */
        void SizeChanged();

        /**
        * From CoeControl,CountComponentControls.
        */
        TInt CountComponentControls() const;

        /**
        * From CCoeControl,ComponentControl.
        * @param aIndex of control
        */
        CCoeControl* ComponentControl( TInt aIndex ) const;

        /**
        * OfferKeyEventL
        * From CCoeControl, Handles key event.
        * @param aKeyEvent The key event.
        * @param aType The type of the event.
        * @return Indicates whether or not the key event was
        *           used by this control.
        */
        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
                                    TEventCode aType );

    private:
        /**
        * HandleControlEventL
        * From MCoeControlObserver, Handles an event of type aEventType
        * @param aControl Pointer to component control
        * @param aEventType Event Code
        */
        void HandleControlEventL( CCoeControl* /*aControl*/,
                                  TCoeEvent /*aEventType*/ );

    private: //data

        /**
        * iLabel
        * Owned by CAknExEditorContainer object.
        */
        CEikLabel*                  iLabel;
        /**
        * iGTextEd, Global Rich Text Editor
        * Owned by CAknExEditorContainer object.
        */
        CEikGlobalTextEditor*       iGTextEd;
    };

#endif // __AKNEXEDITORCONTAINER_H__

// End of File

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -