Esempio n. 1
0
 public FrontEnd(ISlate slate)
 {
     _graphics             = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
     IsMouseVisible        = true;
     _slate          = slate;
     _pendingUpdates = new ConcurrentQueue <Update>();
 }
Esempio n. 2
0
        public void AddControl(ISlate control, Point at)
        {
            var panel = new Panel(control, at, _updates);

            _panels.Add(panel);

            _updates.OnNext(Update.SizeChanged);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
 public SlateMutation(ISlate source)
 {
     _source     = source;
     _updates    = new Subject <Update>();
     _disposable = source.Updates.Subscribe(HandleUpdate);
 }
Esempio n. 5
0
 public Panel(ISlate source, Point offset, ISubject <Update> sink) : base(source)
 {
     _offset     = offset;
     _disposable = _updates.Subscribe(sink.OnNext);
 }
Esempio n. 6
0
 public ScrollBehaviour(ISlate source, int numFixedRows, int numFixedColumns) : base(source)
 {
     _numFixedRows    = numFixedRows;
     _numFixedColumns = numFixedColumns;
     _scrollOffset    = Point.Zero;
 }