8 #ifndef Guit_Choice_hpp
9 #define Guit_Choice_hpp
27 GChoice(
int index,
int min,
int max);
33 GChoice* toChoice()
override {
return this;}
45 virtual void choose(
int index) {set(index,
false);}
47 virtual void choose(
GBox&, GString
const& name);
48 GChoice& operator=(
int index) {set(index,
false);
return *
this;}
49 GChoice& operator=(GInt
const& index) {set(index,
false);
return *
this;}
50 GChoice& operator=(GString
const& index) {set(index);
return *
this;}
57 GChoice& operator--() {increase(-1);
return *
this;}
58 GChoice& operator--(
int) {increase(-1);
return *
this;}
64 GChoice& operator-=(
int value) {increase(-value);
return *
this;}
66 void increase(
int const& value)
override;
69 using GType = GPropType_<GChoice,GInt>;
71 GType& type()
const override {
return Type();}
75 virtual void addBoxChild(GBox&, Gadget* child,
int pos);
77 void addModes(GadgetModes&)
override;
78 void removeModes(GadgetModes&)
override;
85 GChoice& Choice(
int index);
86 GChoice& Choice(
int index,
int min,
int max);
87 GChoice& Choice(GString
const& index);