Beispiel #1
0
		public void CopyTo (Signal[] signals, int index)
		{
			List.CopyTo (signals, index);
		}
Beispiel #2
0
		public void RemoveSignal (Signal signal)
		{
			if (backend is ObjectWrapper && app != null)
				app.Backend.RemoveWidgetSignal ((ObjectWrapper) backend, signal);
		}
Beispiel #3
0
		public int Add (Signal signal)
		{
			return List.Add (signal);
		}
Beispiel #4
0
		public void Remove (Signal signal)
		{
			List.Remove (signal);
		}
		void AddHandler (Gtk.TreeIter iter, string name)
		{
			internalChange = true;
			
			Gtk.TreeIter piter = iter;
			while (store.IterDepth (piter) != 0)
				store.IterParent (out piter, piter);
			
			Signal signal = GetSignal (iter);
			if (signal == null) {
				if (name != "") {
					SignalDescriptor sd = GetSignalDescriptor (iter);
					signal = new Signal (sd);
					signal.Handler = name;
					selection.Signals.Add (signal);
					SetSignalData (iter, signal);
					store.SetValue (iter, ColSignalTextWeight, (int) Pango.Weight.Bold);
					if (store.IterDepth (iter) != 1)
						store.IterParent (out iter, iter);
					InsertEmptySignalRow (iter, null);
				}
			} else {
				if (name != "") {
					signal.Handler = name;
					store.SetValue (iter, ColHandler, signal.Handler);
				} else {
					selection.Signals.Remove (signal);
					if (store.IterDepth (iter) == 1) {
						if (store.IterNChildren (iter) == 1) {
							Gtk.TreeIter parent;
							store.IterParent (out parent, iter);
							store.Remove (ref iter);
							InsertEmptySignalRow (parent, signal.SignalDescriptor.Name);
						} else {
							Gtk.TreeIter citer;
							store.IterChildren (out citer, iter);
							Signal csignal = GetSignal (citer);
							store.Remove (ref citer);
							SetSignalData (iter, csignal);
							if (store.IterNChildren (iter) == 1)
								tree.CollapseRow (store.GetPath (iter));
						}
					} else
						store.Remove (ref iter);
				}
			}
			UpdateGroupStatus (piter);
			internalChange = false;
		}
Beispiel #6
0
		internal void NotifySignalChanged (object obj, string name, Signal oldSignal, Signal signal)
		{
			GuiDispatch.InvokeSync (delegate {
				if (SignalChanged != null) {
					Component c = App.GetComponent (obj, name, null);
					if (c != null)
						SignalChanged (this, new ComponentSignalEventArgs (this, c, oldSignal, signal));
				}
			});
		}
		internal void RemoveWidgetSignal (ObjectWrapper wrapper, Signal signal)
		{
			foreach (Signal s in wrapper.Signals) {
				if (s.Handler == signal.Handler && s.SignalDescriptor.Name == signal.SignalDescriptor.Name) {
					wrapper.Signals.Remove (s);
					return;
				}
			}
		}
		void SetSignalData (Gtk.TreeIter iter, Signal signal)
		{
			store.SetValue (iter, ColHandler, signal.Handler);
			store.SetValue (iter, ColAfter, false);
			store.SetValue (iter, ColHasHandler, true);
			store.SetValue (iter, ColIsSignal, true);
		}
		public ComponentSignalEventArgs (Project p, Component c, Signal oldSignal, Signal signal): base (p, c)
		{
			this.oldSignal = oldSignal;
			this.signal = signal;
		}
Beispiel #10
0
		void NotifyChanged (Signal oldData)
		{
			if (Owner != null)
				Owner.OnSignalChanged (new SignalChangedEventArgs (Owner, oldData, this)); 
		}
		public void NotifySignalChanged (Wrapper.Action action, string name, Signal oldSignal, Signal signal)
		{
			Gtk.Application.Invoke (
				delegate { if (!disposed) designer.NotifySignalChanged (action, name, oldSignal, signal); }
			);
		}
		internal void NotifySignalChanged (Wrapper.Action action, string name, Signal oldSignal, Signal signal)
		{
			ActionComponent c = (ActionComponent) app.GetComponent (action, name, null);
			if (c != null && SignalChanged != null)
				SignalChanged (this, new ComponentSignalEventArgs (project, c, oldSignal, signal));
		}
Beispiel #13
0
 void SetSignalData(Gtk.TreeIter iter, Signal signal)
 {
     store.SetValue (iter, ColHandler, signal.Handler);
     store.SetValue (iter, ColAfter, false);
     store.SetValue (iter, ColHasHandler, true);
     store.SetValue (iter, ColIsSignal, true);
     store.SetValue (iter, ColDescriptorObject, signal.SignalDescriptor);
     store.SetValue (iter, ColSignalObject, signal);
 }