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

📄 vncviewerappui.h

📁 vncviewer_source_1.0
💻 H
字号:
/* Copyright (C) 2006 Lucas Gomez  All Rights Reserved.
 * 
 * This is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this software; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
 * USA.
 */

#ifndef __VNCVIEWERAPPUI_H__
#define __VNCVIEWERAPPUI_H__

// INCLUDES
#include <aknviewappui.h>

#include "VncViewerAppView.h"
#include "ViewportView.h"
#include "Conn.h"
#include "DesktopWindowContainer.h"

// CONSTANTS
const TInt KStringSize=256;

// LITERALS
_LIT(KVersion,"1.0");

// CLASS DECLARATION
/**
* CVncViewerAppUi application UI class.
* Interacts with the user through the UI and request message processing
* from the handler class
*/
class CVncViewerAppUi : public CAknViewAppUi
{
public:
	/**
	 * CVncViewerAppUi.
	 * C++ default constructor. This needs to be public due to
	 * the way the framework constructs the AppUi
	 */
	CVncViewerAppUi();
	
private:
	/**
	 * ConstructL.
	 * 2nd phase constructor.
	 */
	void ConstructL();
	
	/**
	 * ~CVncViewerAppUi.
	 * Virtual Destructor.
	 */
	~CVncViewerAppUi();
	
public:
	/* From MVncViewerViewCallback */
	/**
	 * Connect()
	 * Initiates the connection with the VNC server
	 *
	 * @return N/A
	 */
	void Connect();
	
	void ConnError(const TDesC8& aError);
	
	TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
	
	/**
	* HandleCommandL
    * Takes care of command handling.
    * @param aCommand Command to be handled.
    */
    void HandleCommandL(TInt aCommand);
    
    
    inline TBool GetAutoSelect() {return iConn->GetAutoSelect();}
    
    inline TEncodings GetEncoding() {return iConn->GetEncoding();}
    
    inline TInt GetColourLevel() {return iConn->GetColourLevel();}
    
    inline TBool GetViewOnly() {return iConn->GetViewOnly();}
    
    inline TBool GetAcceptClipboard() {return iConn->GetAcceptClipboard();}
    
    inline TBool GetSendClipboard() {return iConn->GetSendClipboard();}
    
    inline TBool GetShared() {return iConn->GetShared();}
    
    inline TBool GetUseLocalCursor() {return iConn->GetUseLocalCursor();}
    
    inline TBool GetFastCopyRect() {return iConn->GetFastCopyRect();}
    
    
    inline void SetAutoSelect(TBool aAutoSelect) {iConn->SetAutoSelect(aAutoSelect);}
    
    inline void SetEncoding(TEncodings aEncoding) {iConn->SetEncoding(aEncoding);}
    
    inline void SetColourLevel(TInt aColourLevel) {iConn->SetColourLevel(aColourLevel);}
    
    inline void SetViewOnly(TBool aViewOnly) {iConn->SetViewOnly(aViewOnly);}
    
    inline void SetAcceptClipboard(TBool aAcceptClipboard) {iConn->SetAcceptClipboard(aAcceptClipboard);}
    
    inline void SetSendClipboard(TBool aSendClipboard) {iConn->SetSendClipboard(aSendClipboard);}
    
    inline void SetShared(TBool aShared) {iConn->SetShared(aShared);}
    
    inline void SetUseLocalCursor(TBool aUseLocalCursor) {iConn->SetUseLocalCursor(aUseLocalCursor);}
    
    inline void SetFastCopyRect(TBool aFastCopyRect) {iConn->SetFastCopyRect(aFastCopyRect);}
    
    
    inline CDesktopWindowContainer* GetDesktopWindow() {return iViewportView->GetDesktopWindow();}
    
private: // Data

	/**
	 * The application view
	 * Owned by CVncViewerAppUi
	 */
	CVncViewerAppView* iAppView;	
	/**
	 * The viewport view
	 * Owned by CVncViewerAppUi
	 */
	CViewportView* iViewportView;
	
	/*
	 * The connection object
	 * Owned by CVncViewerAppUi
	 */
	CConn* iConn;
	
	TBuf<KStringSize> iVncServerName;
	TInt iVncServerPort;
};

#endif // __VncViewerAPPUI_H__

// End of File

⌨️ 快捷键说明

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