2003-02-12 02:00:12 +00:00
<Type Name= "MessageDialog" FullName= "Gtk.MessageDialog" >
2005-05-23 20:41:51 +00:00
<TypeSignature Language= "C#" Maintainer= "John Luke" Value= "public class MessageDialog : Gtk.Dialog" />
2011-11-09 16:01:51 +00:00
<TypeSignature Language= "ILAsm" Value= ".class public auto ansi beforefieldinit MessageDialog extends Gtk.Dialog" />
2003-02-12 02:00:12 +00:00
<AssemblyInfo >
<AssemblyName > gtk-sharp</AssemblyName>
2003-12-24 01:35:30 +00:00
<AssemblyPublicKey >
</AssemblyPublicKey>
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>
2011-11-09 16:01:51 +00:00
<Base >
<BaseTypeName > Gtk.Dialog</BaseTypeName>
</Base>
<Interfaces >
</Interfaces>
2003-02-12 02:00:12 +00:00
<Docs >
2003-05-31 01:14:01 +00:00
<summary > Convenient message window</summary>
<remarks >
2003-07-17 06:38:40 +00:00
<para >
2003-08-01 19:45:19 +00:00
<see cref= "T:Gtk.MessageDialog" /> presents a <see cref= "T:Gtk.Dialog" /> with an image representing the
<see cref= "T:Gtk.MessageType" /> (Error, Question, etc.) alongside some message text.
2003-08-01 22:01:27 +00:00
It is available as a convenience. You could construct the equivalent of
2003-08-01 19:45:19 +00:00
<see cref= "T:Gtk.MessageDialog" /> from <see cref= "T:Gtk.Dialog" /> without too much effort, but
<see cref= "T:Gtk.MessageDialog" /> saves typing.
</para>
2003-07-17 06:38:40 +00:00
<para >
2003-08-01 22:01:27 +00:00
The <see cref= "T:Gtk.MessageDialog" /> is displayed using <see cref= "M:Gtk.Dialog.Run()" /> , which
automatically makes the <see cref= "T:Gtk.MessageDialog" /> modal and waits for the user to respond to it.
2003-08-01 19:45:19 +00:00
<see cref= "M:Gtk.Dialog.Run()" /> returns when any <see cref= "T:Gtk.Button" />
2003-08-01 22:01:27 +00:00
in the <see cref= "T:Gtk.Dialog" /> is clicked or the <see cref= "T:Gtk.MessageDialog" /> is closed.
2003-08-01 19:45:19 +00:00
</para>
<para >
2004-06-19 15:23:28 +00:00
After <see cref= "M:Gtk.Dialog.Run()" /> returns, you are responsible for hiding (using <see cref= "M:Gtk.Widget.Hide()" /> ) or destroying (using <see cref= "M:Gtk.Widget.Destroy()" /> ) the dialog if you wish to do so.</para>
<para >
A simple message dialog
2007-01-16 16:18:05 +00:00
<example > <code lang= "C#" >
2003-08-01 19:45:19 +00:00
MessageDialog md = new MessageDialog (parent_window,
DialogFlags.DestroyWithParent,
MessageType.Error,
ButtonsType.Close, "Error loading file");
2003-05-31 01:14:01 +00:00
2003-08-01 19:45:19 +00:00
int result = md.Run ();
2004-06-19 15:23:28 +00:00
md.Destroy();
2007-01-16 16:18:05 +00:00
</code> </example> </para>
2004-06-19 15:23:28 +00:00
<para >
A yes/no message dialog
2007-01-16 16:18:05 +00:00
<example > <code lang= "C#" >
2004-06-19 15:23:28 +00:00
MessageDialog md = new MessageDialog (parent_window,
DialogFlags.DestroyWithParent,
MessageType.Question,
ButtonsType.YesNo, "Are you sure you want to quit?");
ResponseType result = (ResponseType)md.Run ();
if (result == ResponseType.Yes)
Application.Quit();
else
md.Destroy();
2007-01-16 16:18:05 +00:00
</code> </example> </para>
2003-08-01 19:45:19 +00:00
<para >
2003-08-01 22:01:27 +00:00
If you would like the <see cref= "T:Gtk.MessageDialog" /> to not be modal, set the property <see cref= "P:Gtk.Dialog.Modal" /> to <see langword= "false" /> .
2007-01-16 16:18:05 +00:00
<example > <code language= "C#" >
2003-08-01 22:01:27 +00:00
md.Modal = false;
2007-01-16 16:18:05 +00:00
</code> </example> </para>
2003-07-17 06:38:40 +00:00
</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
<Members >
2011-11-09 16:01:51 +00:00
<Member MemberName= ".ctor" >
<MemberSignature Language= "C#" Value= "protected MessageDialog ();" />
<MemberSignature Language= "ILAsm" Value= ".method familyhidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberType > Constructor</MemberType>
<ReturnValue />
<Parameters />
<Docs >
<summary > To be added</summary>
<remarks > To be added</remarks>
</Docs>
</Member>
2003-02-12 02:00:12 +00:00
<Member MemberName= ".ctor" >
<MemberSignature Language= "C#" Value= "public MessageDialog (IntPtr raw);" />
2011-11-09 16:01:51 +00:00
<MemberSignature Language= "ILAsm" Value= ".method public hidebysig specialname rtspecialname instance void .ctor(native int raw) cil managed" />
2003-02-12 02:00:12 +00:00
<MemberType > Constructor</MemberType>
<ReturnValue />
<Parameters >
2003-08-01 22:01:27 +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
<param name= "raw" > Pointer to the C object.</param>
2011-11-09 16:01:51 +00:00
<summary > Internal constructor</summary>
2003-02-23 07:26:30 +00:00
<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" >
2005-05-23 20:41:51 +00:00
<MemberSignature Language= "C#" Value= "public MessageDialog (Gtk.Window parent_window, Gtk.DialogFlags flags, Gtk.MessageType type, Gtk.ButtonsType bt, string format, object[] args);" />
2011-11-09 16:01:51 +00:00
<MemberSignature Language= "ILAsm" Value= ".method public hidebysig specialname rtspecialname instance void .ctor(class Gtk.Window parent_window, valuetype Gtk.DialogFlags flags, valuetype Gtk.MessageType type, valuetype Gtk.ButtonsType bt, string format, object[] args) cil managed" />
2003-02-12 02:00:12 +00:00
<MemberType > Constructor</MemberType>
<ReturnValue />
<Parameters >
2003-08-01 22:01:27 +00:00
<Parameter Name= "parent_window" Type= "Gtk.Window" />
<Parameter Name= "flags" Type= "Gtk.DialogFlags" />
<Parameter Name= "type" Type= "Gtk.MessageType" />
<Parameter Name= "bt" Type= "Gtk.ButtonsType" />
2005-01-20 15:45:13 +00:00
<Parameter Name= "format" Type= "System.String" />
2005-05-23 20:41:51 +00:00
<Parameter Name= "args" Type= "System.Object[]" >
<Attributes >
<Attribute >
<AttributeName > System.ParamArray</AttributeName>
</Attribute>
</Attributes>
</Parameter>
2003-08-01 22:01:27 +00:00
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2005-01-20 15:45:13 +00:00
<param name= "parent_window" > the dialog's parent <see cref= "T:Gtk.Window" /> (or <see langword= "null" /> )</param>
<param name= "flags" > the <see cref= "T:Gtk.DialogFlags" /> </param>
<param name= "type" > the type of message dialog to display</param>
<param name= "bt" > the buttons to display</param>
<param name= "format" > the message format string</param>
<param name= "args" > optional arguments for <paramref name= "format" /> </param>
2011-11-09 16:01:51 +00:00
<summary > Creates an instance of <see cref= "T:Gtk.MessageDialog" /> </summary>
2003-07-17 06:38:40 +00:00
<remarks >
<para >
2007-01-16 16:18:05 +00:00
Creates an instance of <see cref= "T:Gtk.MessageDialog" /> <example > <code lang= "C#" >
2003-05-31 01:14:01 +00:00
MessageDialog md = new MessageDialog
(parent_window, Gtk.DialogFlags.DestroyWithParent,
2005-01-20 15:45:13 +00:00
Gtk.MessageType.Error, Gtk.ButtonsType.Close, "Error loading file '{0}'", filename);
2007-01-16 16:18:05 +00:00
</code> </example> </para>
2003-07-17 06:38:40 +00:00
</remarks>
2005-06-16 18:56:42 +00:00
<since version= "Gtk# 2.4" />
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
2005-01-20 15:45:13 +00:00
<Member MemberName= ".ctor" >
2005-05-23 20:41:51 +00:00
<MemberSignature Language= "C#" Value= "public MessageDialog (Gtk.Window parent_window, Gtk.DialogFlags flags, Gtk.MessageType type, Gtk.ButtonsType bt, bool use_markup, string format, object[] args);" />
2011-11-09 16:01:51 +00:00
<MemberSignature Language= "ILAsm" Value= ".method public hidebysig specialname rtspecialname instance void .ctor(class Gtk.Window parent_window, valuetype Gtk.DialogFlags flags, valuetype Gtk.MessageType type, valuetype Gtk.ButtonsType bt, bool use_markup, string format, object[] args) cil managed" />
2005-01-20 15:45:13 +00:00
<MemberType > Constructor</MemberType>
<ReturnValue />
<Parameters >
<Parameter Name= "parent_window" Type= "Gtk.Window" />
<Parameter Name= "flags" Type= "Gtk.DialogFlags" />
<Parameter Name= "type" Type= "Gtk.MessageType" />
<Parameter Name= "bt" Type= "Gtk.ButtonsType" />
<Parameter Name= "use_markup" Type= "System.Boolean" />
<Parameter Name= "format" Type= "System.String" />
2005-05-23 20:41:51 +00:00
<Parameter Name= "args" Type= "System.Object[]" >
<Attributes >
<Attribute >
<AttributeName > System.ParamArray</AttributeName>
</Attribute>
</Attributes>
</Parameter>
2005-01-20 15:45:13 +00:00
</Parameters>
<Docs >
<param name= "parent_window" > the dialog's parent <see cref= "T:Gtk.Window" /> (or <see langword= "null" /> )</param>
<param name= "flags" > the <see cref= "T:Gtk.DialogFlags" /> </param>
<param name= "type" > the type of message dialog to display</param>
<param name= "bt" > the buttons to display</param>
<param name= "use_markup" > whether or not <paramref name= "format" /> uses Pango markup</param>
<param name= "format" > the message format string</param>
<param name= "args" > optional arguments for <paramref name= "format" /> </param>
2011-11-09 16:01:51 +00:00
<summary > Creates an instance of <see cref= "T:Gtk.MessageDialog" /> </summary>
2005-01-20 15:45:13 +00:00
<remarks > Like the other constructor, but allows you to pass a non-marked-up string.</remarks>
2005-06-16 18:56:42 +00:00
<since version= "Gtk# 2.4" />
2005-01-20 15:45:13 +00:00
</Docs>
</Member>
2003-12-24 01:35:30 +00:00
<Member MemberName= "GType" >
2011-11-09 16:01:51 +00:00
<MemberSignature Language= "C#" Value= "public static GLib.GType GType { get; }" />
<MemberSignature Language= "ILAsm" Value= ".property valuetype GLib.GType GType" />
2003-12-24 01:35:30 +00:00
<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.MessageDialog" /> .</remarks>
2003-12-24 01:35:30 +00:00
</Docs>
</Member>
2011-11-09 16:01:51 +00:00
<Member MemberName= "Image" >
<MemberSignature Language= "C#" Value= "public Gtk.Widget Image { get; set; }" />
<MemberSignature Language= "ILAsm" Value= ".property instance class Gtk.Widget Image" />
<MemberType > Property</MemberType>
2005-06-16 18:56:42 +00:00
<Attributes >
2005-05-23 20:41:51 +00:00
<Attribute >
2011-11-09 16:01:51 +00:00
<AttributeName > GLib.Property("image")</AttributeName>
2005-05-23 20:41:51 +00:00
</Attribute>
2005-06-16 18:56:42 +00:00
</Attributes>
2011-11-09 16:01:51 +00:00
<ReturnValue >
<ReturnType > Gtk.Widget</ReturnType>
</ReturnValue>
<Docs >
<summary > The image displayed in the MessageBox.</summary>
<value > a <see cref= "T:Gtk.Widget" /> displayed in the image location.</value>
<remarks />
<since version= "Gtk# 2.10" />
</Docs>
2005-06-16 18:56:42 +00:00
</Member>
2004-11-05 21:25:40 +00:00
<Member MemberName= "Markup" >
2011-11-09 16:01:51 +00:00
<MemberSignature Language= "C#" Value= "public string Markup { set; }" />
<MemberSignature Language= "ILAsm" Value= ".property instance string Markup" />
2004-11-05 21:25:40 +00:00
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > System.String</ReturnType>
</ReturnValue>
<Docs >
2005-01-05 19:34:00 +00:00
<summary > Markup for the message to display in the dialog.</summary>
2005-05-23 20:41:51 +00:00
<value > a <see cref= "T:System.String" /> </value>
2005-01-05 19:34:00 +00:00
<remarks > Markup should be in Pango markup format. (TODO: check this.)</remarks>
2005-06-16 18:56:42 +00:00
<since version= "Gtk# 2.4" />
2004-11-05 21:25:40 +00:00
</Docs>
</Member>
2011-11-09 16:01:51 +00:00
<Member MemberName= "MessageArea" >
<MemberSignature Language= "C#" Value= "public Gtk.Widget MessageArea { get; }" />
<MemberSignature Language= "ILAsm" Value= ".property instance class Gtk.Widget MessageArea" />
2006-08-04 23:13:09 +00:00
<MemberType > Property</MemberType>
<Attributes >
<Attribute >
2011-11-09 16:01:51 +00:00
<AttributeName > GLib.Property("message-area")</AttributeName>
2006-08-04 23:13:09 +00:00
</Attribute>
</Attributes>
<ReturnValue >
<ReturnType > Gtk.Widget</ReturnType>
</ReturnValue>
<Docs >
2011-11-09 16:01:51 +00:00
<summary > To be added.</summary>
<value > To be added.</value>
<remarks > To be added.</remarks>
<since version= "Gtk# 3.0" />
2006-08-04 23:13:09 +00:00
</Docs>
</Member>
2011-11-09 16:01:51 +00:00
<Member MemberName= "MessageType" >
<MemberSignature Language= "C#" Value= "public Gtk.MessageType MessageType { get; set; }" />
<MemberSignature Language= "ILAsm" Value= ".property instance valuetype Gtk.MessageType MessageType" />
2006-08-04 23:13:09 +00:00
<MemberType > Property</MemberType>
<Attributes >
<Attribute >
2011-11-09 16:01:51 +00:00
<AttributeName > GLib.Property("message-type")</AttributeName>
2006-08-04 23:13:09 +00:00
</Attribute>
</Attributes>
<ReturnValue >
2011-11-09 16:01:51 +00:00
<ReturnType > Gtk.MessageType</ReturnType>
2006-08-04 23:13:09 +00:00
</ReturnValue>
<Docs >
2011-11-09 16:01:51 +00:00
<summary > The <see cref= "T:Gtk.MessageType" /> of the <see cref= "T:Gtk.Dialog" /> </summary>
<value > an object of type <see cref= "T:Gtk.MessageDialog" /> </value>
<remarks > The <see cref= "T:Gtk.MessageType" /> of the <see cref= "T:Gtk.Dialog" /> </remarks>
<since version= "Gtk# 2.4" />
2006-08-04 23:13:09 +00:00
</Docs>
</Member>
2011-11-09 16:01:51 +00:00
<Member MemberName= "SecondaryText" >
<MemberSignature Language= "C#" Value= "public string SecondaryText { get; set; }" />
<MemberSignature Language= "ILAsm" Value= ".property instance string SecondaryText" />
2006-08-04 23:13:09 +00:00
<MemberType > Property</MemberType>
<Attributes >
<Attribute >
2011-11-09 16:01:51 +00:00
<AttributeName > GLib.Property("secondary-text")</AttributeName>
2006-08-04 23:13:09 +00:00
</Attribute>
</Attributes>
<ReturnValue >
<ReturnType > System.String</ReturnType>
</ReturnValue>
<Docs >
2011-11-09 16:01:51 +00:00
<summary > The secondary message for the MessageBox.</summary>
<value > defaults to <see langword= "null" /> .</value>
<remarks />
2006-08-04 23:13:09 +00:00
<since version= "Gtk# 2.10" />
</Docs>
</Member>
<Member MemberName= "SecondaryUseMarkup" >
2011-11-09 16:01:51 +00:00
<MemberSignature Language= "C#" Value= "public bool SecondaryUseMarkup { get; set; }" />
<MemberSignature Language= "ILAsm" Value= ".property instance bool SecondaryUseMarkup" />
2006-08-04 23:13:09 +00:00
<MemberType > Property</MemberType>
<Attributes >
<Attribute >
2007-01-16 16:18:05 +00:00
<AttributeName > GLib.Property("secondary-use-markup")</AttributeName>
2006-08-04 23:13:09 +00:00
</Attribute>
</Attributes>
<ReturnValue >
<ReturnType > System.Boolean</ReturnType>
</ReturnValue>
<Docs >
<summary > Indicates if Pango markup is handled in the secondary text..</summary>
<value > if <see langword= "true" /> , markup is parsed.</value>
<remarks > See <see cref= "M:Pango.Global.ParseMarkup" /> for more info.</remarks>
<since version= "Gtk# 2.10" />
</Docs>
</Member>
2011-11-09 16:01:51 +00:00
<Member MemberName= "Text" >
<MemberSignature Language= "C#" Value= "public string Text { get; set; }" />
<MemberSignature Language= "ILAsm" Value= ".property instance string Text" />
2006-08-04 23:13:09 +00:00
<MemberType > Property</MemberType>
<Attributes >
<Attribute >
2011-11-09 16:01:51 +00:00
<AttributeName > GLib.Property("text")</AttributeName>
2006-08-04 23:13:09 +00:00
</Attribute>
</Attributes>
<ReturnValue >
<ReturnType > System.String</ReturnType>
</ReturnValue>
<Docs >
2011-11-09 16:01:51 +00:00
<summary > The primary text displayed in the MessageBox.</summary>
<value > the primary text string.</value>
<remarks > If the box has secondary text, this is displayed as the Title.</remarks>
<since version= "Gtk# 2.10" />
</Docs>
</Member>
<Member MemberName= "UseMarkup" >
<MemberSignature Language= "C#" Value= "public bool UseMarkup { get; set; }" />
<MemberSignature Language= "ILAsm" Value= ".property instance bool UseMarkup" />
<MemberType > Property</MemberType>
<Attributes >
<Attribute >
<AttributeName > GLib.Property("use-markup")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue >
<ReturnType > System.Boolean</ReturnType>
</ReturnValue>
<Docs >
<summary > Indicates if Pango markup is handled in the primary text.</summary>
<value > if <see langword= "true" /> , markup is parsed.</value>
<remarks > See <see cref= "M:Pango.Global.ParseMarkup" /> for more info.</remarks>
2006-08-04 23:13:09 +00:00
<since version= "Gtk# 2.10" />
</Docs>
</Member>
2003-02-12 02:00:12 +00:00
</Members>
2005-06-17 18:43:30 +00:00
</Type>