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

📄 numericcontrol.cpp

📁 P2P应用 : Peercast的源代码
💻 CPP
字号:
/* *  numericcontrol.cpp *  PeerCast * *  Created by mode7 on Mon Apr 05 2004. *  Copyright (c) 2002-2004 peercast.org. All rights reserved. * */#include "numericcontrol.h"void NumericControl::setIntValue( WindowRef window, const int value ){	CFStringRef controlText = CFStringCreateWithFormat( NULL, NULL, CFSTR("%d"), value );	setText( window, controlText );	CFRelease( controlText );}void NumericControl::setFloatValue( WindowRef window, const float value ){	CFStringRef controlText = CFStringCreateWithFormat( NULL, NULL, CFSTR("%f"), value );	setText( window, controlText );	CFRelease( controlText );}int NumericControl::getIntValue( WindowRef window ){	return static_cast<int>( getFloatValue( window ) );}float NumericControl::getFloatValue( WindowRef window ){	CFStringRef stringRef = getStringRef( window );		if( stringRef )	{		mValue = CFStringGetDoubleValue( stringRef );		return mValue;	}		return 0.0f;}

⌨️ 快捷键说明

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