kodi
GUIDialogSlider.h
1 /*
2  * Copyright (C) 2005-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "guilib/GUIDialog.h"
12 #include "guilib/ISliderCallback.h"
13 
15 {
16 public:
18  ~CGUIDialogSlider(void) override;
19  bool OnMessage(CGUIMessage& message) override;
20  bool OnAction(const CAction &action) override;
21 
22  void SetModalityType(DialogModalityType type);
23 
36  static void ShowAndGetInput(const std::string &label, float value, float min, float delta, float max, ISliderCallback *callback, void *callbackData = NULL);
37 
49  static void Display(int label, float value, float min, float delta, float max, ISliderCallback *callback);
50 protected:
51  void SetSlider(const std::string &label, float value, float min, float delta, float max, ISliderCallback *callback, void *callbackData);
52  void OnWindowLoaded() override;
53 
54  ISliderCallback *m_callback;
55  void *m_callbackData;
56 };
57 
Interface class for callback from the slider dialog.
Definition: ISliderCallback.h:24
Definition: GUIDialogSlider.h:14
static void ShowAndGetInput(const std::string &label, float value, float min, float delta, float max, ISliderCallback *callback, void *callbackData=NULL)
Show the slider dialog and wait for the user to change the value Shows the slider until the user is h...
Definition: GUIDialogSlider.cpp:99
Class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:21
Definition: GUIDialog.h:35
static void Display(int label, float value, float min, float delta, float max, ISliderCallback *callback)
Show the slider dialog as a response to user input Shows the slider with the given values for a short...
Definition: GUIDialogSlider.cpp:113
Definition: GUIMessage.h:365