Compare commits
4 Commits
762c0784b5
...
d23d092e7c
Author | SHA1 | Date | |
---|---|---|---|
d23d092e7c | |||
a6b634bc89 | |||
ae1587c201 | |||
d37720a9cd |
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
.vscode/
|
||||
build/
|
19
CMakeLists.txt
Normal file
19
CMakeLists.txt
Normal file
|
@ -0,0 +1,19 @@
|
|||
cmake_minimum_required(VERSION 3.0)
|
||||
project(torque-ide CXX)
|
||||
find_package(wxWidgets COMPONENTS core base)
|
||||
|
||||
if(NOT wxWidgets_FOUND)
|
||||
message(FATAL_ERROR "wxWidgets not found")
|
||||
endif()
|
||||
|
||||
include(${wxWidgets_USE_FILE})
|
||||
add_executable(${PROJECT_NAME}
|
||||
src/torqueideabout.cpp
|
||||
src/torqueideapp.cpp
|
||||
src/torqueideframe.cpp
|
||||
src/torqueideprefs.cpp
|
||||
src/torqueidestc.cpp
|
||||
)
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE src)
|
||||
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -g)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE ${wxWidgets_LIBRARIES})
|
2
README.md
Normal file
2
README.md
Normal file
|
@ -0,0 +1,2 @@
|
|||
## Prerequisites
|
||||
`sudo apt install libwxbase3.0-dev wx3.0-headers libwxgtk3.0-gtk3-dev`
|
|
@ -1,5 +1,5 @@
|
|||
/* XPM */
|
||||
static char * torque_xpm[] = {
|
||||
static const char *const torque_xpm[] = {
|
||||
"32 32 48 1",
|
||||
" c None",
|
||||
". c #4D4D4D",
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
*/
|
||||
|
||||
#include <wx/wx.h>
|
||||
#include "torqueideabout.h"
|
||||
#include "torqueideframe.h"
|
||||
|
||||
class TorqueIDEApp : public wxApp
|
||||
{
|
||||
|
@ -50,4 +52,4 @@ class TorqueIDEApp : public wxApp
|
|||
|
||||
DECLARE_APP(TorqueIDEApp);
|
||||
|
||||
#endif _TORQUEIDEAPP_H
|
||||
#endif /* _TORQUEIDEAPP_H */
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
// For compilers that support precompilation, includes "wx/wx.h"
|
||||
#include <wx/wxprec.h>
|
||||
#include <wx/filedlg.h>
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include <wx/wx.h>
|
||||
|
@ -195,7 +196,7 @@ void TorqueIDEFrame::OnMenuFileNew(wxCommandEvent &event)
|
|||
|
||||
void TorqueIDEFrame::OnMenuFileOpen(wxCommandEvent &event)
|
||||
{
|
||||
wxFileDialog *dlg = new wxFileDialog(this, _("Open"), _(""), _(""), _("TorqueSCRIPT Files(*.cs, *.gui, *.mis)|*.cs;*.gui;*.mis|All files(*.*)|*.*"), wxOPEN, wxDefaultPosition);
|
||||
wxFileDialog *dlg = new wxFileDialog(this, _("Open"), _(""), _(""), _("TorqueSCRIPT Files(*.cs, *.gui, *.mis)|*.cs;*.gui;*.mis|All files(*.*)|*.*"), wxFD_OPEN, wxDefaultPosition);
|
||||
if(dlg->ShowModal() == wxID_OK)
|
||||
{
|
||||
scintilla->LoadFile(dlg->GetPath());
|
||||
|
@ -215,7 +216,7 @@ void TorqueIDEFrame::OnMenuFileSave(wxCommandEvent &event)
|
|||
|
||||
void TorqueIDEFrame::OnMenuFileSaveAs(wxCommandEvent &event)
|
||||
{
|
||||
wxFileDialog *dlg = new wxFileDialog(this, _("Save As"), _(""), _(""), _("TorqueSCRIPT Files(*.cs)|*.cs|All files(*.*)|*.*"), wxSAVE, wxDefaultPosition);
|
||||
wxFileDialog *dlg = new wxFileDialog(this, _("Save As"), _(""), _(""), _("TorqueSCRIPT Files(*.cs)|*.cs|All files(*.*)|*.*"), wxFD_SAVE, wxDefaultPosition);
|
||||
if(dlg->ShowModal() == wxID_OK)
|
||||
{
|
||||
scintilla->SaveFile(dlg->GetPath());
|
||||
|
|
|
@ -194,4 +194,4 @@ class TorqueIDEFrame : public wxFrame
|
|||
};
|
||||
};
|
||||
|
||||
#endif _TORQUEIDEFRAME_H
|
||||
#endif /* _TORQUEIDEFRAME_H */
|
||||
|
|
|
@ -225,7 +225,7 @@ const LanguageInfo languagePrefs [] = {
|
|||
{-1, NULL}},
|
||||
TORQUEIDESTC_FOLD_COMMENTPY | TORQUEIDESTC_FOLD_QUOTESPY},
|
||||
// * (any)
|
||||
{(wxChar *)DEFAULT_LANGUAGE,
|
||||
{(const wxChar *)DEFAULT_LANGUAGE,
|
||||
_T("*.*"),
|
||||
wxSTC_LEX_PROPERTIES,
|
||||
{{TORQUEIDESTC_TYPE_DEFAULT, NULL},
|
||||
|
|
|
@ -115,8 +115,8 @@ extern const CommonInfo commonPrefs;
|
|||
|
||||
// Language Information
|
||||
struct LanguageInfo {
|
||||
wxChar *name;
|
||||
wxChar *filepattern;
|
||||
const wxChar *name;
|
||||
const wxChar *filepattern;
|
||||
int lexer;
|
||||
struct {
|
||||
int type;
|
||||
|
@ -142,4 +142,4 @@ struct StyleInfo {
|
|||
extern const StyleInfo stylePrefs[];
|
||||
extern const int stylePrefsSize;
|
||||
|
||||
#endif _TORQUEIDEPREFS_H
|
||||
#endif /* _TORQUEIDEPREFS_H */
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
// For compilers that supports precompilation, include "wx/wx.h"
|
||||
#include <wx/wxprec.h>
|
||||
#include <wx/filedlg.h>
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include <wx/wx.h>
|
||||
|
@ -232,7 +233,7 @@ bool TorqueIDESTC::LoadFile()
|
|||
// Get Filename
|
||||
if (!filename)
|
||||
{
|
||||
wxFileDialog dlg (this, _T("Open file"), _T(""), _T(""), _T("Any file (*)|*"), wxOPEN | wxFILE_MUST_EXIST | wxCHANGE_DIR);
|
||||
wxFileDialog dlg (this, _T("Open file"), _T(""), _T(""), _T("Any file (*)|*"), wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_CHANGE_DIR);
|
||||
if (dlg.ShowModal() != wxID_OK) return false;
|
||||
filename = dlg.GetPath();
|
||||
}
|
||||
|
@ -279,7 +280,7 @@ bool TorqueIDESTC::SaveFile()
|
|||
|
||||
// Get Filename
|
||||
if (!filename) {
|
||||
wxFileDialog dlg (this, _T("Save file"), _T(""), _T(""), _T("Any file (*)|*"), wxSAVE | wxOVERWRITE_PROMPT);
|
||||
wxFileDialog dlg (this, _T("Save file"), _T(""), _T(""), _T("Any file (*)|*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
|
||||
if (dlg.ShowModal() != wxID_OK) return false;
|
||||
filename = dlg.GetPath();
|
||||
}
|
||||
|
|
|
@ -83,4 +83,4 @@ class TorqueIDESTC : public wxStyledTextCtrl
|
|||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif _TORQUEIDESCINTILLA_H
|
||||
#endif /* _TORQUEIDESCINTILLA_H */
|
||||
|
|
Loading…
Reference in New Issue
Block a user