2014-02-17 15:32:47 -05:00
|
|
|
/*
|
|
|
|
* Copyright 2014 (c) Anna Schumaker.
|
|
|
|
*/
|
|
|
|
#ifndef OCARINA_TABS_H
|
|
|
|
#define OCARINA_TABS_H
|
|
|
|
|
2014-06-04 13:59:15 -04:00
|
|
|
#include <gui/ocarina.h>
|
2016-01-15 12:26:55 -05:00
|
|
|
#include <gui/queue/label.h>
|
2015-04-19 09:52:27 -04:00
|
|
|
#include <gui/queue/window.h>
|
2015-12-10 13:26:22 -05:00
|
|
|
#include <core/playlist.h>
|
2014-06-05 10:19:22 -04:00
|
|
|
#include <core/queue.h>
|
2014-02-17 19:15:02 -05:00
|
|
|
|
2015-11-29 20:10:15 -05:00
|
|
|
class Tab {
|
2014-02-21 22:06:42 -05:00
|
|
|
private:
|
2014-02-28 19:25:35 -05:00
|
|
|
unsigned int tab_sorting_count;
|
|
|
|
std::string tab_sorting_title;
|
2014-02-17 19:15:02 -05:00
|
|
|
|
2014-02-21 22:06:42 -05:00
|
|
|
protected:
|
2015-04-19 09:24:25 -04:00
|
|
|
Glib::RefPtr<Gtk::Builder> tab_builder;
|
2015-11-16 09:12:15 -05:00
|
|
|
queue *tab_pq;
|
2015-04-19 09:14:57 -04:00
|
|
|
Gtk::VBox tab_vbox;
|
2014-02-17 15:32:47 -05:00
|
|
|
|
2015-04-19 12:13:32 -04:00
|
|
|
QueueLabel *tab_label;
|
2014-02-17 15:32:47 -05:00
|
|
|
|
2014-02-21 22:06:42 -05:00
|
|
|
/**
|
|
|
|
* Class helper functions
|
|
|
|
*/
|
|
|
|
void tab_unmap();
|
2014-02-17 19:15:02 -05:00
|
|
|
|
2014-02-21 22:06:42 -05:00
|
|
|
public:
|
2016-01-15 09:35:25 -05:00
|
|
|
QueueWindow *tab_window;
|
2015-11-16 09:12:15 -05:00
|
|
|
Tab(queue *);
|
2014-02-21 22:06:42 -05:00
|
|
|
virtual ~Tab();
|
2014-02-23 13:04:31 -05:00
|
|
|
|
2015-04-03 12:02:49 -04:00
|
|
|
/**
|
|
|
|
* QNotifier implementation
|
|
|
|
*/
|
|
|
|
void on_track_added(unsigned int);
|
2015-04-09 09:09:33 -04:00
|
|
|
virtual void on_track_removed(unsigned int);
|
2016-01-29 10:12:09 -05:00
|
|
|
void on_tracks_cleared(unsigned int);
|
2015-04-03 20:58:26 -04:00
|
|
|
void on_track_updated(unsigned int);
|
2015-04-03 12:02:49 -04:00
|
|
|
|
2014-02-23 13:04:31 -05:00
|
|
|
/**
|
|
|
|
* More helper functions
|
|
|
|
*/
|
2014-02-23 15:27:19 -05:00
|
|
|
int tab_page_num();
|
2014-03-01 19:33:41 -05:00
|
|
|
bool tab_is_cur();
|
2014-02-23 13:04:31 -05:00
|
|
|
void tab_runtime_changed();
|
2014-02-23 15:27:19 -05:00
|
|
|
void tab_focus_search();
|
2014-02-17 19:15:02 -05:00
|
|
|
|
2014-02-21 22:06:42 -05:00
|
|
|
/**
|
|
|
|
* GTK-MM callback functions
|
|
|
|
*/
|
2014-03-01 19:33:41 -05:00
|
|
|
void on_column_clicked(unsigned int);
|
2014-02-21 22:06:42 -05:00
|
|
|
};
|
2014-02-17 19:15:02 -05:00
|
|
|
|
|
|
|
|
2015-11-16 09:12:15 -05:00
|
|
|
Tab *find_tab(queue *);
|
2014-02-23 15:27:19 -05:00
|
|
|
void tab_focus_search();
|
2014-02-21 22:06:42 -05:00
|
|
|
void init_tabs();
|
|
|
|
void post_init_tabs();
|
|
|
|
void cleanup_tabs();
|
2014-02-17 19:15:02 -05:00
|
|
|
|
|
|
|
|
2014-02-21 22:06:42 -05:00
|
|
|
void init_collection_tab();
|
2014-02-23 17:04:39 -05:00
|
|
|
void init_queue_tabs();
|
2014-02-21 22:06:42 -05:00
|
|
|
|
2014-02-17 15:32:47 -05:00
|
|
|
#endif /* OCARINA_TABS_H */
|