本文整理汇总了C++中LWindow::Hide方法的典型用法代码示例。如果您正苦于以下问题:C++ LWindow::Hide方法的具体用法?C++ LWindow::Hide怎么用?C++ LWindow::Hide使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LWindow
的用法示例。
在下文中一共展示了LWindow::Hide方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoManageProfilesDialog
void CProfileManager::DoManageProfilesDialog()
{
nsresult rv;
StDialogHandler theHandler(dlog_ManageProfiles, LCommander::GetTopCommander());
LWindow *theDialog = theHandler.GetDialog();
nsCOMPtr<nsIProfile> profileService =
do_GetService(NS_PROFILE_CONTRACTID, &rv);
ThrowIfNil_(profileService);
// Set up the dialog by filling the list of current profiles
LTextTableView *table = (LTextTableView*) theDialog->FindPaneByID('List');
ThrowIfNil_(table);
LPushButton *deleteButton = (LPushButton *) theDialog->FindPaneByID('Dele');
ThrowIfNil_(deleteButton);
//Str255 pascalStr;
nsAutoString unicodeStr;
nsCAutoString cStr;
char dataBuf[256];
UInt32 dataSize;
// PowerPlant stuff to set up the list view
STableCell selectedCell(1, 1);
SDimension16 tableSize;
TableIndexT rows, cols;
table->GetFrameSize(tableSize);
table->SetTableGeometry(new LTableMonoGeometry(table, tableSize.width, 16));
table->SetTableStorage(new LTableArrayStorage(table, 0UL));
table->SetTableSelector(new LTableSingleSelector(table));
table->InsertCols(1, 0);
// Get the name of the current profile so we can select it
nsXPIDLString currProfileName;
profileService->GetCurrentProfile(getter_Copies(currProfileName));
// Get the list of profile names and add them to the list
PRUint32 listLen;
PRUnichar **profileList;
rv = profileService->GetProfileList(&listLen, &profileList);
ThrowIfError_(rv);
for (PRUint32 index = 0; index < listLen; index++)
{
CPlatformUCSConversion::GetInstance()->UCSToPlatform(nsDependentString(profileList[index]), cStr);
table->InsertRows(1, LONG_MAX, cStr.get(), cStr.Length(), true);
if (nsCRT::strcmp(profileList[index], currProfileName.get()) == 0)
selectedCell.row = index + 1;
}
PRInt32 numProfiles;
rv = profileService->GetProfileCount(&numProfiles);
ThrowIfError_(rv);
(numProfiles > 1) ? deleteButton->Enable() : deleteButton->Disable();
table->SelectCell(selectedCell);
// Handle the "Ask At StartUp" checkbox
LCheckBox *showAtStartCheck = (LCheckBox*) theDialog->FindPaneByID('Show');
ThrowIfNil_(showAtStartCheck);
PRBool showIt;
rv = GetShowDialogOnStart(&showIt);
if (NS_FAILED(rv))
showIt = PR_TRUE;
showAtStartCheck->SetValue(showIt);
theDialog->Show();
theDialog->Select();
while (true) // This is our modal dialog event loop
{
MessageT hitMessage = theHandler.DoDialog();
if (hitMessage == msg_OK)
{
theDialog->Hide();
SetShowDialogOnStart(showAtStartCheck->GetValue());
selectedCell = table->GetFirstSelectedCell();
if (selectedCell.row > 0)
{
dataSize = sizeof(dataBuf) - 1;
table->GetCellData(selectedCell, dataBuf, dataSize);
dataBuf[dataSize] = '\0';
CPlatformUCSConversion::GetInstance()->PlatformToUCS(nsDependentCString(dataBuf), unicodeStr);
rv = profileService->SetCurrentProfile(unicodeStr.get());
}
break;
}
else if (hitMessage == msg_Cancel)
{
break;
}
else if (hitMessage == msg_OnNewProfile)
{
if (DoNewProfileDialog(dataBuf, sizeof(dataBuf)))
{
CPlatformUCSConversion::GetInstance()->PlatformToUCS(nsDependentCString(dataBuf), unicodeStr);
//.........这里部分代码省略.........