本文整理汇总了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);
}