libyui-ncurses
 
Loading...
Searching...
No Matches
NCPopupTextEntry.h
1/*
2 Copyright (C) 2000-2012 Novell, Inc
3 This library is free software; you can redistribute it and/or modify
4 it under the terms of the GNU Lesser General Public License as
5 published by the Free Software Foundation; either version 2.1 of the
6 License, or (at your option) version 3.0 of the License. This library
7 is distributed in the hope that it will be useful, but WITHOUT ANY
8 WARRANTY; without even the implied warranty of MERCHANTABILITY or
9 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10 License for more details. You should have received a copy of the GNU
11 Lesser General Public License along with this library; if not, write
12 to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13 Floor, Boston, MA 02110-1301 USA
14*/
15
16
17/*-/
18
19 File: NCPopupTextEntry.h
20
21 Author: Michael Andres <ma@suse.de>
22
23/-*/
24
25#ifndef NCPopupTextEntry_h
26#define NCPopupTextEntry_h
27
28#include <iosfwd>
29
30#include "NCPopup.h"
31#include "NCInputField.h"
32
33
34
35class NCPopupTextEntry : public NCPopup
36{
37private:
38
39 NCPopupTextEntry & operator=( const NCPopupTextEntry & );
40 NCPopupTextEntry( const NCPopupTextEntry & );
41
42
43 NCInputField * wtext;
44
45 virtual bool postAgain();
46
47public:
48
49 NCPopupTextEntry( const wpos & at,
50 const std::string & label,
51 const std::string & text,
52 unsigned maxInput = 0,
53 unsigned maxFld = 0,
54 NCInputField::FTYPE t = NCInputField::PLAIN );
55
56 virtual ~NCPopupTextEntry();
57
58 void setValue( const std::string & ntext ) { wtext->setValue( ntext ); }
59
60 std::string value() { return wtext->value(); }
61
62 static std::string askForText( const wpos & at,
63 const std::string & label,
64 const std::string & text = "",
65 unsigned maxInput = 0,
66 unsigned maxFld = 0 );
67};
68
69
70
71#endif // NCPopupTextEntry_h
Definition NCInputField.h:35
Screen position pair in the order line, column: (L, C)
Definition position.h:110