public FontChooserDialog(int x, int y, int width, FontEventHandler onFontChange, Dictionary <String, Font> FontStore, HFontPicker father) : base(Gtk.WindowType.Popup)
        {
            this.father       = father;
            this.FontStore    = FontStore;
            this.OnFontChange = onFontChange;
            this.Move(x, y);
            this.Resize(width, 200);


            this.Build();

            //grab dialog
            GrabUtil.GrabWindow(this);
            instance = this;
            TvFonts.GrabFocus();

            while (Gtk.Application.EventsPending())
            {
                Gtk.Application.RunIteration();
            }

            Thread t = new Thread(new ThreadStart(AddFontsToList));

            t.Start();
        }
Esempio n. 2
0
        public void ShowPopup()
        {
            int x, y;

            this.ParentWindow.GetPosition(out x, out y);
            x += this.Allocation.Left;
            y += this.Allocation.Top + this.Allocation.Height;

            FontChooserDialog.ShowMe(x, y, Allocation.Width, on_font_change, FontStore, comboBox.Entry.Text, this);
        }
        public FontChooserDialog( int x, int y, int width, FontEventHandler onFontChange, Dictionary<String, Font> FontStore, HFontPicker father )
            : base(Gtk.WindowType.Popup)
        {
            this.father       = father;
            this.FontStore    = FontStore;
            this.OnFontChange = onFontChange;
            this.Move( x, y );
            this.Resize(width, 200);

            this.Build();

            //grab dialog
            GrabUtil.GrabWindow(this);
            instance = this;
            TvFonts.GrabFocus();

            while( Gtk.Application.EventsPending() )
                Gtk.Application.RunIteration();

            Thread t = new Thread( new ThreadStart( AddFontsToList ) );
            t.Start();
        }