本文整理汇总了C++中CGUIDialogSlider类的典型用法代码示例。如果您正苦于以下问题:C++ CGUIDialogSlider类的具体用法?C++ CGUIDialogSlider怎么用?C++ CGUIDialogSlider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CGUIDialogSlider类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ShowAndGetInput
void CGUIDialogSlider::ShowAndGetInput(const CStdString &label, float value, float min, float delta, float max, ISliderCallback *callback, void *callbackData)
{
// grab the slider dialog
CGUIDialogSlider *slider = (CGUIDialogSlider *)g_windowManager.GetWindow(WINDOW_DIALOG_SLIDER);
if (!slider)
return;
// set the label and value
slider->Initialize();
slider->SetSlider(label, value, min, delta, max, callback, callbackData);
slider->DoModal();
}
示例2: Display
void CGUIDialogSlider::Display(int label, float value, float min, float delta, float max, ISliderCallback *callback)
{
// grab the slider dialog
CGUIDialogSlider *slider = (CGUIDialogSlider *)g_windowManager.GetWindow(WINDOW_DIALOG_SLIDER);
if (!slider)
return;
// set the label and value
slider->Initialize();
slider->SetAutoClose(1000);
slider->SetSlider(g_localizeStrings.Get(label), value, min, delta, max, callback, NULL);
slider->Show();
}
示例3: ShowAndGetInput
void CGUIDialogSlider::ShowAndGetInput(const std::string &label, float value, float min, float delta, float max, ISliderCallback *callback, void *callbackData)
{
// grab the slider dialog
CGUIDialogSlider *slider = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIDialogSlider>(WINDOW_DIALOG_SLIDER);
if (!slider)
return;
// set the label and value
slider->Initialize();
slider->SetSlider(label, value, min, delta, max, callback, callbackData);
slider->SetModalityType(DialogModalityType::MODAL);
slider->Open();
}
示例4: Display
void CGUIDialogSlider::Display(int label, float value, float min, float delta, float max, ISliderCallback *callback)
{
// grab the slider dialog
CGUIDialogSlider *slider = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIDialogSlider>(WINDOW_DIALOG_SLIDER);
if (!slider)
return;
// set the label and value
slider->Initialize();
slider->SetAutoClose(1000);
slider->SetSlider(g_localizeStrings.Get(label), value, min, delta, max, callback, NULL);
slider->SetModalityType(DialogModalityType::MODELESS);
slider->Open();
}
示例5: switch
bool CGUIWindowFullScreen::OnMessage(CGUIMessage& message)
{
switch (message.GetMessage())
{
case GUI_MSG_WINDOW_INIT:
{
// check whether we've come back here from a window during which time we've actually
// stopped playing videos
if (message.GetParam1() == WINDOW_INVALID && !g_application.IsPlayingVideo())
{ // why are we here if nothing is playing???
g_windowManager.PreviousWindow();
return true;
}
g_infoManager.SetShowInfo(false);
g_infoManager.SetShowCodec(false);
m_bShowCurrentTime = false;
m_bGroupSelectShow = false;
g_infoManager.SetDisplayAfterSeek(0); // Make sure display after seek is off.
// switch resolution
g_graphicsContext.SetFullScreenVideo(true);
#ifdef HAS_VIDEO_PLAYBACK
// make sure renderer is uptospeed
g_renderManager.Update(false);
#endif
// now call the base class to load our windows
CGUIWindow::OnMessage(message);
m_bShowViewModeInfo = false;
if (CUtil::IsUsingTTFSubtitles())
{
CSingleLock lock (m_fontLock);
CStdString fontPath = "special://xbmc/media/Fonts/";
fontPath += g_guiSettings.GetString("subtitles.font");
// We scale based on PAL4x3 - this at least ensures all sizing is constant across resolutions.
RESOLUTION_INFO pal(720, 576, 0);
CGUIFont *subFont = g_fontManager.LoadTTF("__subtitle__", fontPath, color[g_guiSettings.GetInt("subtitles.color")], 0, g_guiSettings.GetInt("subtitles.height"), g_guiSettings.GetInt("subtitles.style"), false, 1.0f, 1.0f, &pal, true);
CGUIFont *borderFont = g_fontManager.LoadTTF("__subtitleborder__", fontPath, 0xFF000000, 0, g_guiSettings.GetInt("subtitles.height"), g_guiSettings.GetInt("subtitles.style"), true, 1.0f, 1.0f, &pal, true);
if (!subFont || !borderFont)
CLog::Log(LOGERROR, "CGUIWindowFullScreen::OnMessage(WINDOW_INIT) - Unable to load subtitle font");
else
m_subsLayout = new CGUITextLayout(subFont, true, 0, borderFont);
}
else
m_subsLayout = NULL;
return true;
}
case GUI_MSG_WINDOW_DEINIT:
{
CGUIWindow::OnMessage(message);
CGUIDialog *pDialog = (CGUIDialog *)g_windowManager.GetWindow(WINDOW_DIALOG_OSD_TELETEXT);
if (pDialog) pDialog->Close(true);
CGUIDialogSlider *slider = (CGUIDialogSlider *)g_windowManager.GetWindow(WINDOW_DIALOG_SLIDER);
if (slider) slider->Close(true);
pDialog = (CGUIDialog *)g_windowManager.GetWindow(WINDOW_DIALOG_VIDEO_OSD);
if (pDialog) pDialog->Close(true);
pDialog = (CGUIDialog *)g_windowManager.GetWindow(WINDOW_DIALOG_FULLSCREEN_INFO);
if (pDialog) pDialog->Close(true);
pDialog = (CGUIDialog *)g_windowManager.GetWindow(WINDOW_DIALOG_PVR_OSD_CHANNELS);
if (pDialog) pDialog->Close(true);
pDialog = (CGUIDialog *)g_windowManager.GetWindow(WINDOW_DIALOG_PVR_OSD_GUIDE);
if (pDialog) pDialog->Close(true);
pDialog = (CGUIDialog *)g_windowManager.GetWindow(WINDOW_DIALOG_PVR_OSD_DIRECTOR);
if (pDialog) pDialog->Close(true);
pDialog = (CGUIDialog *)g_windowManager.GetWindow(WINDOW_DIALOG_PVR_OSD_CUTTER);
if (pDialog) pDialog->Close(true);
FreeResources(true);
CSingleLock lock (g_graphicsContext);
g_graphicsContext.SetFullScreenVideo(false);
lock.Leave();
#ifdef HAS_VIDEO_PLAYBACK
// make sure renderer is uptospeed
g_renderManager.Update(false);
#endif
CSingleLock lockFont(m_fontLock);
if (m_subsLayout)
{
g_fontManager.Unload("__subtitle__");
g_fontManager.Unload("__subtitleborder__");
delete m_subsLayout;
m_subsLayout = NULL;
}
return true;
}
case GUI_MSG_CLICKED:
{
unsigned int iControl = message.GetSenderId();
if (iControl == CONTROL_GROUP_CHOOSER && g_PVRManager.IsStarted())
{
//.........这里部分代码省略.........
示例6: switch
bool CGUIWindowFullScreen::OnMessage(CGUIMessage& message)
{
switch (message.GetMessage())
{
case GUI_MSG_WINDOW_INIT:
{
// check whether we've come back here from a window during which time we've actually
// stopped playing videos
if (message.GetParam1() == WINDOW_INVALID && !g_application.IsPlayingVideo())
{ // why are we here if nothing is playing???
g_windowManager.PreviousWindow();
return true;
}
g_infoManager.SetShowInfo(false);
g_infoManager.SetShowCodec(false);
m_bShowCurrentTime = false;
g_infoManager.SetDisplayAfterSeek(0); // Make sure display after seek is off.
// switch resolution
g_graphicsContext.SetFullScreenVideo(true);
#ifdef HAS_VIDEO_PLAYBACK
// make sure renderer is uptospeed
g_renderManager.Update(false);
#endif
// now call the base class to load our windows
CGUIWindow::OnMessage(message);
m_bShowViewModeInfo = false;
if (CUtil::IsUsingTTFSubtitles())
{
CSingleLock lock (m_fontLock);
CStdString fontPath = "special://xbmc/media/Fonts/";
fontPath += g_guiSettings.GetString("subtitles.font");
// We scale based on PAL4x3 - this at least ensures all sizing is constant across resolutions.
RESOLUTION_INFO pal(720, 576, 0);
CGUIFont *subFont = g_fontManager.LoadTTF("__subtitle__", fontPath, color[g_guiSettings.GetInt("subtitles.color")], 0, g_guiSettings.GetInt("subtitles.height"), g_guiSettings.GetInt("subtitles.style"), false, 1.0f, 1.0f, &pal, true);
CGUIFont *borderFont = g_fontManager.LoadTTF("__subtitleborder__", fontPath, 0xFF000000, 0, g_guiSettings.GetInt("subtitles.height"), g_guiSettings.GetInt("subtitles.style"), true, 1.0f, 1.0f, &pal, true);
if (!subFont || !borderFont)
CLog::Log(LOGERROR, "CGUIWindowFullScreen::OnMessage(WINDOW_INIT) - Unable to load subtitle font");
else
m_subsLayout = new CGUITextLayout(subFont, true, 0, borderFont);
}
else
m_subsLayout = NULL;
return true;
}
case GUI_MSG_WINDOW_DEINIT:
{
CGUIWindow::OnMessage(message);
CGUIDialog *pDialog = (CGUIDialog *)g_windowManager.GetWindow(WINDOW_DIALOG_OSD_TELETEXT);
if (pDialog) pDialog->Close(true);
CGUIDialogSlider *slider = (CGUIDialogSlider *)g_windowManager.GetWindow(WINDOW_DIALOG_SLIDER);
if (slider) slider->Close(true);
pDialog = (CGUIDialog *)g_windowManager.GetWindow(WINDOW_DIALOG_VIDEO_OSD);
if (pDialog) pDialog->Close(true);
pDialog = (CGUIDialog *)g_windowManager.GetWindow(WINDOW_DIALOG_FULLSCREEN_INFO);
if (pDialog) pDialog->Close(true);
FreeResources(true);
CSingleLock lock (g_graphicsContext);
g_graphicsContext.SetFullScreenVideo(false);
lock.Leave();
#ifdef HAS_VIDEO_PLAYBACK
// make sure renderer is uptospeed
g_renderManager.Update(false);
#endif
CSingleLock lockFont(m_fontLock);
if (m_subsLayout)
{
g_fontManager.Unload("__subtitle__");
g_fontManager.Unload("__subtitleborder__");
delete m_subsLayout;
m_subsLayout = NULL;
}
return true;
}
case GUI_MSG_SETFOCUS:
case GUI_MSG_LOSTFOCUS:
if (message.GetSenderId() != WINDOW_FULLSCREEN_VIDEO) return true;
break;
}
return CGUIWindow::OnMessage(message);
}