public DocView(DocTree tree) { this.tree = tree; CanFocus = true; Events = EventMask.ButtonPressMask | EventMask.ButtonReleaseMask | EventMask.ExposureMask | EventMask.KeyPressMask | EventMask.PointerMotionMask | EventMask.LeaveNotifyMask; layout = CreatePangoLayout (String.Empty); tree.NodeSelected += new NodeSelectedEventHandler (OnNodeSelected); }
public Browser(string catalog_dir) : base("Documentation Browser Sample") { DefaultSize = new Size (600, 400); Gtk.Paned paned = new Gtk.HPaned (); Gtk.ScrolledWindow sw = new ScrolledWindow (); DocTree tree = new DocTree (catalog_dir); sw.Add (tree); paned.Add1 (sw); sw = new ScrolledWindow (); DocView view = new DocView (tree); sw.AddWithViewport (view); paned.Add2 (sw); paned.Position = 250; paned.ShowAll (); Add (paned); }