1 #ifndef __CALLMESSAGEBOX_H__
2 #define __CALLMESSAGEBOX_H__
3 
4 /*
5  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
6  * Copyright (C) 2008 - INRIA - Vincent COUVERT
7  *
8  * Copyright (C) 2012 - 2016 - Scilab Enterprises
9  *
10  * This file is hereby licensed under the terms of the GNU GPL v2.0,
11  * pursuant to article 5.3.4 of the CeCILL v.2.1.
12  * This file was originally licensed under the terms of the CeCILL v2.1,
13  * and continues to be available under such terms.
14  * For more information, see the COPYING file which you should have received
15  * along with this program.
16  *
17  */
18 
19 #include "BOOL.h"
20 
21 /**
22  * Create a new MessageBox
23  *
24  * @param void
25  * @return the ID of the created MessageBox
26  */
27 int createMessageBox(void);
28 
29 /**
30  * Set the title of the MessageBox
31  *
32  * @param ID the ID of the MessageBox
33  * @param title the title to set
34  */
35 void setMessageBoxTitle(int ID, char * title);
36 
37 /**
38  * Set the message of the MessageBox
39  *
40  * @param ID the ID of the MessageBox
41  * @param message the message to set
42  */
43 void setMessageBoxMessage(int ID, char * message);
44 
45 /**
46  * Set the message of the MessageBox (multi-line)
47  *
48  * @param ID the ID of the MessageBox
49  * @param message the message to set
50  * @param nbLines number of lines in message
51  */
52 void setMessageBoxMultiLineMessage(int ID, char **message, int nbLines);
53 
54 /**
55  * Display the MessageBox and Wait for a user action
56  *
57  * @param ID the ID of the MessageBox
58  */
59 void messageBoxDisplayAndWait(int ID);
60 
61 /**
62  * Get the index of the selected button
63  *
64  * @param ID the ID of the MessageBox
65  * @return the index of the selected button
66  */
67 int getMessageBoxSelectedButton(int ID);
68 
69 /**
70  * Set the indices of the default selected buttons (x_choices)
71  *
72  * @param ID the ID of the MessageBox
73  * @param indices the indices of the default selected buttons
74  * @param nbIndices the number of indices
75  */
76 void setMessageBoxDefaultSelectedButtons(int ID, int* indices, int nbIndices);
77 
78 /**
79  * Get the indices of the user selected buttons (x_choices)
80  *
81  * @param ID the ID of the MessageBox
82  * @return the indices of the user selected buttons
83  */
84 int* getMessageBoxUserSelectedButtons(int ID);
85 
86 /**
87  * Set the labels of the buttons
88  *
89  * @param ID the ID of the MessageBox
90  * @param labels the labels of the buttons
91  * @param nbLabels the number of labels in labels parameter
92  */
93 void setMessageBoxButtonsLabels(int ID, char** labels, int nbLabels);
94 
95 /**
96  * Set the initial value of the editable text zone of the MessageBox
97  *
98  * @param ID the ID of the MessageBox
99  * @param value the value
100  * @param nbLines the number of lines in value parameter
101  */
102 void setMessageBoxInitialValue(int ID, char** value, int nbLines);
103 
104 /**
105  * Get the value of the editable text zone of the MessageBox
106  *
107  * @param ID the ID of the MessageBox
108  * @return the value
109  */
110 char ** getMessageBoxValue(int ID);
111 
112 /**
113  * Get the value size of the editable text zone of the MessageBox
114  *
115  * @param ID the ID of the MessageBox
116  * @return the value size
117  */
118 int getMessageBoxValueSize(int ID);
119 
120 /**
121  * Set the items of the listbox of the MessageBox
122  *
123  * @param ID the ID of the MessageBox
124  * @param items the items to set
125  * @param nbItems the number of items
126  */
127 void setMessageBoxListBoxItems(int ID, char** items, int nbItems);
128 
129 /**
130  * Get the selected item in the listbox of the MessageBox
131  *
132  * @param ID the ID of the MessageBox
133  * @return the selected item index (0 if canceled)
134  */
135 int getMessageBoxSelectedItem(int ID);
136 
137 /**
138  * Set the name of the lines labels in the editable zone in the MessageBox
139  *
140  * @param ID the ID of the MessageBox
141  * @param labels the labels
142  * @param nbItems the number of labels
143  */
144 void setMessageBoxLineLabels(int ID, char** labels, int nbLabels);
145 
146 /**
147  * Set the name of the columns labels in the editable zone in the MessageBox
148  *
149  * @param ID the ID of the MessageBox
150  * @param labels the labels
151  * @param nbItems the number of labels
152  */
153 void setMessageBoxColumnLabels(int ID, char** labels, int nbLabels);
154 
155 /**
156  * Set the default values of a multi-value editable zone in the MessageBox
157  *
158  * @param ID the ID of the MessageBox
159  * @param values the values
160  * @param nbItems the number of values
161  */
162 void setMessageBoxDefaultInput(int ID, char** values, int nbValues);
163 
164 /**
165  * Set a MessageBox modal or not
166  *
167  * @param ID the ID of the MessageBox
168  * @param status TRUE to set the MessageBox modal and FALSE else
169  */
170 void setMessageBoxModal(int ID, BOOL status);
171 
172 /**
173  * Set the MessageBox icon
174  *
175  * @param ID the ID of the MessageBox
176  * @param name the name of the icon
177  */
178 void setMessageBoxIcon(int ID, char *name);
179 
180 #endif /* !__CALLMESSAGEBOX_H__ */
181 
182