OpenCPN Partial API docs
Loading...
Searching...
No Matches
text_entry.h
1#include <functional>
2#include <string>
3
4#include <wx/panel.h>
16class TextEntryPanel : public wxPanel {
17public:
25 TextEntryPanel(wxWindow* parent, const std::string& label, std::string& text,
26 std::function<void()> on_update, int width = 40);
27
28 const int kEditBtnId;
29 const int kTextId;
30 const int kTextEntryId;
31
32private:
33 void OnEditClick();
34
35 std::string m_text;
36 bool m_is_editing;
37 std::function<void()> m_on_update;
38};
A label, a text entry and an EditButton allows for user text input Depending in state it looks like.
Definition text_entry.h:16
TextEntryPanel(wxWindow *parent, const std::string &label, std::string &text, std::function< void()> on_update, int width=40)
Create a new TextEntryPanel.
const int kEditBtnId
Use with FindWindowById to get EditButton.
Definition text_entry.h:28
const int kTextEntryId
Use with FindWindowById to get wxTextCtrl.
Definition text_entry.h:30
const int kTextId
Use with FindWindowById to get wxStaticText.
Definition text_entry.h:29