GUI
TextField.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 by Maciej Wiecierzewski
3  */
4 
5 #ifndef TEXTFIELD_H
6 #define TEXTFIELD_H
7 
8 #include <string>
9 
10 #include "Renderer.h"
11 #include "Widget.h"
12 
13 namespace gui
14 {
15 
16 class GUISystem;
17 
19 
20 class TextField : public Widget
21 {
22  public:
23  TextField(GUISystem *guiSystem, int x, int y, int w, int h, std::string text);
24  virtual ~TextField() {};
25 
26  void render(Renderer *renderer);
27  void setText(const std::string &text);
28  std::string getText();
29 
30  protected:
32 
33  private:
34  std::string text;
35 
36  friend class GUISystem;
37 };
38 
39 }
40 
41 #endif // TEXTFIELD_H