DockBarButton.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * $Id$
  3. *
  4. * Copyright (C) 2005 John Luke <john.luke@gmail.com>
  5. *
  6. * based on work by:
  7. * Copyright (C) 2002 Gustavo Giráldez <gustavo.giraldez@gmx.net>
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2 of the License, or
  12. * (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place - Suite 330,
  22. * Boston, MA 02111-1307, USA.
  23. */
  24. using Gtk;
  25. namespace Gdl
  26. {
  27. /// <summary>
  28. /// This class represents a button which is placed in a DockBar.
  29. /// The button is used to represent iconified DockItems.
  30. /// </summary>
  31. public class DockBarButton : Button
  32. {
  33. DockItem item;
  34. public DockBarButton (DockItem item)
  35. {
  36. this.item = item;
  37. this.Relief = ReliefStyle.None;
  38. this.Add (new Image (item.StockId, IconSize.SmallToolbar));
  39. }
  40. public DockItem DockItem
  41. {
  42. get { return item; }
  43. }
  44. }
  45. }