2025-12-03 22:00:29 +11:00
|
|
|
#pragma once
|
|
|
|
|
|
2025-12-08 22:06:09 +11:00
|
|
|
class GfxRenderer;
|
2025-12-03 22:00:29 +11:00
|
|
|
|
|
|
|
|
typedef enum { TEXT_BLOCK, IMAGE_BLOCK } BlockType;
|
|
|
|
|
|
|
|
|
|
// a block of content in the html - either a paragraph or an image
|
|
|
|
|
class Block {
|
|
|
|
|
public:
|
|
|
|
|
virtual ~Block() = default;
|
2025-12-08 22:06:09 +11:00
|
|
|
virtual void layout(GfxRenderer& renderer) = 0;
|
2025-12-03 22:00:29 +11:00
|
|
|
virtual BlockType getType() = 0;
|
|
|
|
|
virtual bool isEmpty() = 0;
|
|
|
|
|
virtual void finish() {}
|
|
|
|
|
};
|