Functional opening and save (as) ing.

This commit is contained in:
robertsim007 2005-02-06 21:08:38 +00:00
parent 31a045f04a
commit dcb5f29353
3 changed files with 41 additions and 13 deletions

View File

@ -6,26 +6,23 @@
--------------------Configuration: Torque IDE - Win32 Release--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\Robert\LOCALS~1\Temp\RSPF2.tmp" with contents
Creating temporary file "C:\DOCUME~1\Robert\LOCALS~1\Temp\RSP6B.tmp" with contents
[
/nologo /MD /W3 /GX /O2 /I "C:\programming\wxwindows\include" /I "C:\programming\wxwindows\contrib\include" /I "C:\programming\wxwindows\lib\msw" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Fo"Release/" /Fd"Release/" /FD /c
"C:\programming\torque-ide\win32\torqueideapp.cpp"
"C:\programming\torque-ide\win32\torqueideframe.cpp"
]
Creating command line "cl.exe @C:\DOCUME~1\Robert\LOCALS~1\Temp\RSPF2.tmp"
Creating temporary file "C:\DOCUME~1\Robert\LOCALS~1\Temp\RSPF3.tmp" with contents
Creating command line "cl.exe @C:\DOCUME~1\Robert\LOCALS~1\Temp\RSP6B.tmp"
Creating temporary file "C:\DOCUME~1\Robert\LOCALS~1\Temp\RSP6C.tmp" with contents
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw25_adv.lib wxmsw25_stc.lib wxpng.lib wxzlib.lib wxjpeg.lib wxtiff.lib /nologo /subsystem:windows /incremental:no /pdb:"Release/Torque IDE.pdb" /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/Torque IDE.exe" /libpath:"C:\programming\wxwindows\lib\vc_lib" /libpath:"C:\programming\wxwindows\contrib\lib"
".\Release\torqueideapp.obj"
".\Release\torqueideframe.obj"
".\Release\torque ide.res"
]
Creating command line "link.exe @C:\DOCUME~1\Robert\LOCALS~1\Temp\RSPF3.tmp"
Creating command line "link.exe @C:\DOCUME~1\Robert\LOCALS~1\Temp\RSP6C.tmp"
<h3>Output Window</h3>
Compiling...
torqueideapp.cpp
torqueideframe.cpp
Generating Code...
Linking...
LINK : warning LNK4089: all references to "ADVAPI32.dll" discarded by /OPT:REF

View File

@ -56,6 +56,8 @@ TorqueIDEFrame::TorqueIDEFrame(const wxChar *title) : wxFrame((wxFrame *) NULL,
menu_edit->Append(MENU_EDIT_CUT, "Cu&t", "Cuts the selection and moves it to the clipboard");
menu_edit->Append(MENU_EDIT_COPY, "&Copy", "Copies the selection to the clipboard");
menu_edit->Append(MENU_EDIT_PASTE, "&Paste", "Inserts the clipboard contents at the insertion point");
menu_edit->AppendSeparator();
menu_edit->Append(MENU_EDIT_CLEAR, "C&lear", "Clears the selection");
menubar->Append(menu_edit, "&Edit");
menu_help = new wxMenu();
menu_help->Append(MENU_HELP_ABOUT, "&About", "Displays the program information and copyright");
@ -158,6 +160,7 @@ BEGIN_EVENT_TABLE(TorqueIDEFrame, wxFrame)
EVT_MENU(MENU_EDIT_CUT, TorqueIDEFrame::OnMenuEditCut)
EVT_MENU(MENU_EDIT_COPY, TorqueIDEFrame::OnMenuEditCopy)
EVT_MENU(MENU_EDIT_PASTE, TorqueIDEFrame::OnMenuEditPaste)
EVT_MENU(MENU_EDIT_CLEAR, TorqueIDEFrame::OnMenuEditClear)
// Help
EVT_MENU(MENU_HELP_HELP, TorqueIDEFrame::OnMenuHelpHelp)
EVT_MENU(MENU_HELP_ABOUT, TorqueIDEFrame::OnMenuHelpAbout)
@ -173,7 +176,10 @@ void TorqueIDEFrame::OnMenuFileOpen(wxCommandEvent &event)
wxFileDialog *opendlg = new wxFileDialog(this, "Open", "", "", "TorqueSCRIPT Files(*.cs)|*.cs|All files(*.*)|*.*", wxOPEN, wxDefaultPosition);
if ( opendlg->ShowModal() == wxID_OK )
{
scintilla->LoadFile(opendlg->GetFilename());
// Debug purposes
//wxLogMessage(opendlg->GetDirectory()<<"/"<<opendlg->GetFilename());
scintilla->LoadFile(opendlg->GetDirectory()<<"/"<<opendlg->GetFilename());
scintilla->SetSavePoint();
SetStatusText(opendlg->GetFilename(), 1);
}
opendlg->Destroy();
@ -181,7 +187,11 @@ void TorqueIDEFrame::OnMenuFileOpen(wxCommandEvent &event)
void TorqueIDEFrame::OnMenuFileSave(wxCommandEvent &event)
{
wxLogMessage("File Save Menu Selected");
if(scintilla->GetModify())
{
wxLogMessage("File is modified!");
scintilla->SetSavePoint();
}
}
void TorqueIDEFrame::OnMenuFileSaveAs(wxCommandEvent &event)
@ -189,7 +199,10 @@ void TorqueIDEFrame::OnMenuFileSaveAs(wxCommandEvent &event)
wxFileDialog *savedlg = new wxFileDialog(this, "Save As", "", "", "TorqueSCRIPT Files(*.cs)|*.cs|All files(*.*)|*.*", wxSAVE, wxDefaultPosition);
if ( savedlg->ShowModal() == wxID_OK )
{
scintilla->SaveFile(savedlg->GetFilename());
// Debug purposes
//wxLogMessage(savedlg->GetDirectory()<<"/"<<savedlg->GetFilename());
scintilla->SaveFile(savedlg->GetDirectory()<<"/"<<savedlg->GetFilename());
scintilla->SetSavePoint();
SetStatusText(savedlg->GetFilename(), 1);
}
savedlg->Destroy();
@ -226,17 +239,29 @@ void TorqueIDEFrame::OnMenuEditRedo(wxCommandEvent &event)
void TorqueIDEFrame::OnMenuEditCut(wxCommandEvent &event)
{
wxLogMessage("Edit Cut Menu Selected");
scintilla->Cut();
}
void TorqueIDEFrame::OnMenuEditCopy(wxCommandEvent &event)
{
wxLogMessage("Edit Copy Menu Selected");
scintilla->Copy();
}
void TorqueIDEFrame::OnMenuEditPaste(wxCommandEvent &event)
{
wxLogMessage("Edit Paste Menu Selected");
if(scintilla->CanPaste())
{
scintilla->Paste();
}
else
{
return;
}
}
void TorqueIDEFrame::OnMenuEditClear(wxCommandEvent &event)
{
scintilla->Clear();
}
void TorqueIDEFrame::OnMenuHelpHelp(wxCommandEvent &event)

View File

@ -91,6 +91,11 @@ class TorqueIDEFrame : public wxFrame
* Processes menu Edit|Paste
*/
void OnMenuEditPaste(wxCommandEvent &event);
/**
* Processes menu Edit|Clear
*/
void OnMenuEditClear(wxCommandEvent &event);
/**
* Processes menu Help|Help
@ -126,6 +131,7 @@ class TorqueIDEFrame : public wxFrame
MENU_EDIT_CUT,
MENU_EDIT_COPY,
MENU_EDIT_PASTE,
MENU_EDIT_CLEAR,
MENU_HELP_ABOUT,
MENU_HELP_HELP
};