ocarina/include/gui/queue/label.h
Anna Schumaker 1d0f392835 gui: Give tab labels a set_size() function
This lets them set themselves whenever values change.  Additionally, I
update the Tab class to take a QueueLabel instead of the "size label"

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-09-02 14:24:42 -04:00

65 lines
1.2 KiB
C++

/*
* Copyright 2015 (c) Anna Schumaker.
*/
#ifndef OCARINA_GUI_QUEUE_LABEL_H
#define OCARINA_GUI_QUEUE_LABEL_H
#include <core/queue.h>
#include <gtkmm.h>
class QueueLabel : public Gtk::HBox {
protected:
Glib::RefPtr<Gtk::Builder> _builder;
Queue *_queue;
public:
QueueLabel(BaseObjectType *, const Glib::RefPtr<Gtk::Builder>);
~QueueLabel();
virtual void init(Queue *);
virtual void set_sensitive(bool) {};
virtual void set_size() {};
};
class CollectionLabel : public QueueLabel {
public:
Gtk::Label *collection_size;
CollectionLabel(BaseObjectType *, const Glib::RefPtr<Gtk::Builder>);
void set_size();
};
class HistoryLabel : public QueueLabel {
public:
Gtk::Label *history_size;
HistoryLabel(BaseObjectType *, const Glib::RefPtr<Gtk::Builder>);
void set_size();
};
class PlaylistLabel : public QueueLabel {
public:
PlaylistLabel(BaseObjectType *, const Glib::RefPtr<Gtk::Builder>);
};
class TempLabel : public QueueLabel {
public:
Gtk::Label *temp_number;
Gtk::Label *temp_size;
Gtk::Button *temp_close;
TempLabel(BaseObjectType *, const Glib::RefPtr<Gtk::Builder>);
void set_sensitive(bool);
void set_size();
};
#endif /* OCARINA_GUI_QUEUE_LABEL_H */