Beispiel #1
0
        public override CellEditable StartEditing(Gdk.Event ev, Widget widget, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, CellRendererState flags)
        {
            if (property == null || editorCell == null || !sensitive)
            {
                return(null);
            }

            StateType   state   = GetState(flags);
            EditSession session = editorCell.StartEditing(cell_area, state);

            if (session == null)
            {
                return(null);
            }
            Gtk.Widget propEditor = (Gtk.Widget)session.Editor;
            propEditor.Show();
            HackEntry e = new HackEntry(session, propEditor);

            e.Show();
            session.Changed += delegate {
                ((InternalTree)widget).PropertyTree.NotifyChanged();
            };
            TreeIter it;

            ((InternalTree)widget).Model.GetIterFromString(out it, path);
            ((InternalTree)widget).EditingIter = it;
            return(e);
        }
Beispiel #2
0
		public override CellEditable StartEditing (Gdk.Event ev, Widget widget, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, CellRendererState flags)
		{
			if (property == null || editorCell == null || !sensitive)
				return null;

			StateType state = GetState (flags);
			EditSession session = editorCell.StartEditing (cell_area, state);
			if (session == null)
				return null;
			Gtk.Widget propEditor = (Gtk.Widget) session.Editor;
			propEditor.Show ();
			HackEntry e = new HackEntry (session, propEditor);
			e.Show ();
			session.Changed += delegate {
				((InternalTree)widget).PropertyTree.NotifyChanged ();
			};
			TreeIter it;
			((InternalTree)widget).Model.GetIterFromString (out it, path);
			((InternalTree)widget).EditingIter = it;
			return e;
		}