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

📄 richtexteditorcontainer.h

📁 symbian OS中关于文本编辑功能的实现
💻 H
字号:
/*
* ============================================================================
*  Name     : CRTEContainer from RichTextEditorContainer.h
*  Part of  : RichTextEditor
*  Created  : 05/08/2006 by Forum Nokia
*  Version  : 2.0
*
*  Copyright (c) 2006 - 2007 Nokia Corporation.
*  This material, including documentation and any related
*  computer programs, is protected by copyright controlled by
*  Nokia Corporation.
* ============================================================================
*/

#ifndef RTECONTAINER_H
#define RTECONTAINER_H

// INCLUDES
#include <coecntrl.h>
#include <eikrted.h>

#include "eiklabel.h"  //CEikLabel

#include "mypicture.h"
// FORWARD DECLARATIONS

// CLASS DECLARATION

/**
*  CRTEContainer  container control class.
*/
class CRTEContainer : public CCoeControl
    {
    public: // Constructors and destructor

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

        /**
        * Destructor.
        */
        ~CRTEContainer();

       /**
        * Toggle -left-center-right- alignment within the actual paragraph
        */
	void SetAlignment(CParaFormat::TAlignment );
		//! Select an area of text
	void SetSelectionL(TInt,TInt);
		//! Swicht on/off the Bold/Italic/Underline attributes
	void SetCharacterBIUAttribL(CEikGlobalTextEditor::TFontStyleFlags );

	#ifdef __SERIES60_3X__
       /**
		* Change the text's font from 3rd Edition onwards
		*/
		void SetFont(TInt aFontId);
	#else
		//! Change the text's font
		void SetFont(const CFont* );
	#endif
       /**
        * Toggle between strikethrough or not strikethrough text
        */
	void Strike();
       /**
		* Change the text's color
		*/
	void SetColor(TRgb );
		//! Demonstrate the how program use some Richtext feature
	void IntroL();

       /**
        * Create Demo Content
        */
		void DemoL();


    public: // Functions from base classes

    private:
	// New functions

		//! Prepare the Richtext Editor, set the Editor flags
		void Prepare();

		//! Apply the final settings after the Editor is activated
		void SetupL();

		//! Append Bitmap to iBitmap Array
		void PrepareBitmapL();
		//! Call Richtext's InsertL() with the CPicture
		void InsertMyPictureL(TInt aPos);

		//! Echo the last engine operation to the status line
	void Echo(TInt );


		// Functions from base classes

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


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

       /**
        * From CCoeControl,ComponentControl.
        */
        CCoeControl* ComponentControl(TInt aIndex) const;

       /**
        * From CCoeControl,Draw.
        */
        void Draw(const TRect& aRect) const;

		/**
        * From CCoeControl,OfferKeyEventL.
        */
		TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);

    private: //data
  		CEikRichTextEditor* iRtEd; // Rich Text Editor
		CArrayFixFlat<CFbsBitmap*>* iBitmap; // Reference Array for Images
		CEikLabel* iStatusLine; // Status line Label
		TBool iStrike;// Strikethrough Switch
    };

#endif

// End of File

⌨️ 快捷键说明

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