Ejemplo n.º 1
0
        private void CreateToolbar()
        {
            // UrlEntry
            uri_entry            = new Gtk.Entry();
            uri_entry.Activated += new EventHandler(on_uri_activate);

            Gtk.ToolItem uri_item = new Gtk.ToolItem();
            uri_item.Expand = true;
            uri_item.Add(uri_entry);

            // Toolbar
            toolbar = new Toolbar();
            toolbar.ToolbarStyle = ToolbarStyle.Icons;
            toolbar.Orientation  = Orientation.Horizontal;
            toolbar.ShowArrow    = true;

            // Toolbar Itens
            toolbar.Add(action_back.CreateToolItem());
            toolbar.Add(action_forward.CreateToolItem());
            toolbar.Add(action_reload.CreateToolItem());
            toolbar.Add(action_stop.CreateToolItem());
            toolbar.Add(uri_item);
            toolbar.Add(action_jump.CreateToolItem());
        }
Ejemplo n.º 2
0
    private void AddToToolbar(BaseTemplate i)
    {
        var w1 = new IconFactory();
        var w2 = new IconSet(new Pixbuf(
                                 Assembly.GetExecutingAssembly(),
                                 i.GetIcon()));

        w1.Add(i.Type + "_icon", w2);
        w1.AddDefault();
        var act = new Gtk.Action("c_Create" + i.Type + "Action", null, "Create " + i.Type + " Project", null);

        act.Activated +=
            (object sender, System.EventArgs e) =>
        { this.PromptCreateProject(i.Type); };
        var t = act.CreateToolItem();

        (t as ToolButton).StockId = i.Type + "_icon";
        this.c_Toolbar.Add(t);
    }
Ejemplo n.º 3
0
        private void CreateExprBar()
        {
            // UrlEntry
            expr_entry            = new Gtk.Entry();
            expr_entry.Activated += new EventHandler(on_expr_activate);

            Gtk.ToolItem expr_item = new Gtk.ToolItem();
            expr_item.Expand = true;
            expr_item.Add(expr_entry);

            // Toolbar
            exprbar = new Toolbar();
            exprbar.ToolbarStyle = ToolbarStyle.Icons;
            exprbar.Orientation  = Orientation.Horizontal;
            exprbar.ShowArrow    = true;

            // Toolbar Itens
            exprbar.Add(expr_item);
            exprbar.Add(action_expr.CreateToolItem());
        }
Ejemplo n.º 4
0
 public static Gtk.ToolItem CreateToolBarItem(this Gtk.Action action)
 {
     Gtk.ToolItem item = (Gtk.ToolItem)action.CreateToolItem();
     item.TooltipText = action.Label;
     return(item);
 }
Ejemplo n.º 5
0
 private void AddToToolbar(BaseTemplate i)
 {
     var w1 = new IconFactory();
     var w2 = new IconSet(new Pixbuf(
         Assembly.GetExecutingAssembly(),
         i.GetIcon()));
     w1.Add(i.Type + "_icon", w2);
     w1.AddDefault();
     var act = new Gtk.Action("c_Create" + i.Type + "Action", null, "Create " + i.Type + " Project", null);
     act.Activated +=
         (object sender, System.EventArgs e) =>
             { this.PromptCreateProject(i.Type); };
     var t = act.CreateToolItem();
     (t as ToolButton).StockId = i.Type + "_icon";
     this.c_Toolbar.Add(t);
 }