aoexamplecontainer.h
来自「Active Object实现动画」· C头文件 代码 · 共 80 行
H
80 行
/*
* ==============================================================================
* Name : CAOExampleContainer from AOExampleContainer.h
* Part of : AOExample
* Created : 3.5.2004 by Markus Pelkonen
* Description: Declares container control for application.
* Version :
* Copyright: Nokia
* ==============================================================================
*/
#ifndef AOEXAMPLECONTAINER_H
#define AOEXAMPLECONTAINER_H
#include <coecntrl.h>
class CEikEdwin;
/**
* Declares container control for the ui class. This controller holds a one
* editor component that is used to show character data.
*/
class CAOExampleContainer : public CCoeControl, MCoeControlObserver
{
public: // methods
/**
* Two phase constructor.
* @param aRect Frame rectangle for container.
*/
void ConstructL(const TRect& aRect);
/**
* Destructor.
*/
~CAOExampleContainer();
/**
* Append 8 or 16 bit character data to the editor for viewing.
*/
void AppendTextL( const TDesC8& aText );
void AppendTextL( const TDesC16& aText );
/**
* Clear editor component.
*/
void Clear();
private: // methods
/**
* Update the editor component with data found from iBuf.
* Any '\n' character is converted to UCS_PARASEP(0x2029)
* before settting the editor component text.
*/
void UpdateTextL(TInt aFromIndex);
public: // from CCoeControl, CAOExampleAppUi uses OfferKeyEventL -> public
virtual TInt CountComponentControls() const;
virtual CCoeControl* ComponentControl( TInt aIndex ) const;
virtual TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
TEventCode aType);
private: // from MCoeControlObserver
virtual void HandleControlEventL( CCoeControl* aControl,
TCoeEvent aEventType);
private: // attributes
/** editor component used to show character data */
CEikEdwin* iTextBox;
/** internal buffer used to hold character data. */
TBuf<4096> iBuf;
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?