• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ controls::TextBox类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中gwen::controls::TextBox的典型用法代码示例。如果您正苦于以下问题:C++ TextBox类的具体用法?C++ TextBox怎么用?C++ TextBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了TextBox类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: registerSliderFloatParameter

void GwenParameterInterface::registerSliderFloatParameter(SliderParams& params)
{
	Gwen::Controls::TextBox* label = new Gwen::Controls::TextBox(m_gwenInternalData->m_demoPage->GetPage());
	m_paramInternalData->m_textLabels.push_back(label);
	//m_data->m_myControls.push_back(label);
	label->SetText( params.m_name);
	label->SetPos( 10, 10 + 25 );
	label->SetWidth(110);
	label->SetPos(10,m_gwenInternalData->m_curYposition);
	m_gwenInternalData->m_curYposition+=22;

	Gwen::Controls::HorizontalSlider* pSlider = new Gwen::Controls::HorizontalSlider( m_gwenInternalData->m_demoPage->GetPage());
	m_paramInternalData->m_sliders.push_back(pSlider);
	//m_data->m_myControls.push_back(pSlider);
	pSlider->SetPos( 10, m_gwenInternalData->m_curYposition );
	pSlider->SetSize( 100, 20 );
	pSlider->SetRange( params.m_minVal, params.m_maxVal);
	pSlider->SetNotchCount(20);//float(params.m_maxVal-params.m_minVal)/100.f);
	pSlider->SetClampToNotches( params.m_clampToNotches );
	pSlider->SetValue( *params.m_paramValuePointer);//dimensions[i] );
	char labelName[1024];
	sprintf(labelName,"%s",params.m_name);//axisNames[0]);
	MySliderEventHandler<btScalar>* handler = new MySliderEventHandler<btScalar>(labelName,label,pSlider,params.m_paramValuePointer);
	m_paramInternalData->m_sliderEventHandlers.push_back(handler);

	pSlider->onValueChanged.Add( handler, &MySliderEventHandler<btScalar>::SliderMoved );
	handler->SliderMoved(pSlider);
	float v = pSlider->GetValue();
	m_gwenInternalData->m_curYposition+=22;
}
开发者ID:NateWardawg,项目名称:bullet3,代码行数:30,代码来源:GwenParameterInterface.cpp


示例2: CreateInstance

				virtual Gwen::Controls::Base* CreateInstance( Gwen::Controls::Base* parent )
				{
					Gwen::Controls::TextBox* pControl = new Gwen::Controls::TextBox( parent );
					pControl->SetSize( 100, 20 );
					pControl->SetText( "" );
					return pControl;
				}
开发者ID:APerennec,项目名称:GWEN,代码行数:7,代码来源:TextBox_Factory.cpp


示例3:

	GWEN_CONTROL_INLINE( TextBox, GUnit )
	{
		{
			Gwen::Controls::TextBox* label = new Gwen::Controls::TextBox( this );
			label->SetText( "" );
			label->SetPos( 10, 10 );
			label->onTextChanged.Add( this, &ThisClass::OnEdit );
			label->onReturnPressed.Add( this, &ThisClass::OnSubmit );

		}

		{
			Gwen::Controls::TextBox* label = new Gwen::Controls::TextBox( this );
			label->SetText( "Normal Everyday Label" );
			label->SetPos( 10, 10 + 25 );
		}

		{
			Gwen::Controls::TextBox* label = new Gwen::Controls::TextBox( this );
			label->SetText( "Select All Text On Focus" );
			label->SetPos( 10, 10 + 25 * 2 );
			label->SetSelectAllOnFocus( true );
		}

		{
			Gwen::Controls::TextBox* label = new Gwen::Controls::TextBox( this );
			label->SetText( L"Different Coloured Text, for some reason" );
			label->SetTextColor( Gwen::Color( 255, 0, 255, 255 ) );
			label->SetPos( 10, 10 + 25 * 3 );
		}

		{
			Gwen::Controls::TextBoxNumeric* label = new Gwen::Controls::TextBoxNumeric( this );
			label->SetText( L"2004" );
			label->SetTextColor( Gwen::Color( 255, 0, 255, 255 ) );
			label->SetPos( 10, 10 + 25 * 4 );
		}

		{
			m_Font.facename = L"Impact";
			m_Font.size = 50;

			Gwen::Controls::TextBox* label = new Gwen::Controls::TextBox( this );
			label->SetText( L"Different Font" );
			label->SetPos( 10, 10 + 25 * 5 );
			label->SetFont( &m_Font );
			label->SetSize( 200, 55 );
		}


	}
开发者ID:Azon099,项目名称:networked-iv,代码行数:51,代码来源:TextBox.cpp


示例4: OnSubmit

	void OnSubmit( Gwen::Controls::Base* pControl )
	{
		Gwen::Controls::TextBox* textbox = (Gwen::Controls::TextBox*) (pControl);
		UnitPrint( Utility::Format( L"Textbox Submit: [%s]\n", textbox->GetText().c_str() ) );
	}
开发者ID:Azon099,项目名称:networked-iv,代码行数:5,代码来源:TextBox.cpp


示例5:

	GWEN_CONTROL_INLINE( TextBox, GUnit )
	{
		{
			Gwen::Controls::TextBox* label = new Gwen::Controls::TextBox( this );
			label->SetText( "" );
			label->SetPos( 10, 10 );
			label->onTextChanged.Add( this, &ThisClass::OnEdit );
			label->onReturnPressed.Add( this, &ThisClass::OnSubmit );

		}

		{
			Gwen::Controls::TextBox* label = new Gwen::Controls::TextBox( this );
			label->SetText( "Normal Everyday Label" );
			label->SetPos( 10, 10 + 25 );
		}

		{
			Gwen::Controls::TextBox* label = new Gwen::Controls::TextBox( this );
			label->SetText( "Select All Text On Focus" );
			label->SetPos( 10, 10 + 25 * 2 );
			label->SetSelectAllOnFocus( true );
		}

		{
			Gwen::Controls::TextBox* label = new Gwen::Controls::TextBox( this );
			label->SetText( L"Different Coloured Text, for some reason" );
			label->SetTextColor( Gwen::Color( 255, 0, 255, 255 ) );
			label->SetPos( 10, 10 + 25 * 3 );
		}

		{
			Gwen::Controls::TextBoxNumeric* label = new Gwen::Controls::TextBoxNumeric( this );
			label->SetText( L"2004" );
			label->SetTextColor( Gwen::Color( 255, 0, 255, 255 ) );
			label->SetPos( 10, 10 + 25 * 4 );
		}

		{
			m_Font.facename = L"Impact";
			m_Font.size = 50;

			Gwen::Controls::TextBox* label = new Gwen::Controls::TextBox( this );
			label->SetText( L"Different Font" );
			label->SetPos( 10, 10 + 25 * 5 );
			label->SetFont( &m_Font );
			label->SetSize( 200, 55 );
		}

		{
			Gwen::Controls::TextBoxMultiline* label = new Gwen::Controls::TextBoxMultiline( this );
			label->SetText( "I think we're losing sight of the real issue here, which is: what are we gonna call ourselves?\n\nErm, and I think it comes down to a choice between \"The League Against Salivating Monsters\" or my own personal preference, which is \"The Committee for the Liberation and Integration of Terrifying Organisms and their Rehabilitation Into Society.\" Erm, one drawback with that: the abbreviation is \"CLITORIS.\"" );
			label->SetPos( 220, 10 );
			label->SetSize( 200, 180 );
		}

	}
开发者ID:CmPons,项目名称:angel2d,代码行数:57,代码来源:TextBox.cpp


示例6: OnEdit

		void OnEdit( Gwen::Controls::Base* pControl )
		{

			Gwen::Controls::TextBox* textbox = ( Gwen::Controls::TextBox* )( pControl );
			UnitPrint( Utility::Format( L"Textbox Edit: [%ls]\n", textbox->GetText().GetUnicode().c_str() ) );
		}
开发者ID:APerennec,项目名称:GWEN,代码行数:6,代码来源:TextBox.cpp


示例7: float

	void	SetValue(T v)
	{
		if (v < m_pSlider->GetRangeMin())
		{
			printf("?\n");
		}

		if (v > m_pSlider->GetRangeMax())
		{
						printf("?\n");

		}
		m_pSlider->SetValue(v,true);
		(*m_targetValue) = v;
		float val = float(v);//todo: specialize on template type
		char txt[1024];
		sprintf(txt,"%s : %.3f", m_variableName,val);
		m_label->SetText(txt);

	}
开发者ID:NateWardawg,项目名称:bullet3,代码行数:20,代码来源:GwenParameterInterface.cpp



注:本文中的gwen::controls::TextBox类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ controls::TreeNode类代码示例发布时间:2022-05-31
下一篇:
C++ controls::Label类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap