mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
fix bullet indent, add clauses
This commit is contained in:
+14
-8
@@ -38,16 +38,21 @@ IMPLEMENT_REFLECTION(TextField) {
|
||||
// ----------------------------------------------------------------------------- : TextStyle
|
||||
|
||||
TextLayoutP dummy_layout() {
|
||||
auto layout = make_intrusive<TextLayout>();
|
||||
auto line = make_intrusive<LineLayout>(0, 0, 0, LineLayout::Type::LINE);
|
||||
auto layout = make_intrusive<TextLayout>();
|
||||
auto line = make_intrusive<LineLayout>(0, 0, 0, LineLayout::Type::LINE);
|
||||
auto clause = make_intrusive<LineLayout>(0, 0, 0, LineLayout::Type::CLAUSE);
|
||||
auto paragraph = make_intrusive<LineLayout>(0, 0, 0, LineLayout::Type::PARAGRAPH);
|
||||
auto block = make_intrusive<LineLayout>(0, 0, 0, LineLayout::Type::BLOCK);
|
||||
auto block = make_intrusive<LineLayout>(0, 0, 0, LineLayout::Type::BLOCK);
|
||||
clause ->lines.push_back(line);
|
||||
paragraph->lines.push_back(line);
|
||||
block->lines.push_back(line);
|
||||
layout->lines.push_back(line);
|
||||
block->paragraphs.push_back(paragraph);
|
||||
layout->paragraphs.push_back(paragraph);
|
||||
layout->blocks.push_back(block);
|
||||
block ->lines.push_back(line);
|
||||
layout ->lines.push_back(line);
|
||||
paragraph->clauses.push_back(clause);
|
||||
block ->clauses.push_back(clause);
|
||||
layout ->clauses.push_back(clause);
|
||||
block ->paragraphs.push_back(paragraph);
|
||||
layout ->paragraphs.push_back(paragraph);
|
||||
layout ->blocks.push_back(block);
|
||||
return layout;
|
||||
}
|
||||
|
||||
@@ -129,6 +134,7 @@ void LineLayout::reflect(GetMember& handler) const {
|
||||
REFLECT_N("bottom", bottom());
|
||||
REFLECT_N("middle", middle());
|
||||
if (type > Type::LINE) REFLECT(lines);
|
||||
if (type > Type::CLAUSE) REFLECT(clauses);
|
||||
if (type > Type::PARAGRAPH) REFLECT(paragraphs);
|
||||
if (type > Type::BLOCK) REFLECT(blocks);
|
||||
}
|
||||
|
||||
@@ -50,8 +50,8 @@ public:
|
||||
class LineLayout : public IntrusivePtrVirtualBase {
|
||||
public:
|
||||
double width, top, height;
|
||||
enum class Type { LINE, PARAGRAPH, BLOCK, ALL } type;
|
||||
vector<LineLayoutP> lines, paragraphs, blocks;
|
||||
enum class Type { LINE, CLAUSE, PARAGRAPH, BLOCK, ALL } type;
|
||||
vector<LineLayoutP> lines, clauses, paragraphs, blocks;
|
||||
|
||||
LineLayout() {}
|
||||
LineLayout(double width, double top, double height, Type type) : width(width), top(top), height(height), type(type) {}
|
||||
|
||||
Reference in New Issue
Block a user