16 private Builder _builder;
18#pragma warning disable 649
20 private TreeView tree;
21#pragma warning restore 649
25 #region Constructors / Destructors
28 Builder builder =
new Builder(
new FileStream(System.IO.Path.GetDirectoryName(Environment.ProcessPath) +
"/" +
"Glade/Filters.glade", FileMode.Open));
29 return new FiltersView(builder, builder.GetObject(
"filters").Handle);
35 protected FiltersView(Builder builder, IntPtr handle) : base(handle)
38 builder.Autoconnect(
this);
40 tree.RowActivated += Tree_RowActivated;
41 App.ApplyStyles(
this);
49 private void Tree_RowActivated(
object o, RowActivatedArgs args)
51 if (args.Path.Indices.Length == 1)
53 Filt f = Filters.GetFilter(args.Path.Indices[0], args.Path.Indices[1]);
56 if (f.type == Filt.Type.Base)
60 if (f.type == Filt.Type.Base2)
65 if (f.type == Filt.Type.InPlace)
70 if (f.type == Filt.Type.InPlace2)
75 if (f.type == Filt.Type.InPlacePartial)
80 if (f.type == Filt.Type.Resize)
85 if (f.type == Filt.Type.Rotate)
90 if (f.type == Filt.Type.Transformation)
95 if (f.type == Filt.Type.Copy)
99 App.applyFilter.Show();
100 App.applyFilter.Present();
108 tree.ActivateOnSingleClick =
false;
109 Gtk.TreeViewColumn coordCol =
new Gtk.TreeViewColumn();
110 coordCol.Title =
"Filter";
111 Gtk.CellRendererText coordCell =
new Gtk.CellRendererText();
112 coordCol.PackStart(coordCell,
true);
113 tree.AppendColumn(coordCol);
114 coordCol.AddAttribute(coordCell,
"text", 0);
115 Gtk.TreeStore store =
new Gtk.TreeStore(typeof(
string));
117 foreach (Filt.Type f in (Filt.Type[])Enum.GetValues(typeof(Filt.Type)))
119 Gtk.TreeIter iter = store.AppendValues(f.ToString());
120 foreach (Filt fil
in Filters.filters)
124 store.AppendValues(iter, fil.name);
133 Gtk.TreeStore store =
new Gtk.TreeStore(typeof(
string));
134 foreach (Filt.Type f in (Filt.Type[])Enum.GetValues(typeof(Filt.Type)))
136 Gtk.TreeIter iter = store.AppendValues(f.ToString());
137 foreach (Filt fil
in Filters.filters)
141 store.AppendValues(iter, fil.name);