public override Control GetVisualizerWidget (ObjectValue val)
		{
			string value = val.Value;
			Gdk.Color col = new Gdk.Color (85, 85, 85);

			if (!val.IsNull && (val.TypeName == "string" || val.TypeName == "char[]"))
				value = '"' + GetString (val) + '"';
			if (DebuggingService.HasInlineVisualizer (val))
				value = DebuggingService.GetInlineVisualizer (val).InlineVisualize (val);

			var label = new Gtk.Label ();
			label.Text = value;
			var font = label.Style.FontDescription.Copy ();

			if (font.SizeIsAbsolute) {
				font.AbsoluteSize = font.Size - 1;
			} else {
				font.Size -= (int)(Pango.Scale.PangoScale);
			}

			label.ModifyFont (font);
			label.ModifyFg (StateType.Normal, col);
			label.SetPadding (4, 4);

			if (label.SizeRequest ().Width > 500) {
				label.WidthRequest = 500;
				label.Wrap = true;
				label.LineWrapMode = Pango.WrapMode.WordChar;
			} else {
				label.Justify = Gtk.Justification.Center;
			}

			if (label.Layout.GetLine (1) != null) {
				label.Justify = Gtk.Justification.Left;
				var line15 = label.Layout.GetLine (15);
				if (line15 != null) {
					label.Text = value.Substring (0, line15.StartIndex).TrimEnd ('\r', '\n') + "\n…";
				}
			}

			label.Show ();

			return label;
		}
예제 #2
0
        public NewSearchPage()
            : base(0.5f, 0.5f, 0f, 0f)
        {
            base.SetPadding(36, 36, 36, 36);
            base.FocusGrabbed += base_FocusGrabbed;

            mainVBox = new VBox();

            Label label = new Label();
            label.Xalign = 0;
            label.Markup = "<span size=\"x-large\" weight=\"bold\">Search for files...</span>";
            mainVBox.PackStart(label, false, false, 0);
            label.Show();

            searchEntry = new FileSearchEntry();
            searchEntry.WidthRequest = 400;
            mainVBox.PackStart(searchEntry, false, false, 6);
            searchEntry.Show();

            searchButton = new Button("_Search");
            searchButton.Image = new Image(Stock.Find, IconSize.Button);
            searchButton.Clicked += searchButton_Clicked;
            searchButton.Show();

            HButtonBox buttonBox = new HButtonBox();
            buttonBox.Layout = ButtonBoxStyle.End;
            buttonBox.PackStart(searchButton, false, false, 0);
            mainVBox.PackStart(buttonBox, false, false, 0);
            buttonBox.Show();

            base.Add(mainVBox);
            mainVBox.Show();
        }
예제 #3
0
 public void SetDirectMode()
 {
     Gtk.Table.TableChild props;
     widgetTable.Remove(latLabel);
     widgetTable.Remove(lonLabel);
     widgetTable.Remove(latWidget);
     widgetTable.Remove(lonWidget);
     widgetTable.Add(m_DirectEntry);
     widgetTable.Add(m_DirectLabel);
     props              = ((Gtk.Table.TableChild)(this.widgetTable[m_DirectLabel]));
     props.TopAttach    = 0;
     props.LeftAttach   = 0;
     props.RightAttach  = 1;
     props.BottomAttach = 1;
     props.XOptions     = AttachOptions.Shrink;
     m_DirectLabel.Show();
     props                     = ((Gtk.Table.TableChild)(this.widgetTable[m_DirectEntry]));
     props.TopAttach           = 0;
     props.LeftAttach          = 1;
     props.RightAttach         = 2;
     props.BottomAttach        = 1;
     props.XOptions            = AttachOptions.Shrink;
     m_DirectEntry.Text        = Utilities.getCoordStringCN(latWidget.getCoordinate(), lonWidget.getCoordinate());
     m_DirectEntry.TooltipText = Catalog.GetString("Coordinates must be typed in using English formatting");
     m_DirectEntry.Show();
     m_IsDirect = true;
 }
예제 #4
0
        private Gtk.Widget MakeViewPage()
        {
            Gtk.VBox vbox = new Gtk.VBox(false, 0);
            vbox.BorderWidth = 6;

            textLabel              = new Gtk.Label();
            textLabel.Xalign       = 0;
            textLabel.UseUnderline = false;
            textLabel.Justify      = Gtk.Justification.Left;
            textLabel.Wrap         = true;
            textLabel.Text         = text;
            textLabel.Show();
            vbox.PackStart(textLabel, true, true, 0);

            Gtk.HButtonBox hButtonBox = new Gtk.HButtonBox();
            hButtonBox.Layout = Gtk.ButtonBoxStyle.End;

            deleteButton          = new Gtk.Button(Gtk.Stock.Delete);
            deleteButton.Clicked += OnDeleteButtonClicked;
            deleteButton.Show();
            hButtonBox.PackStart(deleteButton, false, false, 0);

            editButton          = new Gtk.Button(Gtk.Stock.Edit);
            editButton.Clicked += OnEditButtonClicked;
            editButton.Show();
            hButtonBox.PackStart(editButton, false, false, 0);

            hButtonBox.Show();
            vbox.PackStart(hButtonBox, false, false, 0);

            vbox.Show();
            return(vbox);
        }
예제 #5
0
        public GlToggleButton(GdkGL.Config config)
        {
            // VBox.
            VBox vbox = new VBox (false, 0);
            vbox.BorderWidth = 10;

            // Drawing area for drawing OpenGL scene.
            DrawingArea drawing_area = new DrawingArea ();
            drawing_area.SetSizeRequest (200, 200);

            // Set OpenGL-capability to the widget.
            m_gl = new GlWidget (drawing_area, config);
            drawing_area.Realized += new EventHandler (Realize);
            drawing_area.ConfigureEvent += new ConfigureEventHandler (Configure);
            drawing_area.ExposeEvent += new ExposeEventHandler (Expose);
            drawing_area.Unrealized += new EventHandler (Unrealize);
            drawing_area.VisibilityNotifyEvent += new VisibilityNotifyEventHandler (VisibilityNotify);

            vbox.PackStart (drawing_area, true, true, 0);
            drawing_area.Show ();

            // Label.
            Label label = new Label ("Toggle Animation");
            vbox.PackStart (label, false, false, 10);
            label.Show ();

            Toggled += new EventHandler (ToggleAnimation);

            // Add VBox.
            vbox.Show ();
            Add (vbox);
        }
예제 #6
0
파일: MainWindow.cs 프로젝트: tigger/tripod
        void BuildLayout ()
        {
            primary_vbox = new VBox ();
            
            var label = new Label ("Super duper test UI!");
            label.Show ();
            primary_vbox.Add (label);
            
            var button_box = new HButtonBox ();
            button_box.Show ();
            primary_vbox.Add (button_box);
            
            var folder_button = new FileChooserButton ("Select import folder", FileChooserAction.SelectFolder);
            folder_button.FileSet += delegate {
                folder = folder_button.Uri;
                Log.Information ("Selected " + folder);
            };
            folder_button.Show ();
            button_box.Add (folder_button);
            
            var import_button = new Button { Label = "Start Import" };
            import_button.Activated += StartImport;
            import_button.Clicked += StartImport;
            import_button.Show ();
            button_box.Add (import_button);

            primary_vbox.Show ();
            Add (primary_vbox);
        }
예제 #7
0
        void Install(Gtk.Alignment commandBox, Button installButton, Update update)
        {
            if (update.InstallAction == null)
            {
                DesktopService.ShowUrl(update.Url);
                return;
            }

            installButton.Hide();

            if (installing)
            {
                Gtk.Label lab = new Gtk.Label(GettextCatalog.GetString("Waiting"));
                commandBox.Child.Destroy();
                commandBox.Add(lab);
                lab.Show();
                installQueue.Enqueue(delegate {
                    lab.Hide();
                    RunInstall(commandBox, update);
                });
                return;
            }

            RunInstall(commandBox, update);
        }
예제 #8
0
    public void atualizarAutomato()
    {
        Table tabela = new Table((uint)automato.Count, 3, false);

        tabela.BorderWidth = 0;
        scrolledwindow1.Add(tabela);
        Label lbl  = new Label("Estado 1");
        Label lbl2 = new Label("Transição");
        Label lbl3 = new Label("Estado 2");

        tabela.Attach(lbl, 0, 1, 0, 1);
        tabela.Attach(lbl2, 1, 2, 0, 1);
        tabela.Attach(lbl3, 2, 3, 0, 1);
        lbl.Show();
        lbl2.Show();
        lbl3.Show();
        uint inc = 2;

        for (int i = 0; i < automato.Count; i++)
        {
            string[] p    = automato[i];
            Label    lbl4 = new Gtk.Label(p[0]);
            Label    lbl5 = new Gtk.Label(p[1]);
            Label    lbl6 = new Gtk.Label(p[2]);
            tabela.Attach(lbl4, 0, 1, (uint)i + 1, inc);
            tabela.Attach(lbl5, 1, 2, (uint)i + 1, inc);
            tabela.Attach(lbl6, 2, 3, (uint)i + 1, inc);
            lbl4.Show();
            lbl5.Show();
            lbl6.Show();
            inc++;
        }
        tabela.Show();
    }
예제 #9
0
        public Category(Tiles.TileGroupInfo info, int columns)
        {
            WidgetFlags |= WidgetFlags.NoWindow;

            header = new Gtk.HBox(false, 0);

            headerExpander = new Gtk.Expander("<big><b>" + GLib.Markup.EscapeText(info.Name) + "</b></big>");
            ((Gtk.Label)headerExpander.LabelWidget).SetAlignment(0.0f, 0.5f);
            headerExpander.UseMarkup    = true;
            headerExpander.UseUnderline = true;
            headerExpander.Show();
            header.PackStart(headerExpander, true, true, 0);

            headerExpander.Activated += OnActivated;

            scope = Tiles.Utils.TileGroupToScopeType(info.Group);

            position = new Gtk.Label();
            position.ModifyFg(Gtk.StateType.Normal, position.Style.Base(Gtk.StateType.Selected));
            header.PackStart(position, false, false, 0);
            position.Show();

            prev = MakeButton(header, Gtk.Stock.GoBack, OnPrev);
            next = MakeButton(header, Gtk.Stock.GoForward, OnNext);

            header.Show();
            header.Parent         = this;
            header.SizeRequested += HeaderSizeRequested;

            tiles   = new SortedTileList(Beagle.Search.SortType.Relevance);
            Columns = columns;

            UpdateButtons();
            Expanded = true;
        }
예제 #10
0
        public TitledList(string title_str)
            : base()
        {
            genre_map = new Dictionary<string, Genre> ();
            title = new Label ();
            title.Xalign = 0;
            title.Ellipsize = Pango.EllipsizeMode.End;
            title.Markup = String.Format ("<b>{0}</b>", GLib.Markup.EscapeText (title_str));

            PackStart (title, false, false, 0);
            title.Show ();

            StyleSet += delegate {
                title.ModifyBg (StateType.Normal, Style.Base (StateType.Normal));
                title.ModifyFg (StateType.Normal, Style.Text (StateType.Normal));
            };

            tile_view = new TileView (2);
            PackStart (tile_view, true, true, 0);
            tile_view.Show ();

            StyleSet += delegate {
                tile_view.ModifyBg (StateType.Normal, Style.Base (StateType.Normal));
                tile_view.ModifyFg (StateType.Normal, Style.Base (StateType.Normal));
            };
        }
예제 #11
0
 public Glass(GroupSelector selector) : base(selector)
 {
     popup_window = new ToolTipWindow();
     popup_label  = new Gtk.Label(String.Empty);
     popup_label.Show();
     popup_window.Add(popup_label);
 }
		public EnableStartupNotesPreference ()
		{
			IPropertyEditorBool enableStartupNotes_peditor;
			Gtk.CheckButton enableStartupNotesCheckbox;
			Gtk.Label enableStartupNotesLabel;

			// Enable Startup Notes option
			enableStartupNotesLabel = new Gtk.Label (Catalog.GetString ("Enable startup notes"));
			enableStartupNotesLabel.UseMarkup = true;
			enableStartupNotesLabel.Justify = Gtk.Justification.Left;
			enableStartupNotesLabel.SetAlignment (0.0f, 0.5f);
			enableStartupNotesLabel.Show ();

			enableStartupNotesCheckbox = new Gtk.CheckButton ();
			enableStartupNotesCheckbox.Add (enableStartupNotesLabel);
			enableStartupNotesCheckbox.Show ();

			enableStartupNotes_peditor =
				Services.Factory.CreatePropertyEditorToggleButton (Preferences.ENABLE_STARTUP_NOTES, enableStartupNotesCheckbox);
			Preferences.Get (enableStartupNotes_peditor.Key);
			enableStartupNotes_peditor.Setup ();

			align = new Gtk.Alignment (0.0f, 0.0f, 0.0f, 1.0f);
			align.Show ();
			align.Add (enableStartupNotesCheckbox);
		}
		public UnknownEditor(object @object, PropertyInfo info) : base(@object, info) {
			Label l = new Label("Cannot edit property of type " +
			                    info.PropertyType.FullName);
			l.Show();
			
			this.Add(l);
		}
예제 #14
0
        void InitTreeViewColumn(TreeView treeView, string[] title, ListStore list, int columnWidth)
        {
            IList <TreeViewColumn> Columns = new List <TreeViewColumn>();

            for (int i = 0; i < title.Length; i++)
            {
                Columns.Add(new TreeViewColumn {
                    MinWidth = columnWidth, Alignment = 0.50F
                });
            }
            for (int i = 0; i < Columns.Count; i++)
            {
                var column        = Columns[i];
                var custom_header = new Gtk.Label(title[i]);
                custom_header.Show();
                column.Widget = custom_header;
                custom_header.ModifyFont(Pango.FontDescription.FromString("Arial 13"));

                var CellRender = new CellRendererText
                {
                    Xalign     = 0.50F,
                    Background = "White",
                    Foreground = "Grey",
                    Font       = "Lucida Console 10"
                };
                column.PackStart(CellRender, true);
                column.AddAttribute(CellRender, "text", i);
                treeView.AppendColumn(column);
            }
            treeView.Model = list;
        }
예제 #15
0
        void RunInstall(HBox labelBox, Update update)
        {
            installing = true;

            ProgressBarMonitor monitorBar = new ProgressBarMonitor();

            monitorBar.ShowErrorsDialog = true;
            monitorBar.Show();
            labelBox.PackStart(monitorBar, false, false, 0);

            IAsyncOperation oper = update.InstallAction(monitorBar.CreateProgressMonitor());

            oper.Completed += delegate {
                DispatchService.GuiDispatch(delegate {
                    monitorBar.Hide();
                    Gtk.Label result = new Gtk.Label();
                    if (oper.Success)
                    {
                        result.Text = GettextCatalog.GetString("Completed");
                    }
                    else
                    {
                        result.Text = GettextCatalog.GetString("Failed");
                    }
                    labelBox.PackStart(result, false, false, 0);
                    result.Show();
                    installing = false;

                    if (installQueue.Count > 0)
                    {
                        installQueue.Dequeue()();
                    }
                });
            };
        }
예제 #16
0
    private void createButton()
    {
        Gtk.VBox vbox = new Gtk.VBox();

        Gtk.Image image = new Gtk.Image();
        addUserPhotoIfExists(image);
        image.HeightRequest = 150;
        image.Visible       = true;

        Gtk.Label label_select = new Gtk.Label("Select !");
        label_select.Visible = false;         //hide this to the user until button is clicked first time

        Gtk.Label label_id = new Gtk.Label(personID.ToString());
        label_id.Visible = false;         //hide this to the user

        Gtk.Viewport viewport = new Gtk.Viewport();
        UtilGtk.ViewportColorDefault(viewport);
        Gtk.Label label_name = new Gtk.Label(personName);
        label_name.Visible = true;
        label_name.Show();
        viewport.Add(label_name);
        viewport.Show();

        vbox.PackStart(image);                                  //0
        vbox.PackStart(label_id);                               //1
        vbox.PackEnd(viewport, false, false, 1);                //2 (contains label_name)

        vbox.Show();

        button = new Button(vbox);
        button.WidthRequest  = 150;
        button.HeightRequest = 170;
    }
예제 #17
0
파일: AudioView.cs 프로젝트: GNOME/banter
        public AudioView()
        {
            //			this.WidthRequest = 500; //250;
            //			this.HeightRequest = 375; //187;

            Frame frame = new Frame();
            frame.BorderWidth = 5;
            frame.Show();

            VBox vbox = new VBox(false, 0);
            frame.Add(vbox);
            vbox.Show();

            Label label = new Label(Catalog.GetString("Audio Chat in progress..."));

            label.Show();
            vbox.PackStart(label, false, true, 5);

            Button button = new Button(Catalog.GetString("End Call"));
            button.Clicked += OnCloseAudioClicked;
            button.Show();
            vbox.PackStart(button, false, true, 5);

            this.Add(frame);
        }
        public EnableStartupNotesPreference()
        {
            IPropertyEditorBool enableStartupNotes_peditor;

            Gtk.CheckButton enableStartupNotesCheckbox;
            Gtk.Label       enableStartupNotesLabel;

            // Enable Startup Notes option
            enableStartupNotesLabel           = new Gtk.Label(Catalog.GetString("Enable startup notes"));
            enableStartupNotesLabel.UseMarkup = true;
            enableStartupNotesLabel.Justify   = Gtk.Justification.Left;
            enableStartupNotesLabel.SetAlignment(0.0f, 0.5f);
            enableStartupNotesLabel.Show();

            enableStartupNotesCheckbox = new Gtk.CheckButton();
            enableStartupNotesCheckbox.Add(enableStartupNotesLabel);
            enableStartupNotesCheckbox.Show();

            enableStartupNotes_peditor =
                Services.Factory.CreatePropertyEditorToggleButton(Preferences.ENABLE_STARTUP_NOTES, enableStartupNotesCheckbox);
            Preferences.Get(enableStartupNotes_peditor.Key);
            enableStartupNotes_peditor.Setup();

            align = new Gtk.Alignment(0.0f, 0.0f, 0.0f, 1.0f);
            align.Show();
            align.Add(enableStartupNotesCheckbox);
        }
예제 #19
0
        public NotebookTabLabel(string title)
        {
            Button button = new Button ();
            button.Image = new Gtk.Image (Stock.Close, IconSize.Menu);
            button.TooltipText = "Close Tab";
            button.Relief = ReliefStyle.None;

            RcStyle rcStyle = new RcStyle ();
            rcStyle.Xthickness = 0;
            rcStyle.Ythickness = 0;
            button.ModifyStyle (rcStyle);

            button.FocusOnClick = false;
            button.Clicked += OnCloseClicked;
            button.Show ();

            Label label = new Label (title);
            label.UseMarkup = false;
            label.UseUnderline = false;
            label.Show ();

            HBox hbox = new HBox (false, 0);
            hbox.Spacing = 0;
            hbox.Add (label);
            hbox.Add (button);
            hbox.Show ();

            this.Add (hbox);
        }
예제 #20
0
		public Category (Tiles.TileGroupInfo info, int columns)
		{
			WidgetFlags |= WidgetFlags.NoWindow;

			header = new Gtk.HBox (false, 0);

			headerExpander = new Gtk.Expander ("<big><b>" + GLib.Markup.EscapeText (info.Name) + "</b></big>");
			((Gtk.Label) headerExpander.LabelWidget).SetAlignment (0.0f, 0.5f);
			headerExpander.UseMarkup = true;
			headerExpander.UseUnderline = true;
			headerExpander.Show ();
			header.PackStart (headerExpander, true, true, 0);

			headerExpander.Activated += OnActivated;
			
			scope = Tiles.Utils.TileGroupToScopeType(info.Group);
			
			position = new Gtk.Label ();
			position.ModifyFg (Gtk.StateType.Normal, position.Style.Base (Gtk.StateType.Selected));
			header.PackStart (position, false, false, 0);
			position.Show ();

			prev = MakeButton (header, Gtk.Stock.GoBack, OnPrev);
			next = MakeButton (header, Gtk.Stock.GoForward, OnNext);

			header.Show ();
			header.Parent = this;
			header.SizeRequested += HeaderSizeRequested;

			tiles = new SortedTileList (Beagle.Search.SortType.Relevance);
			Columns = columns;

			UpdateButtons ();
			Expanded = true;	
		}
예제 #21
0
		public ToolBarLabel (string text)
		{
			Label l = new Label (text);
			l.Show ();
			
			Add (l);
			Show ();
		}
예제 #22
0
    //
    // glade signal handlers
    //

    // custom widget creation callback
    public Gtk.Widget GladeCustomWidgetHandler(Glade.XML xml, string func_name, string name, string s1, string s2, int i1, int i2)
    {
        Console.WriteLine("customWidgetHandler: widget for " + name);

        if (name == "browser_icon_list")
        {
            icon_list = new IconList();
            Scrollbar scroll = new VScrollbar(icon_list.Adjustment);
            Box       box    = new HBox(false, 0);

            box.PackStart(icon_list, true, true, 0);
            box.PackStart(scroll, false, true, 0);

            box.ShowAll();
            return(box);
        }

#if HAVE_LIBEOG
        if (name == "eog_image_view")
        {
            image_ui = new EogUiImage();
            Console.WriteLine("Handle: " + image_ui.Handle);
            image_ui.Show();
            return(image_ui);
        }
#else
        if (name == "eog_image_view")
        {
            Gtk.Widget w = new Gtk.Label("EOG support not enabled; Viewer is disabled.");
            w.Show();
            return(w);
        }
#endif

        if (name == "collections_tree_view")
        {
            collections_tree_view = new CollectionsTreeView();
            collections_tree_view.Show();
            return(collections_tree_view);
        }

        if (name == "imageinfo_tree_view")
        {
            imageinfo_tree_view = new ImageInfoTreeView();
            imageinfo_tree_view.Show();
            return(imageinfo_tree_view);
        }

        if (name == "keywords_widget")
        {
            keywords_widget = new KeywordsWidget();
            keywords_widget.Show();
            return(keywords_widget);
        }

        Console.WriteLine("Returning nil");
        return(null);
    }
        public override Control GetVisualizerWidget(ObjectValue val)
        {
            string value = val.Value;

            Gdk.Color col = new Gdk.Color(85, 85, 85);

            if (!val.IsNull && (val.TypeName == "string" || val.TypeName == "char[]"))
            {
                value = '"' + GetString(val) + '"';
            }
            if (DebuggingService.HasInlineVisualizer(val))
            {
                value = DebuggingService.GetInlineVisualizer(val).InlineVisualize(val);
            }

            var label = new Gtk.Label();

            label.Text = value;
            var font = label.Style.FontDescription.Copy();

            if (font.SizeIsAbsolute)
            {
                font.AbsoluteSize = font.Size - 1;
            }
            else
            {
                font.Size -= (int)(Pango.Scale.PangoScale);
            }

            label.ModifyFont(font);
            label.ModifyFg(StateType.Normal, col);
            label.SetPadding(4, 4);

            if (label.SizeRequest().Width > 500)
            {
                label.WidthRequest = 500;
                label.Wrap         = true;
                label.LineWrapMode = Pango.WrapMode.WordChar;
            }
            else
            {
                label.Justify = Gtk.Justification.Center;
            }

            if (label.Layout.GetLine(1) != null)
            {
                label.Justify = Gtk.Justification.Left;
                var line15 = label.Layout.GetLine(15);
                if (line15 != null)
                {
                    label.Text = value.Substring(0, line15.StartIndex).TrimEnd('\r', '\n') + "\n…";
                }
            }

            label.Show();

            return(label);
        }
예제 #24
0
        public override bool GetPreferenceTabWidget(PreferencesDialog parent,
                                                    out string tabLabel,
                                                    out Gtk.Widget preferenceWidget)
        {
            Gtk.Label      label;
            Gtk.SpinButton menuNoteCountSpinner;
            Gtk.Alignment  align;
            int            menuNoteCount;

            // Addin's tab caption
            tabLabel = Catalog.GetString("Advanced");

            Gtk.VBox opts_list = new Gtk.VBox(false, 12);
            opts_list.BorderWidth = 12;
            opts_list.Show();

            align = new Gtk.Alignment(0.5f, 0.5f, 0.0f, 1.0f);
            align.Show();
            opts_list.PackStart(align, false, false, 0);

            Gtk.Table table = new Gtk.Table(1, 2, false);
            table.ColumnSpacing = 6;
            table.RowSpacing    = 6;
            table.Show();
            align.Add(table);


            // Menu Note Count option
            label = new Gtk.Label(Catalog.GetString("Minimum number of notes to show in Recent list (maximum 18)"));

            label.UseMarkup = true;
            label.Justify   = Gtk.Justification.Left;
            label.SetAlignment(0.0f, 0.5f);
            label.Show();

            table.Attach(label, 0, 1, 0, 1);

            menuNoteCount = (int)Preferences.Get(Preferences.MENU_NOTE_COUNT);
            // we have a hard limit of 18 set, thus not allowing anything bigger than 18
            menuNoteCountSpinner       = new Gtk.SpinButton(1, 18, 1);
            menuNoteCountSpinner.Value = menuNoteCount <= 18 ? menuNoteCount : 18;

            menuNoteCountSpinner.Show();
            table.Attach(menuNoteCountSpinner, 1, 2, 0, 1);

            menuNoteCountSpinner.ValueChanged += UpdateMenuNoteCountPreference;

            if (opts_list != null)
            {
                preferenceWidget = opts_list;
                return(true);
            }
            else
            {
                preferenceWidget = null;
                return(false);
            }
        }
예제 #25
0
 private Widget CreateColorBox(string name, Gdk.Color color)
 {
     EventBox eb = new EventBox();
        eb.ModifyBg(StateType.Normal, color);
        Label l = new Label(name);
        eb.Add(l);
        l.Show();
        return eb;
 }
예제 #26
0
		public override bool GetPreferenceTabWidget (	PreferencesDialog parent,
								out string tabLabel,
								out Gtk.Widget preferenceWidget)
		{
			
			Gtk.Label label;
			Gtk.SpinButton menuNoteCountSpinner;
			Gtk.Alignment align;
			int menuNoteCount;

			// Addin's tab caption
			tabLabel = Catalog.GetString ("Advanced");
			
			Gtk.VBox opts_list = new Gtk.VBox (false, 12);
			opts_list.BorderWidth = 12;
			opts_list.Show ();
			
			align = new Gtk.Alignment (0.5f, 0.5f, 0.0f, 1.0f);
			align.Show ();
			opts_list.PackStart (align, false, false, 0);

			Gtk.Table table = new Gtk.Table (1, 2, false);
			table.ColumnSpacing = 6;
			table.RowSpacing = 6;
			table.Show ();
			align.Add (table);


			// Menu Note Count option
			label = new Gtk.Label (Catalog.GetString ("Minimum number of notes to show in Recent list (maximum 18)"));

			label.UseMarkup = true;
			label.Justify = Gtk.Justification.Left;
			label.SetAlignment (0.0f, 0.5f);
			label.Show ();
			
			table.Attach (label, 0, 1, 0, 1);
		
			menuNoteCount = (int) Preferences.Get (Preferences.MENU_NOTE_COUNT);
			// we have a hard limit of 18 set, thus not allowing anything bigger than 18
			menuNoteCountSpinner = new Gtk.SpinButton (1, 18, 1);
			menuNoteCountSpinner.Value = menuNoteCount <= 18 ? menuNoteCount : 18;
			
			menuNoteCountSpinner.Show ();
			table.Attach (menuNoteCountSpinner, 1, 2, 0, 1);
			
			menuNoteCountSpinner.ValueChanged += UpdateMenuNoteCountPreference;
			
			if (opts_list != null) {
				preferenceWidget = opts_list;
				return true;
			} else {
				preferenceWidget = null;
				return false;
			}
		}
예제 #27
0
 private Label CreateLabel(string value)
 {
     Label label = new Label ();
     label.Xalign = 1.0f;
     label.Markup = String.Format ("<small>{0}</small>", GLib.Markup.EscapeText (value));
     label.OverrideColor (StateFlags.Normal, Hyena.Gui.GtkUtilities.ColorBlend (
         StyleContext.GetColor (StateFlags.Normal), StyleContext.GetBackgroundColor (StateFlags.Normal)));
     label.Show ();
     return label;
 }
예제 #28
0
 private Label CreateLabel (string value)
 {
     Label label = new Label ();
     label.Xalign = 1.0f;
     label.Markup = String.Format ("<small>{0}</small>", GLib.Markup.EscapeText (value));
     label.ModifyFg (StateType.Normal, Hyena.Gui.GtkUtilities.ColorBlend (
         Style.Foreground (StateType.Normal), Style.Background (StateType.Normal)));
     label.Show ();
     return label;
 }
예제 #29
0
/*
 *              private Widget MakeSipPreferences ()
 *              {
 *                      PropertyEditor peditor;
 *
 *                      VBox vbox = new VBox (false, 4);
 *
 *                      Label label = MakeLabel (
 *                                      string.Format (
 *                                              "<span size=\"larger\" weight=\"bold\">{0}</span>",
 *                                              Catalog.GetString ("SIP Account Settings")));
 *                      label.Xalign = 0;
 *                      vbox.PackStart (label, false, false, 0);
 *                      label = MakeLabel (
 *                                      string.Format (
 *                                              "<span size=\"smaller\">{0}</span>",
 *                                              Catalog.GetString (
 *                                                      "In this alpha-phase of the project, we only support " +
 *                                                      "one SIP account.")));
 *                      label.Xalign = 0;
 *                      label.Wrap = true;
 *                      vbox.PackStart (label, false, true, 0);
 *
 *                      Table table = new Table (3, 2, false);
 *                      table.BorderWidth = 8;
 *                      table.RowSpacing = 4;
 *                      table.ColumnSpacing = 8;
 *                      vbox.PackStart (table, true, true, 0);
 *
 *                      // Server address
 *                      label = MakeLabel (Catalog.GetString ("Server Address:"));
 *                      label.Xalign = 1;
 *                      label.Yalign = 0;
 *                      table.Attach (label, 0, 1, 0, 1, AttachOptions.Fill, 0, 0, 0);
 *
 *                      sipServerAddressEntry = new Entry ();
 *                      label.MnemonicWidget = sipServerAddressEntry;
 *                      sipServerAddressEntry.Show ();
 *                      peditor = new PropertyEditorEntry (
 *                                      Preferences.SipServer, sipServerAddressEntry);
 *                      SetupPropertyEditor (peditor);
 *                      table.Attach (sipServerAddressEntry, 1, 2, 0, 1, AttachOptions.Expand | AttachOptions.Fill, 0, 0, 0);
 *
 *                      // Username
 *                      label = MakeLabel (Catalog.GetString ("Username:"******"Password:"));
 *                      label.Xalign = 1;
 *                      label.Yalign = 0;
 *                      table.Attach (label, 0, 1, 2, 3, AttachOptions.Fill, 0, 0, 0);
 *
 *                      sipPasswordEntry = new Entry ();
 *                      label.MnemonicWidget = passwordEntry;
 *                      sipPasswordEntry.Visibility = false; // password field
 *                      sipPasswordEntry.Show ();
 *                      table.Attach (sipPasswordEntry, 1, 2, 2, 3, AttachOptions.Expand | AttachOptions.Fill, 0, 0, 0);
 *
 *                      vbox.Show ();
 *
 *                      return vbox;
 *              }
 */
        Label MakeLabel(string label_text)
        {
            Gtk.Label label = new Gtk.Label(label_text);
            label.UseMarkup    = true;
            label.UseUnderline = true;
            label.Justify      = Gtk.Justification.Left;
            label.SetAlignment(0.0f, 0.5f);
            label.Show();

            return(label);
        }
예제 #30
0
        protected void OnNetChange(object sender, EventArgs e)
        {
            int i = int.Parse(((Gtk.CheckButton)sender).Name.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries) [1]);

            if (((Gtk.CheckButton)sender).Active)
            {
                ok.Show();
                ipLabel.Show();
                IPs [i].Show();
                IPs [i].Sensitive = true;
                ipLabel.Show();
                CPUchecks [i].Active    = false;
                CPUchecks [i].Sensitive = false;
            }
            else
            {
                CPUchecks [i].Sensitive = true;
            }
            this.CPUchecks[0].Hide();
        }
예제 #31
0
        public LinkLabel(string text, Uri uri)
        {
            CanFocus = true;
            AppPaintable = true;

            this.uri = uri;

            label = new Label(text);
            label.ModifyFg(Gtk.StateType.Normal, link_color);
            label.Show();
            Add(label);
        }
예제 #32
0
        internal bool Refresh()
        {
            DaemonInformationRequest  request = new DaemonInformationRequest(false, false, true, true);
            DaemonInformationResponse response;

            try {
                response = (DaemonInformationResponse)request.Send();
            } catch (Beagle.ResponseMessageException) {
                Console.WriteLine("Could not connect to the daemon.");
                return(false);
            }

            if (response.IsIndexing)
            {
                note.Show();
            }
            else
            {
                note.Hide();
            }

            int           i  = 0;
            StringBuilder sb = new StringBuilder();

            foreach (QueryableStatus status in response.IndexStatus)
            {
                if (i++ > 20)
                {
                    break;
                }

                // Skip all those metadata and networking services backends
                if (status.ItemCount < 0)
                {
                    continue;
                }

                sb.AppendFormat("<b>{0}</b>: {1}", status.Name, status.ItemCount);

                if (status.ProgressPercent > 0)
                {
                    sb.AppendFormat(" ({0})", status.ProgressPercent);
                }

                sb.Append("\n");
            }

            label.Markup = sb.ToString();

            label.Show();

            return(true);
        }
예제 #33
0
		static void Label_Toggle (object o, EventArgs args)
		{
			if (label == null) {
				label = new Label ("This is Text label inside a Dialog");
				label.SetPadding (10, 10);
				window.ContentArea.PackStart (label, true, true, 0);
				label.Show ();
			} else {
				label.Destroy ();
				label = null;
			}
		}
예제 #34
0
        public NotebookPage (Page page)
        {
            this.page = page;

            BorderWidth = 5;
            Spacing = 10;

            tab_widget = new Label (page.Name);
            tab_widget.Show ();

            Widget page_widget = page.DisplayWidget as Widget;
            if (page_widget != null) {
                page_widget.Show ();
                PackStart (page_widget, true, true, 0);
            } else {
                foreach (Section section in page) {
                    AddSection (section);
                }

                if (page.ChildPages.Count > 0) {
                    Notebook notebook = new Notebook ();
                    notebook.ShowBorder = false;
                    notebook.ShowTabs = false;
                    notebook.Show ();

                    var hbox = new HBox () { Spacing = 6 };
                    // FIXME this shouldn't be hard-coded to 'Source:', but this is the only
                    // user of this code atm...
                    var page_label = new Label (Mono.Unix.Catalog.GetString ("Source:"));
                    var page_combo = new PageComboBox (page.ChildPages, notebook);
                    hbox.PackStart (page_label, false, false, 0);
                    hbox.PackStart (page_combo, true, true, 0);
                    hbox.ShowAll ();

                    PackStart (hbox, false, false, 0);

                    HSeparator sep = new HSeparator ();
                    sep.Show ();
                    PackStart (sep, false, false, 0);

                    foreach (Page child_page in page.ChildPages) {
                        NotebookPage page_ui = new NotebookPage (child_page);
                        page_ui.BorderWidth = 0;
                        page_ui.Show ();
                        notebook.AppendPage (page_ui, null);
                    }

                    PackStart (notebook, true, true, 0);
                }
            }
        }
        public MenuMinMaxNoteCountPreference()
        {
            table = new Gtk.Table(2, 2, false);
            table.ColumnSpacing = 6;
            table.RowSpacing    = 6;
            table.Show();

            // Menu Min Note Count option
            menuMinNoteCountLabel = new Gtk.Label(Catalog.GetString("Minimum number of notes to show in Recent list"));

            menuMinNoteCountLabel.UseMarkup = true;
            menuMinNoteCountLabel.Justify   = Gtk.Justification.Left;
            menuMinNoteCountLabel.SetAlignment(0.0f, 0.5f);
            menuMinNoteCountLabel.Show();
            table.Attach(menuMinNoteCountLabel, 0, 1, 0, 1);

            menuMinNoteCount = (int)Preferences.Get(Preferences.MENU_NOTE_COUNT);
            menuMaxNoteCount = (int)Preferences.Get(Preferences.MENU_MAX_NOTE_COUNT);
            // This is to avoid having Max bigger than absolute maximum if someone changed the setting
            // outside of the Tomboy using e.g. gconf
            menuMaxNoteCount = (menuMaxNoteCount <= int.MaxValue ? menuMaxNoteCount : int.MaxValue);
            // This is to avoid having Min bigger than Max if someone changed the setting
            // outside of the Tomboy using e.g. gconf
            menuMinNoteCount = (menuMinNoteCount <= menuMaxNoteCount ? menuMinNoteCount : menuMaxNoteCount);

            menuMinNoteCountSpinner       = new Gtk.SpinButton(1, menuMaxNoteCount, 1);
            menuMinNoteCountSpinner.Value = menuMinNoteCount;
            menuMinNoteCountSpinner.Show();
            table.Attach(menuMinNoteCountSpinner, 1, 2, 0, 1);
            menuMinNoteCountSpinner.ValueChanged += UpdateMenuMinNoteCountPreference;

            // Menu Max Note Count option
            menuMaxNoteCountLabel = new Gtk.Label(Catalog.GetString("Maximum number of notes to show in Recent list"));

            menuMaxNoteCountLabel.UseMarkup = true;
            menuMaxNoteCountLabel.Justify   = Gtk.Justification.Left;
            menuMaxNoteCountLabel.SetAlignment(0.0f, 0.5f);
            menuMaxNoteCountLabel.Show();
            table.Attach(menuMaxNoteCountLabel, 0, 1, 1, 2);

            menuMaxNoteCountSpinner       = new Gtk.SpinButton(menuMinNoteCount, int.MaxValue, 1);
            menuMaxNoteCountSpinner.Value = menuMaxNoteCount;
            menuMaxNoteCountSpinner.Show();
            table.Attach(menuMaxNoteCountSpinner, 1, 2, 1, 2);
            menuMaxNoteCountSpinner.ValueChanged += UpdateMenuMaxNoteCountPreference;

            align = new Gtk.Alignment(0.0f, 0.0f, 0.0f, 1.0f);
            align.Show();
            align.Add(table);
        }
		public MenuMinMaxNoteCountPreference ()
		{
			table = new Gtk.Table (2, 2, false);
			table.ColumnSpacing = 6;
			table.RowSpacing = 6;
			table.Show ();

			// Menu Min Note Count option
			menuMinNoteCountLabel = new Gtk.Label (Catalog.GetString ("Minimum number of notes to show in Recent list"));

			menuMinNoteCountLabel.UseMarkup = true;
			menuMinNoteCountLabel.Justify = Gtk.Justification.Left;
			menuMinNoteCountLabel.SetAlignment (0.0f, 0.5f);
			menuMinNoteCountLabel.Show ();
			table.Attach (menuMinNoteCountLabel, 0, 1, 0, 1);

			menuMinNoteCount = (int) Preferences.Get (Preferences.MENU_NOTE_COUNT);
			menuMaxNoteCount = (int) Preferences.Get (Preferences.MENU_MAX_NOTE_COUNT);
			// This is to avoid having Max bigger than absolute maximum if someone changed the setting
			// outside of the Tomboy using e.g. gconf
			menuMaxNoteCount = (menuMaxNoteCount <= int.MaxValue ? menuMaxNoteCount : int.MaxValue);
			// This is to avoid having Min bigger than Max if someone changed the setting
			// outside of the Tomboy using e.g. gconf
			menuMinNoteCount = (menuMinNoteCount <= menuMaxNoteCount ? menuMinNoteCount : menuMaxNoteCount);

			menuMinNoteCountSpinner = new Gtk.SpinButton (1, menuMaxNoteCount, 1);
			menuMinNoteCountSpinner.Value = menuMinNoteCount;
			menuMinNoteCountSpinner.Show ();
			table.Attach (menuMinNoteCountSpinner, 1, 2, 0, 1);
			menuMinNoteCountSpinner.ValueChanged += UpdateMenuMinNoteCountPreference;

			// Menu Max Note Count option
			menuMaxNoteCountLabel = new Gtk.Label (Catalog.GetString ("Maximum number of notes to show in Recent list"));

			menuMaxNoteCountLabel.UseMarkup = true;
			menuMaxNoteCountLabel.Justify = Gtk.Justification.Left;
			menuMaxNoteCountLabel.SetAlignment (0.0f, 0.5f);
			menuMaxNoteCountLabel.Show ();
			table.Attach (menuMaxNoteCountLabel, 0, 1, 1, 2);

			menuMaxNoteCountSpinner = new Gtk.SpinButton (menuMinNoteCount, int.MaxValue, 1);
			menuMaxNoteCountSpinner.Value = menuMaxNoteCount;
			menuMaxNoteCountSpinner.Show ();
			table.Attach (menuMaxNoteCountSpinner, 1, 2, 1, 2);
			menuMaxNoteCountSpinner.ValueChanged += UpdateMenuMaxNoteCountPreference;

			align = new Gtk.Alignment (0.0f, 0.0f, 0.0f, 1.0f);
			align.Show ();
			align.Add (table);
		}
        public override Control GetVisualizerWidget(ObjectValue val)
        {
            var ops = DebuggingService.DebuggerSession.EvaluationOptions.Clone();

            ops.AllowTargetInvoke = true;
            ops.ChunkRawStrings   = true;
            ops.EllipsizedLength  = 5000; //Preview window can hold aprox. 4700 chars
            val.Refresh(ops);             //Refresh DebuggerDisplay/String value with full length instead of ellipsized
            string value = val.Value;

            Gdk.Color col = Styles.PreviewVisualizerTextColor.ToGdkColor();

            if (DebuggingService.HasInlineVisualizer(val))
            {
                value = DebuggingService.GetInlineVisualizer(val).InlineVisualize(val);
            }

            var label = new Gtk.Label();

            label.Text = value;
            label.ModifyFont(FontService.SansFont.CopyModified(Ide.Gui.Styles.FontScale11));
            label.ModifyFg(StateType.Normal, col);
            label.SetPadding(4, 4);

            if (label.SizeRequest().Width > 500)
            {
                label.WidthRequest = 500;
                label.Wrap         = true;
                label.LineWrapMode = Pango.WrapMode.WordChar;
            }
            else
            {
                label.Justify = Gtk.Justification.Center;
            }

            if (label.Layout.GetLine(1) != null)
            {
                label.Justify = Gtk.Justification.Left;
                var trimmedLine = label.Layout.GetLine(50);
                if (trimmedLine != null)
                {
                    label.Text = value.Substring(0, trimmedLine.StartIndex).TrimEnd('\r', '\n') + "\n…";
                }
            }
            label.Selectable = true;
            label.CanFocus   = false;
            label.Show();

            return(label);
        }
예제 #38
0
        void ShowViewPage()
        {
            // Hide all the widgets on the edit page
            textView.Hide();
            cancelButton.Hide();
            saveButton.Hide();

            // Show all the widgets on the view page
            textLabel.Show();
            deleteButton.Show();
            editButton.Show();

            // Switch back to the View Page
            Page = viewPageId;
        }
예제 #39
0
        public LinkLabel(string text, Uri uri)
        {
            CanFocus = true;
            AppPaintable = true;

            this.uri = uri;

            label = new Label(text);
            label.Show();

            link_color = label.Style.Background(StateType.Selected);
            ActAsLink = true;

            Add(label);
        }
예제 #40
0
        private Gtk.Button StockButton(string stockid, string label)
        {
            Gtk.HBox button_contents = new HBox(false, 0);
            button_contents.Show();
            Gtk.Widget button_image = new Gtk.Image(stockid, Gtk.IconSize.Button);
            button_image.Show();
            button_contents.PackStart(button_image, false, false, 1);
            Gtk.Label button_label = new Gtk.Label(label);
            button_label.Show();
            button_contents.PackStart(button_label, false, false, 1);

            Gtk.Button button = new Gtk.Button();
            button.Add(button_contents);

            return(button);
        }
예제 #41
0
        private void AddSection(GameConfigSectionDescriptor sectionDescriptor)
        {
            Pango.FontDescription fontDescription = Pango.FontDescription.FromString(UIUtils.SECTION_FONT);
            _label      = new Gtk.Label();
            _label.Text = sectionDescriptor._tittle;
            _label.ModifyFont(fontDescription);
            _label.Show();
            _parent.GetCanvas().Add(_label);

            foreach (GameConfigButtonDescriptor buttonDescriptor in sectionDescriptor._buttons)
            {
                AddButton(buttonDescriptor);
            }

            Dispose();
        }
예제 #42
0
파일: GroupWindow.cs 프로젝트: GNOME/banter
        public GroupButton(PersonGroup personGroup)
        {
            group = personGroup;

            HBox hbox;

            hbox = new HBox (false, 0);
            label = new Label (group.DisplayName);
            label.Xalign = 0;
            label.UseUnderline = false;
            label.UseMarkup = true;
            label.Show ();
            hbox.PackStart (label, false, false, 4);
            this.Relief = ReliefStyle.None;
            Add (hbox);
        }
예제 #43
0
    private void initialize(string title, Constants.MessageTypes type, string message)
    {
        LogB.Information("Dialog message: " + message);

        Glade.XML gladeXML;
        gladeXML = Glade.XML.FromAssembly(Util.GetGladePath() + "dialog_message.glade", "dialog_message", "chronojump");
        gladeXML.Autoconnect(this);

        //put an icon to window
        UtilGtk.IconWindow(dialog_message);

        //with this, user doesn't see a moving/changing creation window
        //if uncommented, then does weird bug in windows not showing dialog as its correct size until window is moves
        //dialog_message.Hide();

        if (title != "")
        {
            dialog_message.Title = title;
        }

        label_message.Text      = message;
        label_message.UseMarkup = true;

        switch (type)
        {
        case Constants.MessageTypes.WARNING:
            image_warning.Show();
            image_info.Hide();
            image_help.Hide();
            break;

        case Constants.MessageTypes.INFO:
            image_warning.Hide();
            image_info.Show();
            image_help.Hide();
            break;

        case Constants.MessageTypes.HELP:
            image_warning.Hide();
            image_info.Hide();
            image_help.Show();
            break;
        }

        label_message.Show();
        dialog_message.Show();
    }
        public override Control GetVisualizerWidget(ObjectValue val)
        {
            string value = val.Value;

            Gdk.Color col = Styles.PreviewVisualizerTextColor.ToGdkColor();

            if (!val.IsNull && (val.TypeName == "string" || val.TypeName == "char[]"))
            {
                value = '"' + GetString(val) + '"';
            }
            if (DebuggingService.HasInlineVisualizer(val))
            {
                value = DebuggingService.GetInlineVisualizer(val).InlineVisualize(val);
            }

            var label = new Gtk.Label();

            label.Text = value;
            label.ModifyFont(FontService.SansFont.CopyModified(Ide.Gui.Styles.FontScale11));
            label.ModifyFg(StateType.Normal, col);
            label.SetPadding(4, 4);

            if (label.SizeRequest().Width > 500)
            {
                label.WidthRequest = 500;
                label.Wrap         = true;
                label.LineWrapMode = Pango.WrapMode.WordChar;
            }
            else
            {
                label.Justify = Gtk.Justification.Center;
            }

            if (label.Layout.GetLine(1) != null)
            {
                label.Justify = Gtk.Justification.Left;
                var line15 = label.Layout.GetLine(15);
                if (line15 != null)
                {
                    label.Text = value.Substring(0, line15.StartIndex).TrimEnd('\r', '\n') + "\n…";
                }
            }

            label.Show();

            return(label);
        }
예제 #45
0
    void InitTreeView()
    {
        string[] Title = { "Id", "Title", "Author", "Press", "ISBN", "Price" };
        IList <TreeViewColumn> Columns = new List <TreeViewColumn>
        {
            new TreeViewColumn {
                Title = "Id", Sizing = TreeViewColumnSizing.Fixed, MinWidth = 80, Alignment = 0.50F
            },
            new TreeViewColumn {
                Title = "Title", Sizing = TreeViewColumnSizing.Fixed, MinWidth = 200, Alignment = 0.50F
            },
            new TreeViewColumn {
                Title = "Author", Sizing = TreeViewColumnSizing.Fixed, MinWidth = 200, Alignment = 0.50F
            },
            new TreeViewColumn {
                Title = "Press", Sizing = TreeViewColumnSizing.Fixed, MinWidth = 200, Alignment = 0.50F
            },
            new TreeViewColumn {
                Title = "ISBN", Sizing = TreeViewColumnSizing.Fixed, MinWidth = 150, Alignment = 0.50F
            },
            new TreeViewColumn {
                Title = "Price", Sizing = TreeViewColumnSizing.Fixed, MinWidth = 15, Alignment = 0.50F
            }
        };

        for (int i = 0; i < Columns.Count; i++)
        {
            var column        = Columns[i];
            var custom_header = new Gtk.Label(Title[i]);
            custom_header.Show();
            column.Widget = custom_header;
            custom_header.ModifyFont(Pango.FontDescription.FromString("Times Bold Italic 13"));

            var CellRender = new CellRendererText
            {
                Xalign     = 0.50F,
                Background = "White",
                Foreground = "Black",
                Font       = "Lucida Console"
            };
            column.PackStart(CellRender, true);
            column.AddAttribute(CellRender, "text", i);
            BooksView.AppendColumn(column);
        }
        BookList.Clear();
        BooksView.Model = BookList;
    }
예제 #46
0
        public TitledList (string title_str) : base (false, 3)
        {
            title = new Label ();
            title.Xalign = 0;
            title.Wrap = true;
            title.Layout.Wrap = Pango.WrapMode.Word;
            title.Ellipsize = Pango.EllipsizeMode.None;
            Title = title_str;

            PackStart (title, false, false, 0);
            title.Show ();

            StyleSet += delegate {
                title.ModifyBg (StateType.Normal, Style.Base (StateType.Normal));
                title.ModifyFg (StateType.Normal, Style.Text (StateType.Normal));
            };
        }
예제 #47
0
 void LoadData()
 {
     if (!string.IsNullOrEmpty(exception.Message))
     {
         messageLabel.Show();
         messageLabel.Text = exception.Message;
         if (messageLabel.SizeRequest().Width > 400)
         {
             messageLabel.WidthRequest = 400;
             messageLabel.Wrap         = true;
         }
     }
     else
     {
         messageLabel.Hide();
     }
 }
예제 #48
0
		public void Append (string tip)
		{
			uint row = table.NRows;

			Gtk.Image image = new Gtk.Image (arrow);
			image.Show ();
			table.Attach (image, 0, 1, row, row + 1, Gtk.AttachOptions.Fill, Gtk.AttachOptions.Fill, 0, 0);

			Gtk.Label label = new Gtk.Label ();
			label.Markup = tip;
			label.LineWrap = true;
			label.Justify = Justification.Fill;
			label.SetAlignment (0.0f, 0.5f);
			label.ModifyFg (Gtk.StateType.Normal, label.Style.Foreground (Gtk.StateType.Insensitive));
			label.Show ();
			table.Attach (label, 1, 2, row, row + 1, Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill, 0, 0, 0);
		}
예제 #49
0
        public void Append(string tip)
        {
            uint row = table.NRows;

            Gtk.Image image = new Gtk.Image(arrow);
            image.Show();
            table.Attach(image, 0, 1, row, row + 1, Gtk.AttachOptions.Fill, Gtk.AttachOptions.Fill, 0, 0);

            Gtk.Label label = new Gtk.Label();
            label.Markup   = tip;
            label.LineWrap = true;
            label.Justify  = Justification.Fill;
            label.SetAlignment(0.0f, 0.5f);
            label.ModifyFg(Gtk.StateType.Normal, label.Style.Foreground(Gtk.StateType.Insensitive));
            label.Show();
            table.Attach(label, 1, 2, row, row + 1, Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill, 0, 0, 0);
        }
예제 #50
0
		Widget CreateExceptionInfoHeader ()
		{
			ExceptionMessageLabel = new Label () { Selectable = true, Wrap = true, WidthRequest = 500, Xalign = 0.0f };
			ExceptionTypeLabel = new Label () { UseMarkup = true, Xalign = 0.0f };

			ExceptionMessageLabel.Show ();
			ExceptionTypeLabel.Show ();

			var frame = new InfoFrame (ExceptionMessageLabel);
			frame.Show ();

			var vbox = new VBox (false, 6);
			vbox.PackStart (ExceptionTypeLabel, false, true, 0);
			vbox.PackStart (frame, true, true, 0);
			vbox.Show ();

			return vbox;
		}
예제 #51
0
파일: main.cs 프로젝트: linuxhubit/bottles
        static void Main(string[] args)
        {
            Application.Init();

            var window = new Gtk.Window("Example");

            var label = new Gtk.Label("Hello, World!");

            window.Add(label);
            label.Show();

            window.DeleteEvent += (win, ev) => {
                Application.Quit();
            };

            window.Present();
            Application.Run();
        }
예제 #52
0
        public PanelButton()
        {
            button        = new PanelButtonWidget(this);
            button.Events = EventMask.AllEventsMask;
            //button.WidthRequest = 100;

            box = new HBox();
            button.Add(box);

            label           = new Gtk.Label();
            label.Ellipsize = Pango.EllipsizeMode.End;
            label.Halign    = Align.Start;
            box.PackEnd(label, true, true, 0);

            button.Show();
            label.Show();
            box.Show();
        }
        public TomboyTaskMenuItem(Task task)
            : base()
        {
            this.task = task;

            summary              = new Label();
            summary.Markup       = task.Summary;
            summary.UseUnderline = false;
            summary.UseMarkup    = true;
            summary.Xalign       = 0;

            summary.Show();
            Add(summary);

            check_button          = new BetterCheckButton();
            check_button.Toggled += OnCheckButtonToggled;
            Image = check_button;
        }
예제 #54
0
        public LinkLabel(string text, Uri uri)
        {
            CanFocus = true;
            AppPaintable = true;

            this.uri = uri;

            label = new Label(text);
            label.Show();

            link_color = label.Style.Background (StateType.Selected);
            hover_color = new Gdk.Color ((byte)(link_color.Red + 50),
                                         (byte)(link_color.Green + 50),
                                         (byte)(link_color.Blue + 50));
            ActAsLink = true;

            Add(label);
        }
예제 #55
0
파일: TrayIcon.cs 프로젝트: GNOME/last-exit
        public TrackInfoPopup()
            : base(Gtk.WindowType.Popup)
        {
            BorderWidth = 8;
            AppPaintable = true;
            /* 			Resizable = true; */

            containerbox = new HBox ();
            containerbox.Spacing = 3;
            cover_image = new MagicCoverImage ();
            containerbox.PackStart (cover_image, false, false, 0);
            cover_image.Visible = true;

            Alignment al = new Alignment ((float) 0.0,
                              (float) 0.5,
                              (float) 1.0,
                              (float) 0.0);
            containerbox.Add (al);

            box = new VBox ();
            box.Spacing = 2;

            artist_album_label = new Label (artist);
            artist_album_label.Show ();
             			//artist_album_label.Ellipsize = Pango.EllipsizeMode.End;
            artist_album_label.Xalign = 0.0f;
            artist_album_label.Yalign = 0.5f;
            artist_album_label.Selectable = false;

            title_label = new Label (title);
            title_label.Show ();
             			//title_label.Ellipsize = Pango.EllipsizeMode.End;
            title_label.Xalign = 0.0f;
            title_label.Yalign = 0.5f;
            title_label.Selectable = false;

            box.PackStart (title_label, false, false, 0);
            box.PackStart (artist_album_label, false, false, 0);
            al.Add (box);
            box.ShowAll ();
            Add (containerbox);
            containerbox.ShowAll ();
            //Name = "gtk-tooltips";
        }
예제 #56
0
	private void SetStatus(string status) {
		if (status == null && label != null) {
			Remove(label);
			label = null;
		} else if (status != null) {
			if (image != null) {
				Remove(image);
				image = null;
			}
			if (label == null) {
				label = new Label();
				label.SetAlignment(0.5f, 0.5f);
				label.Wrap = true;
				label.Show();
				Add(label);
			}
			label.Text = status;
		}
	}
예제 #57
0
	public ProgressPanel (string message, string button, StartWorkDelegate StartWork, FinishWorkDelegate FinishWork)
	{
			Gtk.Label l = new Gtk.Label (message);
			l.UseMarkup = true;
			l.Show ();
			PackStart (l);
			
			pb = new ProgressBar ();
			pb.Show ();
			PackEnd (pb, false, false, 3);

			Button b = new Button (button);
			b.Show ();
			b.Clicked += new EventHandler (OnStartWorking);
			PackEnd (b, false, false, 3);

			this.StartWork = StartWork;
			this.FinishWork = FinishWork;
	}
예제 #58
0
        public TabVBox(ITdiTab tabWidget)
        {
            tab = tabWidget;
            titleLabel = new Label ();
            if(tab is ITdiTabWithPath)
            {
                (tab as ITdiTabWithPath).PathChanged += OnPathUpdated;
                OnPathUpdated (null, EventArgs.Empty);
            }
            else
            {
                tab.TabNameChanged += Tab_TabNameChanged;
                Tab_TabNameChanged (null, null);
            }

            this.PackStart (titleLabel, false, true, 2);
            this.Add ((Widget)tab);
            titleLabel.Show ();
            (tab as Widget).Show ();
        }
예제 #59
0
        public ProgressPanel(string message, string button, StartWorkDelegate StartWork, FinishWorkDelegate FinishWork)
        {
            Gtk.Label l = new Gtk.Label(message);
            l.UseMarkup = true;
            l.Show();
            PackStart(l);

            pb = new ProgressBar();
            pb.Show();
            PackEnd(pb, false, false, 3);

            Button b = new Button(button);

            b.Show();
            b.Clicked += new EventHandler(OnStartWorking);
            PackEnd(b, false, false, 3);

            this.StartWork  = StartWork;
            this.FinishWork = FinishWork;
        }
예제 #60
0
        public RatingMenuItem () : base ()
        {
            box = new HBox ();
            box.Spacing = 5;

            Label label = new Label ();
            label.Markup = String.Format ("<i>{0}</i>",
                GLib.Markup.EscapeText (Catalog.GetString ("Rating:")));
            box.PackStart (label, false, false, 0);
            label.Show ();

            entry = new RatingEntry ();
            entry.HasFrame = false;
            entry.PreviewOnHover = true;
            entry.AlwaysShowEmptyStars = true;
            entry.Changed += OnEntryChanged;
            box.PackStart (entry, false, false, 0);

            box.ShowAll ();
            Add (box);
        }