/* * Copyright 2014 (c) Anna Schumaker. */ #ifndef OCARINA_TABS_H #define OCARINA_TABS_H #include #include #include #include #include #include class Tab { private: unsigned int tab_sorting_count; std::string tab_sorting_title; protected: Glib::RefPtr tab_builder; queue *tab_pq; Gtk::VBox tab_vbox; QueueToolbar *tab_toolbar; QueueLabel *tab_label; /** * Class helper functions */ void tab_dec_sort_count(); void tab_unmap(); public: QueueWindow *tab_window; Tab(queue *); virtual ~Tab(); /** * QNotifier implementation */ void on_track_added(unsigned int); virtual void on_track_removed(unsigned int); void on_tracks_cleared(unsigned int); void on_track_updated(unsigned int); /** * More helper functions */ int tab_page_num(); bool tab_is_cur(); void tab_runtime_changed(); void tab_display_sorting(); void tab_focus_search(); void tab_selected_ids(std::vector &); void tab_queue_add(queue *); bool tab_queue_selected(bool); bool tab_add_to_queue(unsigned int); bool tab_add_to_playlist(enum playlist_t); bool tab_favorite_selected(); void tab_ban_selected(); /** * internal callback functions that can be overridden if necessary */ virtual bool on_key_press_event(const std::string &); virtual void on_show_rc_menu(); /** * GTK-MM callback functions */ void on_repeat_toggled(); bool on_key_pressed(GdkEventKey *); void on_column_clicked(unsigned int); bool on_button_pressed(GdkEventButton *); }; Tab *find_tab(queue *); void tab_focus_search(); void init_tabs(); void post_init_tabs(); void cleanup_tabs(); void init_collection_tab(); void init_history_tab(); void init_queue_tabs(); #endif /* OCARINA_TABS_H */