📄 smscryptosymbiancppuitexteditor.h
字号:
/*
* ============================================================================
* Name : SMSCryptoSymbianCppUITextEditor.h
* Part of : Open C SMS Crypto Example
* Created : 05/25/2007 by Forum Nokia
* Version : 1.0
* Copyright: Nokia Corporation
* ============================================================================
*/
#ifndef SMSCRYPTOSYMBIANCPPUITEXTEDITOR_H
#define SMSCRYPTOSYMBIANCPPUITEXTEDITOR_H
#include <coecntrl.h>
#include <utf.h>
#include <imcvcodc.h>
#include <eikedwob.h>
const TUint bufferSize = 110;
const TUint bufSizeDouble = 220;
const TUint querySize = 20;
class MEikCommandObserver;
class CEikEdwin;
/**
* Container class for SMSCryptoSymbianCppUITextEditor
*
* @class CSMSCryptoSymbianCppUITextEditor SMSCryptoSymbianCppUITextEditor.h
*/
class CSMSCryptoSymbianCppUITextEditor : public CCoeControl
,MEikEdwinObserver {
public:
// constructors and destructor
CSMSCryptoSymbianCppUITextEditor();
static CSMSCryptoSymbianCppUITextEditor* NewL(
const TRect& aRect,
const CCoeControl* aParent,
MEikCommandObserver* aCommandObserver );
static CSMSCryptoSymbianCppUITextEditor* NewLC(
const TRect& aRect,
const CCoeControl* aParent,
MEikCommandObserver* aCommandObserver );
void ConstructL(
const TRect& aRect,
const CCoeControl* aParent,
MEikCommandObserver* aCommandObserver );
virtual ~CSMSCryptoSymbianCppUITextEditor();
public:
// from base class CCoeControl
TInt CountComponentControls() const;
CCoeControl* ComponentControl( TInt aIndex ) const;
TKeyResponse OfferKeyEventL(
const TKeyEvent& aKeyEvent,
TEventCode aType );
void HandleResourceChange( TInt aType );
protected:
// from base class CCoeControl
void SizeChanged();
private:
// from base class CCoeControl
void Draw( const TRect& aRect ) const;
private:
void InitializeControlsL();
void LayoutControls();
CCoeControl* iFocusControl;
MEikCommandObserver* iCommandObserver;
public:
void SendSMSL();
void ShowNoteL(TInt note);
void ReadSMSInEditorL();
void SetSMSL(TBuf<bufferSize> aBuf);
void SetTextEditorStateL();
public:
private:
CEikEdwin* iTextEditor;
TBuf<bufferSize> iBuf;
TBool iEditable;
CnvUtfConverter iConverter;
TImCodecB64 iBase64;
protected:
void HandleEdwinEventL(
CEikEdwin* anEdwin,
TEdwinEvent anEventType );
protected:
void HandleEdit1FormatChangedL(
CEikEdwin* anEdwin,
TEdwinEvent anEventType );
public:
enum TControls
{
EEdit1,
// add any user-defined entries here...
ELastControl
};
private:
typedef void ( CSMSCryptoSymbianCppUITextEditor::*EdwinEventHandler )(
CEikEdwin* anEdwin,
TEdwinEvent event );
void AddEdwinEventHandlerL(
CEikEdwin* anEdwin,
TEdwinEvent anEvent,
EdwinEventHandler aHandler );
class TEdwinEventDispatch
{
public:
CEikEdwin* src;
TEdwinEvent event;
EdwinEventHandler handler;
};
RArray< TEdwinEventDispatch > iEdwinEventDispatch;
};
#endif // SMSCRYPTOSYMBIANCPPUITEXTEDITOR_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -