1 // ------------------------------------------------------------------------------
3 // This code was generated by a tool.
6 // Changes to this file may cause incorrect behavior and will be lost if
7 // the code is regenerated.
9 // ------------------------------------------------------------------------------
16 private static bool initialized
;
18 internal static void Initialize(Gtk
.Widget iconRenderer
) {
19 if ((Stetic
.Gui
.initialized
== false)) {
20 Stetic
.Gui
.initialized
= true;
25 internal class IconLoader
{
27 public static Gdk
.Pixbuf
LoadIcon(Gtk
.Widget widget
, string name
, Gtk
.IconSize size
, int sz
) {
28 Gdk
.Pixbuf res
= widget
.RenderIcon(name
, size
, null);
34 return Gtk
.IconTheme
.Default
.LoadIcon(name
, sz
, 0);
36 catch (System
.Exception
) {
37 if ((name
!= "gtk-missing-image")) {
38 return Stetic
.IconLoader
.LoadIcon(widget
, "gtk-missing-image", size
, sz
);
41 Gdk
.Pixmap pmap
= new Gdk
.Pixmap(Gdk
.Screen
.Default
.RootWindow
, sz
, sz
);
42 Gdk
.GC gc
= new Gdk
.GC(pmap
);
43 gc
.RgbFgColor
= new Gdk
.Color(255, 255, 255);
44 pmap
.DrawRectangle(gc
, true, 0, 0, sz
, sz
);
45 gc
.RgbFgColor
= new Gdk
.Color(0, 0, 0);
46 pmap
.DrawRectangle(gc
, false, 0, 0, (sz
- 1), (sz
- 1));
47 gc
.SetLineAttributes(3, Gdk
.LineStyle
.Solid
, Gdk
.CapStyle
.Round
, Gdk
.JoinStyle
.Round
);
48 gc
.RgbFgColor
= new Gdk
.Color(255, 0, 0);
49 pmap
.DrawLine(gc
, (sz
/ 4), (sz
/ 4), ((sz
- 1) - (sz
/ 4)), ((sz
- 1) - (sz
/ 4)));
50 pmap
.DrawLine(gc
, ((sz
- 1) - (sz
/ 4)), (sz
/ 4), (sz
/ 4), ((sz
- 1) - (sz
/ 4)));
51 return Gdk
.Pixbuf
.FromDrawable(pmap
, pmap
.Colormap
, 0, 0, 0, 0, sz
, sz
);
58 internal class ActionGroups
{
60 public static Gtk
.ActionGroup
GetActionGroup(System
.Type type
) {
61 return Stetic
.ActionGroups
.GetActionGroup(type
.FullName
);
64 public static Gtk
.ActionGroup
GetActionGroup(string name
) {