1 #ifndef _jukebox__hpp__included__
2 #define _jukebox__hpp__included__
8 namespace settingvar
{ class group
; }
10 class save_jukebox_listener
;
21 save_jukebox(settingvar::group
& _settings
, command::group
& _cmd
);
29 * Throws std::runtime_exception: No slot selected.
35 * Parameter slot: The slot to select.
36 * Throws std::runtime_exception: Slot out of range.
38 void set_slot(size_t slot
);
42 * Throws std::runtime_exception: No slot selected.
46 * Cycle previous slot.
48 * Throws std::runtime_exception: No slot selected.
52 * Get save as binary flag.
56 * Get name of current jukebox slot.
58 * Throws std::runtime_exception: No slot selected.
60 std::string
get_slot_name();
62 * Set size of jukebox.
64 * Parameter size: The new size.
66 void set_size(size_t size
);
68 * Set update function.
70 void set_update(std::function
<void()> _update
);
72 * Unset update function.
76 void do_slotsel(const std::string
& arg
);
77 settingvar::group
& settings
;
80 std::function
<void()> update
;
81 save_jukebox_listener
* listener
;
83 command::_fnptr
<const std::string
&> slotsel
;
84 command::_fnptr
<> cycleprev
;
85 command::_fnptr
<> cyclenext
;