From ebcc95da4c26369511caa90d89c5ed06e1e4853a Mon Sep 17 00:00:00 2001 From: Treeki Date: Thu, 14 Oct 2010 20:17:20 +0200 Subject: brlyt packing added, plus some changes in the existing API (mostly for const correctness). brlyt writing may still need some testing (especially for the material structs) --- lyt/layout.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'lyt/layout.h') diff --git a/lyt/layout.h b/lyt/layout.h index 88e62dd..092be44 100644 --- a/lyt/layout.h +++ b/lyt/layout.h @@ -20,6 +20,7 @@ #include "packagebase.h" #include "materials/material.h" +#include "materials/materialcontainer.h" #include "group.h" #include "pane.h" #include "textbox.h" @@ -44,10 +45,14 @@ public: void clear(); LYTPackageBase &package() const; + QByteArray pack(); + + quint8 flags; + float width; float height; - QMap materials; + LYTMaterialContainer materials; LYTPane *rootPane; QList groups; @@ -72,6 +77,13 @@ protected: LYTPane *createPaneObj(LYTBinaryFileSection §ion); + QStringList generateTextureRefs() const; + QStringList generateFontRefs() const; + + void writeMat1(LYTBinaryFileSection §ion) const; + void writePane(LYTBinaryFile &file, LYTPane *pane) const; + void writeGroups(LYTBinaryFile &file) const; + friend class LYTPane; friend class LYTTextBox; friend class LYTPicture; -- cgit v1.2.3