49 lines
967 B
C++
49 lines
967 B
C++
/*
|
|
* Copyright 2015 (c) Anna Schumaker.
|
|
*/
|
|
#ifndef OCARINA_GUI_QUEUE_TOOLBAR_H
|
|
#define OCARINA_GUI_QUEUE_TOOLBAR_H
|
|
|
|
extern "C" {
|
|
#include <core/queue.h>
|
|
}
|
|
#include <gui/queue/label.h>
|
|
#include <gui/queue/window.h>
|
|
#include <gtkmm.h>
|
|
|
|
enum toolbar_flags {
|
|
T_RANDOM = (1 << 0),
|
|
T_REPEAT = (1 << 1),
|
|
T_SWITCH = (1 << 2),
|
|
};
|
|
|
|
|
|
class QueueToolbar : public Gtk::HBox {
|
|
private:
|
|
Glib::RefPtr<Gtk::Builder> _builder;
|
|
queue *_queue;
|
|
QueueLabel *_q_label;
|
|
QueueWindow *_q_window;
|
|
|
|
|
|
Gtk::ToggleButton *_q_random;
|
|
Gtk::ToggleButton *_q_repeat;
|
|
Gtk::Switch *_q_switch;
|
|
|
|
public:
|
|
Gtk::SearchEntry *q_search;
|
|
|
|
QueueToolbar(BaseObjectType *, const Glib::RefPtr<Gtk::Builder>);
|
|
~QueueToolbar();
|
|
|
|
void init(queue *, QueueLabel*, QueueWindow*, unsigned int);
|
|
|
|
void on_random_toggled();
|
|
void on_repeat_toggled();
|
|
bool on_search_key_released(GdkEventKey *event);
|
|
void on_search_changed();
|
|
void on_switch_toggled();
|
|
};
|
|
|
|
#endif /* OCARINA_GUI_QUEUE_TOOLBAR_H */
|