Example #1
0
		/// <summary>
		/// Adds the given control to the location.
		/// </summary>
		public void AddContext(Side loc, Renderable2D control)
		{
			//			ToolBar toolbar = GetToolbar(context);
		//			toolbar.Orientation = ContextOrientation(loc);
			stacks[loc].AddChild(control);
			anchors[(AnchorLocation)loc].MakeDirty();			
		}
Example #2
0
		/// <summary>
		/// Anchors a control at the given location.
		/// </summary>
		public void AnchorControl(Renderable2D control, AnchorLocation location)
		{
			if (anchors[location].Control != null)
				throw new Exception("There's already something at this anchor.");

			anchors[location].Control = control;
		}
Example #3
0
		/// <summary>
		/// Clears the tooltip for the scene.
		/// </summary>
		public void ClearToolTip()
		{
			_tooltipContent = null;
			_tooltipOverlay.Control = null;
		}
Example #4
0
		/// <summary>
		/// Privatize adding children. Outsiders don't get to do this.
		/// </summary>
		protected void Add(Renderable2D child)
		{
			base.AddChild(child);
		}
Example #5
0
		/// <summary>
		/// Draws the decorations for the given control.
		/// </summary>
		public abstract void Decorate(Renderable2D control);
Example #6
0
		/// <summary>
		/// Sets the tooltip for the scene.
		/// </summary>
		public void SetToolTip(Renderable2D content, bool followCursor)
		{
			_tooltipContent = content;
			_tooltipOverlay.Control = content;
			_tooltipFollowCursor = followCursor;
			MoveTooltip(LastMousePosition);
		}
Example #7
0
		public AnchorPane(Renderable2D control, AnchorLocation location)
		{
			this.Control = control;
			Location = location;	
		}
Example #8
0
		public override void Decorate(Renderable2D control)
		{
			if (control is CornerButtons)
			{
				Decorate(control as CornerButtons);
				return;
			}
			if (control is DialogFrame)
			{
				Decorate(control as DialogFrame);
				return;
			}
			if (control is MessageBoxFrame)
			{
				Decorate(control as MessageBoxFrame);
				return;
			}
			if (control is DockButton)
			{
				Decorate(control as DockButton);
				return;
			}
			if (control is DockBookSelector)
			{
				Decorate(control as DockBookSelector);
				return;
			}
			if (control is Button)
			{
				Decorate(control as Button);
				return;
			}
			if (control is ToolBar)
			{
				Decorate(control as ToolBar);
				return;
			}
			if (control is TextBox)
			{
				Decorate(control as TextBox);
				return;
			}
			if (control is Slider)
			{
				Decorate(control as Slider);
				return;
			}
			if (control is CheckBox)
			{
				Decorate(control as CheckBox);
				return;
			}
			if (control is MenuBox)
			{
				Decorate(control as MenuBox);
				return;
			}
			if (control is Menu)
			{
				Decorate(control as Menu);
				return;
			}
			if (control is ProgressBar)
			{
				Decorate(control as ProgressBar);
				return;
			}
			if (control is ProgressDial)
			{
				Decorate(control as ProgressDial);
				return;
			}
			if (control is TreeItem)
			{
				Decorate(control as TreeItem);
				return;
			}
			if (control is RingBar)
			{
				Decorate(control as RingBar);
				return;
			}
			if (control is RingButton)
			{
				Decorate(control as RingButton);
				return;
			}
		}
Example #9
0
		public AnchorPane(Renderable2D Control) : this(Control, AnchorLocation.N)
		{
		}
Example #10
0
		
		/// <summary>
		/// Gets the previous control in the focus chain from the given child.
		/// </summary>
		public virtual Renderable2D GetPreviousFocus(Renderable2D child)
		{
			throw new Exception("This method has no meaning on controls which aren't containers.");
Example #11
0
		public OverlayPane(Renderable2D control) : this()
		{
			Control = control;
		}
Example #12
0
		public override void OnKeyPress(KeyEvent evt)
		{
			base.OnKeyPress(evt);
			
			if (Control == null)
				return;
			
			if (evt.SpecialKey == SpecialKey.Tab)
			{
				MakeDirty();
				if (evt.Modifier == InteractionModifier.Shift)
				{
					if (InFocus != null)
						InFocus = InFocus.GetPreviousFocus();
					else
						InFocus = Control.GetLastFocus();
				}
				else
				{
					if (InFocus != null)
						InFocus = InFocus.GetNextFocus();
					else
						InFocus = Control.GetFirstFocus();
				}
			}			
			else if (InFocus != null)
			{
				
				InFocus.OnKeyPress(evt);
			}
		}
Example #13
0
		public ActorPane(Renderable2D control) : this()
		{
			Control = control;
		}