Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

69 linhas
2.6 KiB

  1. // ------------------------------------------------------------------------------
  2. // <autogenerated>
  3. // This code was generated by a tool.
  4. // Mono Runtime Version: 2.0.50727.42
  5. //
  6. // Changes to this file may cause incorrect behavior and will be lost if
  7. // the code is regenerated.
  8. // </autogenerated>
  9. // ------------------------------------------------------------------------------
  10. namespace Stetic {
  11. internal class Gui {
  12. private static bool initialized;
  13. internal static void Initialize(Gtk.Widget iconRenderer) {
  14. if ((Stetic.Gui.initialized == false)) {
  15. Stetic.Gui.initialized = true;
  16. }
  17. }
  18. }
  19. internal class IconLoader {
  20. public static Gdk.Pixbuf LoadIcon(Gtk.Widget widget, string name, Gtk.IconSize size, int sz) {
  21. Gdk.Pixbuf res = widget.RenderIcon(name, size, null);
  22. if ((res != null)) {
  23. return res;
  24. }
  25. else {
  26. try {
  27. return Gtk.IconTheme.Default.LoadIcon(name, sz, 0);
  28. }
  29. catch (System.Exception ) {
  30. if ((name != "gtk-missing-image")) {
  31. return Stetic.IconLoader.LoadIcon(widget, "gtk-missing-image", size, sz);
  32. }
  33. else {
  34. Gdk.Pixmap pmap = new Gdk.Pixmap(Gdk.Screen.Default.RootWindow, sz, sz);
  35. Gdk.GC gc = new Gdk.GC(pmap);
  36. gc.RgbFgColor = new Gdk.Color(255, 255, 255);
  37. pmap.DrawRectangle(gc, true, 0, 0, sz, sz);
  38. gc.RgbFgColor = new Gdk.Color(0, 0, 0);
  39. pmap.DrawRectangle(gc, false, 0, 0, (sz - 1), (sz - 1));
  40. gc.SetLineAttributes(3, Gdk.LineStyle.Solid, Gdk.CapStyle.Round, Gdk.JoinStyle.Round);
  41. gc.RgbFgColor = new Gdk.Color(255, 0, 0);
  42. pmap.DrawLine(gc, (sz / 4), (sz / 4), ((sz - 1) - (sz / 4)), ((sz - 1) - (sz / 4)));
  43. pmap.DrawLine(gc, ((sz - 1) - (sz / 4)), (sz / 4), (sz / 4), ((sz - 1) - (sz / 4)));
  44. return Gdk.Pixbuf.FromDrawable(pmap, pmap.Colormap, 0, 0, 0, 0, sz, sz);
  45. }
  46. }
  47. }
  48. }
  49. }
  50. internal class ActionGroups {
  51. public static Gtk.ActionGroup GetActionGroup(System.Type type) {
  52. return Stetic.ActionGroups.GetActionGroup(type.FullName);
  53. }
  54. public static Gtk.ActionGroup GetActionGroup(string name) {
  55. return null;
  56. }
  57. }
  58. }