| 1 |
////////////////////////////////////////////////////////////////////////////// |
| 2 |
////////////////////////////////////////////////////////////////////////////// |
| 3 |
// |
| 4 |
// copyright : (C) 2014 Eran Ifrah |
| 5 |
// file name : ViewSettings.cpp |
| 6 |
// |
| 7 |
// ------------------------------------------------------------------------- |
| 8 |
// A |
| 9 |
// _____ _ _ _ _ |
| 10 |
// / __ \ | | | | (_) | |
| 11 |
// | / \/ ___ __| | ___| | _| |_ ___ |
| 12 |
// | | / _ \ / _ |/ _ \ | | | __/ _ ) |
| 13 |
// | \__/\ (_) | (_| | __/ |___| | || __/ |
| 14 |
// \____/\___/ \__,_|\___\_____/_|\__\___| |
| 15 |
// |
| 16 |
// F i l e |
| 17 |
// |
| 18 |
// This program is free software; you can redistribute it and/or modify |
| 19 |
// it under the terms of the GNU General Public License as published by |
| 20 |
// the Free Software Foundation; either version 2 of the License, or |
| 21 |
// (at your option) any later version. |
| 22 |
// |
| 23 |
////////////////////////////////////////////////////////////////////////////// |
| 24 |
////////////////////////////////////////////////////////////////////////////// |
| 25 |
|
| 26 |
#include "DbViewerPanel.h" |
| 27 |
#include "ViewSettings.h" |
| 28 |
|
| 29 |
ViewSettings::ViewSettings( wxWindow* parent,IDbAdapter* pDbAdapter):_ViewSettings(parent) |
| 30 |
{ |
| 31 |
DbViewerPanel::InitStyledTextCtrl( m_scintilla2 ); |
| 32 |
m_pDbAdapter = pDbAdapter; |
| 33 |
} |
| 34 |
|
| 35 |
ViewSettings::~ViewSettings() |
| 36 |
{ |
| 37 |
} |
| 38 |
|
| 39 |
void ViewSettings::OnOKClick(wxCommandEvent& event) |
| 40 |
{ |
| 41 |
m_pView->SetName(m_txName->GetValue()); |
| 42 |
m_pView->SetSelect(m_scintilla2->GetText()); |
| 43 |
EndModal(wxID_OK); |
| 44 |
} |
| 45 |
void ViewSettings::SetView(View* pView, wxSFDiagramManager* pManager) |
| 46 |
{ |
| 47 |
m_pView = pView; |
| 48 |
m_pDiagramManager = pManager; |
| 49 |
|
| 50 |
m_txName->SetValue(pView->GetName()); |
| 51 |
m_scintilla2->SetText(pView->GetSelect()); |
| 52 |
} |
| 53 |
|