Power System Platform  2026w10a-beta
Loading...
Searching...
No Matches
ATPFileEditorForm Class Reference
Inheritance diagram for ATPFileEditorForm:
Collaboration diagram for ATPFileEditorForm:

Public Member Functions

 ATPFileEditorForm (wxWindow *parent, wxString path)
 

Protected Member Functions

virtual void OnCancelClick (wxCommandEvent &event)
 
virtual void OnOKClick (wxCommandEvent &event)
 

Protected Attributes

wxString m_path
 

Detailed Description

Definition at line 5 of file ATPFileEditorForm.h.

Constructor & Destructor Documentation

◆ ATPFileEditorForm()

ATPFileEditorForm::ATPFileEditorForm ( wxWindow *  parent,
wxString  path 
)

Definition at line 4 of file ATPFileEditorForm.cpp.

5 : ATPFileEditorFormBase(parent), m_path(path)
6{
7 wxTextFile file;
8 file.Open(m_path);
9 m_stcATPFile->AppendText(file.GetFirstLine() + "\n");
10 while (!file.Eof())
11 {
12 m_stcATPFile->AppendText(file.GetNextLine() + "\n");
13 }
14 file.Close();
15 m_stcATPFile->StyleClearAll();
16 m_stcATPFile->SetLexer(wxSTC_LEX_F77);
17 //m_stcATPFile->StyleSetForeground(wxSTC_F_STRING1, wxColour(150, 0, 0));
18 //m_stcATPFile->StyleSetForeground(wxSTC_F_IDENTIFIER, wxColour(40, 0, 60));
19 //m_stcATPFile->StyleSetForeground(wxSTC_F_NUMBER, wxColour(255, 100, 0));
20 //m_stcATPFile->StyleSetForeground(wxSTC_F_LABEL, wxColour(255, 0, 0));
21 //m_stcATPFile->StyleSetForeground(wxSTC_F_OPERATOR, wxColour(150, 0, 150));
22 //m_stcATPFile->StyleSetForeground(wxSTC_F_WORD, wxColour(0, 0, 150));
23 //m_stcATPFile->StyleSetForeground(wxSTC_F_WORD2, wxColour(255, 165, 0));
24 m_stcATPFile->StyleSetForeground(wxSTC_F_COMMENT, wxColour(0, 100, 25));
25 //m_stcATPFile->StyleSetBold(wxSTC_P_WORD, true);
26 //m_stcATPFile->StyleSetBold(wxSTC_P_WORD2, true);
27 // Set max length to 80 characters
28 m_stcATPFile->SetEdgeColumn(80);
29 m_stcATPFile->SetEdgeMode(wxSTC_EDGE_LINE);
30
31 //m_stcATPFile->SetKeyWords(0, wxT("BEGIN /SOURCE"));
32}

◆ ~ATPFileEditorForm()

ATPFileEditorForm::~ATPFileEditorForm ( )
virtual

Definition at line 34 of file ATPFileEditorForm.cpp.

35{
36}

Member Function Documentation

◆ OnCancelClick()

void ATPFileEditorForm::OnCancelClick ( wxCommandEvent &  event)
protectedvirtual

Definition at line 38 of file ATPFileEditorForm.cpp.

39{
40 EndModal(wxID_CANCEL);
41}

◆ OnOKClick()

void ATPFileEditorForm::OnOKClick ( wxCommandEvent &  event)
protectedvirtual

Definition at line 42 of file ATPFileEditorForm.cpp.

43{
44 wxTextFile file;
45 file.Open(m_path);
46 file.Clear();
47 file.AddLine(m_stcATPFile->GetText());
48 file.Write();
49 file.Close();
50 EndModal(wxID_OK);
51}

Member Data Documentation

◆ m_path

wxString ATPFileEditorForm::m_path
protected

Definition at line 14 of file ATPFileEditorForm.h.


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