NAP
parameterdropdown.h
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4 
5 #pragma once
6 
7 // Local Includes
8 #include "parameter.h"
9 
10 // External Includes
11 #include <nap/signalslot.h>
12 
13 namespace nap
14 {
18  class NAPAPI ParameterDropDown : public Parameter
19  {
20  RTTI_ENABLE(Parameter)
21  public:
26  virtual void setValue(const Parameter& value) override;
27 
32  void setSelectedIndex(int selectedIndex);
33 
38  int getSelectedIndex(){ return mSelectedIndex; }
39 
43  void setItems(const std::vector<std::string>& items);
44 
45  // Signals
48  public:
49  std::vector<std::string> mItems;
50  int mSelectedIndex = 0;
51  private:
52 
53  };
54 }
nap::Parameter
Definition: parameter.h:20
nap::ParameterDropDown::getSelectedIndex
int getSelectedIndex()
Definition: parameterdropdown.h:38
nap::Signal< int >
nap::ParameterDropDown::mItems
std::vector< std::string > mItems
Property: 'Items' items of this dropdown.
Definition: parameterdropdown.h:49
nap
Definition: templateapp.h:17
nap::ParameterDropDown::itemsChanged
Signal< const std::vector< std::string > & > itemsChanged
Definition: parameterdropdown.h:47
nap::ParameterDropDown::indexChanged
Signal< int > indexChanged
Definition: parameterdropdown.h:46
nap::ParameterDropDown
Definition: parameterdropdown.h:18