public FrontEnd(ISlate slate) { _graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; IsMouseVisible = true; _slate = slate; _pendingUpdates = new ConcurrentQueue <Update>(); }
public void AddControl(ISlate control, Point at) { var panel = new Panel(control, at, _updates); _panels.Add(panel); _updates.OnNext(Update.SizeChanged); }
public void RemoveControl(ISlate control) { var panel = _panels.FirstOrDefault(p => object.ReferenceEquals(p.Control, control)); if (panel == null) { return; } _panels.Remove(panel); panel.Dispose(); _updates.OnNext(Update.SizeChanged); }
public SlateMutation(ISlate source) { _source = source; _updates = new Subject <Update>(); _disposable = source.Updates.Subscribe(HandleUpdate); }
public Panel(ISlate source, Point offset, ISubject <Update> sink) : base(source) { _offset = offset; _disposable = _updates.Subscribe(sink.OnNext); }
public ScrollBehaviour(ISlate source, int numFixedRows, int numFixedColumns) : base(source) { _numFixedRows = numFixedRows; _numFixedColumns = numFixedColumns; _scrollOffset = Point.Zero; }