本文整理汇总了C++中TView::SetActiveState方法的典型用法代码示例。如果您正苦于以下问题:C++ TView::SetActiveState方法的具体用法?C++ TView::SetActiveState怎么用?C++ TView::SetActiveState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TView
的用法示例。
在下文中一共展示了TView::SetActiveState方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
short
XPFPrefs::PoseConfirmDialog (bool forInstall, bool quitting)
{
short retVal = kStdCancelItemIndex;
MountedVolume *bootDisk = NULL;
CStr255_AC version;
if (fRebootInMacOS9) {
bootDisk = fMacOS9Disk;
if (!bootDisk) return kNoButton;
if (bootDisk->getMacOS9BootStatus () != kStatusOK) return kNoButton;
version = "Mac OS 9.x"; // FIXME -- would be nice to grab real version
} else {
bootDisk = forInstall ? fInstallCD : fTargetDisk;
if (!bootDisk) return kNoButton;
if (!forInstall && (bootDisk->getBootStatus () != kStatusOK)) return kNoButton;
version = "Mac OS X ";
version += bootDisk->getMacOSXVersion ();
}
MAParamText ("$OS$", version);
MAParamText ("$VOLUME$", bootDisk->getVolumeName ());
if (forInstall) MAParamText ("$TARGET$", fTargetDisk->getVolumeName ());
IDType dialogID;
if (forInstall) {
dialogID = quitting ? kInstallDialog : kInstallNowDialog;
} else {
dialogID = quitting ? kRestartDialog : kRestartNowDialog;
}
TWindow *dialog = TViewServer::fgViewServer->NewTemplateWindow (dialogID, NULL);
if (getTooBigForNVRAM (forInstall)) {
TView *change = dialog->FindSubView ('chan');
if (change) change->SetActiveState (false, true);
}
IDType result = dialog->PoseModally ();
switch (result) {
case 'chan':
retVal = kStdOkItemIndex;
break;
case 'canc':
retVal = kStdCancelItemIndex;
break;
case 'dont':
retVal = kNoButton;
break;
}
dialog->Close ();
return retVal;
}