guit  0.1
 All Classes Functions Variables Typedefs Enumerations Friends
gvalue.hpp
1 //
2 // Items of a gadget
3 // Guit GUI Toolkit
4 // Copyright © 2020 Eric Lecolinet. All rights reserved.
5 // http://www.telecom-paris.fr/~elc
6 //
7 #ifndef GuitItems_hpp
8 #define GuitItems_hpp
9 #include <gprop.hpp>
10 namespace guit {
11 
14 class GValue : public GProp {
15 public:
16  GValue(GString const& value = "") : value_(value) {}
17 
19  static GType& Type();
20  GType& type() const override {return Type();}
21 
22  bool onAdd(Gadget*) override;
23 
24  GString value_;
25 };
26 
27 
30 class GItems : public GProp {
31 public:
32  GItems(GString const& items = "");
33 
34  bool onAdd(Gadget*) override;
35  void apply(Gadget*, GRender&, Specif) final;
36  static GString parseClass(GString const& items, size_t & from);
37 
39  static GType& Type();
40  GType& type() const override {return Type();}
41 
42  GString items_;
43  GString itemclass_;
44 };
45 
46 }
47 #endif