コード例 #1
0
ファイル: ActionItem.cs プロジェクト: Exe0/Eto
		public override ToolItem GenerateToolBarItem(Generator generator, ToolBarTextAlign textAlign)
		{
			var tbb = new SeparatorToolItem(generator) { Type = ToolBarType };
			if (!string.IsNullOrEmpty (ToolBarItemStyle))
				tbb.Style = ToolBarItemStyle;
			return tbb;
		}
コード例 #2
0
        /// <summary>
        /// CSharpToolBarクラスのインスタンスを初期化
        /// </summary>
        public CSharpToolBar()
        {
            //
            // TODO: コンストラクタ ロジックをここに追加してください。
            //

            buttons         = new CSharpToolBarButtonCollection(this);
            appearance      = CSharpToolBarAppearance.Normal;
            borderStyle     = Border3DStyle.Adjust;
            textAlign       = ToolBarTextAlign.Underneath;
            imageList       = null;
            buttonSize      = new Size(80, 25);
            autoToolBarSize = false;
            autoAdjustSize  = true;
            wrappable       = true;
            allowDragButton = true;

            // ちらつきを押さえるために各スタイルを設定
            SetStyle(ControlStyles.AllPaintingInWmPaint |
                     ControlStyles.DoubleBuffer |
                     ControlStyles.UserPaint, true);

            //this.BackColor = Color.Transparent;
            //Dock = DockStyle.Top;
        }
コード例 #3
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;
		}
コード例 #4
0
ファイル: ActionItem.cs プロジェクト: JohnACarruthers/Eto
		public override ToolBarItem GenerateToolBarItem(Generator generator, ToolBarTextAlign textAlign)
		{
			var item = Action.GenerateToolBarItem(this, generator, textAlign);
			if (item != null) {
				if (!string.IsNullOrEmpty (ToolBarItemStyle))
					item.Style = ToolBarItemStyle;
			}
			return item;
		}
コード例 #5
0
ファイル: ActionItem.cs プロジェクト: sami1971/Eto
        public override ToolItem GenerateToolBarItem(Generator generator, ToolBarTextAlign textAlign)
        {
            var item = Action.GenerateToolBarItem(this, generator, textAlign);

            if (item != null)
            {
                if (!string.IsNullOrEmpty(ToolBarItemStyle))
                {
                    item.Style = ToolBarItemStyle;
                }
            }
            return(item);
        }
コード例 #6
0
ファイル: ActionItem.cs プロジェクト: sami1971/Eto
        public override ToolItem GenerateToolBarItem(Generator generator, ToolBarTextAlign textAlign)
        {
            var tbb = new SeparatorToolItem(generator)
            {
                Type = ToolBarType
            };

            if (!string.IsNullOrEmpty(ToolBarItemStyle))
            {
                tbb.Style = ToolBarItemStyle;
            }
            return(tbb);
        }
コード例 #7
0
ファイル: ButtonAction.cs プロジェクト: JohnACarruthers/Eto
		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;
		}
コード例 #8
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);
        }
コード例 #9
0
ファイル: RadioAction.cs プロジェクト: alexandrebaker/Eto
		public override ToolItem GenerateToolBarItem(ActionItem actionItem, Generator generator, ToolBarTextAlign textAlign)
		{
			throw new NotImplementedException("cannot put radio buttons on the toolbar just yet");
		}		
コード例 #10
0
ファイル: BaseAction.cs プロジェクト: JohnACarruthers/Eto
		public abstract ToolBarItem GenerateToolBarItem(ActionItem actionItem, Generator generator, ToolBarTextAlign textAlign);
コード例 #11
0
ファイル: ActionItem.cs プロジェクト: Exe0/Eto
		public override ToolItem GenerateToolBarItem(Generator generator, ToolBarTextAlign textAlign)
		{
			return null;
		}
コード例 #12
0
ファイル: ButtonAction.cs プロジェクト: pcdummy/Eto
        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);
        }
コード例 #13
0
ファイル: ActionItem.cs プロジェクト: Exe0/Eto
		public abstract ToolItem GenerateToolBarItem(Generator generator, ToolBarTextAlign textAlign);
コード例 #14
0
ファイル: MacButtonAction.cs プロジェクト: pcdummy/Eto
        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);
        }
コード例 #15
0
 public override ToolBarItem GenerateToolBarItem(ActionItem actionItem, Generator generator, ToolBarTextAlign textAlign)
 {
     throw new NotImplementedException("cannot put radio buttons on the toolbar just yet");
 }
コード例 #16
0
ファイル: CheckAction.cs プロジェクト: alexandrebaker/Eto
		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;
		}
コード例 #17
0
ファイル: ActionItem.cs プロジェクト: sami1971/Eto
 public abstract ToolItem GenerateToolBarItem(Generator generator, ToolBarTextAlign textAlign);
コード例 #18
0
ファイル: BaseAction.cs プロジェクト: pcdummy/Eto
 public abstract ToolBarItem GenerateToolBarItem(ActionItem actionItem, Generator generator, ToolBarTextAlign textAlign);
コード例 #19
0
ファイル: ActionItem.cs プロジェクト: sami1971/Eto
 public override ToolItem GenerateToolBarItem(Generator generator, ToolBarTextAlign textAlign)
 {
     return(null);
 }