예제 #1
0
        /// <summary>
        /// Called when ItemsDataSource changes
        /// </summary>

/*		private void ListTargetChanged (IAdaptor aAdaptor)
 *              {
 *                      cachedItems = null;
 *                      if (ItemsDataSource == null)
 *                              CurrentSelection.Target = null;
 *                      else {
 * //				if ((ItemsDataSource is IAdaptor) == false)
 * //					return;
 *                              object check = ConnectionProvider.ResolveTargetForObject(ItemsDataSource);
 *                              if (check != lastItems) {
 *                                      lastItems = check;
 *                                      check = ItemsDataSource;
 *                                      ItemsDataSource = null;
 *                                      ItemsDataSource = check;
 *                              }
 *                      }
 *                      Adaptor.CheckControl();
 *              }*/

        /// <summary>
        /// Creates adaptors associated with this IconView
        /// </summary>
        internal virtual void CreateAdaptors()
        {
            // Allocate selection adaptor
            currentSelection = new GtkAdaptor();
//			currentSelection.OnDataChange += SelectedObjectChanged;
            internalModel.ClearSelection += delegate() {
                if (CurrentSelection != null)
                {
                    CurrentSelection.Target = null;
                }
            };

            // Create and connect ListAdaptor with this TreeView

/*			listadaptor = new GtkListAdaptor(false, null, this, false);
 *                      listadaptor.OnListChanged += DSChanged;
 *                      listadaptor.OnElementAdded += DSElementAdded;
 *                      listadaptor.OnElementChanged += DSElementChanged;
 *                      listadaptor.OnElementRemoved += DSElementRemoved;
 *                      listadaptor.OnTargetChange += ListTargetChanged;*/
//			listadaptor.OnTargetChange += ItemsTargetChanged;
            // Create Adaptor
            adaptor = new GtkControlAdaptor(this, false);
            adaptor.DisableMappingsDataTransfer = true;

            internalModel.CheckControl += delegate() {
                if (adaptor != null)
                {
                    adaptor.CheckControl();
                }
            };
//			columnadaptor = new GtkAdaptor();
        }
예제 #2
0
        /// <summary>
        /// Creates adaptors associated with this IconView
        /// </summary>
        internal virtual void CreateAdaptors()
        {
            // Allocate selection adaptor
            currentSelection              = new GtkAdaptor();
            internalModel.ClearSelection += delegate() {
                if (CurrentSelection != null)
                {
                    CurrentSelection.Target = null;
                }
            };

            // Create Adaptor
            adaptor = new GtkControlAdaptor(this, false);
            adaptor.DisableMappingsDataTransfer = true;

            internalModel.CheckControl += delegate() {
                if (adaptor != null)
                {
                    adaptor.CheckControl();
                }
            };
        }
		/// <summary>
		/// Called when ItemsDataSource changes
		/// </summary>
/*		private void ListTargetChanged (IAdaptor aAdaptor)
		{
			cachedItems = null;
			if (ItemsDataSource == null)
				CurrentSelection.Target = null;
			else {
//				if ((ItemsDataSource is IAdaptor) == false)
//					return;
				object check = ConnectionProvider.ResolveTargetForObject(ItemsDataSource);
				if (check != lastItems) {
					lastItems = check;
					check = ItemsDataSource;
					ItemsDataSource = null;
					ItemsDataSource = check;
				}
			}
			Adaptor.CheckControl();
		}*/
		
		/// <summary>
		/// Creates adaptors associated with this IconView
		/// </summary>
		internal virtual void CreateAdaptors()
		{
			// Allocate selection adaptor
			currentSelection = new GtkAdaptor();
//			currentSelection.OnDataChange += SelectedObjectChanged;
			internalModel.ClearSelection += delegate() {
				if (CurrentSelection != null)
					CurrentSelection.Target = null;
			};
			
			// Create and connect ListAdaptor with this TreeView
/*			listadaptor = new GtkListAdaptor(false, null, this, false); 
			listadaptor.OnListChanged += DSChanged;
			listadaptor.OnElementAdded += DSElementAdded;
			listadaptor.OnElementChanged += DSElementChanged;
			listadaptor.OnElementRemoved += DSElementRemoved;
			listadaptor.OnTargetChange += ListTargetChanged;*/
//			listadaptor.OnTargetChange += ItemsTargetChanged;
			// Create Adaptor
			adaptor = new GtkControlAdaptor (this, false);
			adaptor.DisableMappingsDataTransfer = true;

			internalModel.CheckControl += delegate() {
				if (adaptor != null)
					adaptor.CheckControl();
			};			
//			columnadaptor = new GtkAdaptor();
		}
		/// <summary>
		/// Called when ItemsDataSource changes
		/// </summary>
		/*		private void ListTargetChanged (IAdaptor aAdaptor)
		{
			cachedItems = null;
			if (ItemsDataSource == null)
				CurrentSelection.Target = null;
			else {
//				if ((ItemsDataSource is IAdaptor) == false)
//					return;
				object check = ConnectionProvider.ResolveTargetForObject(ItemsDataSource);
				if (check != lastItems) {
					lastItems = check;
					check = ItemsDataSource;
					ItemsDataSource = null;
					ItemsDataSource = check;
				}
			}
			Adaptor.CheckControl();
		}*/
		
		/// <summary>
		/// Creates adaptors associated with this IconView
		/// </summary>
		internal virtual void CreateAdaptors ()
		{
			// Allocate selection adaptor
			currentSelection = new GtkAdaptor ();
			internalModel.ClearSelection += delegate() {
				if (CurrentSelection != null)
					CurrentSelection.Target = null;
			};

			// Create Adaptor
			adaptor = new GtkControlAdaptor (this, false);
			adaptor.DisableMappingsDataTransfer = true;

			internalModel.CheckControl += delegate() {
				if (adaptor != null)
					adaptor.CheckControl ();
			};			
		}