protected void InitToolbar()
    {
        var bg = worldNotebook.Style.Background(worldNotebook.State);

        var toolbar = new Toolbar
        {
            ToolbarStyle = ToolbarStyle.Icons
        };

        var TBRun       = new ToolButton(Stock.MediaPlay);
        var TBStop      = new ToolButton(Stock.MediaStop);
        var TBNew       = new ToolButton(Stock.New);
        var TBShow      = new ToolButton(Stock.Find);
        var TBOpen      = new ToolButton(Stock.Open);
        var TBSave      = new ToolButton(Stock.Save);
        var TBQuit      = new ToolButton(Stock.Quit);
        var TBSeparator = new SeparatorToolItem();

        toolbar.Insert(TBRun, 0);
        toolbar.Insert(TBStop, 1);
        toolbar.Insert(TBSave, 2);
        toolbar.Insert(TBNew, 3);
        toolbar.Insert(TBShow, 4);
        toolbar.Insert(TBOpen, 5);
        toolbar.Insert(TBSeparator, 6);
        toolbar.Insert(TBQuit, 7);
        toolbar.ModifyBg(StateType.Normal, bg);
        toolbar.BorderWidth = 0;

        TBRun.Clicked  += OnRunButtonClicked;
        TBStop.Clicked += OnStopButtonClicked;
        TBNew.Clicked  += OnClearButtonClicked;
        TBShow.Clicked += OnShowColoniesButtonClicked;
        TBOpen.Clicked += OnLoadImageButtonClicked;
        TBSave.Clicked += OnSaveButtonClicked;
        TBQuit.Clicked += OnQuitButtonClicked;

        var vbox = new VBox(false, 2)
        {
            WidthRequest  = 290,
            HeightRequest = 20
        };

        vbox.PackStart(toolbar, false, false, 0);
        vbox.ModifyBg(StateType.Normal, bg);
        vbox.BorderWidth = 0;

        worldLayout.Put(vbox, 20, 0);

        ShowAll();
    }
        public void SetBackgroundColor(Gdk.Color backgroundColor)
        {
            if (_root != null)
            {
                _root.ModifyBg(StateType.Normal, backgroundColor);
                _viewPort.ModifyBg(StateType.Normal, backgroundColor);

                if (_headerContainer != null && !_headerContainer.Children.Any())
                {
                    _headerContainer.ModifyBg(StateType.Normal, backgroundColor);
                }

                if (_footerContainer != null && !_footerContainer.Children.Any())
                {
                    _footerContainer.ModifyBg(StateType.Normal, backgroundColor);
                }
            }
        }
Exemple #3
0
 static void GeneralInit(VBox Panel)
 {
     Panel.ModifyBg(StateType.Normal, new Gdk.Color(0, 0, 20));
     GeneralAdd(Panel, "GITHUB", "Github Repository:").Changed += delegate(object s, EventArgs e) { if (AllowEdit)
                                                                                                    {
                                                                                                        CurrentProject.GitHub = ((Entry)s).Text;
                                                                                                    }
     };
     GeneralAdd(Panel, "TARGET", "Site Target Dir:").Changed += delegate(object s, EventArgs e) { if (AllowEdit)
                                                                                                  {
                                                                                                      CurrentProject.Target = ((Entry)s).Text;
                                                                                                  }
     };
     GeneralAdd(Panel, "TEMPLATE", "Template file:").Changed += delegate(object s, EventArgs e) { if (AllowEdit)
                                                                                                  {
                                                                                                      CurrentProject.Template = ((Entry)s).Text;
                                                                                                  }
     };
 }