sort of working dictionary
This commit is contained in:
@@ -31,6 +31,9 @@ class PageLine final : public PageElement {
|
||||
void render(GfxRenderer& renderer, int fontId, int xOffset, int yOffset) override;
|
||||
bool serialize(FsFile& file) override;
|
||||
static std::unique_ptr<PageLine> deserialize(FsFile& file);
|
||||
|
||||
// Getter for word selection support
|
||||
const std::shared_ptr<TextBlock>& getTextBlock() const { return block; }
|
||||
};
|
||||
|
||||
class Page {
|
||||
|
||||
@@ -48,6 +48,12 @@ class TextBlock final : public Block {
|
||||
Style getStyle() const { return style; }
|
||||
const BlockStyle& getBlockStyle() const { return blockStyle; }
|
||||
bool isEmpty() override { return words.empty(); }
|
||||
|
||||
// Getters for word selection support
|
||||
const std::list<std::string>& getWords() const { return words; }
|
||||
const std::list<uint16_t>& getWordXPositions() const { return wordXpos; }
|
||||
const std::list<EpdFontFamily::Style>& getWordStyles() const { return wordStyles; }
|
||||
size_t getWordCount() const { return words.size(); }
|
||||
void layout(GfxRenderer& renderer) override {};
|
||||
// given a renderer works out where to break the words into lines
|
||||
void render(const GfxRenderer& renderer, int fontId, int x, int y) const;
|
||||
|
||||
Reference in New Issue
Block a user