10 #include <gvarprop.hpp>
15 GFlowValue() =
default;
16 GFlowValue(int8_t kind, int16_t gridsize) : kind(kind), gridsize(gridsize) {}
17 bool operator==(GFlowValue
const&)
const;
18 bool operator!=(GFlowValue
const&)
const;
23 inline bool gconvert(GFlowValue
const& from, GFlowValue& to) {to = from;
return true;}
24 bool gconvert(GString
const& from, GFlowValue& to);
25 bool gconvert(GFlowValue
const& from, GString& to);
41 enum Kind : int8_t {Column, Row, Pie, Stack};
52 GFlow(Kind kind, int16_t gridsize = 0);
54 GFlow(GFlowValue
const&);
59 GFlow& operator=(
GFlow const& flow) {
set(flow);
return *
this;}
60 GFlow& operator=(GString
const& flow) {
set(flow);
return *
this;}
62 int16_t gridSize()
const {
return value_.gridsize;}
64 using GType = GPropType_<GFlow,GProp>;
66 GType& type()
const override {
return Type();}
70 bool onAdd(Gadget*)
override;
71 void updateGadget(Gadget&)
override;
72 void addModes(GadgetModes&)
override;
73 void apply(Gadget* g, GRender& r,
Specif) final;