| 1 |
#include "SingleBitmapAndTextDlg.h" |
| 2 |
#include "BitmapSelectorDlg.h" |
| 3 |
#include <windowattrmanager.h> |
| 4 |
|
| 5 |
SingleBitmapAndTextDlg::SingleBitmapAndTextDlg(wxWindow* parent, const wxString& bmp, const wxString& text) |
| 6 |
: SingleBitmapAndTextDlgBase(parent) |
| 7 |
{ |
| 8 |
m_textCtrlBmp->ChangeValue(bmp); |
| 9 |
m_textCtrlText->ChangeValue(text); |
| 10 |
SetName("SingleBitmapAndTextDlg"); |
| 11 |
WindowAttrManager::Load(this); |
| 12 |
} |
| 13 |
|
| 14 |
SingleBitmapAndTextDlg::~SingleBitmapAndTextDlg() {} |
| 15 |
|
| 16 |
void SingleBitmapAndTextDlg::OnOKUI(wxUpdateUIEvent& event) |
| 17 |
{ |
| 18 |
event.Enable(!m_textCtrlBmp->GetValue().IsEmpty() && !m_textCtrlText->GetValue().IsEmpty()); |
| 19 |
} |
| 20 |
|
| 21 |
void SingleBitmapAndTextDlg::OnSelectBitmap(wxCommandEvent& event) |
| 22 |
{ |
| 23 |
BitmapSelectorDlg dlg(this, m_textCtrlBmp->GetValue()); |
| 24 |
if(dlg.ShowModal() == wxID_OK) { m_textCtrlBmp->ChangeValue(dlg.GetBitmapFile()); } |
| 25 |
} |