当前位置: 首页>>代码示例>>C++>>正文


C++ GLUI_Spinner::disable方法代码示例

本文整理汇总了C++中GLUI_Spinner::disable方法的典型用法代码示例。如果您正苦于以下问题:C++ GLUI_Spinner::disable方法的具体用法?C++ GLUI_Spinner::disable怎么用?C++ GLUI_Spinner::disable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GLUI_Spinner的用法示例。


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

示例1: PCGetGluiSubwin

void 
CTfUi::_InitFunc()
{
	assert(pcTransFunc);

											// move the File panel to above the Edit panel
											// add new control for accessing TF as files
	GLUI_Rollout* pcFilePanel = PCGetGluiSubwin()->add_rollout("File", false);
		pcEditText_Dir		= PCGetGluiSubwin()->add_edittext_to_panel(pcFilePanel, "Dir",		GLUI_EDITTEXT_TEXT, szDir,		IAddWid(FILE_DIR),		&CGlutWin::_GluiCB_static);
		pcEditText_Filename = PCGetGluiSubwin()->add_edittext_to_panel(pcFilePanel, "Filename", GLUI_EDITTEXT_TEXT, szFilename, IAddWid(FILE_FILENAME), &CGlutWin::_GluiCB_static);
		PCGetGluiSubwin()->add_button_to_panel(pcFilePanel, "Save", IAddWid(FILE_SAVE), &CGlutWin::_GluiCB_static);
		PCGetGluiSubwin()->add_button_to_panel(pcFilePanel, "Open", IAddWid(FILE_OPEN), &CGlutWin::_GluiCB_static);

									// by default, use current director and *.* as the filename
	char szDir[1024+1];
	#if defined(WIN32)
		GetCurrentDirectoryA((DWORD)sizeof(szDir), szDir);
	#else
		getcwd(szDir, sizeof(szDir));
	#endif
	_SetDir(szDir);
	_SetFilename("*.*");

											// add a panel to group the radio group and buttons
	GLUI_Rollout* pcEditPanel  = PCGetGluiSubwin()->add_rollout("Edit");

	GLUI_Panel *pcChannelPanel = PCGetGluiSubwin()->add_panel_to_panel(pcEditPanel, "Channel");
	GLUI_RadioGroup *pcRadioGroup_Channel = PCGetGluiSubwin()->add_radiogroup_to_panel(pcChannelPanel, &iEditingChannel);
		PCGetGluiSubwin()->add_radiobutton_to_group(pcRadioGroup_Channel, "R");
		PCGetGluiSubwin()->add_radiobutton_to_group(pcRadioGroup_Channel, "G");
		PCGetGluiSubwin()->add_radiobutton_to_group(pcRadioGroup_Channel, "B");
		PCGetGluiSubwin()->add_radiobutton_to_group(pcRadioGroup_Channel, "A");
		pcRadioGroup_Channel->set_int_val(iEditingChannel);

		PCGetGluiSubwin()->add_button_to_panel(pcEditPanel, "Redo",		IAddWid(EDIT_REDO),		&CGlutWin::_GluiCB_static);
		PCGetGluiSubwin()->add_button_to_panel(pcEditPanel, "Undo",		IAddWid(EDIT_UNDO),		&CGlutWin::_GluiCB_static);
		PCGetGluiSubwin()->add_button_to_panel(pcEditPanel, "Clear",	IAddWid(EDIT_CLEAR),	&CGlutWin::_GluiCB_static);
		PCGetGluiSubwin()->add_button_to_panel(pcEditPanel, "Delete",	IAddWid(EDIT_DELETE),	&CGlutWin::_GluiCB_static);

	GLUI_Rollout* pcTfPanel = PCGetGluiSubwin()->add_rollout("TF Setting", false);
	GLUI_Panel* pcPanel;
	GLUI_Spinner *pcSpinner;
		pcPanel = PCGetGluiSubwin()->add_panel_to_panel(pcTfPanel, "Data Value");
			pcSpinner = PCGetGluiSubwin()->add_spinner_to_panel(pcPanel, "Min (Significand)",	GLUI_SPINNER_FLOAT, &cHistogramMin.fSignificand);
			pcSpinner->disable();
			pcSpinner = PCGetGluiSubwin()->add_spinner_to_panel(pcPanel, "Min (Exponent)",		GLUI_SPINNER_FLOAT, &cHistogramMin.fExponent);
			pcSpinner->disable();

			pcSpinner = PCGetGluiSubwin()->add_spinner_to_panel(pcPanel, "Max (Significand)",	GLUI_SPINNER_FLOAT, &cHistogramMax.fSignificand);
			pcSpinner->disable();
			pcSpinner = PCGetGluiSubwin()->add_spinner_to_panel(pcPanel, "Max (Exponent)",		GLUI_SPINNER_FLOAT, &cHistogramMax.fExponent);
			pcSpinner->disable();

		pcPanel = PCGetGluiSubwin()->add_panel_to_panel(pcTfPanel, "TF Domain");

			PCGetGluiSubwin()->add_spinner_to_panel(pcPanel, "Min (Significand)",	GLUI_SPINNER_FLOAT, &pcTransFunc->cDomainMin.fSignificand);	
			PCGetGluiSubwin()->add_spinner_to_panel(pcPanel, "Min (Exponent)",		GLUI_SPINNER_FLOAT, &pcTransFunc->cDomainMin.fExponent);	

			PCGetGluiSubwin()->add_spinner_to_panel(pcPanel, "Max (Significand)",	GLUI_SPINNER_FLOAT, &pcTransFunc->cDomainMax.fSignificand);	
			PCGetGluiSubwin()->add_spinner_to_panel(pcPanel, "Max (Exponent)",		GLUI_SPINNER_FLOAT, &pcTransFunc->cDomainMax.fExponent);	

											// move the File panel to above the Edit panel
	PCGetGluiSubwin()->add_button("Update",	IAddWid(EDIT_UPDATE),	&CGlutWin::_GluiCB_static);
	PCGetGluiSubwin()->add_button("Exit",	IAddWid(EDIT_EXIT),		&CGlutWin::_GluiCB_static);

							// specify a default window size for the TF editor
	_Reshape(512, 384);
}
开发者ID:recheliu,项目名称:recheliu-mylib,代码行数:68,代码来源:TfUi.cpp


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