示例#1
0
        public void GetPolicy(out Gtk.PolicyType hscrollbar_policy, out Gtk.PolicyType vscrollbar_policy)
        {
            int native_hscrollbar_policy;
            int native_vscrollbar_policy;

            gtk_scrolled_window_get_policy(Handle, out native_hscrollbar_policy, out native_vscrollbar_policy);
            hscrollbar_policy = (Gtk.PolicyType)native_hscrollbar_policy;
            vscrollbar_policy = (Gtk.PolicyType)native_vscrollbar_policy;
        }
示例#2
0
 public override void Wrap(object obj, bool initialized)
 {
     base.Wrap (obj, initialized);
     if (!initialized) {
         if (scrolled.Child == null && AllowPlaceholders)
             AddPlaceholder ();
         HscrollbarPolicy = VscrollbarPolicy = Gtk.PolicyType.Automatic;
         scrolled.ShadowType = Gtk.ShadowType.In;
     }
     scrolled.SetPolicy (Gtk.PolicyType.Always, Gtk.PolicyType.Always);
 }
示例#3
0
 public static void SetOverlayScrollbarPolicy(Gtk.ScrolledWindow sw, Gtk.PolicyType hpolicy, Gtk.PolicyType vpolicy)
 {
     if (!canSetOverlayScrollbarPolicy)
     {
         return;
     }
     try {
         gtk_scrolled_window_set_overlay_policy(sw.Handle, hpolicy, vpolicy);
         return;
     } catch (DllNotFoundException) {
     } catch (EntryPointNotFoundException) {
     }
 }
示例#4
0
        public static ScrollPolicy ConvertScrollPolicy(Gtk.PolicyType p)
        {
            switch (p)
            {
            case Gtk.PolicyType.Always:
                return(ScrollPolicy.Always);

            case Gtk.PolicyType.Automatic:
                return(ScrollPolicy.Automatic);

            case Gtk.PolicyType.Never:
                return(ScrollPolicy.Never);
            }
            throw new InvalidOperationException("Invalid policy value:" + p);
        }
示例#5
0
 public static void GetOverlayScrollbarPolicy(Gtk.ScrolledWindow sw, out Gtk.PolicyType hpolicy, out Gtk.PolicyType vpolicy)
 {
     if (!canSetOverlayScrollbarPolicy)
     {
         hpolicy = vpolicy = 0;
         return;
     }
     try {
         gtk_scrolled_window_get_overlay_policy(sw.Handle, out hpolicy, out vpolicy);
         return;
     } catch (DllNotFoundException) {
     } catch (EntryPointNotFoundException) {
     }
     hpolicy = vpolicy = 0;
     canSetOverlayScrollbarPolicy = false;
 }
示例#6
0
 public void SetPolicy(Gtk.PolicyType hscrollbar_policy, Gtk.PolicyType vscrollbar_policy)
 {
     gtk_scrolled_window_set_policy(Handle, (int)hscrollbar_policy, (int)vscrollbar_policy);
 }
示例#7
0
 static extern void gtk_scrolled_window_get_overlay_policy(IntPtr sw, out Gtk.PolicyType hpolicy, out Gtk.PolicyType vpolicy);