コード例 #1
0
ファイル: DesignerView.cs プロジェクト: mono/stetic
        public DesignerView(Stetic.Project project, ProjectItemInfo item)
        {
            this.widget = (WidgetInfo) item;

            // Widget design tab

            design = project.CreateWidgetDesigner (widget, true);

            // Actions design tab

            actionbox = design.CreateActionGroupDesigner ();

            // Designers tab

            AppendPage (design, new Gtk.Label (Catalog.GetString ("Designer")));
            AppendPage (actionbox, new Gtk.Label (Catalog.GetString ("Actions")));
            TabPos = Gtk.PositionType.Bottom;
        }
コード例 #2
0
        public DesignerView(Stetic.Project project, ProjectItemInfo item)
        {
            this.widget = (WidgetInfo)item;

            // Widget design tab

            design = project.CreateWidgetDesigner(widget, true);

            // Actions design tab

            actionbox = design.CreateActionGroupDesigner();

            // Designers tab

            AppendPage(design, new Gtk.Label(Catalog.GetString("Designer")));
            AppendPage(actionbox, new Gtk.Label(Catalog.GetString("Actions")));
            TabPos = Gtk.PositionType.Bottom;
        }
コード例 #3
0
        static void OpenWindow(ProjectItemInfo item)
        {
            Gtk.Widget page = (Gtk.Widget)openWindows [item];
            if (page != null)
            {
                page.Show();
                WidgetNotebook.Page = WidgetNotebook.PageNum(page);
            }
            else
            {
                DesignerView view = new DesignerView(Project, item);

                // Tab label

                HBox tabLabel = new HBox();
                tabLabel.PackStart(new Gtk.Image(item.Component.Type.Icon), true, true, 0);
                tabLabel.PackStart(new Label(item.Name), true, true, 3);
                Button b = new Button(new Gtk.Image("gtk-close", IconSize.Menu));
                b.Relief       = Gtk.ReliefStyle.None;
                b.WidthRequest = b.HeightRequest = 24;

                b.Clicked += delegate(object s, EventArgs a) {
                    view.Hide();
                    WidgetNotebook.QueueResize();
                };

                tabLabel.PackStart(b, false, false, 0);
                tabLabel.ShowAll();

                // Notebook page

                int p = WidgetNotebook.AppendPage(view, tabLabel);
                view.ShowAll();
                openWindows [item]  = view;
                WidgetNotebook.Page = p;
            }
        }
コード例 #4
0
ファイル: Stetic.cs プロジェクト: mono/stetic
        static void OpenWindow(ProjectItemInfo item)
        {
            Gtk.Widget page = (Gtk.Widget) openWindows [item];
            if (page != null) {
                page.Show ();
                WidgetNotebook.Page = WidgetNotebook.PageNum (page);
            }
            else {
                DesignerView view = new DesignerView (Project, item);

                // Tab label

                HBox tabLabel = new HBox ();
                tabLabel.PackStart (new Gtk.Image (item.Component.Type.Icon), true, true, 0);
                tabLabel.PackStart (new Label (item.Name), true, true, 3);
                Button b = new Button (new Gtk.Image ("gtk-close", IconSize.Menu));
                b.Relief = Gtk.ReliefStyle.None;
                b.WidthRequest = b.HeightRequest = 24;

                b.Clicked += delegate (object s, EventArgs a) {
                    view.Hide ();
                    WidgetNotebook.QueueResize ();
                };

                tabLabel.PackStart (b, false, false, 0);
                tabLabel.ShowAll ();

                // Notebook page

                int p = WidgetNotebook.AppendPage (view, tabLabel);
                view.ShowAll ();
                openWindows [item] = view;
                WidgetNotebook.Page = p;
            }
        }
コード例 #5
0
        static void OnWidgetActivated(object s, EventArgs args)
        {
            ProjectItemInfo wi = ProjectView.Selection;

            OpenWindow(wi);
        }