本文整理汇总了C++中CGUIDialogOK::IsConfirmed方法的典型用法代码示例。如果您正苦于以下问题:C++ CGUIDialogOK::IsConfirmed方法的具体用法?C++ CGUIDialogOK::IsConfirmed怎么用?C++ CGUIDialogOK::IsConfirmed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGUIDialogOK
的用法示例。
在下文中一共展示了CGUIDialogOK::IsConfirmed方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ok
bool Dialog::ok(const String& heading, const String& line1,
const String& line2,
const String& line3) throw (WindowException)
{
DelayedCallGuard dcguard(languageHook);
const int window = WINDOW_DIALOG_OK;
CGUIDialogOK* pDialog = (CGUIDialogOK*)g_windowManager.GetWindow(window);
if (pDialog == NULL)
throw WindowException("Error: Window is NULL, this is not possible :-)");
if (!heading.empty())
pDialog->SetHeading(heading);
if (!line1.empty())
pDialog->SetLine(0, line1);
if (!line2.empty())
pDialog->SetLine(1, line2);
if (!line3.empty())
pDialog->SetLine(2, line3);
//send message and wait for user input
XBMCWaitForThreadMessage(TMSG_DIALOG_DOMODAL, window, ACTIVE_WINDOW);
return pDialog->IsConfirmed();
}
示例2: Dialog_OK
PyObject* Dialog_OK(PyObject *self, PyObject *args)
{
const int window = WINDOW_DIALOG_OK;
PyObject* unicodeLine[4];
for (int i = 0; i < 4; i++) unicodeLine[i] = NULL;
CGUIDialogOK* pDialog = (CGUIDialogOK*)g_windowManager.GetWindow(window);
if (PyXBMCWindowIsNull(pDialog)) return NULL;
// get lines, last 2 lines are optional.
string utf8Line[4];
if (!PyArg_ParseTuple(args, (char*)"OO|OO", &unicodeLine[0], &unicodeLine[1], &unicodeLine[2], &unicodeLine[3])) return NULL;
for (int i = 0; i < 4; i++)
{
if (unicodeLine[i] && !PyXBMCGetUnicodeString(utf8Line[i], unicodeLine[i], i+1))
return NULL;
}
pDialog->SetHeading(utf8Line[0]);
pDialog->SetLine(0, utf8Line[1]);
pDialog->SetLine(1, utf8Line[2]);
pDialog->SetLine(2, utf8Line[3]);
//send message and wait for user input
PyXBMCWaitForThreadMessage(TMSG_DIALOG_DOMODAL, window, ACTIVE_WINDOW);
return Py_BuildValue((char*)"b", pDialog->IsConfirmed());
}
示例3: ShowAndGetInput
// \brief Show CGUIDialogOK dialog, then wait for user to dismiss it.
bool CGUIDialogOK::ShowAndGetInput(CVariant heading, CVariant text)
{
CGUIDialogOK *dialog = g_windowManager.GetWindow<CGUIDialogOK>(WINDOW_DIALOG_OK);
if (!dialog)
return false;
dialog->SetHeading(heading);
dialog->SetText(text);
dialog->Open();
return dialog->IsConfirmed();
}
示例4: ok
bool Dialog::ok(const String& heading, const String& line1,
const String& line2,
const String& line3)
{
DelayedCallGuard dcguard(languageHook);
CGUIDialogOK* pDialog = (CGUIDialogOK*)g_windowManager.GetWindow(WINDOW_DIALOG_OK);
if (pDialog == NULL)
throw WindowException("Error: Window is NULL, this is not possible :-)");
if (!heading.empty())
pDialog->SetHeading(CVariant{heading});
if (!line1.empty())
pDialog->SetLine(0, CVariant{line1});
if (!line2.empty())
pDialog->SetLine(1, CVariant{line2});
if (!line3.empty())
pDialog->SetLine(2, CVariant{line3});
pDialog->Open();
return pDialog->IsConfirmed();
}