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

📄 vncoptions.h

📁 teamviewer source code vc++
💻 H
字号:
//  Copyright (C) 2006 TeamViewer GmbH. All Rights Reserved.
//
//  TeamViewer 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 program 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 program; if not, write to the Free Software
//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
//  USA.
//

#ifndef VNCOPTIONS_H__
#define VNCOPTIONS_H__ 
#pragma once

#include "../winvnc/winvnc/global.h"
#include "../winvnc/winvnc/vncauth.h"

#define NOCURSOR 0
#define DOTCURSOR 1
#define NORMALCURSOR 2

#define LASTENCODING rfbEncodingZRLE

class VNCOptions  
{
public:
	VNCOptions();
	VNCOptions& operator=(VNCOptions& s);
	virtual ~VNCOptions();
	int DoDialog(HWND parent, int resource);
	void SetFromCommandLine(LPTSTR szCmdLine);
	void FixScaling();
	void ApplyQuality();
	void SetStatus(const char *name, int width, int height, int cols, 
		           __int64 bytesread, __int64 bytessent,
				   int readlast, int readmin, int readavg, int readmax);
	void SetActiveMode(ConnectionMode cm);

	/*
	ShowRemoteCursor shows or hides the local cursor.
	This is only relevant for the client. It determines if the local cursor should be 
	displayed additionaly to the remote cursor. In a weak connection this can improve
	cursor aiming.
	This function does not affect server mode!
	The standard value TRUE is set in constructor VNCOptions::VNCOptions().

	parameter doShow Shows (true) or hides (false) the local cursor in client mode.
	return: returns the boolean value before this function was called.
	*/
	bool ShowRemoteCursor(bool doShow);

	static VOID CALLBACK TimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime);
	map<HWND, char*> helptexts;

	bool AutoScaling()
	{
		return m_fAutoScaling && m_scaling;
	}

	bool m_SetFromCommandLine;					// has options been set by commandline?

	bool m_ShowToolbar;							// display toolbar?
	bool m_FullScreen;							// use fullscreen?
	int	 m_ActiveMode;							// Connection Typ
	int  m_Quality;								// quality setting for remote control/presentation sessions
	bool m_ViewOnly;							// view only, do not send mouse/cursor actions
	char m_clearPassword[MAXPWLEN];				// contains password if it was specified on command line
	bool m_RemoveWallpaper;							
	bool m_DisableInput;
	bool m_BlackScreen;

	char m_host[255];
	int  m_port;						

	// scaling	
	bool m_fAutoScaling;						// use autoscaling?
	bool m_scaling;								// use scaling?
	int  m_scale_num;							// scaling numerator	
	int  m_scale_den;							// scaling denumerator; scaling by numerator/denumerator
	int  m_nServerScale;						// server scale factor 1/n, 1 <= n <= 9
	int  m_set_scale_num;						// explicitely set scaling factor

	// encoding
	int  m_PreferredEncoding;
	int  m_Use8Bit;
	int  m_Compression;
	const static bool m_fEnableCache = false;

	// Tight codec settings
	const static bool m_useCompressLevel = true;		// use compression?
	int  m_compressLevel;				// which compressionlevel?
	const static bool m_enableJpegCompression = true;	// use JPEG? 
	int  m_jpegQualityLevel;			// which quality?

	// mouse cursor settings
	bool m_ignoreShapeUpdates;
	bool m_requestShapeUpdates;
	int  m_localCursor;

	// misc constant settings
	const static bool m_DisableClipboard = false;		// disable clipboard transmission?
	const static bool m_NoHotKeys = false;
	const static bool m_SwapMouse = false;				// swap mouse buttons
	const static int  m_delay = 0;						// Debugging: highlight area to be update for a timespan m_delay
	const static bool m_DeiconifyOnBell = false;

	char  m_status_name[100];
	int   m_status_encoding;
	int   m_status_width;
	int   m_status_height;
	int   m_status_colors;
	int   m_status_localcolors;
	__int64 m_status_bytesread;
	__int64 m_status_bytessent;
	int	  m_status_readlast;
	int   m_status_readmin;
	int   m_status_readavg;
	int   m_status_readmax;

protected:
	static BOOL CALLBACK OptDlgProc(  HWND hwndDlg,  UINT uMsg, WPARAM wParam, LPARAM lParam );
	void InitDialog(HWND hwnd);
	void ApplyOptions(HWND hwnd);
	int m_resource;

};

#endif VNCOPTIONS_H__

⌨️ 快捷键说明

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