FDOSTUI
FreeDOS Text User Interface
inpdlg.hpp
Go to the documentation of this file.
1 /*
2  INPDLG.HPP
3 
4  License CC0 PUBLIC DOMAIN
5 
6  To the extent possible under law, Mark J. Olesen has waived all copyright
7  and related or neighboring rights to FDOSTUI Library. This work is published
8  from: United States
9 */
10 #ifndef __inpdlg_hpp__
11 
12 #include "window.hpp"
13 #include "label.hpp"
14 #include "entry.hpp"
15 #include "button.hpp"
16 
17 class inputdlg : public window
18 {
19 
20 public:
21 
22  inputdlg(
23  int const i_pos_x,
24  int const i_pos_y,
25  unsigned int const i_len_x,
26  unsigned int const i_len_y);
27 
28  virtual
29  ~inputdlg();
30 
31  unsigned char*
32  get_value() const;
33 
34  void
35  set_prompt(
36  unsigned char const* i_prompt);
37 
38  void
39  set_value(
40  unsigned char const* i_value);
41 
42 protected:
43 
48 
49 private:
50 
51  inputdlg();
52 
53  inputdlg(
54  const inputdlg&);
55 
56  inputdlg&
57  operator=(inputdlg const&);
58 
59 };
60 
61 inline void
63  unsigned char const* i_prompt)
64 {
65  (*m_label_prompt).set_text(i_prompt);
66  return;
67 }
68 
69 inline void
71  unsigned char const* i_value)
72 {
73  (*m_entry_value).set_text(i_value);
74  return;
75 }
76 
77 #define __inpdlg_hpp__
78 #endif
contains entry class
contains window class
virtual ~inputdlg()
destructor
Definition: inpdlg.cpp:49
contains label class
contains button class
label * m_label_prompt
Definition: inpdlg.hpp:44
Allows a user to input a value.
Definition: inpdlg.hpp:17
void set_value(unsigned char const *i_value)
set default value
Definition: inpdlg.hpp:70
unsigned char * get_value() const
get user input value
Definition: inpdlg.cpp:55
Allows display of text.
Definition: label.hpp:21
Allows a user to enter text.
Definition: entry.hpp:14
button * m_button_cancel
Definition: inpdlg.hpp:46
top level container widget that can be moved and resized by the user
Definition: window.hpp:19
Allows a user to click on a button.
Definition: button.hpp:21
void set_prompt(unsigned char const *i_prompt)
set user prompt
Definition: inpdlg.hpp:62
button * m_button_ok
Definition: inpdlg.hpp:47
entry * m_entry_value
Definition: inpdlg.hpp:45