24 class Columns :
public Gtk::TreeModel::ColumnRecord {
26 Columns() { add(text); add(index); add(imdb); }
27 Gtk::TreeModelColumn<Glib::ustring> text;
28 Gtk::TreeModelColumn<int> index;
29 Gtk::TreeModelColumn<Glib::ustring> imdb;
33 Gtk::Box main_box_{Gtk::ORIENTATION_VERTICAL};
34 Gtk::MenuBar menubar_;
35 Glib::RefPtr<Gtk::AccelGroup> accel_group_;
36 Gtk::Toolbar toolbar_;
37 Gtk::Statusbar statusbar_;
38 guint status_ctx_movies_ { 0 };
39 Gtk::Paned paned_{Gtk::ORIENTATION_HORIZONTAL};
42 Gtk::Box left_box_{Gtk::ORIENTATION_VERTICAL};
43 Gtk::Box sort_box_{Gtk::ORIENTATION_HORIZONTAL};
44 Gtk::Label sort_label_;
45 Gtk::ComboBoxText sort_combo_;
46 Glib::RefPtr<Gtk::ListStore> list_store_;
47 Gtk::TreeView list_view_;
50 Gtk::Box right_box_{Gtk::ORIENTATION_VERTICAL};
51 Gtk::Label title_label_;
52 Gtk::Grid details_grid_;
53 Gtk::Label director_label_, director_value_;
54 Gtk::Label actors_label_, actors_value_;
55 Gtk::Label genres_label_, genres_value_;
56 Gtk::Label runtime_label_, runtime_value_;
57 Gtk::Label imdb_label_;
58 Gtk::LinkButton imdb_link_;
60 Gtk::TextView plot_view_;
61 Glib::RefPtr<Gdk::Pixbuf> poster_pixbuf_original_;
62 std::string current_imdb_id_;
72 Gtk::ToolButton* btn_add_ {
nullptr };
73 Gtk::ToolButton* btn_delete_ {
nullptr };
74 Gtk::ToolButton* btn_refresh_ {
nullptr };
75 Gtk::ToolButton* btn_update_ {
nullptr };
78 void update_poster_scaled();
79 void load_poster_async(
const std::string& url,
const std::string& imdb);
82 void show_status(
const std::string& msg);
83 void add_form_row(
int row, Gtk::Label& lbl, Gtk::Label& val);
84 Glib::ustring current_selected_imdb();
85 void reload_model(
const Glib::ustring& select_imdb = {});
86 void on_selection_changed();
87 void on_delete_current();
88 void on_update_current();
90 static std::string join(
const std::vector<std::string>& v,
const std::string& sep);
91 void update_status_movie_count();