wavelength 1.0.0
Loading...
Searching...
No Matches
songsellist.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5#include "met/freqlist.h"
6#include "os/string.h"
7#include "script/dataarray.h"
8
17class SongSelList : public FreqList {
18public:
25 ~SongSelList() override = default;
26
35 SongSelList(DataArray *pData, const char *pszPanel);
36
48 static UIComponent *New(DataArray *pData, const char *pszPanel) {
49 return new SongSelList(pData, pszPanel);
50 }
51
60 void UpdateRow(int nRow, int nItem) override;
61
69 void UpdateCursor() override;
70
79 void SetSongs(const std::vector<String> &songs, int nChoiceCount);
80
82 const std::vector<String> &GetSongs() const {
83 return mSongs;
84 }
85
87 std::vector<String> &GetSongs() {
88 return mSongs;
89 }
90
91private:
92 std::vector<String> mSongs;
93 const char *mPicPanel;
94 int mChoiceCount;
95};
Reference-counted array of script data nodes.
Definition dataarray.h:20
FreqList(DataArray *pData, const char *pszPanel)
Construct the list from its script description.
SongSelList(DataArray *pData, const char *pszPanel)
Construct the list from its script description, listing nothing.
~SongSelList() override=default
Destroy the object.
std::vector< String > & GetSongs()
Definition songsellist.h:87
void SetSongs(const std::vector< String > &songs, int nChoiceCount)
Replace the listed items and show them.
const std::vector< String > & GetSongs() const
Definition songsellist.h:82
void UpdateCursor() override
Move the cursor, and show the genre and the band picture of the selected song, or the label and the a...
static UIComponent * New(DataArray *pData, const char *pszPanel)
Create a list from its script description.
Definition songsellist.h:48
void UpdateRow(int nRow, int nItem) override
Fill a row with a choice, or with the short artist of a song.
UIComponent(DataArray *pData)
Construct a showing component in the normal state.
Definition uicomponent.h:37