2003-02-12 02:00:12 +00:00
<Type Name= "Viewport" FullName= "Gtk.Viewport" >
2003-03-27 21:19:43 +00:00
<TypeSignature Language= "C#" Value= "public class Viewport : Gtk.Bin, Implementor, IWrapper, IWrapper, IDisposable" Maintainer= "Lee Mallabone" />
2003-02-12 02:00:12 +00:00
<AssemblyInfo >
<AssemblyName > gtk-sharp</AssemblyName>
<AssemblyVersion > 0.0.0.0</AssemblyVersion>
<Attributes />
</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.
2003-05-08 20:26:02 +00:00
<example >
<code lang= "C#" >
2003-04-02 08:30:07 +00:00
public ScrolledWindow CreateViewport()
{
ScrolledWindow scroller = new ScrolledWindow();
Viewport viewer = new Viewport();
// Create a table with text entries in it
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;
}
2003-05-08 20:26:02 +00:00
</code>
</example> </para>
<para > Complete example: <code lang= "C#" source= "Viewport1.cs" /> </para>
2003-03-27 21:19:43 +00:00
</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
<Base >
<BaseTypeName > Gtk.Bin</BaseTypeName>
</Base>
<Interfaces >
<Interface >
<InterfaceName > Atk.Implementor</InterfaceName>
</Interface>
<Interface >
<InterfaceName > GLib.IWrapper</InterfaceName>
</Interface>
<Interface >
<InterfaceName > GLib.IWrapper</InterfaceName>
</Interface>
<Interface >
<InterfaceName > System.IDisposable</InterfaceName>
</Interface>
</Interfaces>
<Attributes />
<Members >
<Member MemberName= "Finalize" >
<MemberSignature Language= "C#" Value= "protected virtual void Finalize ();" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
2003-02-23 07:26:30 +00:00
<summary > Disposes the resources associated with the object.</summary>
<remarks />
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<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>
<returns > An instance of Viewport, wrapping the C object.</returns>
<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>
<returns > A new Viewport</returns>
<remarks />
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "GType" >
<MemberSignature Language= "C#" Value= "public static uint GType { get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > System.UInt32</ReturnType>
</ReturnValue>
<Docs >
2003-02-23 07:26:30 +00:00
<summary > The GLib Type for Gtk.Viewport</summary>
2003-03-07 01:30:00 +00:00
<returns > The GLib Type for the Gtk.Viewport class.</returns>
2003-02-23 07:26:30 +00:00
<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-09-17 21:56:59 +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>
<param name= "value" > A new <see cref= "T:Gtk.Adjustment" /> for horizontal scrolling.</param>
<returns > The current state of the horizontal model</returns>
<remarks />
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "Vadjustment" >
<MemberSignature Language= "C#" Value= "public Gtk.Adjustment Vadjustment { set; get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > Gtk.Adjustment</ReturnType>
</ReturnValue>
2003-09-17 21:56:59 +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>
<param name= "value" > A new <see cref= "T:Gtk.Adjustment" /> for vertical scrolling.</param>
<returns > The current state of the vertical model.</returns>
<remarks />
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "ShadowType" >
<MemberSignature Language= "C#" Value= "public Gtk.ShadowType ShadowType { set; get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > Gtk.ShadowType</ReturnType>
</ReturnValue>
2003-09-17 21:56:59 +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>
<param name= "value" > A new shadow style.</param>
<returns > The current shadow style surrounding the child widget.</returns>
<remarks />
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "ScrollAdjustmentsSet" >
<MemberSignature Language= "C#" Value= "public event GtkSharp.ScrollAdjustmentsSetHandler ScrollAdjustmentsSet;" />
<MemberType > Event</MemberType>
2003-09-17 21:56:59 +00:00
<ReturnValue >
<ReturnType > GtkSharp.ScrollAdjustmentsSetHandler</ReturnType>
</ReturnValue>
2003-02-12 02:00:12 +00:00
<Parameters />
<Docs >
2003-03-27 21:19:43 +00:00
<summary > This event is fired when the <see cref= "P:Gtk.Viewport.VAdjustment" /> or <see cref= "P:Gtk.Viewport.HAdjustment" /> properties are set.</summary>
<remarks />
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
2003-03-07 01:30:00 +00:00
<Member MemberName= ".ctor" >
<MemberSignature Language= "C#" Value= "protected Viewport (GLib.Type gtype);" />
<MemberType > Constructor</MemberType>
<ReturnValue />
<Parameters >
2003-09-17 21:56:59 +00:00
<Parameter Name= "gtype" Type= "GLib.Type" />
</Parameters>
2003-03-07 01:30:00 +00:00
<Docs >
<summary > Internal constructor</summary>
<param name= "gtype" > GLib type for the type</param>
<returns > Creates a new instance of Viewport, using the GLib-provided type</returns>
<remarks >
<para > This is a constructor used by derivative types of <see cref= "T:Gtk.Viewport" /> that would have their own GLib type assigned to it. This is not typically used by C# code.</para>
</remarks>
</Docs>
</Member>
2003-03-27 21:19:43 +00:00
<Member MemberName= ".ctor" >
<MemberSignature Language= "C#" Value= "public Viewport ();" />
<MemberType > Constructor</MemberType>
<ReturnValue />
<Parameters />
<Docs >
<summary > The main way to create a Viewport.</summary>
<returns > A new Viewport.</returns>
2003-05-08 20:26:02 +00:00
<remarks >
<para > Horizontal and vertical <see cref= "T:Gtk.Adjustment" /> objects are automatically created.</para>
</remarks>
2003-03-27 21:19:43 +00:00
</Docs>
</Member>
2003-02-12 02:00:12 +00:00
</Members>
2003-09-17 21:56:59 +00:00
</Type>