Esempio n. 1
0
        public virtual void AppendTile(AbstractTileObject tileObject)
        {
            Tile tile = new Tile(tileObject, IconSize);

            tile.Owner          = this;
            tile.ActiveChanged += OnTileActiveChanged;
            tile.SizeAllocated += OnTileSizeAllocated;
            tile.Show();
            tiles.Add(tile);

            box.PackStart(tile, false, false, 0);
        }
Esempio n. 2
0
		public Tile (AbstractTileObject obj, int iconSize) : base(3, 3, false)
		{
			AddImage = new Image (obj.AddButtonStock, Gtk.IconSize.SmallToolbar);
			RemoveImage = new Image (obj.RemoveButtonStock, Gtk.IconSize.SmallToolbar);
			
			OwnedObject = obj;	
			
			OwnedObject.IconUpdated += HandleOwnedObjectIconUpdated;
			OwnedObject.TextUpdated += HandleOwnedObjectTextUpdated;
			OwnedObject.ButtonsUpdated += HandleOwnedObjectButtonsUpdated;
			
			IconSize = iconSize;
			
			BuildTile ();
		}
Esempio n. 3
0
        public Tile(AbstractTileObject obj, int iconSize) : base(3, 3, false)
        {
            AddImage    = new Image(obj.AddButtonStock, Gtk.IconSize.SmallToolbar);
            RemoveImage = new Image(obj.RemoveButtonStock, Gtk.IconSize.SmallToolbar);

            OwnedObject = obj;

            OwnedObject.IconUpdated    += HandleOwnedObjectIconUpdated;
            OwnedObject.TextUpdated    += HandleOwnedObjectTextUpdated;
            OwnedObject.ButtonsUpdated += HandleOwnedObjectButtonsUpdated;

            IconSize = iconSize;

            BuildTile();
        }
Esempio n. 4
0
        public virtual void RemoveTile(AbstractTileObject tileObject)
        {
            Tile tile = tiles.First(t => t.OwnedObject == tileObject);

            if (tile == null)
            {
                throw new ArgumentException("Container does not own that AbstractTileObject.  It may have been removed already.", "tileObject");
            }

            if (selected_index == tiles.IndexOf(tile))
            {
                ClearSelection();
            }

            tile.Hide();
            tile.ActiveChanged -= OnTileActiveChanged;
            tile.SizeAllocated -= OnTileSizeAllocated;
            tile.Owner          = null;

            tiles.Remove(tile);
            box.Remove(tile);
            tile.Dispose();
            tile.Destroy();
        }
		public override void AppendTile (AbstractTileObject tileObject)
		{
			tileObject.Enabled = true;
			base.AppendTile (tileObject);
		}
Esempio n. 6
0
		public virtual void RemoveTile (AbstractTileObject tileObject)
		{
			Tile tile = tiles.First (t => t.OwnedObject == tileObject);
			
			if (tile == null)
				throw new ArgumentException ("Container does not own that AbstractTileObject.  It may have been removed already.", "tileObject");
	
			if (selected_index == tiles.IndexOf (tile))
				ClearSelection ();
	
			tile.Hide ();
			tile.ActiveChanged -= OnTileActiveChanged;
			tile.SizeAllocated -= OnTileSizeAllocated;
			tile.Owner = null;
			
			tiles.Remove (tile);
			box.Remove (tile);
			tile.Dispose ();
			tile.Destroy ();
		}
Esempio n. 7
0
		public virtual void AppendTile (AbstractTileObject tileObject)
		{			
			Tile tile = new Tile (tileObject, IconSize);
			tile.Owner = this;
			tile.ActiveChanged += OnTileActiveChanged;
			tile.SizeAllocated += OnTileSizeAllocated;
			tile.Show ();
			tiles.Add (tile);
			
			box.PackStart (tile, false, false, 0);
		}		
Esempio n. 8
0
 public override void AppendTile(AbstractTileObject tileObject)
 {
     tileObject.Enabled = true;
     base.AppendTile(tileObject);
 }