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