/* * Copyright 2014 (c) Anna Schumaker. */ #ifndef OCARINA_TABS_H #define OCARINA_TABS_H #include #include class Tab { private: std::set visible_ids; Glib::RefPtr tab_filter; protected: Playqueue *tab_pq; Glib::RefPtr tab_model; /** * Widgets that MUST be set by a child class */ Gtk::SearchEntry *tab_search; Gtk::TreeView *tab_treeview; Gtk::Widget *tab_widget; /** * Optional widgets that MAY be set */ Gtk::ToggleButton *tab_random; Gtk::Label *tab_size; /** * Class helper functions */ void tab_init_random(); bool tab_is_cur(); void tab_set_size(); void tab_unmap(); public: Tab(Playqueue *); virtual ~Tab(); /** * More helper functions */ void tab_finish_init(); int tab_page_num(); void tab_runtime_changed(); /** * internal callback functions */ virtual void on_post_init(); virtual void on_track_added(unsigned int); virtual void on_track_deleted(unsigned int); /** * GTK-MM callback functions */ void on_random_toggled(); /* Filtering functions */ bool on_filter_visible(const Gtk::TreeIter &); bool on_entry_key_released(GdkEventKey *); void on_entry_changed(); }; void init_tabs(); void post_init_tabs(); void cleanup_tabs(); void init_collection_tab(); void init_history_tab(); void init_playlist_tab(); #endif /* OCARINA_TABS_H */