public PreviewPopup(IconView view) : base(Gtk.WindowType.Toplevel) { Gtk.VBox vbox = new Gtk.VBox(); this.Add(vbox); this.AddEvents((int)(Gdk.EventMask.PointerMotionMask | Gdk.EventMask.KeyReleaseMask | Gdk.EventMask.ButtonPressMask)); this.Decorated = false; this.SkipTaskbarHint = true; this.SkipPagerHint = true; this.SetPosition(Gtk.WindowPosition.None); this.KeyReleaseEvent += HandleKeyRelease; this.ButtonPressEvent += HandleButtonPress; this.Destroyed += HandleDestroyed; this.view = view; view.MotionNotifyEvent += HandleIconViewMotion; view.KeyPressEvent += HandleIconViewKeyPress; view.KeyReleaseEvent += HandleKeyRelease; view.DestroyEvent += HandleIconViewDestroy; this.BorderWidth = 6; hist = new FSpot.Histogram(); hist.Color [0] = 127; hist.Color [1] = 127; hist.Color [2] = 127; hist.Color [3] = 0xff; image = new Gtk.Image(); image.CanFocus = false; label = new Gtk.Label(String.Empty); label.CanFocus = false; label.ModifyFg(Gtk.StateType.Normal, new Gdk.Color(127, 127, 127)); label.ModifyBg(Gtk.StateType.Normal, new Gdk.Color(0, 0, 0)); this.ModifyFg(Gtk.StateType.Normal, new Gdk.Color(127, 127, 127)); this.ModifyBg(Gtk.StateType.Normal, new Gdk.Color(0, 0, 0)); vbox.PackStart(image, true, true, 0); vbox.PackStart(label, true, false, 0); vbox.ShowAll(); }
public PreviewPopup(IconView view) : base(Gtk.WindowType.Toplevel) { Gtk.VBox vbox = new Gtk.VBox (); this.Add (vbox); this.AddEvents ((int) (Gdk.EventMask.PointerMotionMask | Gdk.EventMask.KeyReleaseMask | Gdk.EventMask.ButtonPressMask)); this.Decorated = false; this.SkipTaskbarHint = true; this.SkipPagerHint = true; this.SetPosition (Gtk.WindowPosition.None); this.KeyReleaseEvent += HandleKeyRelease; this.ButtonPressEvent += HandleButtonPress; this.Destroyed += HandleDestroyed; this.view = view; view.MotionNotifyEvent += HandleIconViewMotion; view.KeyPressEvent += HandleIconViewKeyPress; view.KeyReleaseEvent += HandleKeyRelease; view.DestroyEvent += HandleIconViewDestroy; this.BorderWidth = 6; hist = new FSpot.Histogram (); hist.RedColorHint = 127; hist.GreenColorHint = 127; hist.BlueColorHint = 127; hist.BackgroundColorHint = 0xff; image = new Gtk.Image (); image.CanFocus = false; label = new Gtk.Label (String.Empty); label.CanFocus = false; label.ModifyFg (Gtk.StateType.Normal, new Gdk.Color (127, 127, 127)); label.ModifyBg (Gtk.StateType.Normal, new Gdk.Color (0, 0, 0)); this.ModifyFg (Gtk.StateType.Normal, new Gdk.Color (127, 127, 127)); this.ModifyBg (Gtk.StateType.Normal, new Gdk.Color (0, 0, 0)); vbox.PackStart (image, true, true, 0); vbox.PackStart (label, true, false, 0); vbox.ShowAll (); }
private void AttachInterface() { view.PhotoChanged += HandlePhotoChanged; hist = new FSpot.Histogram(); #if USE_THREAD expose_timeout = new FSpot.Delay(new GLib.IdleHandler(this.QueueDraw)); #endif this.Dialog.Destroyed += HandleDestroyed; #if true Gdk.Color c = this.Dialog.Style.Backgrounds [(int)Gtk.StateType.Active]; hist.Color [0] = (byte)(c.Red / 0xff); hist.Color [1] = (byte)(c.Green / 0xff); hist.Color [2] = (byte)(c.Blue / 0xff); hist.Color [3] = 0xff; #endif histogram_image.Pixbuf = hist.GeneratePixbuf(); exposure_spinbutton.Adjustment = exposure_scale.Adjustment; temp_spinbutton.Adjustment = temp_scale.Adjustment; temptint_spinbutton.Adjustment = temptint_scale.Adjustment; brightness_spinbutton.Adjustment = brightness_scale.Adjustment; contrast_spinbutton.Adjustment = contrast_scale.Adjustment; hue_spinbutton.Adjustment = hue_scale.Adjustment; sat_spinbutton.Adjustment = sat_scale.Adjustment; temp_spinbutton.Adjustment.ChangeValue(); temptint_spinbutton.Adjustment.ChangeValue(); brightness_spinbutton.Adjustment.ChangeValue(); contrast_spinbutton.Adjustment.ChangeValue(); hue_spinbutton.Adjustment.ChangeValue(); sat_spinbutton.Adjustment.ChangeValue(); hue_spinbutton.Adjustment.ChangeValue(); sat_spinbutton.Adjustment.ChangeValue(); exposure_scale.ValueChanged += RangeChanged; temp_scale.ValueChanged += RangeChanged; temptint_scale.ValueChanged += RangeChanged; brightness_scale.ValueChanged += RangeChanged; contrast_scale.ValueChanged += RangeChanged; hue_scale.ValueChanged += RangeChanged; sat_scale.ValueChanged += RangeChanged; HandlePhotoChanged(view); }
private void AttachInterface () { view.PhotoChanged += HandlePhotoChanged; hist = new FSpot.Histogram (); #if USE_THREAD expose_timeout = new FSpot.Delay (new GLib.IdleHandler (this.QueueDraw)); #endif this.Dialog.Destroyed += HandleDestroyed; #if true Gdk.Color c = this.Dialog.Style.Backgrounds [(int)Gtk.StateType.Active]; hist.Color [0] = (byte) (c.Red / 0xff); hist.Color [1] = (byte) (c.Green / 0xff); hist.Color [2] = (byte) (c.Blue / 0xff); hist.Color [3] = 0xff; #endif histogram_image.Pixbuf = hist.GeneratePixbuf (); exposure_spinbutton.Adjustment = exposure_scale.Adjustment; temp_spinbutton.Adjustment = temp_scale.Adjustment; temptint_spinbutton.Adjustment = temptint_scale.Adjustment; brightness_spinbutton.Adjustment = brightness_scale.Adjustment; contrast_spinbutton.Adjustment = contrast_scale.Adjustment; hue_spinbutton.Adjustment = hue_scale.Adjustment; sat_spinbutton.Adjustment = sat_scale.Adjustment; temp_spinbutton.Adjustment.ChangeValue (); temptint_spinbutton.Adjustment.ChangeValue (); brightness_spinbutton.Adjustment.ChangeValue (); contrast_spinbutton.Adjustment.ChangeValue (); hue_spinbutton.Adjustment.ChangeValue (); sat_spinbutton.Adjustment.ChangeValue (); hue_spinbutton.Adjustment.ChangeValue (); sat_spinbutton.Adjustment.ChangeValue (); exposure_scale.ValueChanged += RangeChanged; temp_scale.ValueChanged += RangeChanged; temptint_scale.ValueChanged += RangeChanged; brightness_scale.ValueChanged += RangeChanged; contrast_scale.ValueChanged += RangeChanged; hue_scale.ValueChanged += RangeChanged; sat_scale.ValueChanged += RangeChanged; HandlePhotoChanged (view); }