X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flineararrangement.h;h=6f3c26ace105f96d4a47c2230d9d1fa930a1e4a0;hb=b59fab7e533ef96d72c92b224d4f24718bc6b0a1;hp=571e279af3cccc4093736dab6e994d48cae585da;hpb=32539688068fad9614291159b069da10ead10f47;p=libs%2Fgltk.git diff --git a/source/lineararrangement.h b/source/lineararrangement.h index 571e279..6f3c26a 100644 --- a/source/lineararrangement.h +++ b/source/lineararrangement.h @@ -3,38 +3,50 @@ #include #include "arrangement.h" +#include "mspgltk_api.h" namespace Msp { namespace GLtk { -class LinearArrangement: public Arrangement +class MSPGLTK_API LinearArrangement: public Arrangement { public: - class Loader: public DataFile::ObjectLoader + class MSPGLTK_API Loader: public DataFile::ObjectLoader { public: Loader(LinearArrangement &); + private: + void expand(); + void spacing(unsigned); void split(); + void uniform(bool); }; protected: - Side primary; - Side opposite; + Side primary = RIGHT; + Side opposite = static_cast(primary^2); Edge next; - bool first; - bool split_here; - Side gravity; + bool first = true; + bool split_here = false; + Side gravity = opposite; + bool internal_aligned = false; + bool uniform = false; + Widget *uniform_ref = nullptr; + int next_spacing = -1; LinearArrangement(Layout &, Side); public: + void set_uniform(bool); void split(); void expand(); + void spacing(unsigned); protected: - virtual void process_widget(Widget &, Side, bool); - virtual void finish_slot(); + void process_widget(Widget &, Side, bool) override; + void finish_widget(Widget &) override; + void finish_slot() override; }; } // namespace GLtk