Exemplo n.º 1
0
        public override void Render(Gdk.Drawable window, Gdk.Rectangle bounds, Gtk.StateType state)
        {
            Gtk.ShadowType sh = (bool)Value ? Gtk.ShadowType.In : Gtk.ShadowType.Out;
            int            s  = indicatorSize - 1;

            if (s > bounds.Height)
            {
                s = bounds.Height;
            }
            if (s > bounds.Width)
            {
                s = bounds.Width;
            }
            Gtk.Style.PaintCheck(Container.Style, window, state, sh, bounds, Container, "checkbutton", bounds.X + indicatorSpacing - 1, bounds.Y + (bounds.Height - s) / 2, s, s);
        }
Exemplo n.º 2
0
 public Arrow(Gtk.ArrowType arrow_type, Gtk.ShadowType shadow_type) : base(IntPtr.Zero)
 {
     if (GetType() != typeof(Arrow))
     {
         var vals  = new List <GLib.Value> ();
         var names = new List <string> ();
         names.Add("arrow_type");
         vals.Add(new GLib.Value(arrow_type));
         names.Add("shadow_type");
         vals.Add(new GLib.Value(shadow_type));
         CreateNativeObject(names.ToArray(), vals.ToArray());
         return;
     }
     Raw = gtk_arrow_new((int)arrow_type, (int)shadow_type);
 }
Exemplo n.º 3
0
        protected override bool OnExposeEvent(Gdk.EventExpose ev)
        {
            Gdk.Rectangle rect = Allocation;
            rect.X = rect.Y = 0;

            Gtk.ShadowType sh = active ? Gtk.ShadowType.In : Gtk.ShadowType.Out;
            if (isRadio)
            {
                Gtk.Style.PaintOption(this.Style, this.GdkWindow, this.State, sh, rect, this, "", rect.X, rect.Y, rect.Width, rect.Height);
            }
            else
            {
                Gtk.Style.PaintCheck(this.Style, this.GdkWindow, this.State, sh, rect, this, "", rect.X, rect.Y, rect.Width, rect.Height);
            }
            return(true);
        }