OpenCPN Partial API docs
Loading...
Searching...
No Matches
TextEntryPanel Class Reference

A label, a text entry and an EditButton allows for user text input Depending in state it looks like. More...

#include <text_entry.h>

Inheritance diagram for TextEntryPanel:

Public Member Functions

 TextEntryPanel (wxWindow *parent, const std::string &label, std::string &text, std::function< void()> on_update, int width=40)
 Create a new TextEntryPanel.
 

Public Attributes

const int kEditBtnId
 Use with FindWindowById to get EditButton button.
 
const int kTextId
 Use with FindWindowById to get wxStaticText label.
 
const int kTextEntryId
 Use with FindWindowById to get wxTextCtrl entry.
 

Detailed Description

A label, a text entry and an EditButton allows for user text input Depending in state it looks like.

or

The leftmost label is fixed, possibly empty.

Definition at line 15 of file text_entry.h.

Constructor & Destructor Documentation

◆ TextEntryPanel()

TextEntryPanel::TextEntryPanel ( wxWindow *  parent,
const std::string &  label,
std::string &  text,
std::function< void()>  on_update,
int  width = 40 
)

Create a new TextEntryPanel.

Parameters
parentContaining window.
labelLeft-most label, possibly empty.
textInitial value of the text entry.
on_updateCallback invoked when user updates the text entry
widthWidth of entry in characters.

Member Data Documentation

◆ kEditBtnId

const int TextEntryPanel::kEditBtnId

Use with FindWindowById to get EditButton button.

Definition at line 27 of file text_entry.h.

◆ kTextEntryId

const int TextEntryPanel::kTextEntryId

Use with FindWindowById to get wxTextCtrl entry.

Definition at line 29 of file text_entry.h.

◆ kTextId

const int TextEntryPanel::kTextId

Use with FindWindowById to get wxStaticText label.

Definition at line 28 of file text_entry.h.


The documentation for this class was generated from the following file: