## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

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

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

3.     --                                                                   --

4.     --      Copyright (C) 2000 E. Briot, J. Brobecker and A. Charlet     --

5.     --                Copyright (C) 2000-2003 ACT-Europe                 --

6.     --                                                                   --

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

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

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

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

11.     --                                                                   --

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

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

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

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

16.     --                                                                   --

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

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

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

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

21.     --                                                                   --

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

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

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

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

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

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

28.     -----------------------------------------------------------------------

30.     --  <description>

31.     --

32.     --  This package provides a ready to use high level dialog capability.

33.     --

34.     --  </description>

35.     --  <group>Windows</group>

36.     --  <see>Gtk.Message_Dialog</see>

38.     with GlibTo API docTo specTo body;

39.     with Gtk.DialogTo API docTo specTo body; use Gtk.DialogTo API docTo specTo body;

40.     with Gtk.EnumsTo API docTo specTo body;  use Gtk.EnumsTo API docTo specTo body;

41.     with Gtk.WindowTo API docTo specTo body; use Gtk.WindowTo API docTo specTo body;

43.     package Gtkada.DialogsTo API docTo specTo body is

44.        pragma Elaborate_Body;

46.        type Message_Dialog_Buttons is mod 2 ** 32;

47.        --  Define the set of values a button in a message dialog box can have.

49.        type Button_Range is range 0 .. 8;

50.        --  The range of valid buttons.

52.        Button_None   : constant Message_Dialog_ButtonsTo API docTo spec := 0;

53.        Button_Yes    : constant Message_Dialog_ButtonsTo API docTo spec := 2 ** 0;

54.        Button_No     : constant Message_Dialog_ButtonsTo API docTo spec := 2 ** 1;

55.        Button_All    : constant Message_Dialog_ButtonsTo API docTo spec := 2 ** 2;

56.        Button_OK     : constant Message_Dialog_ButtonsTo API docTo spec := 2 ** 3;

57.        Button_Cancel : constant Message_Dialog_ButtonsTo API docTo spec := 2 ** 4;

58.        Button_Abort  : constant Message_Dialog_ButtonsTo API docTo spec := 2 ** 5;

59.        Button_Retry  : constant Message_Dialog_ButtonsTo API docTo spec := 2 ** 6;

60.        Button_Ignore : constant Message_Dialog_ButtonsTo API docTo spec := 2 ** 7;

61.        Button_Help   : constant Message_Dialog_ButtonsTo API docTo spec := 2 ** 8;

63.        type Message_Dialog_Type is

64.          (Warning,

65.           --  Message box with a yellow exclamation point.

67.           Error,

68.           --  Message box with a red stop sign.

70.           Information,

71.           --  Message box with a blue "i".

73.           Confirmation,

74.           --  Message box with a blue question mark.

76.           Custom

77.           --  Message box with no pixmap. The caption of the box should be set by

78.           --  the user.

79.          );

80.        --  Define the values describing the type of message box.

81.        --  Used by the Message_Dialog function.

83.        function Message_DialogTo API docTo body

84.          (Msg            : Glib.UTF8_StringTo API docTo spec;

85.           Dialog_TypeTo API docTo body    : Message_Dialog_TypeTo API docTo spec := Information;

86.           Buttons        : Message_Dialog_ButtonsTo API docTo spec := Button_OKTo API docTo spec or Button_HelpTo API docTo spec;

87.           Default_Button : Message_Dialog_ButtonsTo API docTo spec := Button_OKTo API docTo spec;

88.           Help_Msg       : Glib.UTF8_StringTo API docTo spec := "";

89.           Title          : Glib.UTF8_StringTo API docTo spec := "";

90.           JustificationTo API docTo body  : Gtk_JustificationTo API docTo spec := Justify_Center;

91.           Parent         : Gtk.Window.Gtk_WindowTo API docTo spec := null)

92.           return Message_Dialog_ButtonsTo API docTo spec;

93.        --  Display a message dialog box centered on the mouse.

94.        --  This will create a dialog box containing the specified message.

95.        --  Dialog_Type indicates the purpose of the dialog.

96.        --  Buttons indicates which buttons should appear in the dialog.

97.        --  Help_Msg is the message displayed in a separate dialog box when the help

98.        --  button is pressed while the dialog is displayed.

99.        --  If Help_Msg is null, a dialog containing the message

100.        --  "No help available" will be displayed. In both cases, the dialog

101.        --  displayed will only have a OK button.

102.        --  If Title is null, a default title will be chosen depending on the value

103.        --  of Dialog_Type.

104.        --  The dialog will be centered with regards to Parent

105.        --

106.        --  This function will return only after the user pressed one of the buttons

107.        --  or deleted the dialog, by running an additional level of main loop.

108.        --  One of the following values will be returned:

109.        --    - Button_None

110.        --    - Button_Abort

111.        --    - Button_Yes

112.        --    - Button_Ok

113.        --    - Button_Retry

114.        --    - Button_No

115.        --    - Button_Cancel

116.        --    - Button_Ignore

117.        --    - Button_All

119.        function Create_Gtk_DialogTo API docTo body

120.          (Msg           : Glib.UTF8_StringTo API docTo spec;

121.           Dialog_TypeTo API docTo body   : Message_Dialog_TypeTo API docTo spec := Information;

122.           Title         : Glib.UTF8_StringTo API docTo spec := "";

123.           JustificationTo API docTo body : Gtk_JustificationTo API docTo spec := Justify_Center;

124.           Parent        : Gtk.Window.Gtk_WindowTo API docTo spec := null)

125.           return Gtk.Dialog.Gtk_DialogTo API docTo spec;

126.        --  Convenience function to create a new dialog.

127.        --  This function was introduced in GtkAda 2.0 to provide a compatibility

128.        --  with Message_Dialog, while using the standard Gtk.Dialog. You should add

129.        --  the buttons yourself, through Gtk.Dialog.Gtk_Dialog, and then display

130.        --  the dialog on the screen through Gtk.Dialog.Run.

131.        --  As opposed to Message_Dialog, you can provide your own custom buttons if

132.        --  needed.

134.     end Gtkada.DialogsTo API docTo specTo body;