2 #include "creativity/gui/BookStore.hpp" 3 #include "creativity/state/BookState.hpp" 4 #include <eris/types.hpp> 5 #include <glibmm/object.h> 6 #include <glibmm/refptr.h> 7 #include <gtkmm/enums.h> 8 #include <gtkmm/treemodel.h> 9 #include <gtkmm/treemodelcolumn.h> 12 namespace Glib {
class ValueBase; }
13 namespace Gtk {
class TreeView; }
14 namespace creativity {
namespace state {
class State; } }
28 static Glib::RefPtr<LibraryStore> create(std::shared_ptr<const state::State> state, eris::eris_id_t reader);
35 Gtk::TreeModelColumn<bool>
37 reader_purchased_market,
40 Gtk::TreeModelColumn<unsigned int>
47 add(reader_purchased_market);
48 add(reader_purchased_public);
55 virtual void appendColumnsTo(Gtk::TreeView &v)
const override;
59 LibraryStore(std::shared_ptr<const state::State> &&state, eris::eris_id_t reader);
68 virtual void get_value_vfunc(
const iterator &iter,
int column, Glib::ValueBase &value)
const override;
83 virtual void set_sort_column_id_vfunc(
int sort_column_id, Gtk::SortType order)
override;
87 const eris::eris_id_t reader_;
90 #define LESS_GREATER_METHODS(col) \ 91 bool less_##col(const state::BookState &a, const state::BookState &b); \ 92 bool greater_##col(const state::BookState &a, const state::BookState &b); 93 LESS_GREATER_METHODS(reader_quality)
94 LESS_GREATER_METHODS(reader_purchased_market)
95 LESS_GREATER_METHODS(reader_purchased_public)
96 LESS_GREATER_METHODS(reader_pirated)
97 LESS_GREATER_METHODS(reader_acquired)
98 #undef LESS_GREATER_METHODS Gtk::TreeModel::ColumnRecord subclass for handling Book information in the list of books in the main ...
Definition: BookStore.hpp:24
Definition: BookStore.hpp:14
Primary namespace for all Creativity library code.
Definition: config.hpp:4
Gtk::TreeModelColumn< unsigned int > reader_acquired
Simulation period when this copy of the book was acquired.
Definition: LibraryStore.hpp:41
Definition: BookInfoWindow.hpp:6
Gtk::TreeModelColumn< double > reader_quality
This reader's quality draw for the book.
Definition: LibraryStore.hpp:33
BookStore::ColRec extension to add reader-specific fields.
Definition: LibraryStore.hpp:31
Gtk::TreeModelColumn< bool > reader_purchased_public
True if the book was purchased from the public provider.
Definition: LibraryStore.hpp:36
Class extending BookStore that lists a reader's library books (excluding self-written works); it incl...
Definition: LibraryStore.hpp:25
ColumnRecord object for a BookStore.
Definition: BookStore.hpp:65