2003-02-12 02:00:12 +00:00
<Type Name= "Viewport" FullName= "Gtk.Viewport" >
2005-05-23 20:41:51 +00:00
<TypeSignature Language= "C#" Maintainer= "Lee Mallabone" Value= "public class Viewport : Gtk.Bin" />
2003-02-12 02:00:12 +00:00
<AssemblyInfo >
<AssemblyName > gtk-sharp</AssemblyName>
2003-12-24 01:35:30 +00:00
<AssemblyPublicKey >
</AssemblyPublicKey>
2006-08-04 19:43:19 +00:00
<AssemblyVersion > 2.10.0.0</AssemblyVersion>
2003-02-12 02:00:12 +00:00
</AssemblyInfo>
2003-02-23 07:26:30 +00:00
<ThreadSafetyStatement > Gtk# is thread aware, but not thread safe; See the <link location= "node:gtk-sharp/programming/threads" > Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
2003-02-12 02:00:12 +00:00
<Docs >
2003-03-27 21:19:43 +00:00
<summary > A <see cref= "T:Gtk.Container" /> that allows a scrollable view of its child when added to a <see cref= "T:Gtk.ScrolledWindow" /> .</summary>
<remarks >
<para > To scroll correctly, a <see cref= "T:Gtk.ScrolledWindow" /> ordinarily requires explicit support from the <see cref= "T:Gtk.Widget" /> that will be scrolled. However, a Viewport adds scrolling capabilities to an arbitrary child widget. For example, you can add a collection of widgets to a <see cref= "T:Gtk.Table" /> container. By simply placing the <see cref= "T:Gtk.Table" /> in a Viewport, you need only add the Viewport to a <see cref= "T:Gtk.ScrolledWindow" /> to visually scroll the contents of your Table.</para>
<para > The "model" of this widget consists of horizontal and vertical <see cref= "T:Gtk.Adjustment" /> objects. These do not need to be explicitly set to use the Viewport. Packing a child widget as demonstrated in the example, below, is all that is required.</para>
<para > The appearance of the Viewport can be adjusted using the <see cref= "P:Gtk.Viewport.ShadowType" /> property.</para>
2003-04-02 08:30:07 +00:00
<para > The following example creates a <see cref= "T:Gtk.Table" /> in a Viewport. When placed in a small <see cref= "T:Gtk.Window" /> , the widgets can be scrolled.
2004-06-19 18:25:02 +00:00
</para>
2003-05-08 20:26:02 +00:00
<example >
2004-06-19 18:25:02 +00:00
<code lang= "C#" >
namespace GtkSamples {
using Gtk;
using System;
public class ViewportApp {
public static ScrolledWindow CreateViewport()
{
ScrolledWindow scroller = new ScrolledWindow();
Viewport viewer = new Viewport();
Table widgets = new Table(1, 2, false);
widgets.Attach(new Entry("This is example Entry 1"), 0, 1, 0, 1);
widgets.Attach(new Entry("This is example Entry 2"), 1, 2, 0, 1);
// Place the widgets in a Viewport, and the Viewport in a ScrolledWindow
viewer.Add(widgets);
scroller.Add(viewer);
return scroller;
}
public static int Main (string[] args)
{
Application.Init ();
Window win = new Window ("Viewport Tester");
win.SetDefaultSize (180, 50);
win.DeleteEvent += new DeleteEventHandler (Window_Delete);
ScrolledWindow scroller = CreateViewport();
win.Add (scroller);
win.ShowAll ();
Application.Run ();
return 0;
}
static void Window_Delete (object obj, DeleteEventArgs args)
{
Application.Quit ();
args.RetVal = true;
}
}
2003-04-02 08:30:07 +00:00
}
2004-06-19 18:25:02 +00:00
</code>
</example>
2003-03-27 21:19:43 +00:00
</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
<Base >
<BaseTypeName > Gtk.Bin</BaseTypeName>
</Base>
2006-08-04 23:48:02 +00:00
<Interfaces > </Interfaces>
2003-02-12 02:00:12 +00:00
<Members >
<Member MemberName= ".ctor" >
<MemberSignature Language= "C#" Value= "public Viewport (IntPtr raw);" />
<MemberType > Constructor</MemberType>
<ReturnValue />
<Parameters >
2003-09-17 21:56:59 +00:00
<Parameter Name= "raw" Type= "System.IntPtr" />
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2003-02-23 07:26:30 +00:00
<summary > Internal constructor</summary>
<param name= "raw" > Pointer to the C object.</param>
<remarks >
<para > This is an internal constructor, and should not be used by user code.</para>
</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= ".ctor" >
<MemberSignature Language= "C#" Value= "public Viewport (Gtk.Adjustment hadjustment, Gtk.Adjustment vadjustment);" />
<MemberType > Constructor</MemberType>
<ReturnValue />
<Parameters >
2003-09-17 21:56:59 +00:00
<Parameter Name= "hadjustment" Type= "Gtk.Adjustment" />
<Parameter Name= "vadjustment" Type= "Gtk.Adjustment" />
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2003-03-27 21:19:43 +00:00
<summary > Creates a new Viewport with the specified horizontal and vertical Adjustments.</summary>
<param name= "hadjustment" > An <see cref= "T:Gtk.Adjustment" /> to model horizontal viewing.</param>
<param name= "vadjustment" > An <see cref= "T:Gtk.Adjustment" /> to model vertical viewing.</param>
<remarks />
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "Hadjustment" >
<MemberSignature Language= "C#" Value= "public Gtk.Adjustment Hadjustment { set; get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > Gtk.Adjustment</ReturnType>
</ReturnValue>
2003-12-24 01:35:30 +00:00
<Parameters >
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2003-03-27 21:19:43 +00:00
<summary > Manage the horizontal model.</summary>
2005-05-23 20:41:51 +00:00
<value > The current state of the horizontal model</value>
2003-03-27 21:19:43 +00:00
<remarks />
2003-02-12 02:00:12 +00:00
</Docs>
2005-08-23 17:02:47 +00:00
<Attributes >
2005-05-23 20:41:51 +00:00
<Attribute >
<AttributeName > GLib.Property(Name="hadjustment")</AttributeName>
</Attribute>
2005-08-23 17:02:47 +00:00
</Attributes>
</Member>
2003-02-12 02:00:12 +00:00
<Member MemberName= "Vadjustment" >
<MemberSignature Language= "C#" Value= "public Gtk.Adjustment Vadjustment { set; get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > Gtk.Adjustment</ReturnType>
</ReturnValue>
2003-12-24 01:35:30 +00:00
<Parameters >
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2003-03-27 21:19:43 +00:00
<summary > Manage the vertical model.</summary>
2005-05-23 20:41:51 +00:00
<value > The current state of the vertical model.</value>
2003-03-27 21:19:43 +00:00
<remarks />
2003-02-12 02:00:12 +00:00
</Docs>
2005-08-23 17:02:47 +00:00
<Attributes >
2005-05-23 20:41:51 +00:00
<Attribute >
<AttributeName > GLib.Property(Name="vadjustment")</AttributeName>
</Attribute>
2005-08-23 17:02:47 +00:00
</Attributes>
</Member>
2003-02-12 02:00:12 +00:00
<Member MemberName= "ShadowType" >
<MemberSignature Language= "C#" Value= "public Gtk.ShadowType ShadowType { set; get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > Gtk.ShadowType</ReturnType>
</ReturnValue>
2003-12-24 01:35:30 +00:00
<Parameters >
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2003-03-27 21:19:43 +00:00
<summary > Manage the shadow style surrounding the Viewport contents.</summary>
2005-05-23 20:41:51 +00:00
<value > The current shadow style surrounding the child widget.</value>
2003-03-27 21:19:43 +00:00
<remarks />
2003-02-12 02:00:12 +00:00
</Docs>
2005-08-23 17:02:47 +00:00
<Attributes >
2005-05-23 20:41:51 +00:00
<Attribute >
2005-12-09 23:12:49 +00:00
<AttributeName > GLib.Property(Name="shadow-type")</AttributeName>
2005-05-23 20:41:51 +00:00
</Attribute>
2005-08-23 17:02:47 +00:00
</Attributes>
</Member>
2003-02-12 02:00:12 +00:00
<Member MemberName= "ScrollAdjustmentsSet" >
2004-02-25 23:39:06 +00:00
<MemberSignature Language= "C#" Value= "public event Gtk.ScrollAdjustmentsSetHandler ScrollAdjustmentsSet;" />
2003-02-12 02:00:12 +00:00
<MemberType > Event</MemberType>
2003-09-17 21:56:59 +00:00
<ReturnValue >
2004-02-25 23:39:06 +00:00
<ReturnType > Gtk.ScrollAdjustmentsSetHandler</ReturnType>
2003-09-17 21:56:59 +00:00
</ReturnValue>
2003-02-12 02:00:12 +00:00
<Parameters />
<Docs >
2005-09-19 00:36:43 +00:00
<summary > This event is raised when the <see cref= "P:Gtk.Viewport.VAdjustment" /> or <see cref= "P:Gtk.Viewport.HAdjustment" /> properties are set.</summary>
2003-03-27 21:19:43 +00:00
<remarks />
2003-02-12 02:00:12 +00:00
</Docs>
2005-08-23 17:02:47 +00:00
<Attributes >
2005-05-23 20:41:51 +00:00
<Attribute >
<AttributeName > GLib.Signal(CName="set_scroll_adjustments")</AttributeName>
</Attribute>
2005-08-23 17:02:47 +00:00
</Attributes>
</Member>
2003-03-07 01:30:00 +00:00
<Member MemberName= ".ctor" >
2003-12-24 01:35:30 +00:00
<MemberSignature Language= "C#" Value= "public Viewport ();" />
2003-03-07 01:30:00 +00:00
<MemberType > Constructor</MemberType>
<ReturnValue />
2003-12-24 01:35:30 +00:00
<Parameters />
2003-03-07 01:30:00 +00:00
<Docs >
2003-12-24 01:35:30 +00:00
<summary > The main way to create a Viewport.</summary>
2003-03-07 01:30:00 +00:00
<remarks >
2003-12-24 01:35:30 +00:00
<para > Horizontal and vertical <see cref= "T:Gtk.Adjustment" /> objects are automatically created.</para>
2003-03-07 01:30:00 +00:00
</remarks>
</Docs>
</Member>
2003-12-24 01:35:30 +00:00
<Member MemberName= "GType" >
<MemberSignature Language= "C#" Value= "public static GLib.GType GType { get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > GLib.GType</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
2004-06-21 20:14:42 +00:00
<summary > GType Property.</summary>
2005-05-23 20:41:51 +00:00
<value > a <see cref= "T:GLib.GType" /> </value>
2004-06-21 20:14:42 +00:00
<remarks > Returns the native <see cref= "T:GLib.GType" /> value for <see cref= "T:Gtk.Viewport" /> .</remarks>
2003-12-24 01:35:30 +00:00
</Docs>
</Member>
<Member MemberName= "OnScrollAdjustmentsSet" >
<MemberSignature Language= "C#" Value= "protected virtual void OnScrollAdjustmentsSet (Gtk.Adjustment hadjustment, Gtk.Adjustment vadjustment);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "hadjustment" Type= "Gtk.Adjustment" />
<Parameter Name= "vadjustment" Type= "Gtk.Adjustment" />
</Parameters>
<Docs >
2004-06-15 15:41:25 +00:00
<summary > Default handler for the <see cref= "M:Gtk.Viewport.ScrollAdjustmentsSet" /> event.</summary>
2003-12-24 01:35:30 +00:00
<param name= "hadjustment" > a <see cref= "T:Gtk.Adjustment" /> </param>
<param name= "vadjustment" > a <see cref= "T:Gtk.Adjustment" /> </param>
2004-06-15 15:41:25 +00:00
<remarks > Override this method in a subclass to provide a default handler for the <see cref= "M:Gtk.Viewport.ScrollAdjustmentsSet" /> event.</remarks>
2003-12-24 01:35:30 +00:00
</Docs>
</Member>
2003-03-27 21:19:43 +00:00
<Member MemberName= ".ctor" >
2003-12-24 01:35:30 +00:00
<MemberSignature Language= "C#" Value= "protected Viewport (GLib.GType gtype);" />
2003-03-27 21:19:43 +00:00
<MemberType > Constructor</MemberType>
<ReturnValue />
2003-12-24 01:35:30 +00:00
<Parameters >
<Parameter Name= "gtype" Type= "GLib.GType" />
</Parameters>
2003-03-27 21:19:43 +00:00
<Docs >
2004-06-21 20:33:11 +00:00
<summary > Protected Constructor.</summary>
2003-12-24 01:35:30 +00:00
<param name= "gtype" > a <see cref= "T:GLib.GType" /> </param>
2004-06-21 20:33:11 +00:00
<remarks > Chain to this constructor if you have manually registered a native <see cref= "T:GLib.GType" /> value for your subclass.</remarks>
2003-03-27 21:19:43 +00:00
</Docs>
2005-08-23 17:02:47 +00:00
<Attributes >
2005-05-23 20:41:51 +00:00
<Attribute >
<AttributeName > System.Obsolete(Message=null, IsError=False)</AttributeName>
</Attribute>
2005-08-23 17:02:47 +00:00
</Attributes>
</Member>
2003-02-12 02:00:12 +00:00
</Members>
2005-05-23 20:41:51 +00:00
</Type>