📄 iksdemoui.h
字号:
/*
** Copyright (C) 2005 Darrell Karbott (djk2005@users.sf.net)
** This code is free software; you can redistribute it and/or modify
** it under the terms of the GNU Public Licence (GPL) version 2 See
** http://www.gnu.org/ for further details of the GPL.
*/
#ifndef __IKSDEMOUI_H__
#define __IKSDEMOUI_H__ 1
/*
** A UIQ user interface for the CIksDemo application.
*/
#include "iksdemo.h"
#include "adapters.h"
#include <qikdocument.h>
#include <qikappui.h>
#include <qikapplication.h>
#include <badesca.h>
class CIksDemoDocument : public CQikDocument {
public:
CIksDemoDocument(CEikApplication& aApp);
~CIksDemoDocument();
private:
CEikAppUi* CreateAppUiL();
};
class CIksDemoAppView;
class CIksDemoAppUi : public CQikAppUi {
public:
void ConstructL();
// REDFLAG: Needs a function to reset CIksDemo's ui instance
~CIksDemoAppUi();
void UpdateSendJidsL(const TDesC& latest);
protected:
MIksDemoUserInteractions* Cmd();
private:
void HandleConnectL();
void HandleSendMsgL();
void HandleCommandL(TInt aCommand);
private:
CIksDemo* iDemo;
CIksDemoAppView* iView;
CIksDemoUserInterfaceAdapter* iUiAdapter;
CIksDemoUserInteractionsAdapter* iInteractionAdapter;
CDesCArray* iLoginJids;
CDesCArray* iSendJids;
TBuf<64> iPassword;
};
class CIksDemoAppView : public CCoeControl, public MIksDemoUserInterface {
public:
~CIksDemoAppView();
void ConstructL(const TRect& aRect);
public:
virtual void DisplayJabberMsgFrom(const TDesC& from, const TDesC& msg );
virtual void DisplayStatusMsg(const TDesC& msg);
virtual void DisplayErrorMsg(const TDesC& msg);
virtual void UpdateConnectionStatus(TBool);
public:
//virtual TInt CountComponentControls() const;
protected:
//virtual CCoeControl* ComponentControl(TInt aIndex) const;
//void SizeChanged();
private:
void Draw(const TRect& /*aRect*/) const;
private:
TInt DrawWrappedTextL(const TDesC& text, TInt y, CWindowGc& gc) const;
private:
TBuf<MAX_MSG_LEN> iStatusMsg;
TBuf<MAX_JID_LEN> iMsgJid;
TBuf<MAX_MSG_LEN> iMsg;
TZoomFactor iZoom;
};
class CIksDemoApplication : public CQikApplication {
CApaDocument* CreateDocumentL();
TUid AppDllUid() const;
};
const TUid KUidIksDemoApp = { 0x10207045 };
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -