libyui  3.3.1
YPopupInternal.h
1 /*
2  Copyright (C) 2016 SUSE LLC
3 
4  This library is free software; you can redistribute it and/or modify
5  it under the terms of the GNU Lesser General Public License as
6  published by the Free Software Foundation; either version 2.1 of the
7  License, or (at your option) version 3.0 of the License. This library
8  is distributed in the hope that it will be useful, but WITHOUT ANY
9  WARRANTY; without even the implied warranty of MERCHANTABILITY or
10  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
11  License for more details. You should have received a copy of the GNU
12  Lesser General Public License along with this library; if not, write
13  to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
14  Floor, Boston, MA 02110-1301 USA
15 */
16 
17 #include <string>
18 #include <vector>
19 
20 // Internal helper class for YDialogSpy and YPropertyEditor
22 {
23 public:
24 
25  /**
26  * Display a simple popup dialog with OK button
27  * @param label the message to display
28  */
29  static void message(const std::string &label);
30 
31  typedef std::vector<std::string> StringArray;
32 
33  /**
34  * Display a popup dialog with several input fields
35  * @param array fields to edit
36  * @param label title of the dialog
37  * @return true if dialog was closed by [OK], false otherwise
38  */
39  static bool editStringArray(StringArray &array, const std::string &label);
40 
41  /**
42  * Display a popup dialog with 3 initially empty input fields
43  * @param label title of the dialog
44  * @return Entered values in a StringArray, if canceled the array is empty.
45  */
46  static StringArray editNewStringArray(const std::string &label);
47 };
static StringArray editNewStringArray(const std::string &label)
Display a popup dialog with 3 initially empty input fields.
static bool editStringArray(StringArray &array, const std::string &label)
Display a popup dialog with several input fields.
static void message(const std::string &label)
Display a simple popup dialog with OK button.