/// <summary> /// Overrides OnCursorChanged to handle changes /// </summary> protected override void OnChanged() // protected override void OnCursorChanged() { base.OnChanged(); if (Model == null) { currentSelection.Target = null; return; } if (currentSelection.Target != null) { if (ListItems == null) { adaptor.DemandInstantPost(); currentSelection.Target = null; return; } } TreeIter iter; // TreePath tp; if (GetActiveIter(out iter) == true) { object o = internalModel.NodeFromIter(iter); // tp = internalModel.GetPath (iter); // if (tp == null) // throw new ExceptionResolvingPathFromTreeIterOnChanged (GetType()); if (ListItems != null) { // IList lst = (IList) ListItems; // object obj = HierarchicalList.Get (lst, tp.Indices); if (TypeValidator.IsCompatible(o.GetType(), internalModel.ListItemType) == true) { currentSelection.Target = o; } else { currentSelection.Target = null; } o = null; // lst = null; } else { currentSelection.Target = null; } } else { currentSelection.Target = null; } adaptor.DemandInstantPost(); }
/// <summary> /// Overrides OnCursorChanged to handle changes /// </summary> protected override void OnCursorChanged() { base.OnCursorChanged(); if (Model == null) { currentSelection.Target = null; return; } if (currentSelection.Target != null) { if (ListItems == null) { adaptor.DemandInstantPost(); currentSelection.Target = null; return; } } TreePath tp; TreeViewColumn tv; TreeIter iter; GetCursor(out tp, out tv); if ((tp != null) && (tv != null)) { if (internalModel.GetIter(out iter, tp) == true) { object obj = internalModel.NodeFromIter(iter); if ((TypeValidator.IsCompatible(obj.GetType(), internalModel.ListItemType) == true) || (CursorPointsEveryType == true)) { currentSelection.Target = obj; } else { currentSelection.Target = null; } obj = null; } else { currentSelection.Target = null; } } else { currentSelection.Target = null; } adaptor.DemandInstantPost(); }
/// <summary> /// Overrides OnToggled to put data in DataSource if needed /// </summary> protected virtual void OnToggled() { adaptor.DemandInstantPost(); if (toggled != null) { toggled(this, new EventArgs()); } }
/// <summary> /// Overrides OnCursorChanged to handle changes /// </summary> protected override void OnChanged() { base.OnChanged(); if (Model == null) { currentSelection.Target = null; return; } if (currentSelection.Target != null) { if (ListItems == null) { adaptor.DemandInstantPost(); currentSelection.Target = null; return; } } TreeIter iter; if (GetActiveIter(out iter) == true) { object o = internalModel.NodeFromIter(iter); if (ListItems != null) { if (TypeValidator.IsCompatible(o.GetType(), internalModel.ListItemType) == true) { currentSelection.Target = o; } else { currentSelection.Target = null; } } else { currentSelection.Target = null; } } else { currentSelection.Target = null; } adaptor.DemandInstantPost(); }
/* protected override void OnInsertAtCursor (string str) * { * base.OnInsertAtCursor (str); * OnChanged(); * } * protected override void OnDeleteFromCursor (DeleteType type, int count) * { * base.OnDeleteFromCursor (type, count); * OnChanged(); * } * protected override void OnCutClipboard () * { * base.OnCutClipboard (); * OnChanged(); * } * protected override void OnPasteClipboard () * { * base.OnPasteClipboard (); * OnChanged(); * } */ /// <summary> /// Overrides OnChanged to put data in DataSource if needed /// </summary> protected void OnChanged(object aSender, System.EventArgs aArgs) { //base.OnChanged(); //Console.WriteLine("hejjjj\n{0}\n{1}", adaptor.Value as string, base.Buffer.Text); if (adaptor.Value != null && (adaptor.Value as string).CompareTo(base.Buffer.Text) == 0) { return; } if (adaptor.Value == null && base.Buffer.Text == String.Empty) { return; } if (ignore == true) { return; } adaptor.DemandInstantPost(); }
/// <summary> /// Overrides OnDaySelected and posts data to DataSource /// </summary> protected override void OnDaySelected() { base.OnDaySelected(); adaptor.DemandInstantPost(); }
/// <summary> /// Overrides OnValueChanged to put data in DataSource if needed /// </summary> protected override void OnValueChanged() { base.OnValueChanged(); adaptor.DemandInstantPost(); }
/// <summary> /// Overrides OnValueChanged to put data in DataSource if needed /// </summary> protected virtual void OnValueChanged() { adaptor.DemandInstantPost(); }
/// <summary> /// Overrides OnColorSet to put data in DataSource if needed /// </summary> protected override void OnColorSet() { base.OnColorSet(); adaptor.DemandInstantPost(); }
/// <summary> /// Overrides OnSelectionChanged to put data in DataSource if needed /// </summary> protected override void OnSelectionChanged() { base.OnSelectionChanged(); adaptor.DemandInstantPost(); }
/// <summary> /// Overrides OnToggled to put data in DataSource if needed /// </summary> protected override void OnChanged() { adaptor.DemandInstantPost(); base.OnChanged(); }