public GtkSocketViewContent(GtkPlugOpenedFile openFile)
		{
			this.openFile = openFile;
			this.openFile.ViewContent = this;
			label = new Gtk.Label("Initializing...");
			label.ParentSet += this.OnLabelParentChanged;
			label.ShowAll();
		}
Exemplo n.º 2
0
        public static UITabPage CreateUICanvasTab(Gtk.Notebook parentNotebook, GameConfigDB gameConfigDB, bool isInitializing = false)
        {
            Gtk.ScrolledWindow scrolledWindow = new Gtk.ScrolledWindow();
            scrolledWindow.Name       = "_scrolledWindow" + nextGeneratedTabIndex;
            scrolledWindow.ShadowType = ((Gtk.ShadowType)(1));
            scrolledWindow.ShowAll();

            Gtk.Viewport viewport = new Gtk.Viewport();
            viewport.ShadowType = ((Gtk.ShadowType)(0));

            Gtk.Fixed canvas = new Gtk.Fixed();
            canvas.WidthRequest  = 800;
            canvas.HeightRequest = 600;
            canvas.Name          = "_gameCanvas" + nextGeneratedTabIndex;
            canvas.HasWindow     = false;
            canvas.ShowAll();
            viewport.Add(canvas);
            viewport.ShowAll();
            scrolledWindow.Add(viewport);

            Gtk.Viewport viewportLabel = new Gtk.Viewport();
            viewportLabel.ShadowType    = ((Gtk.ShadowType)(0));
            viewportLabel.WidthRequest  = 80;
            viewportLabel.HeightRequest = 30;

            Gtk.Label label = new Gtk.Label();
            label.Name      = "label1";
            label.LabelProp = global::Mono.Unix.Catalog.GetString(gameConfigDB.GetName());
            label.ShowAll();
            viewportLabel.Add(label);

            if (parentNotebook.NPages <= 0 || isInitializing)
            {
                parentNotebook.Add(scrolledWindow);
                parentNotebook.SetTabLabel(scrolledWindow, viewportLabel);
            }
            else
            {
                parentNotebook.InsertPage(scrolledWindow, viewportLabel, parentNotebook.NPages - 1);
                parentNotebook.Page = parentNotebook.NPages - 2;
            }

            UITabPage tabPage = new UITabPage(gameConfigDB, scrolledWindow, viewport, label, canvas);

            tabPage.InitDropEvent();
            scrolledWindow.Data.Add("UITabPage", tabPage);

            return(tabPage);
        }
Exemplo n.º 3
0
        void UpdateNotebookButtonLabel(Notebook notebook)
        {
            string labelText =
                notebook == null?
                Catalog.GetString("Notebook") :
                    notebook.Name;

            // Ellipsize names longer than 12 chars in length
            // TODO: Should we hardcode the ellipsized notebook name to 12 chars?
            Gtk.Label l = toolButton.LabelWidget as Gtk.Label;
            if (l != null)
            {
                l.Text          = labelText;
                l.MaxWidthChars = 12;
                l.Ellipsize     = Pango.EllipsizeMode.End;
                l.ShowAll();
            }
        }
Exemplo n.º 4
0
        public CatalogTab ()
        {
            this.Build ();

            String[] localizedCatalogs = {
                Mono.Unix.Catalog.GetString("ActPlace"),
                Mono.Unix.Catalog.GetString("Language"),
                Mono.Unix.Catalog.GetString("HumanRightsViolationCategory"),
                Mono.Unix.Catalog.GetString("HumanRightsViolation"),
                Mono.Unix.Catalog.GetString("City"),
                Mono.Unix.Catalog.GetString("State"),
                Mono.Unix.Catalog.GetString("Country"),
                Mono.Unix.Catalog.GetString("AffiliationType"),
                Mono.Unix.Catalog.GetString("IdentificationType"),
                Mono.Unix.Catalog.GetString("SourceInformationType"),
                Mono.Unix.Catalog.GetString("DocumentarySourceType"),
                Mono.Unix.Catalog.GetString("MaritalStatus"),
                Mono.Unix.Catalog.GetString("TravelCompanion"),
                Mono.Unix.Catalog.GetString("CaseStatus"),
                Mono.Unix.Catalog.GetString("IndigenousLanguage"),
                Mono.Unix.Catalog.GetString("RelationshipType"),
                Mono.Unix.Catalog.GetString("TravelingReason"),
                Mono.Unix.Catalog.GetString("InstitutionCategory"),
                Mono.Unix.Catalog.GetString("ReliabilityLevel"),
                Mono.Unix.Catalog.GetString("VictimStatus"),
                Mono.Unix.Catalog.GetString("InstitutionType"),
                Mono.Unix.Catalog.GetString("Religion"),
                Mono.Unix.Catalog.GetString("InterventionType"),
                Mono.Unix.Catalog.GetString("EthnicGroup"),
                Mono.Unix.Catalog.GetString("Job"),
                Mono.Unix.Catalog.GetString("ScholarityLevel"),
                Mono.Unix.Catalog.GetString("AddressType"),
                Mono.Unix.Catalog.GetString("StayType"),
                Mono.Unix.Catalog.GetString("PerpetratorType"),
                Mono.Unix.Catalog.GetString("PerpetratorStatus"),
                Mono.Unix.Catalog.GetString("InvolvementDegree")
            };

            String[] catalogs = {
                "ActPlace",
                "Language",
                "HumanRightsViolationCategory",
                "HumanRightsViolation",
                "City",
                "State",
                "Country",
                "AffiliationType",
                "IdentificationType",
                "SourceInformationType",
                "DocumentarySourceType",
                "MaritalStatus",
                "TravelCompanion",
                "CaseStatus",
                "IndigenousLanguage",
                "RelationshipType",
                "TravelingReason",
                "InstitutionCategory",
                "ReliabilityLevel",
                "VictimStatus",
                "InstitutionType",
                "Religion",
                "InterventionType",
                "EthnicGroup",
                "Job",
                "ScholarityLevel",
                "AddressType",
                "StayType",
                "PerpetratorType",
                "PerpetratorStatus",
                "InvolvementDegree"
            };

            notebook1.Remove (notebook1.Children[0]);

            foreach (String catalog in catalogs) {
                CatalogCRUD catalogcrud = new CatalogCRUD ();
                catalogcrud.Model = catalog;

                notebook1.Add (catalogcrud);

                // Notebook tab
                Gtk.Label label = new Gtk.Label ();
                label.LabelProp = Mono.Unix.Catalog.GetString(catalog);
                notebook1.SetTabLabel (catalogcrud, label);
                label.ShowAll ();
            }


        }