| 1 |
#include "enter_strings_dlg.h" |
| 2 |
#include <ColoursAndFontsManager.h> |
| 3 |
#include <lexer_configuration.h> |
| 4 |
#include <windowattrmanager.h> |
| 5 |
|
| 6 |
EnterStringsDlg::EnterStringsDlg(wxWindow* parent, const wxString& value) |
| 7 |
: EnterStringsDlgBase(parent) |
| 8 |
{ |
| 9 |
LexerConf::Ptr_t lexer = ColoursAndFontsManager::Get().GetLexer("text", "Default"); |
| 10 |
if(lexer) { lexer->Apply(m_stc); } |
| 11 |
m_stc->SetText(value); |
| 12 |
SetName("EnterStringsDlg"); |
| 13 |
WindowAttrManager::Load(this); |
| 14 |
} |
| 15 |
|
| 16 |
EnterStringsDlg::~EnterStringsDlg() {} |
| 17 |
|
| 18 |
wxString EnterStringsDlg::GetValue() const { return m_stc->GetText(); } |
| 19 |
|
| 20 |
void EnterStringsDlg::SetMessage(const wxString& msg) |
| 21 |
{ |
| 22 |
if(msg.IsEmpty() == false) { |
| 23 |
m_staticTextMessage->SetLabel(msg); |
| 24 |
m_staticTextMessage->Show(); |
| 25 |
} else { |
| 26 |
m_staticTextMessage->Hide(); |
| 27 |
} |
| 28 |
} |