Ejemplo n.º 1
1
		public override ToolBarItem Generate (ActionItem actionItem, ToolBar toolBar)
		{
			var item = base.Generate (actionItem, toolBar);
			var tb = (NSToolbarItem)item.ControlObject;
			tb.Target = null;
			tb.Action = Selector;
			return item;
		}
Ejemplo n.º 2
0
		public override ToolBarItem GenerateToolBarItem(ActionItem actionItem, Eto.Generator generator, ToolBarTextAlign textAlign)
		{
			var item = base.GenerateToolBarItem (actionItem, generator, textAlign);
			var tb = (NSToolbarItem)item.ControlObject;
			tb.Target = null;
			tb.Action = Selector;
			return item;
		}
Ejemplo n.º 3
0
		public override MenuItem Generate (ActionItem actionItem, ISubMenuWidget menu)
		{
			var item = base.Generate (actionItem, menu) as ImageMenuItem;
			var menuItem = (NSMenuItem)item.ControlObject;
			menuItem.Target = null;
			menuItem.Action = Selector;
			
			return item;
		}
Ejemplo n.º 4
0
 public override MenuItem Generate(ActionItem actionItem, ISubMenuWidget menu)
 {
     CheckMenuItem mi = new CheckMenuItem(menu.Generator);
     mi.Text = MenuText;
     mi.Shortcut = Accelerator;
     mi.Enabled = this.Enabled;
     mi.Checked = Checked;
     new MenuConnector(this, mi);
     return mi;
 }
Ejemplo n.º 5
0
 public override ToolBarItem Generate(ActionItem actionItem, ToolBar toolBar)
 {
     ToolBarButton tbb = new ToolBarButton(toolBar.Generator);
     tbb.ID = this.ID;
     tbb.Enabled = this.Enabled;
     if (ShowLabel || actionItem.ShowLabel || toolBar.TextAlign != ToolBarTextAlign.Right) tbb.Text = ToolBarText;
     //Console.WriteLine("Adding toolbar {0}", ToolBarText);
     if (Icon != null) tbb.Icon = Icon;
     new ToolBarConnector(this, tbb);
     return tbb;
 }
Ejemplo n.º 6
0
 public override ToolBarItem Generate(ActionItem actionItem, ToolBar toolBar)
 {
     CheckToolBarButton tbb = new CheckToolBarButton(toolBar.Generator);
     tbb.ID = this.ID;
     tbb.Checked = Checked;
     tbb.Enabled = this.Enabled;
     if (ShowLabel || actionItem.ShowLabel || toolBar.TextAlign != ToolBarTextAlign.Right) tbb.Text = ToolBarText;
     if (Icon != null) tbb.Icon = Icon;
     new ToolBarConnector(this, tbb);
     return tbb;
 }
Ejemplo n.º 7
0
        public override MenuItem Generate(ActionItem actionItem, ISubMenuWidget menu)
        {
            RadioMenuItem mi = new RadioMenuItem(menu.Generator, (Controller != null) ? Controller.menuItem : null);
            mi.Text = MenuText;
            mi.Shortcut = Accelerator;
            mi.Enabled = this.Enabled;
            mi.Checked = Checked;

            new MenuConnector(this, mi);
            menuItem = mi;
            return mi;
        }
Ejemplo n.º 8
0
 public override MenuItem Generate(ActionItem actionItem, ISubMenuWidget menu)
 {
     ImageMenuItem mi = new ImageMenuItem(menu.Generator);
     mi.Text = MenuText;
     mi.Shortcut = Accelerator;
     mi.Enabled = this.Enabled;
     if (Icon != null) mi.Icon = Icon;
     mi.Click += new EventHandler<EventArgs>(delegate { this.Activate(); }).MakeWeak((e) => mi.Click -= e);
     this.EnabledChanged += new EventHandler<EventArgs>(delegate { mi.Enabled = this.Enabled; }).MakeWeak((e) => this.EnabledChanged -= e);
     //new MenuConnector(this, mi);
     return mi;
 }
Ejemplo n.º 9
0
		public override MenuItem Generate(ActionItem actionItem, ISubMenuWidget menu)
		{
			ImageMenuItem mi = new ImageMenuItem(menu.Generator);
			mi.Text = MenuText;
			mi.Shortcut = Accelerator;
			mi.Enabled = this.Enabled;
			if (Icon != null) mi.Icon = Icon;
			if (!string.IsNullOrEmpty (MenuItemStyle))
				mi.Style = MenuItemStyle;
			new MenuConnector(this, mi);
			return mi;
		}
Ejemplo n.º 10
0
		public override ToolBarItem GenerateToolBarItem(ActionItem actionItem, Generator generator, ToolBarTextAlign textAlign)
		{
			ToolBarButton tbb = new ToolBarButton(generator);
			tbb.ID = this.ID;
			tbb.Enabled = this.Enabled;
			if (ShowLabel || actionItem.ShowLabel || textAlign != ToolBarTextAlign.Right) tbb.Text = ToolBarText;
			//Console.WriteLine("Adding toolbar {0}", ToolBarText);
			if (Image != null) tbb.Image = Image;
			if (!string.IsNullOrEmpty (ToolBarItemStyle))
				tbb.Style = ToolBarItemStyle;
			new ToolBarConnector(this, tbb);
			return tbb;
		}
Ejemplo n.º 11
0
        public override ToolBarItem Generate(ActionItem actionItem, ToolBar toolBar)
        {
            CheckToolBarButton tbb = new CheckToolBarButton(toolBar.Generator);

            tbb.ID      = this.ID;
            tbb.Checked = Checked;
            tbb.Enabled = this.Enabled;
            if (ShowLabel || actionItem.ShowLabel || toolBar.TextAlign != ToolBarTextAlign.Right)
            {
                tbb.Text = ToolBarText;
            }
            if (Icon != null)
            {
                tbb.Icon = Icon;
            }
            if (!string.IsNullOrEmpty(ToolBarItemStyle))
            {
                tbb.Style = ToolBarItemStyle;
            }
            new ToolBarConnector(this, tbb);
            return(tbb);
        }
Ejemplo n.º 12
0
        public override ToolItem GenerateToolBarItem(ActionItem actionItem, Generator generator, ToolBarTextAlign textAlign)
        {
            var tbb = new ButtonToolItem(generator);

            tbb.ID      = ID;
            tbb.Enabled = Enabled;
            if (ShowLabel || actionItem.ShowLabel || textAlign != ToolBarTextAlign.Right)
            {
                tbb.Text = ToolBarText;
            }
            //Console.WriteLine("Adding toolbar {0}", ToolBarText);
            if (Image != null)
            {
                tbb.Image = Image;
            }
            if (!string.IsNullOrEmpty(ToolBarItemStyle))
            {
                tbb.Style = ToolBarItemStyle;
            }
            new ToolBarConnector(this, tbb);
            return(tbb);
        }
Ejemplo n.º 13
0
		public override ToolItem GenerateToolBarItem(ActionItem actionItem, Generator generator, ToolBarTextAlign textAlign)
		{
			throw new NotImplementedException("cannot put radio buttons on the toolbar just yet");
		}		
Ejemplo n.º 14
0
 public abstract MenuItem Generate(ActionItem actionItem, ISubMenuWidget menu);
Ejemplo n.º 15
0
		public override ToolItem GenerateToolBarItem(ActionItem actionItem, Generator generator, ToolBarTextAlign textAlign)
		{
			var tbb = new CheckToolItem(generator);
			tbb.ID = ID;
			tbb.Checked = Checked;
			tbb.Enabled = Enabled;
			if (ShowLabel || actionItem.ShowLabel || textAlign != ToolBarTextAlign.Right) tbb.Text = ToolBarText;
			if (Image != null) tbb.Image = Image;
			if (!string.IsNullOrEmpty (ToolBarItemStyle))
				tbb.Style = ToolBarItemStyle;
			new ToolBarConnector(this, tbb);
			return tbb;
		}
Ejemplo n.º 16
0
 public override ToolBarItem GenerateToolBarItem(ActionItem actionItem, Generator generator, ToolBarTextAlign textAlign)
 {
     throw new NotImplementedException("cannot put radio buttons on the toolbar just yet");
 }
Ejemplo n.º 17
0
 public abstract ToolBarItem GenerateToolBarItem(ActionItem actionItem, Generator generator, ToolBarTextAlign textAlign);
Ejemplo n.º 18
0
		public abstract ToolBarItem GenerateToolBarItem(ActionItem actionItem, Generator generator, ToolBarTextAlign textAlign);
Ejemplo n.º 19
0
 public abstract ToolBarItem Generate(ActionItem actionItem, ToolBar toolBar);
Ejemplo n.º 20
0
		public override ToolBarItem Generate(ActionItem actionItem, ToolBar toolBar)
		{
			throw new NotImplementedException("cannot put radio buttons on the toolbar just yet");
		}
Ejemplo n.º 21
0
		public abstract ToolBarItem Generate(ActionItem actionItem, ToolBar toolBar);
Ejemplo n.º 22
0
 public override ToolBarItem Generate(ActionItem actionItem, ToolBar toolBar)
 {
     throw new NotImplementedException("cannot put radio buttons on the toolbar just yet");
 }
Ejemplo n.º 23
0
 public abstract MenuItem Generate(ActionItem actionItem, ISubMenuWidget menu);