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; }
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; }
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; }
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; }
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; }
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; }
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; }
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; }
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; }
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; }
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); }
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); }
public override ToolItem GenerateToolBarItem(ActionItem actionItem, Generator generator, ToolBarTextAlign textAlign) { throw new NotImplementedException("cannot put radio buttons on the toolbar just yet"); }
public abstract MenuItem Generate(ActionItem actionItem, ISubMenuWidget menu);
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; }
public override ToolBarItem GenerateToolBarItem(ActionItem actionItem, Generator generator, ToolBarTextAlign textAlign) { throw new NotImplementedException("cannot put radio buttons on the toolbar just yet"); }
public abstract ToolBarItem GenerateToolBarItem(ActionItem actionItem, Generator generator, ToolBarTextAlign textAlign);
public abstract ToolBarItem Generate(ActionItem actionItem, ToolBar toolBar);
public override ToolBarItem Generate(ActionItem actionItem, ToolBar toolBar) { throw new NotImplementedException("cannot put radio buttons on the toolbar just yet"); }