X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flineararrangement.h;h=f0ec2453d02121d445b3caf9b3307948709c0110;hb=83f553a382ce554951594de85e4fd7b854305463;hp=571e279af3cccc4093736dab6e994d48cae585da;hpb=32539688068fad9614291159b069da10ead10f47;p=libs%2Fgltk.git diff --git a/source/lineararrangement.h b/source/lineararrangement.h index 571e279..f0ec245 100644 --- a/source/lineararrangement.h +++ b/source/lineararrangement.h @@ -3,37 +3,48 @@ #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_widget(Widget &); virtual void finish_slot(); };