2013-01-27 12:07:28 -08:00
|
|
|
#ifndef MWGUI_JOURNALBOOKS_HPP
|
|
|
|
#define MWGUI_JOURNALBOOKS_HPP
|
|
|
|
|
|
|
|
#include "bookpage.hpp"
|
|
|
|
#include "journalviewmodel.hpp"
|
|
|
|
|
2017-11-22 08:32:38 +04:00
|
|
|
#include <components/to_utf8/to_utf8.hpp>
|
|
|
|
|
2013-01-27 12:07:28 -08:00
|
|
|
namespace MWGui
|
|
|
|
{
|
2023-01-29 21:31:21 +01:00
|
|
|
MWGui::BookTypesetter::Utf8Span to_utf8_span(std::string_view text);
|
2014-03-16 23:38:51 +01:00
|
|
|
|
2013-01-27 12:07:28 -08:00
|
|
|
struct JournalBooks
|
|
|
|
{
|
2013-05-01 10:28:59 +02:00
|
|
|
typedef TypesetBook::Ptr Book;
|
|
|
|
JournalViewModel::Ptr mModel;
|
2013-01-27 12:07:28 -08:00
|
|
|
|
2017-11-22 08:32:38 +04:00
|
|
|
JournalBooks(JournalViewModel::Ptr model, ToUTF8::FromType encoding);
|
2013-01-27 12:07:28 -08:00
|
|
|
|
2013-05-01 10:28:59 +02:00
|
|
|
Book createEmptyJournalBook();
|
|
|
|
Book createJournalBook();
|
|
|
|
Book createTopicBook(uintptr_t topicId);
|
2023-01-29 21:31:21 +01:00
|
|
|
Book createQuestBook(std::string_view questName);
|
2018-09-04 12:19:50 +04:00
|
|
|
Book createTopicIndexBook();
|
2013-01-27 12:07:28 -08:00
|
|
|
|
2017-11-22 08:32:38 +04:00
|
|
|
ToUTF8::FromType mEncoding;
|
2018-09-04 12:19:50 +04:00
|
|
|
int mIndexPagesCount;
|
2017-11-22 08:32:38 +04:00
|
|
|
|
2013-01-27 12:07:28 -08:00
|
|
|
private:
|
2013-05-01 10:28:59 +02:00
|
|
|
BookTypesetter::Ptr createTypesetter();
|
2018-09-04 12:19:50 +04:00
|
|
|
BookTypesetter::Ptr createLatinJournalIndex();
|
|
|
|
BookTypesetter::Ptr createCyrillicJournalIndex();
|
2013-01-27 12:07:28 -08:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // MWGUI_JOURNALBOOKS_HPP
|