## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

1.     -----------------------------------------------------------------------

2.     --              GtkAda - Ada95 binding for Gtk+/Gnome                --

3.     --                                                                   --

4.     --                Copyright (C) 2006-2010, AdaCore                   --

5.     --                                                                   --

6.     -- This library is free software; you can redistribute it and/or     --

7.     -- modify it under the terms of the GNU General Public               --

8.     -- License as published by the Free Software Foundation; either      --

9.     -- version 2 of the License, or (at your option) any later version.  --

10.     --                                                                   --

11.     -- This library is distributed in the hope that it will be useful,   --

12.     -- but WITHOUT ANY WARRANTY; without even the implied warranty of    --

13.     -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU --

14.     -- General Public License for more details.                          --

15.     --                                                                   --

16.     -- You should have received a copy of the GNU General Public         --

17.     -- License along with this library; if not, write to the             --

18.     -- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      --

19.     -- Boston, MA 02111-1307, USA.                                       --

20.     --                                                                   --

21.     -- As a special exception, if other files instantiate generics from  --

22.     -- this unit, or you link this unit with other files to produce an   --

23.     -- executable, this  unit  does not  by itself cause  the resulting  --

24.     -- executable to be covered by the GNU General Public License. This  --

25.     -- exception does not however invalidate any other reasons why the   --

26.     -- executable file  might be covered by the  GNU Public License.     --

27.     -----------------------------------------------------------------------

29.     --  <description>

30.     --  Gtk_Message_Dialog presents a dialog with an image representing the type of

31.     --  message (Error, Question, etc.) alongside some message text. It's simply a

32.     --  convenience widget; you could construct the equivalent of

33.     --  Gtk_Message_Dialog from Gtk_Dialog without too much effort, but

34.     --  Gtk_Message_Dialog saves typing.

35.     --

36.     --  The easiest way to do a modal message dialog is to use Gtk.Dialog.Run,

37.     --  though you can also pass in the MODAL flag, Gtk.Dialog.Run automatically

38.     --  makes the dialog modal and waits for the user to respond to it.

39.     --  Gtk.Dialog.Run returns when any dialog button is clicked.

40.     --  </description>

41.     --  <c_version>2.16.6</c_version>

42.     --  <group>Windows</group>

43.     --  <screenshot>messagedialog.png</screenshot>

44.     --  <see>Gtkada.Dialogs</see>

46.     with Glib.PropertiesTo API docTo specTo body;

47.     with Gtk.DialogTo API docTo specTo body;

48.     with Gtk.WidgetTo API docTo specTo body;

49.     with Gtk.WindowTo API docTo specTo body;

51.     package Gtk.Message_DialogTo API docTo specTo body is

53.        type Gtk_Message_Dialog_Record is new Gtk.Dialog.Gtk_Dialog_RecordTo API docTo spec with

54.          null record;

55.        type Gtk_Message_Dialog is access all Gtk_Message_Dialog_RecordTo API docTo spec'Class;

57.        type Gtk_Message_Type is

58.          (Message_Info,

59.           Message_Warning,

60.           Message_Question,

61.           Message_Error);

63.        type Gtk_Buttons_Type is

64.          (Buttons_None,

65.           Buttons_Ok,

66.           Buttons_Close,

67.           Buttons_Cancel,

68.           Buttons_Yes_No,

69.           Buttons_Ok_Cancel);

71.        procedure Gtk_NewTo API docTo body

72.          (Dialog         : out Gtk_Message_DialogTo API docTo spec;

73.           Parent         : Gtk.Window.Gtk_WindowTo API docTo spec := null;

74.           Flags          : Gtk.Dialog.Gtk_Dialog_FlagsTo API docTo spec := 0;

75.           TypTo API docTo body            : Gtk_Message_TypeTo API docTo spec := Message_Info;

76.           ButtonsTo API docTo body        : Gtk_Buttons_TypeTo API docTo spec := Buttons_Close;

77.           Message        : String);

78.        procedure InitializeTo API docTo body

79.          (Dialog         : access Gtk_Message_Dialog_RecordTo API docTo spec'Class;

80.           Parent         : Gtk.Window.Gtk_WindowTo API docTo spec := null;

81.           Flags          : Gtk.Dialog.Gtk_Dialog_FlagsTo API docTo spec := 0;

82.           TypTo API docTo body            : Gtk_Message_TypeTo API docTo spec := Message_Info;

83.           ButtonsTo API docTo body        : Gtk_Buttons_TypeTo API docTo spec := Buttons_Close;

84.           Message        : String);

85.        --  Creates a new message dialog, which is a simple dialog with an icon

86.        --  indicating the dialog type (error, warning, etc.) and some text the user

87.        --  may want to see. When the user clicks a button a "response" signal is

88.        --  emitted with response IDs from Gtk.Dialog.Gtk_Response_Type. See

89.        --  Gtk_Dialog for more details.

91.        procedure Gtk_New_With_MarkupTo API docTo body

92.          (Dialog         : out Gtk_Message_DialogTo API docTo spec;

93.           Parent         : Gtk.Window.Gtk_WindowTo API docTo spec := null;

94.           Flags          : Gtk.Dialog.Gtk_Dialog_FlagsTo API docTo spec := 0;

95.           TypTo API docTo body            : Gtk_Message_TypeTo API docTo spec := Message_Info;

96.           ButtonsTo API docTo body        : Gtk_Buttons_TypeTo API docTo spec := Buttons_Close;

97.           Message        : String);

98.        procedure Initialize_With_MarkupTo API docTo body

99.          (Dialog         : access Gtk_Message_Dialog_RecordTo API docTo spec'Class;

100.           Parent         : Gtk.Window.Gtk_WindowTo API docTo spec := null;

101.           Flags          : Gtk.Dialog.Gtk_Dialog_FlagsTo API docTo spec := 0;

102.           TypTo API docTo body            : Gtk_Message_TypeTo API docTo spec := Message_Info;

103.           ButtonsTo API docTo body        : Gtk_Buttons_TypeTo API docTo spec := Buttons_Close;

104.           Message        : String);

105.        --  Same as Gtk_New and Initialize, but Message might contain special markup

106.        --  like <b>, <i>, <big>,...

108.        function Get_TypeTo API docTo body return GTypeTo API docTo spec;

109.        --  Return the internal type used for a Gtk_Message_Dialog

111.        procedure Set_MarkupTo API docTo body

112.          (Message_Dialog : access Gtk_Message_Dialog_RecordTo API docTo spec;

113.           Str            : String);

114.        --  Sets the text of the message dialog to be Str, which is marked

115.        --  up with the >Pango text markup language. This means that you can for

116.        --  instance <b> to get bold text.

118.        procedure Format_Secondary_MarkupTo API docTo body

119.          (Message_Dialog : access Gtk_Message_Dialog_RecordTo API docTo spec;

120.           Message        : String);

121.        procedure Format_Secondary_TextTo API docTo body

122.          (Message_Dialog : access Gtk_Message_Dialog_RecordTo API docTo spec;

123.           Message        : String);

124.        --  Sets the secondary text of the message dialog to be Message. When using

125.        --  markup, special marks are interpreted (<b> for bold, <i> for italic,...)

126.        --  Note that setting a secondary text makes the primary text become bold,

127.        --  unless you have provided explicit markup.

129.        function Get_ImageTo API docTo body

130.          (Dialog : access Gtk_Message_Dialog_RecordTo API docTo spec)

131.           return Gtk.Widget.Gtk_WidgetTo API docTo spec;

132.        procedure Set_ImageTo API docTo body

133.          (Dialog : access Gtk_Message_Dialog_RecordTo API docTo spec;

134.           Image  : access Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body'Class);

135.        --  Get and set the dialog's image.

137.        ----------------

138.        -- Properties --

139.        ----------------

140.        --  The following properties are defined for this widget. See

141.        --  Glib.Properties for more information on properties.

142.        --

143.        --  <properties>

144.        --  Name:  Buttons_Property

145.        --  Type:  Enum

146.        --  Descr: The buttons shown in the message dialog

147.        --

148.        --  Name:  Image_Property

149.        --  Type:  Object

150.        --  Descr: The image

151.        --

152.        --  Name:  Message_Type_Property

153.        --  Type:  Enum

154.        --  Descr: The type of message

155.        --

156.        --  Name:  Secondary_Text_Property

157.        --  Type:  String

158.        --  Descr: The secondary text of the message dialog

159.        --

160.        --  Name:  Secondary_Use_Markup_Property

161.        --  Type:  Boolean

162.        --  Descr: The secondary text includes Pango markup.

163.        --

164.        --  Name:  Text_Property

165.        --  Type:  String

166.        --  Descr: The primary text of the message dialog

167.        --

168.        --  Name:  Use_Markup_Property

169.        --  Type:  Boolean

170.        --  Descr: The primary text of the title includes Pango markup.

171.        --

172.        --  </properties>

174.     --     Buttons_Property      : constant Glib.Properties.Property_Enum;

175.     --     Message_Type_Property : constant Glib.Properties.Property_Enum;

176.        Image_Property                : constant Glib.Properties.Property_ObjectTo API docTo spec;

177.        Secondary_Text_Property       : constant Glib.Properties.Property_StringTo API docTo spec;

178.        Secondary_Use_Markup_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

179.        Text_Property                 : constant Glib.Properties.Property_StringTo API docTo spec;

180.        Use_Markup_Property           : constant Glib.Properties.Property_BooleanTo API docTo spec;

182.        ----------------------

183.        -- Style Properties --

184.        ----------------------

185.        --  The following properties can be changed through the gtk theme and

186.        --  configuration files, and retrieved through Gtk.Widget.Style_Get_Property

187.        --

188.        --  <style_properties>

189.        --  Name:  Message_Border_Property

190.        --  Type:  Int

191.        --  Descr: Width of border around the label and image in the message dialog

192.        --

193.        --  Name:  Use_Separator_Property

194.        --  Type:  Boolean

195.        --  Descr: Whether to put a separator between the message dialog's text and

196.        --         the buttons

197.        --

198.        --  </style_properties>

200.        Message_Border_Property : constant Glib.Properties.Property_IntTo API docTo spec;

201.        Use_Separator_Property  : constant Glib.Properties.Property_BooleanTo API docTo spec;

203.     private

204.     --     Buttons_Property : constant Glib.Properties.Property_Enum :=

205.     --       Glib.Properties.Build ("buttons");

206.     --     Message_Type_Property : constant Glib.Properties.Property_Enum :=

207.     --       Glib.Properties.Build ("message-type");

208.        Image_PropertyTo API docTo spec : constant Glib.Properties.Property_ObjectTo API docTo spec :=

209.          Glib.Properties.BuildTo API docTo specTo body ("image");

210.        Secondary_Text_PropertyTo API docTo spec : constant Glib.Properties.Property_StringTo API docTo spec :=

211.          Glib.Properties.BuildTo API docTo specTo body ("secondary-text");

212.        Secondary_Use_Markup_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

213.          Glib.Properties.BuildTo API docTo specTo body ("secondary-use-markup");

214.        Text_PropertyTo API docTo spec : constant Glib.Properties.Property_StringTo API docTo spec :=

215.          Glib.Properties.BuildTo API docTo specTo body ("text");

216.        Use_Markup_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

217.          Glib.Properties.BuildTo API docTo specTo body ("use-markup");

219.        Message_Border_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

220.          Glib.Properties.BuildTo API docTo specTo body ("message-border");

221.        Use_Separator_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

222.          Glib.Properties.BuildTo API docTo specTo body ("use-separator");

224.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_message_dialog_get_type");

226.     end Gtk.Message_DialogTo API docTo specTo body;

228.     --  Implemented through our own C wrappers:

229.     --  No binding: gtk_message_dialog_format_secondary_markup

230.     --  No binding: gtk_message_dialog_format_secondary_text

231.     --  No binding: gtk_message_dialog_new

232.     --  No binding: gtk_message_dialog_new_with_markup