15 enum LoadStatus {CantLoad=-1, Unloaded=0, Loaded=1};
16 typedef void (DrawFun)(GRenderGraphics&, GRender&, GRect
const& iconframe);
19 bool operator==(
const GIconValue&)
const;
20 bool operator!=(
const GIconValue&)
const;
22 mutable LoadStatus status{Unloaded};
23 mutable GTexture texture{};
31 bool gconvert(GIconValue
const& from, GIconValue& to);
32 bool gconvert(GString
const& from, GIconValue& to);
33 bool gconvert(GIconValue
const& from, GString& to);
41 using DrawFun = GIconValue::DrawFun;
42 static DrawFun Image, XPM,
43 CheckSymbol, RadioSymbol, ComboSymbol, LeftSymbol, RightSymbol, UpSymbol,
44 DownSymbol, UpDownSymbol;
47 static GIcon check, radio, left, right, up, down, updown, combo;
50 GIcon(GString
const& filename);
51 GIcon(
const char** xpm);
62 GType& type()
const override {
return Type();}
64 void apply(Gadget*, GRender&,
Specif)
override;
65 void updateGadget(Gadget&)
override;
66 static void drawHArrow(GRenderGraphics& g, GRect
const& frame,
67 float lx,
float rx,
float ty,
float by);
68 static void drawVArrow(GRenderGraphics& g, GRect
const& frame,
69 float lx,
float rx,
float ty,
float by);
74 inline GIcon& Icon() {
return *
new GIcon();}
75 inline GIcon& Icon(GString
const& filename) {
return *
new GIcon(filename);}