Beispiel #1
0
		public ViewEditorDialog (ISchemaProvider schemaProvider, bool create, ViewEditorSettings settings)
		{
			if (schemaProvider == null)
				throw new ArgumentNullException ("schemaProvider");
			
			
			this.schemaProvider = schemaProvider;
			this.action = create ? SchemaActions.Create : SchemaActions.Alter;
			
			this.Build();
			
			if (create)
				Title = AddinCatalog.GetString ("Create View");
			else
				Title = AddinCatalog.GetString ("Alter View");
			
			notebook = new Notebook ();

			sqlEditor = new SqlEditorWidget ();
			sqlEditor.TextChanged += new EventHandler (SqlChanged);
			notebook.AppendPage (sqlEditor, new Label (AddinCatalog.GetString ("Definition")));
			
			if (settings.ShowComment) {
				commentEditor = new CommentEditorWidget ();
				notebook.AppendPage (commentEditor, new Label (AddinCatalog.GetString ("Comment")));
			}

			notebook.Page = 0;

			entryName.Text = view.Name;

			vboxContent.PackStart (notebook, true, true, 0);
			vboxContent.ShowAll ();
			SetWarning (null);
		}
Beispiel #2
0
        private void Build()
        {
            this.titleLabel = new Label("");
            var fontDescription = new Pango.FontDescription();

            fontDescription.Size = Convert.ToInt32(17 * Pango.Scale.PangoScale);
            this.titleLabel.ModifyFont(fontDescription);
            this.PackStart(this.titleLabel, false, true, 10);

            this.dayNotesComponent     = new DayNotes();
            this.dayExercisesComponent = new DayExercises();

            var nbLibro = new Gtk.Notebook();

            nbLibro.AppendPage(
                this.dayNotesComponent,
                new Gtk.Label("Notes")
                );

            nbLibro.AppendPage(
                this.dayExercisesComponent,
                new Gtk.Label("Exercises")
                );


            this.Add(nbLibro);

            //Update state and render
            this.OnViewBuilt();
        }
Beispiel #3
0
        void IPlugin.Init(object context)
        {
            ISolidReflector reflector = context as ISolidReflector;

            mainWindow = reflector.GetMainWindow();
            IAssemblyBrowser browser = reflector.GetPlugins().GetService <IAssemblyBrowser>();

            browser.SelectionChanged += OnSelectionChanged;

            ScrolledWindow scrollWindow = new ScrolledWindow();
            Viewport       viewport     = new Viewport();

            scrollWindow.Add(viewport);
            viewport.Add(nb);
            scrollWindow.ShowAll();

            nb.AppendPage(textView, new Gtk.Label("CG Text"));
            nb.AppendPage(drawingArea, new Gtk.Label("CG Visualizer"));
            nb.ShowAll();

            cgVisualizingDock                = mainWindow.DockFrame.AddItem("CGVisualizer");
            cgVisualizingDock.DrawFrame      = true;
            cgVisualizingDock.Label          = "Call Graph Visualizer";
            cgVisualizingDock.Content        = scrollWindow;
            cgVisualizingDock.DefaultVisible = true;
            cgVisualizingDock.Visible        = true;
        }
Beispiel #4
0
        public AboutDialog()
        {
            Title = Catalog.GetString ("About Pinta");
            //TransientFor = IdeApp.Workbench.RootWindow;
            AllowGrow = false;
            HasSeparator = false;
            Icon = PintaCore.Resources.GetIcon ("Pinta.png");

            VBox.BorderWidth = 0;

            aboutPictureScrollBox = new ScrollBox ();

            VBox.PackStart (aboutPictureScrollBox, false, false, 0);
            imageSep = PintaCore.Resources.GetIcon ("About.ImageSep.png");

            VBox.PackStart (new Gtk.Image (imageSep), false, false, 0);

            Notebook notebook = new Notebook ();
            notebook.BorderWidth = 6;
            notebook.AppendPage (new AboutPintaTabPage (), new Label (Title));
            notebook.AppendPage (new VersionInformationTabPage (), new Label (Catalog.GetString ("Version Info")));

            VBox.PackStart (notebook, true, true, 4);

            AddButton (Gtk.Stock.Close, (int)ResponseType.Close);

            ShowAll ();
        }
Beispiel #5
0
		public DemoMain ()
		{
			SetupDefaultIcon ();
		   	window = new Gtk.Window ("Gtk# Code Demos");
		   	window.SetDefaultSize (600, 400);
			window.DeleteEvent += new DeleteEventHandler (WindowDelete);

			HBox hbox = new HBox (false, 0);
			window.Add (hbox);

			treeView = CreateTree ();
			hbox.PackStart (treeView, false, false, 0);

			Notebook notebook = new Notebook ();
			hbox.PackStart (notebook, true, true, 0);

			notebook.AppendPage (CreateText (infoBuffer, false), new Label ("_Info"));
			TextTag heading = new TextTag ("heading");
			heading.Font = "Sans 18";
			infoBuffer.TagTable.Add (heading);

			notebook.AppendPage (CreateText (sourceBuffer, true), new Label ("_Source"));

			window.ShowAll ();
		}
Beispiel #6
0
    public ChangesetView(Driver driver, int stopAfter)
    {
        this.driver = driver;
            this.stopAfter = stopAfter;

            InitializeChangesetList();

            ScrolledWindow scrolledWindow1 = new ScrolledWindow();
            scrolledWindow1.Add(changesetList);

            Add1(scrolledWindow1);

            viewChildren = new Notebook ();
            viewChildren.TabPos = PositionType.Bottom;
            Add2(viewChildren);

            changesetDetailView = new ChangesetDetailView(driver);
            viewChildren.AppendPage (changesetDetailView, new Label ("Details"));

            changesetDiffView = new ChangesetDiffView(driver);
            viewChildren.AppendPage (changesetDiffView, new Label ("Unified Diff"));

            int x, y, width, height, depth;
            RootWindow.GetGeometry (out x, out y, out width, out height, out depth);
            Position = Convert.ToInt32((height - 40) * 0.4);

            viewChildren.SwitchPage += OnSwitchPage;
    }
Beispiel #7
0
        public CommonAboutDialog()
        {
            Title = MainClass.Languages.Translate("moscrif_ide_title_f1");
            TransientFor = MainClass.MainWindow;
            AllowGrow = false;
            HasSeparator = false;
            Modal = true;

            VBox.BorderWidth = 0;

            aboutPictureScrollBox = new ScrollBox();

            VBox.PackStart(aboutPictureScrollBox, false, false, 0);

            Notebook notebook = new Notebook();
            notebook.BorderWidth = 6;
            notebook.AppendPage(new AboutTabPage(), new Label(Title));
            notebook.AppendPage(new VersionInformationTabPage(), new Label(MainClass.Languages.Translate("components")));
            var buildInfo = LoadBuildInfo();
            if (buildInfo != null)
                notebook.AppendPage(buildInfo, new Label(MainClass.Languages.Translate("components")));
            VBox.PackStart(notebook, true, true, 4);

            AddButton (Stock.Close, ResponseType.Close);

            //ShowAll();
        }
Beispiel #8
0
        void IPlugin.Init(object context)
        {
            ISolidReflector reflector = context as ISolidReflector;

            mainWindow = reflector.GetMainWindow();
            IAssemblyBrowser browser = reflector.GetPlugins().GetService <IAssemblyBrowser>();

            browser.SelectionChanged += OnSelectionChanged;

            ScrolledWindow cfgDrawingAreaWindow   = new ScrolledWindow();
            Viewport       cfgDrawingAreaViewport = new Viewport();

            cfgDrawingAreaWindow.Add(cfgDrawingAreaViewport);
            cfgDrawingAreaViewport.Add(drawingArea);

            ScrolledWindow cfgTextAreaWindow   = new ScrolledWindow();
            Viewport       cfgTextAreaViewport = new Viewport();

            cfgTextAreaWindow.Add(cfgTextAreaViewport);
            cfgTextAreaViewport.Add(cfgTextView);

            Gtk.Notebook nb = new Gtk.Notebook();
            nb.AppendPage(cfgTextAreaWindow, new Gtk.Label("CFG Text"));
            nb.AppendPage(cfgDrawingAreaWindow, new Gtk.Label("CFG Visualizer"));
            nb.ShowAll();

            cfgVisualizingDock                = mainWindow.DockFrame.AddItem("CFG Visualizer");
            cfgVisualizingDock.Expand         = true;
            cfgVisualizingDock.DrawFrame      = true;
            cfgVisualizingDock.Label          = "CFG Visualizer";
            cfgVisualizingDock.Content        = nb;
            cfgVisualizingDock.DefaultVisible = true;
            cfgVisualizingDock.Visible        = true;

            ScrolledWindow simulationTextViewWindow = new ScrolledWindow();
            VBox           simulationVBox           = new VBox(false, 0);

            simulationTextView = new TextView();
            simulationTextViewWindow.Add(simulationTextView);
            Button simulateButton = new Button("Simulate");

            simulateButton.Clicked += HandleClicked;

            simulationVBox.PackStart(simulateButton, false, false, 0);
            simulationVBox.PackStart(new Label("New CFG: "), false, false, 0);
            simulationVBox.PackStart(simulationTextViewWindow, true, true, 0);
            simulationVBox.PackStart(new Label("Method output: "), false, false, 0);
            simulationVBox.PackEnd(outputTextView, true, true, 0);

            simulationVBox.ShowAll();

            simulationDock                = mainWindow.DockFrame.AddItem("Simulation Visualizer");
            simulationDock.Expand         = true;
            simulationDock.DrawFrame      = true;
            simulationDock.Label          = "Simulation Visualizer";
            simulationDock.Content        = simulationVBox;
            simulationDock.DefaultVisible = true;
            simulationDock.Visible        = true;
        }
Beispiel #9
0
        /// <summary>
        /// Set up the UI inside the Window
        /// </summary>
        private void InitializeWidgets(Manager simiasManager)
        {
            this.SetDefaultSize(480, 550);

            // Create an extra vbox to add the spacing
            EventBox prefsWindow = new EventBox();

            prefsWindow.ModifyBg(StateType.Normal, this.Style.Background(StateType.Normal));
            VBox winBox = new VBox();

            //this.Add (winBox);
            prefsWindow.Add(winBox);
            this.Add(prefsWindow);
            winBox.BorderWidth = 7;
            winBox.Spacing     = 7;

            this.Icon           = new Gdk.Pixbuf(Util.ImagesPath("ifolder16.png"));
            this.WindowPosition = Gtk.WindowPosition.Center;

            //-----------------------------
            // Set up the Notebook (tabs)
            //-----------------------------
            PrefNoteBook = new Notebook();

            generalPage = new PrefsGeneralPage(this, ifws);
            PrefNoteBook.AppendPage(generalPage,
                                    new Label(Util.GS("General")));

            accountsPage = new PrefsAccountsPage(this);
            PrefNoteBook.AppendPage(accountsPage,
                                    new Label(Util.GS("Accounts")));

            /*migrationPage =*/ new MigrationPage(this, ifws);
//			PrefNoteBook.AppendPage( migrationPage, new Label(Util.GS("Migration")));

            PrefNoteBook.SwitchPage +=
                new SwitchPageHandler(OnSwitchPageEvent);

            winBox.PackStart(PrefNoteBook, true, true, 0);

            HButtonBox buttonBox = new HButtonBox();

            buttonBox.BorderWidth = 10;
            buttonBox.Spacing     = 10;
            buttonBox.Layout      = ButtonBoxStyle.Edge;
            winBox.PackStart(buttonBox, false, false, 0);

            Button helpButton = new Button(Gtk.Stock.Help);

            buttonBox.PackStart(helpButton);
            helpButton.Clicked += new EventHandler(HelpEventHandler);

            Button closeButton = new Button(Gtk.Stock.Close);

            buttonBox.PackStart(closeButton);
            closeButton.Clicked += new EventHandler(CloseEventHandler);
        }
Beispiel #10
0
 /// <summary>
 /// Constructor
 /// </summary>
 public ManagerView(ViewBase owner)
     : base(owner)
 {
     notebook = new Notebook();
     _mainWidget = notebook;
     Grid = new GridView(this);
     ScriptEditor = new EditorView(this);
     notebook.AppendPage(Grid.MainWidget, new Label("Properties"));
     notebook.AppendPage(ScriptEditor.MainWidget, new Label("Script"));
 }
Beispiel #11
0
        //        Entry sipServerAddressEntry;
        //        Entry sipUsernameEntry;
        //        Entry sipPasswordEntry;
        public PreferencesDialog()
            : base()
        {
            SetDefaultSize (600, 600);
            WindowPosition = WindowPosition.Center;
            IconName = "rtc";
            HasSeparator = false;
            BorderWidth = 5;
            Resizable = true;
            Title = Catalog.GetString ("Banter Preferences");

            VBox.Spacing = 5;
            ActionArea.Layout = ButtonBoxStyle.End;

            // Notebook Tabs (General, Messages)...
            Gtk.Notebook notebook = new Notebook ();
            notebook.TabPos = PositionType.Top;
            notebook.BorderWidth = 5;
            notebook.Show ();

            //			notebook.AppendPage (MakeGeneralPage (),
            //									new Label (Catalog.GetString ("General")));
            notebook.AppendPage (MakeAccountsPage (),
                                    new Label (Catalog.GetString ("Accounts")));
            notebook.AppendPage (MakeMessagesPage (),
                                    new Label (Catalog.GetString ("Messages")));

            VBox.PackStart (notebook, true, true, 0);

            // Close button...
            Button button = new Button (Stock.Close);
            button.CanDefault = true;
            button.Show ();

            AccelGroup accelGroup = new AccelGroup ();
            AddAccelGroup (accelGroup);

            button.AddAccelerator ("activate",
                                    accelGroup,
                                    (uint) Gdk.Key.Escape,
                                    0,
                                    0);

            AddActionWidget (button, ResponseType.Close);
            DefaultResponse = ResponseType.Close;

            Realized += DialogRealized;

            Preferences.PreferenceChanged += PreferenceChanged;

            ShowAll ();
        }
Beispiel #12
0
        public DatabaseEditor(string filePath)
        {
            fileName = filePath;
            control = new Notebook();

            control.TabPos = PositionType.Bottom;
            control.AppendPage(new StructureDatabaseView(filePath),new Label(MainClass.Languages.Translate("sql_structure")));
            control.AppendPage(new DataDatabaseView(filePath),new Label(MainClass.Languages.Translate("sql_data")));
            control.AppendPage(new SqlDatabaseView(filePath),new Label(MainClass.Languages.Translate("sql_sql")));

            control.SwitchPage += new SwitchPageHandler(OnSwitchPage);

            control.ShowAll();
        }
		public ClassBrowserPadWidget (ExtensibleTreeView treeView, IPadWindow window)
		{
			this.treeView = treeView;
			
			DockItemToolbar searchBox = window.GetToolbar (PositionType.Top);
			
			searchEntry = new Entry ();
			searchBox.Add (searchEntry, true);
			buttonSearch = new Button (new Gtk.Image (Gtk.Stock.Find, IconSize.Menu));
			buttonSearch.Relief = ReliefStyle.None;
			buttonCancelSearch = new Button (new Gtk.Image (Gtk.Stock.Stop, IconSize.Menu));
			buttonCancelSearch.Relief = ReliefStyle.None;
			searchBox.Add (buttonSearch);
			searchBox.Add (buttonCancelSearch);
			searchBox.ShowAll ();
			
			notebook = new Notebook ();
			notebook.ShowTabs = false;
			notebook.ShowBorder = false;
			this.PackEnd (notebook, true, true, 0);
			
			notebook.AppendPage (treeView, null);
			ScrolledWindow scrolledWindow = new ScrolledWindow ();
			scrolledWindow.Add (searchResultsTreeView);
			notebook.AppendPage (scrolledWindow, null);
			
			list = new ListStore (new Type[] {
				typeof (Pixbuf),
				typeof (string),
				typeof (IType)
			});
			model = new TreeModelSort (list);
			searchResultsTreeView.Model = model;
			searchResultsTreeView.AppendColumn (string.Empty, new Gtk.CellRendererPixbuf (), "pixbuf", 0);
			searchResultsTreeView.AppendColumn (string.Empty, new Gtk.CellRendererText (), "text", 1);
			searchResultsTreeView.HeadersVisible = false;
			searchResultsTreeView.RowActivated += SearchRowActivated;
			IdeApp.Workspace.WorkspaceItemOpened += OnOpenCombine;
			IdeApp.Workspace.WorkspaceItemClosed += OnCloseCombine;
					
			this.searchEntry.Changed += SearchEntryChanged;
			this.buttonCancelSearch.Clicked += CancelSearchClicked;
			this.searchEntry.Activated += SearchClicked;
			this.searchEntry.KeyPressEvent += SearchEntryKeyPressEvent;
			this.buttonSearch.Clicked += SearchClicked;
			
			this.ShowAll ();
		}
        public WorkbenchView(WorkbenchController controller)
        {
            SplashWindow.Update ("Creating GUI");
            XML gxml = new Glade.XML (null,
                          WorkbenchSingleton.GLADEFILE,
                          "Workbench",
                          null);

            window = (Gtk.Window) gxml["Workbench"];
            Gtk.VPaned splitter = (Gtk.VPaned) gxml["mainPane"];

            editorNotebook = new EditorNotebook ();
            splitter.Pack1 (editorNotebook, true, false);

            ScrolledWindow sw = new ScrolledWindow ();
            console = new TextView ();
            console.Editable = false;
            console.WrapMode = WrapMode.Word;
            sw.Add (console);

            Notebook bottomNotebook = new Notebook ();
            bottomNotebook.AppendPage (sw, new Label ("Console"));
            splitter.Pack2 (bottomNotebook, true, false);

                        window.Icon = icon;
            this.WindowTitle = "";
            gxml.Autoconnect (controller);
            bottomNotebook.ShowAll ();
            editorNotebook.ShowAll ();
            SplashWindow.Update ("Simetron is ready!");
        }
Beispiel #15
0
 ISheet IDesigner.AddSheet(string Label, ISheet sheet)
 {
     if (this.Sheet == null)
     {
         Canvas = new DrawingArea();
         Canvas.AddEvents((int)Gdk.EventMask.ButtonPressMask);
         Canvas.AddEvents((int)Gdk.EventMask.ButtonReleaseMask);
         Canvas.AddEvents((int)Gdk.EventMask.PointerMotionMask);
         //
         Canvas.ButtonPressEvent   += HandleButtonPressEvent;
         Canvas.ButtonReleaseEvent += HandleButtonReleaseEvent;
         Canvas.ExposeEvent        += HandleExposeEvent;
         Canvas.MotionNotifyEvent  += HandleMotionNotifyEvent;
         Gtk.Drag.DestSet(
             Canvas,
             DestDefaults.All, new Gtk.TargetEntry[] { new Gtk.TargetEntry("application/x-solidide.shape", Gtk.TargetFlags.App, 0) },
             Gdk.DragAction.Copy
             );
         Canvas.DragDataReceived += HandleCanvasDragDataReceived;
         //
         noteBook.AppendPage(Canvas, new Gtk.Label(Label));
         noteBook.ShowAll(); //Canvas.Show();
     }
     this.Sheet = sheet as Sheet <Gdk.Event, Cairo.Context, SolidV.MVC.Model>;
     return(sheet);
 }
Beispiel #16
0
		public TabbedSkin(BasilProject project, ITaskBuilder taskBuilder)
		{
			_project = project;
			_tabsToTools = new System.Collections.Hashtable();

			window = new Gtk.Window ("WeSay");
			window.SetDefaultSize (600, 400);
			window.DeleteEvent += new DeleteEventHandler (WindowDelete);

			HBox hbox = new HBox (false, 0);
			window.Add (hbox);

			Notebook notebook = new Notebook ();
			notebook.SwitchPage += new SwitchPageHandler(OnNotebookSwitchPage);
			hbox.PackStart(notebook, true, true, 0);
			foreach (ITask t in taskBuilder.Tasks)
			{
				VBox container = new VBox();
				t.Container = container;
				int i = notebook.AppendPage(container, new Label(t.Label));
				_tabsToTools.Add(i, t);
			}

			window.ShowAll ();
		}
Beispiel #17
0
        //------------------------------------------------------------------------------
        public UnitForm(string file_name)
        {
            instance = new Notebook ();

            UnitEditor.RenderablesList renderables_list = new UnitEditor.RenderablesList (file_name);
            instance.AppendPage (renderables_list, new Label("Renderables"));
        }
Beispiel #18
0
        private void build()
        {
            VBox vb = new VBox();



            //ScrolledWindow sw = new ScrolledWindow();
            TreeStore ts = new TreeStore(typeof(string), typeof(string));

            foreach (BattlelordsRace r in this.session.Races)
            {
                ts.AppendValues(r.Name, r.Name);
            }
            TreeView tv = new TreeView(ts);

            tv.HeadersVisible = true;
            tv.AppendColumn("Race", new CellRendererText(), "text", 0);
            //sw.Add(tv);
            //this.Add(sw);


            Gtk.Notebook nb = new Gtk.Notebook();
            nb.AppendPage(tv, new Label("Race"));
            vb.PackStart(nb);
            //vb.PackEnd();


            this.ShowAll();
        }
Beispiel #19
0
        public ListPage(Notebook notebook, ModulesTreeInfo module)
        {
            this.notebook = notebook;
            this.module = module;

            headerbox = new HBox();
            headerlabel = new Label(module.Text);
            headerbox.PackStart(headerlabel);
            //Image img = new Image("gtk-close", IconSize.Menu);
            close_img = ImageManager.GetImage("Images.close-button.png");
            //close_img = new Image("gtk-close", IconSize.Menu);
            btnCloseTab = new Button(close_img);
            btnCloseTab.BorderWidth = 0;
            btnCloseTab.Relief = ReliefStyle.None;
            //btnCloseTab.WidthRequest = 19;
            //btnCloseTab.HeightRequest = 19;
            btnCloseTab.Clicked += delegate { this.Dispose(); };
            headerbox.PackStart(btnCloseTab);
            headerbox.ShowAll();

            tableview = new DataTableView(module);
            this.Add(tableview);
            this.ShowAll();

            notebook.AppendPage(this, headerbox);
            notebook.SetTabReorderable(this, true);
        }
    public PreferencesDialog(ItemShelf itemShelf)
        : base()
    {
        this.itemShelf = itemShelf;

        this.Title = Mono.Posix.Catalog.GetString ("Preferences");
        this.HasSeparator = false;
        this.SetDefaultSize (300, 200);

        Notebook notebook = new Notebook ();

        Glade.XML gxml = new Glade.XML (null, "themeselection.glade", "hbox1", null);
        HBox hBox = (HBox)gxml["hbox1"];
        ScrolledWindow scrolledwindow = (ScrolledWindow)gxml["scrolledwindow1"];
        TreeView themeTreeview = CreateThemeTreeView ();
        themeTreeview.Selection.Changed += OnThemeTreeViewSelectionChanged;

        scrolledwindow.Add (themeTreeview);

        notebook.AppendPage (hBox, new Label (Mono.Posix.Catalog.GetString ("Theme")));

        this.VBox.Add (notebook);

        Button closeButton = (Button)this.AddButton (Gtk.Stock.Close, 1);
        closeButton.Clicked += OnCloseButtonClicked;

        this.ShowAll();
    }
Beispiel #21
0
        public void AddPage(BaseContextPage page)
        {
            Hyena.Log.DebugFormat("Adding context page {0}", page.Id);

            // TODO delay adding the page.Widget until the page is first activated,
            // that way we don't even create those objects unless used
            var frame = new Hyena.Widgets.RoundedFrame();

            frame.Add(page.Widget);
            frame.Show();

            // TODO implement DnD?

            /*if (page is ITrackContextPage) {
             *  Gtk.Drag.DestSet (frame, DestDefaults.Highlight | DestDefaults.Motion,
             *                    new TargetEntry [] { Banshee.Gui.DragDrop.DragDropTarget.UriList },
             *                    Gdk.DragAction.Default);
             *  frame.DragDataReceived += delegate(object o, DragDataReceivedArgs args) {
             *  };
             * }*/

            page.Widget.Show();
            notebook.AppendPage(frame, null);
            pane_pages[page] = frame;

            // Setup the tab-like button that switches the notebook to this page
            var tab_image     = new Image(IconThemeUtils.LoadIcon(22, page.IconNames));
            var toggle_button = new RadioButton(radio_group)
            {
                Child         = tab_image,
                DrawIndicator = false,
                Relief        = ReliefStyle.None
            };

            TooltipSetter.Set(tooltip_host, toggle_button, page.Name);
            toggle_button.Clicked += (s, e) => {
                if (pane_pages.ContainsKey(page))
                {
                    if (page.State == ContextState.Loaded)
                    {
                        notebook.CurrentPage = notebook.PageNum(pane_pages[page]);
                    }
                    SetActivePage(page);
                }
            };
            toggle_button.ShowAll();
            vbox.PackStart(toggle_button, false, false, 0);
            pane_tabs[page] = toggle_button;

            pages.Add(page);

            if (initialized && pages.Count == 1)
            {
                SetActivePage(page);
                toggle_button.Active = true;
            }

            UpdateVisibility();
        }
		public CommonAboutDialog ()
		{
			Title = string.Format (GettextCatalog.GetString ("About {0}"), BrandingService.ApplicationName);
			TransientFor = IdeApp.Workbench.RootWindow;
			AllowGrow = false;
			HasSeparator = false;
			
			var notebook = new Notebook ();
			notebook.BorderWidth = 0;
			notebook.AppendPage (new AboutMonoDevelopTabPage (), new Label (Title));
			notebook.AppendPage (new VersionInformationTabPage (), new Label (GettextCatalog.GetString ("Version Info")));
			VBox.PackStart (notebook, true, true, 0);
			
			AddButton (Gtk.Stock.Close, (int)ResponseType.Close);
			
			ShowAll ();
		}
		public ConstraintsEditorWidget (ISchemaProvider schemaProvider, SchemaActions action, ConstraintEditorSettings settings)
		{
			if (schemaProvider == null)
				throw new ArgumentNullException ("schemaProvider");
			
			this.schemaProvider = schemaProvider;
			this.action = action;
	
			this.Build();
			
			notebook = new Notebook ();
			Add (notebook);

			if (settings.ShowPrimaryKeyConstraints) {
				//not for column constraints, since they are already editable in the column editor
				pkEditor = new PrimaryKeyConstraintEditorWidget (schemaProvider, action);
				pkEditor.ContentChanged += new EventHandler (OnContentChanged);
				pkEditor.PrimaryKeyChanged += delegate(object sender, EventArgs e) {
					if (PrimaryKeyChanged != null)
						PrimaryKeyChanged (this, new EventArgs ());
				};
				notebook.AppendPage (pkEditor, new Label (AddinCatalog.GetString ("Primary Key")));
			}
			
			if (settings.ShowForeignKeyConstraints) {
				fkEditor = new ForeignKeyConstraintEditorWidget (schemaProvider, action, settings.ForeignKeySettings);
				fkEditor.ContentChanged += new EventHandler (OnContentChanged);
				notebook.AppendPage (fkEditor, new Label (AddinCatalog.GetString ("Foreign Key")));
			}
			
			if (settings.ShowCheckConstraints) {
				checkEditor = new CheckConstraintEditorWidget (schemaProvider, action, settings.CheckSettings);
				checkEditor.ContentChanged += new EventHandler (OnContentChanged);
				notebook.AppendPage (checkEditor, new Label (AddinCatalog.GetString ("Check")));
			}
			
			if (settings.ShowUniqueConstraints) {
				uniqueEditor = new UniqueConstraintEditorWidget (schemaProvider, action);
				uniqueEditor.ContentChanged += new EventHandler (OnContentChanged);
				notebook.AppendPage (uniqueEditor, new Label (AddinCatalog.GetString ("Unique")));
			}

			ShowAll ();
		}
Beispiel #24
0
    public ExploreView(Driver driver, int stopAfter)
        : base("Explore")
    {
        int x, y, width, height, depth;
        RootWindow.GetGeometry (out x, out y, out width, out height, out depth);
        SetDefaultSize (width - 50, height - 40);

        VBox vBox = new VBox(false, 1);
        Add(vBox);

        HPaned hPaned = new HPaned();
        vBox.Add(hPaned);

        ScrolledWindow scrolledWindow = new ScrolledWindow();
        //scrolledWindow.SetDefaultSize (Convert.ToInt32((width - 50) * 0.4), height -40);
        hPaned.Add1(scrolledWindow);

        repositoryView = new RepositoryView(driver);
        scrolledWindow.Add(repositoryView);

        viewChildren = new Notebook ();

        changesetView = new ChangesetView(driver, stopAfter);
        viewChildren.AppendPage (changesetView, new Label ("Changeset View"));

        directoryView = new DirectoryView(driver);
        viewChildren.AppendPage (directoryView, new Label ("Directory View"));

        fileView = new FileView(driver);
        viewChildren.AppendPage (fileView, new Label ("File View"));

        hPaned.Add2(viewChildren);
        hPaned.Position = (width - 50) / 3;

        // add status bar
        Statusbar sb = new Statusbar ();
        sb.HasResizeGrip = false;
        vBox.PackEnd(sb, false, false, 1);

         		ShowAll();

        repositoryView.Selection.Changed += OnPathSelectionChanged;
        viewChildren.SwitchPage += OnSwitchPage;
    }
Beispiel #25
0
        private ChatsPage()
        {
            base.FocusGrabbed += base_FocusGrabbed;

            closePixbuf = new Gdk.Pixbuf(null, "FileFind.Meshwork.GtkClient.smallclose.png");

            tabLabelPages = new Dictionary<Widget, ChatSubpageBase>();

            notebook = new Notebook();
            notebook.TabPos = PositionType.Bottom;
            notebook.SwitchPage += notebook_SwitchPage;
            notebook.PageReordered += notebook_PageReordered;

            ScrolledWindow swindow = new ScrolledWindow();
            swindow.HscrollbarPolicy = PolicyType.Automatic;
            swindow.VscrollbarPolicy = PolicyType.Automatic;
            chatList = new TreeView ();
            swindow.Add(chatList);

            chatTreeStore = new NetworkGroupedTreeStore<ChatRoom>(chatList);
            chatList.Model = chatTreeStore;

            TreeViewColumn column;

            column = chatList.AppendColumn("Room Name", new CellRendererText(), new TreeCellDataFunc (NameDataFunc));
            column.Expand = true;
            column.Sizing = TreeViewColumnSizing.Autosize;

            var pixbufCell = new CellRendererPixbuf();
            column.PackStart(pixbufCell, false);
            column.SetCellDataFunc(pixbufCell, new TreeCellDataFunc(RoomSecureDataFunc));

            column = chatList.AppendColumn("Users", new CellRendererText(), new TreeCellDataFunc (RoomUsersDataFunc));
            column.Sizing = TreeViewColumnSizing.Autosize;

            chatList.RowActivated += chatList_RowActivated;
            chatList.ButtonPressEvent += chatList_ButtonPressEvent;

            EventBox box = new EventBox();
            box.Add(new Label("Chatroom List"));
            box.ButtonPressEvent += HandleTabButtonPressEvent;
            box.ShowAll();
            notebook.AppendPage(swindow, box);

            this.PackStart(notebook, true, true, 0);
            notebook.ShowAll();

            foreach (Network network in Core.Networks) {
                Core_NetworkAdded (network);
            }

            Core.NetworkAdded +=
                (NetworkEventHandler)DispatchService.GuiDispatch(
                    new NetworkEventHandler(Core_NetworkAdded)
                );
        }
Beispiel #26
0
        void IPlugin.Init(object context)
        {
            mainApp    = context as ISolidIDE;
            mainWindow = mainApp.GetMainWindow();

            noteBook = new Gtk.Notebook();
            noteBook.AppendPage(new TextView(), new Gtk.Label("TestPlugin Visualizer"));
            noteBook.AppendPage(new DrawingArea(), new Gtk.Label("TestPlugin Visualizer"));
            noteBook.ShowAll();

            dockItem                = mainWindow.DockFrame.AddItem("TestPlugin Visualizer");
            dockItem.Behavior       = DockItemBehavior.Normal;
            dockItem.Expand         = true;
            dockItem.DrawFrame      = true;
            dockItem.Label          = "TestPlugin Visualizer";
            dockItem.Content        = noteBook;
            dockItem.DefaultVisible = true;
            dockItem.Visible        = true;
        }
        public CommonAboutDialog()
        {
            this.Title = GettextCatalog.GetString ("About MonoDevelop");
            this.TransientFor = (Gtk.Window) WorkbenchSingleton.Workbench;
            aboutPictureScrollBox = new ScrollBox ();

            this.VBox.PackStart (aboutPictureScrollBox, false, false, 0);

            Notebook nb = new Notebook ();
            nb.SetSizeRequest (400, 280);
            VersionInformationTabPage vinfo = new VersionInformationTabPage ();

            nb.AppendPage (new AboutMonoDevelopTabPage (), new Label (GettextCatalog.GetString ("About MonoDevelop")));

            nb.AppendPage (vinfo, new Label (GettextCatalog.GetString ("Version Info")));
            this.VBox.PackStart (nb, true, true, 0);
            this.AddButton (Gtk.Stock.Close, (int) ResponseType.Close);
            this.ShowAll ();
        }
		public ViewEditorDialog (ISchemaProvider schemaProvider, ViewSchema view, bool create)
		{
			if (schemaProvider == null)
				throw new ArgumentNullException ("schemaProvider");
			if (view == null)
				throw new ArgumentNullException ("view");
			
			this.schemaProvider = schemaProvider;
			this.view = view;
			this.action = create ? SchemaActions.Create : SchemaActions.Alter;
			
			this.Build();
			
			if (create)
				Title = GettextCatalog.GetString ("Create View");
			else
				Title = GettextCatalog.GetString ("Alter View");
			
			notebook = new Notebook ();

			sqlEditor = new SqlEditorWidget ();
			sqlEditor.TextChanged += new EventHandler (SqlChanged);
			notebook.AppendPage (sqlEditor, new Label (GettextCatalog.GetString ("Definition")));
			
			IDbFactory fac = schemaProvider.ConnectionPool.DbFactory;
			if (fac.IsCapabilitySupported ("View", action, ViewCapabilities.Comment)) {
				commentEditor = new CommentEditorWidget ();
				notebook.AppendPage (commentEditor, new Label (GettextCatalog.GetString ("Comment")));
			}

			notebook.Page = 0;

			entryName.Text = view.Name;
			if (!create) {
				sqlEditor.Text = schemaProvider.GetViewAlterStatement (view);
				commentEditor.Comment = view.Comment;
			}

			vboxContent.PackStart (notebook, true, true, 0);
			vboxContent.ShowAll ();
			SetWarning (null);
		}
Beispiel #29
0
		public DialogPreferencesBase(Window parent) : base("Preferences", parent, DialogFlags.Modal, Stock.Ok, ResponseType.Ok, Stock.Cancel, ResponseType.Cancel)
		{
			notebook = new Notebook();
			
			dbForm = new FormDatabasePreferences();
			dbForm.BorderWidth = 6;
			notebook.AppendPage(dbForm, new Label("Database") );
			
			this.VBox.PackStart(notebook, true, true, 6);
			this.ShowAll();
		}
		public CommonAboutDialog ()
		{
			Name = "wizard_dialog";
			Title = string.Format (GettextCatalog.GetString ("About {0}"), BrandingService.ApplicationName);
			TransientFor = IdeApp.Workbench.RootWindow;
			AllowGrow = false;
			HasSeparator = false;
			BorderWidth = 0;

			var notebook = new Notebook ();
			notebook.ShowTabs = false;
			notebook.ShowBorder = false;
			notebook.BorderWidth = 0;
			notebook.AppendPage (new AboutMonoDevelopTabPage (), new Label (Title));
			notebook.AppendPage (new VersionInformationTabPage (), new Label (GettextCatalog.GetString ("Version Information")));
			VBox.PackStart (notebook, true, true, 0);
			
			var copyButton = new Button () { Label = GettextCatalog.GetString ("Copy Information") };
			copyButton.Clicked += (sender, e) => CopyBufferToClipboard ();
			ActionArea.PackEnd (copyButton, false, false, 0);
			copyButton.NoShowAll = true;

			var backButton = new Button () { Label = GettextCatalog.GetString ("Show Details") };
			ActionArea.PackEnd (backButton, false, false, 0);
			backButton.Clicked += (sender, e) => {
				if (notebook.Page == 0) {
					backButton.Label = GettextCatalog.GetString ("Hide Details");
					copyButton.Show ();
					notebook.Page = 1;
				}
				else {
					backButton.Label = GettextCatalog.GetString ("Show Details");
					copyButton.Hide ();
					notebook.Page = 0;
				}
			};

			AddButton (Gtk.Stock.Close, (int)ResponseType.Close);

			ShowAll ();
		}
Beispiel #31
0
        void IPlugin.Init(object context)
        {
            ISampleTool reflector = context as ISampleTool;

            mainWindow = reflector.GetMainWindow();

            Gtk.Notebook nb = new Gtk.Notebook();
            nb.AppendPage(new TextView(), new Gtk.Label("TestPlugin Visualizer"));
            nb.AppendPage(new DrawingArea(), new Gtk.Label("TestPlugin Visualizer"));
            nb.ShowAll();

            dockItem                = mainWindow.DockFrame.AddItem("TestPlugin Visualizer");
            dockItem.Visible        = true;
            dockItem.Behavior       = DockItemBehavior.Normal;
            dockItem.Expand         = true;
            dockItem.DrawFrame      = true;
            dockItem.Label          = "TestPlugin Visualizer";
            dockItem.Content        = nb;
            dockItem.DefaultVisible = true;
            dockItem.Visible        = true;
        }
Beispiel #32
0
    public MainWindow()
        : base(Gtk.WindowType.Toplevel)
    {
        Build ();

        Notebook notebook = new Notebook();

        LampManager.ApachePanel apachepanel = new LampManager.ApachePanel();
        notebook.AppendPage(apachepanel, new Label("Apache"));

        LampManager.PHPPanel phppanel = new LampManager.PHPPanel();
        notebook.AppendPage(phppanel, new Label("PHP"));

        LampManager.SettingsPanel settingsPanel = new LampManager.SettingsPanel();
        notebook.AppendPage(settingsPanel, new Label("Settings"));

        hbox1.Add(notebook);
        notebook.Show();
        apachepanel.Show();
        phppanel.Show();
        settingsPanel.Show();
    }
        /// <summary>
        /// Set up the UI inside the Window
        /// </summary>
        private void InitializeWidgets()
        {
            VBox dialogBox = new VBox();

            this.VBox.PackStart(dialogBox);
            dialogBox.BorderWidth = 10;
            dialogBox.Spacing     = 10;

            this.SetDefaultSize(480, 480);
            this.Icon = new Gdk.Pixbuf(Util.ImagesPath("ifolder16.png"));

            //-----------------------------
            // Create iFolder Conflict
            //-----------------------------
            ConflictHolder = new HBox();
            dialogBox.PackStart(ConflictHolder, false, true, 0);

            //-----------------------------
            // Create iFolder Notebook
            //-----------------------------
            propNoteBook = new Gtk.Notebook();

            SettingsPage = new iFolderPropSettingsPage(this, ifws);

            propNoteBook.AppendPage(SettingsPage,
                                    new Label(Util.GS("_General")));

            SharingPage = new iFolderPropSharingPage(this, ifws, simws);

            propNoteBook.AppendPage(SharingPage,
                                    new Label(Util.GS("_Sharing")));

            dialogBox.PackStart(propNoteBook);

            this.VBox.ShowAll();

            this.AddButton(Stock.Close, ResponseType.Ok);
            this.AddButton(Stock.Help, ResponseType.Help);
        }
Beispiel #34
0
		public PropertiesWidget ()
		{
			Stetic.WidgetPropertyTree grid = GuiBuilderService.SteticApp.PropertiesWidget;
			
			Notebook tabs = new Notebook ();
			
			tabs.AppendPage (grid, new Label (GettextCatalog.GetString ("Properties")));
			
			signalsEditor = GuiBuilderService.SteticApp.SignalsWidget;
			signalsEditor.SignalActivated += new EventHandler (OnSignalActivated);
			tabs.AppendPage (signalsEditor, new Label (GettextCatalog.GetString ("Signals")));
			
			Gtk.EventBox infoBox = new Gtk.EventBox ();
			tabs.AppendPage (infoBox, new Gtk.Label (""));
			
			PackStart (tabs, true, true, 0);
			
			ShowAll ();
			infoBox.Hide ();
			
			tabs.Page = 0;
		}
Beispiel #35
0
        protected ToggleToolButton AddButton(string label, Gtk.Widget page)
        {
            updating = true;
            ToggleToolButton button = new ToggleToolButton();

            button.Label       = label;
            button.IsImportant = true;
            button.Clicked    += new EventHandler(OnButtonToggled);
            button.ShowAll();
            toolbar.Insert(button, -1);
            notebook.AppendPage(page, new Gtk.Label());
            updating = false;
            return(button);
        }
Beispiel #36
0
        /// <summary>
        /// Add tab to notebook object
        /// </summary>
        private void AddLabelTab(ref Gtk.Label lblObj, string title)
        {
            // Create and add tab for Thanks info
            ScrolledWindow sw = new ScrolledWindow();
            Viewport       vp = new Viewport();

            sw.AddWithViewport(vp);
            lblObj = new Label();
            lblObj.SetPadding(4, 4);
            lblObj.SetAlignment((float)0, (float)0);
            vp.ModifyBg(StateType.Normal, new Gdk.Color(255, 255, 255));
            vp.Add(lblObj);
            tabInfo.AppendPage(sw, new Gtk.Label(title));
        }
Beispiel #37
0
        public StatusEntry()
        {
            ModifyBg (StateType.Normal, Style.Background (StateType.Active));
            BorderWidth = 0;

            customAvailableMessages = new SerializableDictionary<string,string> ();
            customBusyMessages = new SerializableDictionary<string,string> ();
            customAwayMessages = new SerializableDictionary<string,string> ();

            presence = null;
            potentialPresenceType = PresenceType.Offline;

            notebook = new Notebook ();
            notebook.ModifyBg (StateType.Normal, Style.Background (StateType.Active));
            notebook.ShowTabs = false;
            notebook.ShowBorder = false;

            notebook.AppendPage (CreateViewWidget (), new Label ());
            notebook.AppendPage (CreateEditWidget (), new Label());

            notebook.Show ();

            Add (notebook);
        }
Beispiel #38
0
		public MainView()
		{
			MainWindow = new Window("Сервер приложений ГЛОБАЛ");
			statusView = new StatusView();

			MainWindow.DeleteEvent += Window_Delete;
			gkNode = new NodeView();
			gkNode.AppendColumn("Время", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 0);
			gkNode.AppendColumn("Адрес", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 1);
			gkNode.AppendColumn("Название", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 2);
			gkNode.AppendColumn("Прогресс", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 3);
			logNode = new NodeView();
			logNode.AppendColumn("Название", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 0);
			logNode.AppendColumn("Время", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 1);
			logNode.NodeStore = new NodeStore(typeof(LogTreeNode));
			connectionNode = new NodeView();
			connectionNode.AppendColumn("Тип", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 0);
			connectionNode.AppendColumn("Адрес", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 1);
			connectionNode.AppendColumn("Пользователь", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 2);
			connectionNode.ButtonPressEvent += new ButtonPressEventHandler(OnItemButtonPressed);
			pollingNode = new NodeView();
			pollingNode.AppendColumn("Клиент", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 0);
			pollingNode.AppendColumn("Идентификатор", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 1);
			pollingNode.AppendColumn("Первый поллинг", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 2);
			pollingNode.AppendColumn("Последний поллинг", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 3);
			pollingNode.AppendColumn("Индекс", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 4);
			pollingNode.NodeStore = new NodeStore(typeof(PollingTreeNode));
			operationNode = new NodeView();
			operationNode.AppendColumn("Название", new CellRendererText { MaxWidthChars = 80, Height = 20 }, "text", 0);
			operationNode.NodeStore = new NodeStore(typeof(OperationTreeNode));
			Notebook notepadControl = new Notebook();
			notepadControl.AppendPage(connectionNode, new Label("Соединения"));
			notepadControl.AppendPage(logNode, new Label("Лог"));
			notepadControl.AppendPage(statusView.Create(), new Label("Статус"));
			notepadControl.AppendPage(gkNode, new Label("ГК"));
			notepadControl.AppendPage(pollingNode, new Label("Поллинг"));
			notepadControl.AppendPage(operationNode, new Label("Операции"));
			notepadControl.AppendPage(new LicenseView().Create(), new Label("Лицензирование"));
			MainWindow.Add(notepadControl);
			MainWindow.SetDefaultSize(700, 500);
			MainWindow.ShowAll();
			GKLifecycleManager.GKLifecycleChangedEvent += On_GKLifecycleChangedEvent;
			LicenseManager.LicenseChanged += On_LicenseChanged;

			GKLifecycles = new List<KeyValuePair<GKLifecycleInfo, DateTime>>();
			Clients = new List<ClientCredentials>();
			ClientPolls = new List<ClientPoll>();
			ServerTasks = new List<ServerTask>();
			Current = this;
		}
Beispiel #39
0
        static void create_stacks(string name, string location)
        {
            Gtk.Grid    sgrid    = new Gtk.Grid();
            Gtk.Entry[] password =
            {
                new Gtk.Entry("Password"),
                new Gtk.Entry("New Password"),
                null
            };
            Gtk.Label          slabel  = new Gtk.Label(name);
            Gtk.ToggleButton[] switchs =
            {
                new Gtk.ToggleButton("Secure"),
                new Gtk.ToggleButton("Launch"),
                null
            };

            sgrid.ColumnHomogeneous = true;
            switchs[1].Active       = true;

            password[1].Sensitive  = false;
            password[0].Visibility = false;
            password[1].Visibility = false;

            //password[0].Activated += new EventHandler ();
            //password[1].Activated += new EventHandler ();
            //switchs[0].Activated += new EventHandler (zero_tog);
            //switchs[1].Activated += new EventHandler (zero_tog);

            sgrid.Attach(switchs[0], 1, 2, 1, 1);
            sgrid.Attach(switchs[1], 0, 2, 1, 1);
            sgrid.Attach(password[0], 0, 3, 1, 1);
            sgrid.Attach(password[1], 1, 3, 1, 1);

            /*
             * g_signal_connect (password[0],"activate",(GCallback)check_pass,password[1]);
             * g_signal_connect_swapped (password[1],"activate",(GCallback)check_pass,password[0]);
             * g_signal_connect (switchs[0],"toggled",(GCallback)zero_tog,switchs[1]);
             * g_signal_connect (switchs[1],"toggled",(GCallback)zero_tog,switchs[0]);
             * g_signal_connect_swapped (switchs[0],"toggled",(GCallback)zero_act,password[1]);
             * g_signal_connect_swapped (switchs[1],"toggled",(GCallback)one_act,password[1]);
             */
            sgrid.ShowAll();
            one_act(password[1], switchs[1]);
            stack.AppendPage(sgrid, slabel);
            stack.SetMenuLabelText(sgrid, name);
        }
        protected void AddTab(TabContent tabContent, string text)
        {
            if (!contentList.Contains(tabContent))               // XXX: Keep for testing
            {
                throw new Exception("The TabContent is not registert");
            }

            tabs++;
            var tabHead = new TabHeader(text, tabs);

            tabHead.button.Clicked += delegate
            {
                editFrameAdapter.PassToTabView(tabHead, CurrTreeStore);
            };

            tabList.Add(tabHead);
            tabView.AppendPage(tabContent.scrollWin, tabHead);
        }
		public void AddWidgets (IEnumerable<Widget> widgets)
		{
			if (widgets.Count () > 1) {				
				Notebook notebook = new Notebook ();
				
				foreach (Widget widget in widgets) {
					Gtk.Alignment spacer = new Gtk.Alignment (0,0,1,1);
					spacer.LeftPadding = spacer.RightPadding = spacer.TopPadding = spacer.BottomPadding = 7;
					spacer.Child = widget;
					notebook.AppendPage (spacer, new Label (widget.Name));
				}
				
				VBox.PackStart (notebook);
			} else {
				VBox.PackStart (widgets.First ());
			}
			
			VBox.ShowAll ();
		}
Beispiel #42
0
        /// <summary>
        /// Tunes the left dock item.
        /// </summary>
        private void TuneLeftDockItem()
        {
            Gtk.VBox vbox = new Gtk.VBox();
            tbLeft.Name = "LeftToolbar";
            vbox.PackStart(tbLeft, true, true, 0);
            tbLeft.Orientation = Gtk.Orientation.Vertical;
            // Show only text on the buttons
            tbLeft.ToolbarStyle = Gtk.ToolbarStyle.Text;

            ScrolledWindow scroll = new ScrolledWindow();

            // Attach the treeView to the scroll bar.
            scroll.AddWithViewport(vbox);

            nbLeftDock.Add(scroll);;

            this.propertyGrid = new SolidV.Gtk.InspectorGrid.InspectorGrid();
            nbLeftDock.AppendPage(propertyGrid, new Gtk.Label("Properties"));
            nbLeftDock.ShowAll();
        }
Beispiel #43
0
        /// <summary>
        /// Tunes the middle dock item or the data visualizer.
        /// </summary>
        private void TuneMiddleDockItem()
        {
            // Attach the comboBox first.
            vbMiddle.PackStart(comboBox, false, false, 0);
            ScrolledWindow scroll = new ScrolledWindow();

            // Attach the treeView to the scroll bar.
            scroll.AddWithViewport(treeView);
            // Attach the scrollBar to the box.
            vbMiddle.PackStart(scroll, true, true, 0);

            // Set up DrawingArea.
            drawingArea = new DrawingArea();
            drawingArea.SetSizeRequest(800, 500);
            ScrolledWindow scrollDA = new ScrolledWindow();

            Gtk.VBox vBoxDA     = new Gtk.VBox();
            Viewport viewPortDA = new Viewport();

            viewPortDA.Add(drawingArea);
            scrollDA.Add(viewPortDA);
            vBoxDA.PackStart(scrollDA, true, true, 0);

            // Add Paned container in order to make the two boxes resizable
            Gtk.VPaned splitter = new Gtk.VPaned();
            splitter.Pack1(vBoxDA, true, true);
            splitter.Pack2(vbMiddle, true, true);
            splitter.Position = 400;
            splitter.ShowAll();

            nbMiddleDock.AppendPage(splitter, new Gtk.Label("Schema Visualizer"));
            nbMiddleDock.ShowAll();

            schemaV = new SchemaVisualizer(drawingArea);

            // Get the selected shape.
            SelectionModel selectionModel = schemaV.Selection;

            selectionModel.ModelChanged += HandleSelectionModelChanged;
        }
        private void build()
        {
            VBox vb = new VBox();

            //ScrolledWindow sw = new ScrolledWindow();
            TreeStore ts = new TreeStore(typeof(string), typeof(string));
            foreach (BattlelordsRace r in this.session.Races)
            {
                ts.AppendValues(r.Name, r.Name);
            }
            TreeView tv = new TreeView(ts);
            tv.HeadersVisible = true;
            tv.AppendColumn("Race", new CellRendererText(), "text", 0);
            //sw.Add(tv);
            //this.Add(sw);

            Gtk.Notebook nb = new Gtk.Notebook();
            nb.AppendPage(tv, new Label("Race"));
            vb.PackStart(nb);
            //vb.PackEnd();

            this.ShowAll();
        }
Beispiel #45
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;
            }
        }
        /// <summary>
        /// Creates the hard-coded panel area. This will get replaced with the
        /// docking widgets at some point, but for the time being, they are set
        /// as part of code.
        /// </summary>
        /// <returns></returns>
        private Widget CreatePanelArea()
        {
            // Create the project pane.
            var projectTab = new ProjectTabView(projectManager);

            // We have a notepad that contains the the individual elements.
            var notebook = new Notebook
            {
                TabPos = PositionType.Bottom
            };

            notebook.AppendPage(projectTab, new Label("Project"));

            // Wrap the notebook in a frame for spacing.
            var frame = new Frame
            {
                Child = notebook,
                BorderWidth = 2,
                Shadow = ShadowType.None,
                ShadowType = ShadowType.None,
            };

            return frame;
        }
        private void Build()
        {
            this.titleLabel = new Label("");
            var fontDescription = new Pango.FontDescription();

            fontDescription.Size = Convert.ToInt32(17 * Pango.Scale.PangoScale);
            this.titleLabel.ModifyFont(fontDescription);
            this.PackStart(this.titleLabel, false, true, 10);

            this.monthNotesComponent     = new MonthNotes();
            this.monthExercisesComponent = new MonthExercises();
            this.monthMeasuresComponent  = new MonthMeasures();

            this.monthExercisesComponentG = new MonthExercisesGraph();
            this.monthMeasuresComponentG  = new MonthMeasuresGraph();

            var nbLibro     = new Gtk.Notebook();
            var nbEjercicio = new Gtk.Notebook();
            var nbMedidas   = new Gtk.Notebook();

            nbEjercicio.AppendPage(
                this.monthExercisesComponent,
                new Gtk.Label("List")
                );
            nbEjercicio.AppendPage(
                this.monthExercisesComponentG,
                new Gtk.Label("Graphic")
                );


            nbMedidas.AppendPage(
                this.monthMeasuresComponent,
                new Gtk.Label("List")
                );
            nbMedidas.AppendPage(
                this.monthMeasuresComponentG,
                new Gtk.Label("Graphic")
                );

            nbLibro.AppendPage(
                this.monthNotesComponent,
                new Gtk.Label("Notes")
                );

            VBox ex = new VBox();

            ex.Add(nbEjercicio);
            nbLibro.AppendPage(
                ex,
                new Gtk.Label("Exercises")
                );

            VBox ey = new VBox();

            ey.Add(nbMedidas);
            nbLibro.AppendPage(
                ey,
                new Gtk.Label("Measures")
                );


            this.Add(nbLibro);

            //Update state and render
            this.OnViewBuilt();
        }
Beispiel #48
0
        /// <summary>Crea las hojas de las opciones, la parte central
        /// del diálogo.</summary>
        /// <returns>El notebook de las opciones.</returns>

        private Gtk.Widget CrearNotebook()
        {
            Gtk.Notebook notebook = new Gtk.Notebook();
            notebook.BorderWidth = 10;

            // Panel de configuración del ensamblador.

            cbAdvertencias = new Gtk.CheckButton(
                Ventana.GetText("D_Conf_MostrarAdv"));

            Gtk.Frame frmEnsamblador =
                new Gtk.Frame(Ventana.GetText("D_Conf_Ensamblador"));
            VBox panelEnsamblador = new VBox(false, 5);

            panelEnsamblador.PackStart(cbAdvertencias);
            frmEnsamblador.Add(panelEnsamblador);

            // Panel de Memoria de control.

            rbMemoriaDef = new RadioButton(null,
                                           Ventana.GetText("D_Conf_MemDef"));
            rbMemoriaUsu = new RadioButton(rbMemoriaDef,
                                           Ventana.GetText("D_Conf_MemUsu"));

            rbMemoriaDef.Toggled   += new EventHandler(rbToggled1);
            rbMemoriaUsu.Toggled   += new EventHandler(rbToggled2);
            lblMemoriaAlt           = new Gtk.Entry("");
            lblMemoriaAlt.Sensitive = false;
            btnFichero          = new Gtk.Button(Ventana.GetText("D_Conf_Explorar"));
            btnFichero.Clicked += new EventHandler(btnFicheroClicked);

            Gtk.Frame frmMemoria =
                new Gtk.Frame(Ventana.GetText("D_Conf_Memoria"));
            VBox panelMemoria = new Gtk.VBox(false, 5);

            panelMemoria.PackStart(rbMemoriaDef);
            panelMemoria.PackStart(rbMemoriaUsu);
            panelMemoria.PackStart(lblMemoriaAlt);
            panelMemoria.PackStart(btnFichero);
            frmMemoria.Add(panelMemoria);


            // Panel del simulador.

            Gtk.Frame frmSimulador =
                new Gtk.Frame(Ventana.GetText("D_Conf_Simulador"));
            VBox panelSimulador = new VBox(false, 5);

            panelSimulador.PackStart(
                new Gtk.Label(Ventana.GetText("D_Conf_Tiempo")));

            sbTiempo = new Gtk.SpinButton(
                new Adjustment(1000.0, 50.0, 5000.0, 10.0, 100.0, 1.0),
                1.0,
                0);
            sbTiempo.Numeric = true;

            panelSimulador.PackStart(sbTiempo);
            frmSimulador.Add(panelSimulador);


            //  ----

            notebook.AppendPage(
                frmSimulador,
                new Gtk.Label(Ventana.GetText("D_Conf_Simulador")));

            notebook.AppendPage(
                frmEnsamblador,
                new Gtk.Label(Ventana.GetText("D_Conf_Ensamblador")));

            notebook.AppendPage(
                frmMemoria,
                new Gtk.Label(Ventana.GetText("D_Conf_Memoria")));

            return(notebook);
        }
        /// <summary>
        /// Constructor -- builds a basic dialog structure and adds each plugins configuration widget into a notebook
        /// </summary>
        /// <param name="plugins">
        /// A <see cref="List<ILiveRadioPlugin>"/> -- the list of plugins
        /// </param>
        public LiveRadioConfigDialog(LiveRadioSource source, List <ILiveRadioPlugin> plugins)
        {
            this.plugins          = plugins;
            this.source           = source;
            enable_plugin_buttons = new Dictionary <string, CheckButton> ();

            preferences_image.Yalign   = 0f;
            preferences_image.IconName = "gtk-preferences";
            preferences_image.IconSize = (int)IconSize.Dialog;
            preferences_image.Show();
            header_label.Text      = String.Format(AddinManager.CurrentLocalizer.GetString("{0}LiveRadio configuration\n{1}"), "<span weight=\"bold\" size=\"larger\">", "</span>");
            header_label.UseMarkup = true;
            header_label.Wrap      = true;
            header_label.Yalign    = 0f;
            header_label.Xalign    = 0f;

            description_label.Text   = AddinManager.CurrentLocalizer.GetString("Please set your preferences for your LiveRadio plugins\n");
            description_label.Yalign = 0f;
            description_label.Xalign = 0f;

            foreach (ILiveRadioPlugin plugin in plugins)
            {
                Widget plugin_widget = plugin.ConfigurationWidget;
                if (plugin_widget != null)
                {
                    VBox        box    = new VBox();
                    CheckButton button = new CheckButton(AddinManager.CurrentLocalizer.GetString("Enable this plugin"));
                    if (source.EnabledPlugins.Contains(plugin.Name))
                    {
                        button.Active = true;
                    }

                    enable_plugin_buttons.Add(plugin.Name, button);

                    box.PackStart(button, false, true, 5);
                    box.PackStart(plugin_widget, true, true, 5);

                    notebook.AppendPage(box, new Label(plugin.Name));
                }
            }
            cancel_button.Image = new Image("gtk-cancel", IconSize.Button);
            apply_button.Image  = new Image("gtk-apply", IconSize.Button);
            save_button.Image   = new Image("gtk-save", IconSize.Button);

            HBox main_container   = new HBox();
            VBox action_container = new VBox();

            main_container.Spacing     = 12;
            main_container.BorderWidth = 6;

            action_container.PackStart(header_label, true, true, 0);
            action_container.PackStart(description_label, true, true, 0);

            main_container.PackStart(preferences_image, true, true, 5);
            main_container.PackEnd(action_container, true, true, 5);
            this.ContentArea.PackStart(main_container, true, true, 5);

            this.ContentArea.PackStart(notebook, true, true, 5);

            AddActionWidget(cancel_button, 0);
            AddActionWidget(apply_button, 0);
            AddActionWidget(save_button, 0);

            cancel_button.Clicked += new EventHandler(OnCancelButtonClicked);
            apply_button.Clicked  += new EventHandler(OnApplyButtonClicked);
            save_button.Clicked   += new EventHandler(OnSaveButtonClicked);

            Title       = "LiveRadio configuration";
            IconName    = "gtk-preferences";
            Resizable   = false;
            BorderWidth = 6;
            this.ContentArea.Spacing = 12;

            ShowAll();
        }
Beispiel #50
0
        private void build()
        {
            this.Title = "New Battlelords Character";
            {
                // page 1 - intro
                Gtk.TextView   tv = new Gtk.TextView();
                Gtk.TextBuffer tb;
                tb = tv.Buffer;
                //tb.Text = MediaManager.GetHtml("intro.html");
                tb.Text = "Welcome to the Battlelords Character Asistant.\n" +
                          "\nThis will guide you thru the initial player character generation. " +
                          "You will be presented with some initial options that can not change " +
                          "once the character is created. " +
                          "\nStep 1" +
                          "\nStep 2" +
                          "\nStep 3" +
                          "\nStep 4" +
                          "\nConculsion";
                tv.WrapMode = WrapMode.Word;
                tv.Editable = false;

                this.AppendPage(tv);
                this.SetPageTitle(tv, "Introduction");
                this.SetPageType(tv, AssistantPageType.Intro);
                this.SetPageComplete(tv, true);
            }
            {
                // page 2 - rolling method
                string method1 = "Percentile dice are rolled and marked down in order of the given visual statistics. " +
                                 "Eight rolls are initially made. The player then makes three additional dice rolls. " +
                                 "He has the option of replacing any three previously rolled statistics with one of these number. " +
                                 "Players may not move rolls around! First roll is Strength, second roll is Manual Dexterity, etc.";
                Gtk.VBox     vb      = new Gtk.VBox();
                Gtk.HBox     hb1     = new Gtk.HBox();
                Gtk.Label    lb1     = new Gtk.Label("Rolling Method");
                string[]     entries = { "Method 1", "Method 2", "Method 3", "Fill In" };
                Gtk.ComboBox cb1     = new Gtk.ComboBox(entries);
                hb1.PackStart(lb1, true, false, 0);
                hb1.PackEnd(cb1, true, false, 0);
                cb1.Active = 0;
                Gtk.HBox        hb2 = new Gtk.HBox();
                Gtk.CheckButton b1  = new Gtk.CheckButton("Max Body Points");
                Gtk.CheckButton b2  = new Gtk.CheckButton("Max Starting Money");
                b1.Active = true;
                b2.Active = true;
                hb2.PackStart(b1, true, false, 1);
                hb2.PackEnd(b2, true, false, 1);
                Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow();
                Gtk.TextView       tv = new Gtk.TextView();
                tv.WrapMode = WrapMode.Word;
                tv.Editable = false;
                Gtk.TextBuffer tb = tv.Buffer;
                tb.Text = method1;
                sw.Add(tv);
                //vb.PackStart(hb1, false, false, 0);
                vb.PackStart(hb2, false, false, 0);
                //vb.PackEnd(sw, true, true, 0);

                this.AppendPage(vb);
                this.SetPageTitle(vb, "Rolling Options");
                this.SetPageType(vb, AssistantPageType.Content);
                this.SetPageComplete(vb, true);
            }
            {
                // page 3 - race
                TreeStore ts = new TreeStore(typeof(string), typeof(string));
                foreach (BattlelordsRace r in this.session.Races)
                {
                    ts.AppendValues(r.Name, r.Name);
                }
                TreeView tv = new TreeView(ts);
                tv.HeadersVisible = true;
                tv.AppendColumn("Battlelords Race", new CellRendererText(), "text", 0);

                this.AppendPage(tv);
                this.SetPageTitle(tv, "Select Race");
                this.SetPageType(tv, AssistantPageType.Content);
                this.SetPageComplete(tv, true);
            }
            {
                // page 4 - Basics page

                /*
                 * 1 char name
                 * 2 player name
                 * 3 height
                 * 4 weight
                 * 5 body pts
                 * 6 start money
                 */
                Gtk.VBox vb2 = new Gtk.VBox();

                Gtk.HBox  hb1 = new Gtk.HBox();
                Gtk.Label lb1 = new Gtk.Label("Player's Name:");
                Gtk.Entry en1 = new Gtk.Entry();
                hb1.PackStart(lb1, false, false, 0);
                hb1.PackStart(new Gtk.HSeparator(), true, false, 0);
                hb1.PackEnd(en1, true, true, 0);

                Gtk.HBox  hb2 = new Gtk.HBox();
                Gtk.Label lb2 = new Gtk.Label("Character's Name:");
                Gtk.Entry en2 = new Gtk.Entry();
                hb2.PackStart(lb2, false, false, 0);
                hb2.PackStart(new Gtk.HSeparator(), true, false, 0);
                hb2.PackEnd(en2, true, true, 0);

                Gtk.HBox  hb3 = new Gtk.HBox();
                Gtk.Label lb3 = new Gtk.Label("Height (ft):");
                Gtk.Entry en3 = new Gtk.Entry();
                en3.Sensitive = false;
                Gtk.Button b3 = new Gtk.Button();
                //b3.Label = "roll";
                b3.TooltipText = "Click here to roll height.";
                b3.Image       = MediaManager.GetImageFromBaseFile("dice.png");
                hb3.PackStart(lb3, false, false, 0);
                hb3.PackStart(new Gtk.HSeparator(), true, false, 0);
                hb3.PackStart(en3, true, true, 0);
                hb3.PackEnd(b3, false, false, 0);

                Gtk.HBox  hb4 = new Gtk.HBox();
                Gtk.Label lb4 = new Gtk.Label("Weight (lbs):");
                Gtk.Entry en4 = new Gtk.Entry();
                en4.Sensitive = false;
                Gtk.Button b4 = new Gtk.Button();
                //b4.Label = "roll";
                b4.TooltipText = "Click here to roll for weight.";
                b4.Image       = MediaManager.GetImageFromBaseFile("dice.png");
                hb4.PackStart(lb4, false, false, 0);
                hb4.PackStart(new Gtk.HSeparator(), true, false, 0);
                hb4.PackStart(en4, true, true, 0);
                hb4.PackEnd(b4, false, false, 0);

                Gtk.HBox  hb5 = new Gtk.HBox();
                Gtk.Label lb5 = new Gtk.Label("Body Points:");
                Gtk.Entry en5 = new Gtk.Entry();
                en5.Sensitive = false;
                Gtk.Button b5 = new Gtk.Button();
                b5.TooltipText = "Click here to roll for body points.";
                b5.Image       = MediaManager.GetImageFromBaseFile("dice.png");
                hb5.PackStart(lb5, false, false, 0);
                hb5.PackStart(new Gtk.HSeparator(), true, false, 0);
                hb5.PackStart(en5, true, true, 0);
                hb5.PackEnd(b5, false, false, 0);

                Gtk.HBox  hb6 = new Gtk.HBox();
                Gtk.Label lb6 = new Gtk.Label("Starting Money:");
                Gtk.Entry en6 = new Gtk.Entry();
                en6.Sensitive = false;
                Gtk.Button b6 = new Gtk.Button();
                b6.TooltipText = "Click here to roll for starting money.";
                b6.Image       = MediaManager.GetImageFromBaseFile("dice.png");
                hb6.PackStart(lb6, false, false, 0);
                hb6.PackStart(new Gtk.HSeparator(), true, false, 0);
                hb6.PackStart(en6, true, true, 0);
                hb6.PackEnd(b6, false, false, 0);

                vb2.PackStart(hb1, false, false, 0);
                vb2.PackStart(hb2, false, false, 0);
                vb2.PackStart(hb3, false, false, 0);
                vb2.PackStart(hb4, false, false, 0);
                vb2.PackStart(hb5, false, false, 0);
                vb2.PackStart(hb6, false, false, 0);

                this.AppendPage(vb2);
                this.SetPageTitle(vb2, "Enter Basic Information");
                this.SetPageType(vb2, AssistantPageType.Content);
                this.SetPageComplete(vb2, true);
            }
            {
                // page 5 - vitals
                VBox         vb5 = new VBox();
                Gtk.Notebook nb  = new Gtk.Notebook();
                //Battle.Gui.VitalsControl stvc = new Battle.Gui.VitalsControl(this.session);
                //stvc.Sensitive = false;
                VitalsControl m1vitals   = new VitalsControl(this.session);
                VitalsControl m2vitals   = new VitalsControl(this.session);
                VitalsControl m3vitals   = new VitalsControl(this.session);
                VitalsControl fillvitals = new VitalsControl(this.session);

                m1vitals.Enabled = false;
                m2vitals.Enabled = false;
                m3vitals.Enabled = false;

                nb.AppendPage(m1vitals, new Gtk.Label("Method 1"));
                nb.AppendPage(m2vitals, new Gtk.Label("Method 2"));
                nb.AppendPage(m3vitals, new Gtk.Label("Method 3"));
                nb.AppendPage(fillvitals, new Gtk.Label("Fill In"));

                HButtonBox bb5     = new HButtonBox();
                Button     rollBtn = new Button(Stock.Execute);
                rollBtn.Clicked += delegate(object sender, EventArgs e) {
                    Console.WriteLine("{0}", sender.GetType().ToString());
                };
                rollBtn.Label = "Roll";
                Button saveBtn = new Button(Stock.Save);
                saveBtn.Label = "Save";
                bb5.PackStart(rollBtn);
                bb5.PackEnd(saveBtn);
                nb.SwitchPage += delegate(object o, SwitchPageArgs args) {
                    if (args.PageNum == 3)
                    {
                        rollBtn.Sensitive = false;
                    }
                    else
                    {
                        rollBtn.Sensitive = true;
                    }
                };

                vb5.Add(nb);
                vb5.Add(bb5);

                this.AppendPage(vb5);
                this.SetPageTitle(vb5, "Enter Vitals");
                this.SetPageType(vb5, AssistantPageType.Content);
                this.SetPageComplete(vb5, true);
            }
            {
                // page 6 - secondaries
                Gtk.Label             not_completed_label = new Gtk.Label("not completed");
                Pango.FontDescription d = new Pango.FontDescription();
                d.Style = Pango.Style.Italic;
                not_completed_label.ModifyFont(d);

                this.AppendPage(not_completed_label);
                this.SetPageTitle(not_completed_label, "Enter Secondary Attributes");
                this.SetPageType(not_completed_label, AssistantPageType.Content);
                this.SetPageComplete(not_completed_label, true);
            }
            {
                // page 7 - fate
                Gtk.Label             not_completed_label = new Gtk.Label("not completed");
                Pango.FontDescription d = new Pango.FontDescription();
                d.Style = Pango.Style.Italic;
                not_completed_label.ModifyFont(d);

                this.AppendPage(not_completed_label);
                this.SetPageTitle(not_completed_label, "Determine Fate");
                this.SetPageType(not_completed_label, AssistantPageType.Content);
                this.SetPageComplete(not_completed_label, true);
            }
            {
                // page 8 - social
                Gtk.Label             not_completed_label = new Gtk.Label("not completed");
                Pango.FontDescription d = new Pango.FontDescription();
                d.Style = Pango.Style.Italic;
                not_completed_label.ModifyFont(d);

                this.AppendPage(not_completed_label);
                this.SetPageTitle(not_completed_label, "Social Status");
                this.SetPageType(not_completed_label, AssistantPageType.Content);
                this.SetPageComplete(not_completed_label, true);
            }
            {
                // page 9 - skills
                Gtk.Label             not_completed_label = new Gtk.Label("not completed");
                Pango.FontDescription d = new Pango.FontDescription();
                d.Style = Pango.Style.Italic;
                not_completed_label.ModifyFont(d);

                this.AppendPage(not_completed_label);
                this.SetPageTitle(not_completed_label, "Choose Initial Skills");
                this.SetPageType(not_completed_label, AssistantPageType.Content);
                this.SetPageComplete(not_completed_label, true);
            }
            {
                // page 10 - matrixes
                Gtk.Label             not_completed_label = new Gtk.Label("not completed");
                Pango.FontDescription d = new Pango.FontDescription();
                d.Style = Pango.Style.Italic;
                not_completed_label.ModifyFont(d);

                this.AppendPage(not_completed_label);
                this.SetPageTitle(not_completed_label, "Choose Initial Matrixes");
                this.SetPageType(not_completed_label, AssistantPageType.Content);
                this.SetPageComplete(not_completed_label, true);
            }
            {
                // page 11 - confirm
                TextView   tv11 = new TextView();
                TextBuffer b11  = tv11.Buffer;
                b11.Text      = "Confirm this new character.";
                tv11.Editable = false;
                this.AppendPage(tv11);
                this.SetPageTitle(tv11, "Confirm New Character");
                this.SetPageType(tv11, AssistantPageType.Confirm);
                this.SetPageComplete(tv11, true);
            }
            this.Close  += HandleHandleClose;
            this.Cancel += HandleHandleCancel;
            this.ShowAll();
        }
Beispiel #51
0
        private void GenerateTabs()

        {
            VBox tab = new VBox();

            Image img = new Image();

            img.Pixbuf = Images.GetPixbuf("options-general.png");

            tab.PackStart(img, false, false, 2);

            tab.PackEnd(new Label("General"), false, false, 0);

            tab.SetSizeRequest(60, 50);

            tab.ShowAll();

            optionTabs.AppendPage(GenerateGeneral(), tab);



            tab = new VBox();

            img = new Image();

            img.Pixbuf = Images.GetPixbuf("options-text-editors.png");

            tab.PackStart(img, false, false, 2);

            tab.PackEnd(new Label("Text Editors"), false, false, 0);

            tab.SetSizeRequest(60, 50);

            tab.ShowAll();

            optionTabs.AppendPage(GenerateTextEditors(), tab);



            tab = new VBox();

            img = new Image();

            img.Pixbuf = Images.GetPixbuf("options-results.png");

            tab.PackStart(img, false, false, 2);

            tab.PackEnd(new Label("Results"), false, false, 0);

            tab.SetSizeRequest(60, 50);

            tab.ShowAll();

            optionTabs.AppendPage(GenerateResults(), tab);



            tab = new VBox();

            img = new Image();

            img.Pixbuf = Images.GetPixbuf("options-plugins.png");

            tab.PackStart(img, false, false, 2);

            tab.PackEnd(new Label("Plugins"), false, false, 0);

            tab.SetSizeRequest(60, 50);

            tab.ShowAll();

            optionTabs.AppendPage(GeneratePlugins(), tab);



            tab.Dispose();

            img.Dispose();



            optionTabs.SwitchPage += new SwitchPageHandler(optionTabs_SwitchPage);
        }
Beispiel #52
0
        private void Init()
        {
            Logger.Debug("Called Preferences Init");
            this.Icon = Utilities.GetIcon("tasque", 16);
            // Update the window title
            this.Title = string.Format(Catalog.GetString("Tasque Preferences"));

            this.VBox.Spacing     = 0;
            this.VBox.BorderWidth = 0;
            this.Resizable        = false;

            this.AddButton(Stock.Close, Gtk.ResponseType.Ok);
            this.DefaultResponse = ResponseType.Ok;

            notebook          = new Gtk.Notebook();
            notebook.ShowTabs = true;

            //
            // General Page
            //
            generalPage = MakeGeneralPage();
            generalPage.Show();
            generalPageId =
                notebook.AppendPage(generalPage,
                                    new Label(Catalog.GetString("General")));

            //
            // Appearance Page
            //
            appearancePage = MakeAppearancePage();
            appearancePage.Show();
            notebook.AppendPage(appearancePage,
                                new Label(Catalog.GetString("Appearance")));

            //
            // Backend Page
            //
            backendPage   = null;
            backendPageId = -1;

            var backendType = application.BackendManager.CurrentBackend;

            if (backendType != null)
            {
                backendPage = (Widget)application.BackendManager.GetBackendPreferencesWidget();
                if (backendPage != null)
                {
                    backendPage.Show();
                    var l = new Label(GLib.Markup.EscapeText(
                                          application.BackendManager.AvailableBackends [backendType]));
                    l.UseMarkup    = false;
                    l.UseUnderline = false;
                    l.Show();
                    backendPageId = notebook.AppendPage(backendPage, l);
                }
            }

            notebook.Show();
            this.VBox.PackStart(notebook, true, true, 0);

            DeleteEvent += WindowDeleted;
        }
Beispiel #53
0
        private void OnBackendComboBoxChanged(object sender, EventArgs args)
        {
            if (selectedBackend >= 0)
            {
                // TODO: Prompt the user and make sure they really want to change
                // which backend they are using.

                // Remove the existing backend's preference page
                if (backendPageId >= 0)
                {
                    notebook.RemovePage(backendPageId);
                    backendPageId = -1;
                    backendPage   = null;
                }

                // if yes (replace backend)
                if (backendComboMap.ContainsKey(selectedBackend))
                {
                    // Cleanup old backend
                    IBackend oldBackend = backendComboMap [selectedBackend];
                    Logger.Info("Cleaning up '{0}'...", oldBackend.Name);
                    try {
                        oldBackend.Cleanup();
                    } catch (Exception e) {
                        Logger.Warn("Exception cleaning up '{0}': {2}",
                                    oldBackend.Name,
                                    e.Message);
                    }

                    selectedBackend = -1;
                }
            }

            IBackend newBackend = null;

            if (backendComboMap.ContainsKey(backendComboBox.Active))
            {
                newBackend = backendComboMap [backendComboBox.Active];
            }

            // TODO: Set the new backend
            Application.Backend = newBackend;

            if (newBackend == null)
            {
                return;
            }

            selectedBackend = backendComboBox.Active;

            // Add a backend prefs page if one exists
            backendPage = newBackend.GetPreferencesWidget();
            if (backendPage != null)
            {
                backendPage.Show();
                Label l = new Label(GLib.Markup.EscapeText(newBackend.Name));
                l.UseMarkup    = false;
                l.UseUnderline = false;
                l.Show();
                backendPageId =
                    notebook.AppendPage(backendPage, l);

                // If the new backend is not configured, automatically switch
                // to the backend's preferences page
                if (!newBackend.Configured)
                {
                    notebook.Page = backendPageId;
                }
            }

            // Save the user preference
            Application.Preferences.Set(Preferences.CurrentBackend,
                                        newBackend.GetType().ToString());

            //categoriesToHide = BuildNewCategoryList ();
            //Application.Preferences.SetStringList (Preferences.HideInAllCategory,
            //									   categoriesToHide);
            RebuildCategoryTree();
        }
		public CommonAboutDialog ()
		{
			Title = GettextCatalog.GetString ("About MonoDevelop");
			TransientFor = IdeApp.Workbench.RootWindow;
			AllowGrow = false;
			HasSeparator = false;

			VBox.BorderWidth = 0;

			aboutPictureScrollBox = new ScrollBox ();

			VBox.PackStart (aboutPictureScrollBox, false, false, 0);
			imageSep = new Pixbuf (typeof(CommonAboutDialog).Assembly, "AboutImageSep.png");
			VBox.PackStart (new Gtk.Image (imageSep), false, false, 0);

			Notebook notebook = new Notebook ();
			notebook.BorderWidth = 6;
			notebook.AppendPage (new AboutMonoDevelopTabPage (), new Label (Title));
			notebook.AppendPage (new VersionInformationTabPage (), new Label (GettextCatalog.GetString ("Version Info")));
			var buildInfo = LoadBuildInfo ();
			if (buildInfo != null)
				notebook.AppendPage (buildInfo, new Label (GettextCatalog.GetString ("Build Info")));
			VBox.PackStart (notebook, true, true, 4);

			AddButton (Gtk.Stock.Close, (int)ResponseType.Close);

			ShowAll ();
		}
Beispiel #55
0
        private void OnBackendComboBoxChanged(object sender, EventArgs args)
        {
            if (selectedBackend >= 0)
            {
                // TODO: Prompt the user and make sure they really want to change
                // which backend they are using.

                // Remove the existing backend's preference page
                if (backendPageId >= 0)
                {
                    notebook.RemovePage(backendPageId);
                    backendPageId = -1;
                    backendPage   = null;
                }

                // if yes (replace backend)
                if (backendComboMap.ContainsKey(selectedBackend))
                {
                    selectedBackend = -1;
                }
            }

            string newBackend = null;

            if (backendComboMap.ContainsKey(backendComboBox.Active))
            {
                newBackend = backendComboMap [backendComboBox.Active];
            }
            application.BackendManager.SetBackend(newBackend);

            if (newBackend == null)
            {
                return;
            }

            selectedBackend = backendComboBox.Active;

            // Add a backend prefs page if one exists
            backendPage = (Widget)application.BackendManager.GetBackendPreferencesWidget();
            if (backendPage != null)
            {
                backendPage.Show();
                var l = new Label(GLib.Markup.EscapeText(
                                      application.BackendManager.AvailableBackends [newBackend]));
                l.UseMarkup    = false;
                l.UseUnderline = false;
                l.Show();
                backendPageId = notebook.AppendPage(backendPage, l);

                // TODO: If the new backend is not configured, automatically switch
                // to the backend's preferences page
            }

            // Save the user preference
            application.Preferences.Set(PreferencesKeys.CurrentBackend,
                                        newBackend);

            //taskListsToHide = BuildNewTaskListList ();
            //Application.Preferences.SetStringList (IPreferences.HideInAllTaskList,
            //									   taskListsToHide);
            RebuildTaskListTree();
        }