Some icon tweaking and miscellaneous twiddling

This commit is contained in:
Tim Warren 2015-04-17 12:48:00 -04:00
parent f9d677516a
commit 1b1c88e4ff
12 changed files with 102 additions and 301 deletions

View File

@ -74,7 +74,7 @@ exe: LDLIBS += resource.res
exe: msw_resource all
Tyro.app: all resources/platform/osx/Info.plist
strip -sxX $(PROGRAM)
strip -SXx $(PROGRAM)
SetFile -t APPL $(TARGET)
-mkdir Tyro.app
-mkdir Tyro.app/Contents

View File

@ -0,0 +1,72 @@
/* XPM */
const static char *document[] = {
/* columns rows colors chars-per-pixel */
"64 64 2 1 ",
" c #010101",
". c None",
/* pixels */
"................................................................",
"................................................................",
"................................................................",
"................................................................",
"............. ...........................",
"............ ..........................",
"............ ...................... .........................",
"............ ...................... ........................",
"............ ...................... .......................",
"............ ...................... . ......................",
"............ ...................... .. .....................",
"............ ...................... ... ....................",
"............ ...................... .... ...................",
"............ ...................... ..... ..................",
"............ ...................... ...... .................",
"............ ...................... ....... ................",
"............ ...... ........ ...............",
"............ ...... ......... ..............",
"............ ...................... .............",
"............ ....................... ............",
"............ .................................... ............",
"............ .................................... ............",
"............ .................................... ............",
"............ .................................... ............",
"............ ...... ...... ............",
"............ ...... ...... ............",
"............ .................................... ............",
"............ .................................... ............",
"............ .................................... ............",
"............ .................................... ............",
"............ .................................... ............",
"............ .................................... ............",
"............ ...... ...... ............",
"............ ...... ...... ............",
"............ .................................... ............",
"............ .................................... ............",
"............ .................................... ............",
"............ .................................... ............",
"............ .................................... ............",
"............ .................................... ............",
"............ ...... ...... ............",
"............ ...... ...... ............",
"............ .................................... ............",
"............ .................................... ............",
"............ .................................... ............",
"............ .................................... ............",
"............ .................................... ............",
"............ .................................... ............",
"............ ...... ...... ............",
"............ ...... ...... ............",
"............ .................................... ............",
"............ .................................... ............",
"............ .................................... ............",
"............ .................................... ............",
"............ .................................... ............",
"............ .................................... ............",
"............ .................................... ............",
"............ .................................... ............",
"............ ............",
"............. .............",
"................................................................",
"................................................................",
"................................................................",
"................................................................"
};

View File

@ -1,40 +0,0 @@
/* XPM */
const static char *clipboard[] = {
/* columns rows colors chars-per-pixel */
"32 32 2 1 ",
" c #010101",
". c None",
/* pixels */
"................................",
".............. ..............",
"............. .... .............",
"............ ...... ............",
"...... .. .. ......",
"..... ...... .. .. ...... .....",
"..... ..... ...... ..... .....",
"..... .. .......... .. .....",
"..... . .............. . .....",
"..... . ................ . .....",
"..... . . .....",
"..... .. .............. .. .....",
"..... .. .............. .. .....",
"..... .. .............. .. .....",
"..... .. .............. .. .....",
"..... .. .............. .. .....",
"..... .. .............. .. .....",
"..... .. .............. .. .....",
"..... .. .............. .. .....",
"..... .. .............. .. .....",
"..... .. .............. .. .....",
"..... .. .............. .. .....",
"..... .. .............. .. .....",
"..... .. .............. .. .....",
"..... .. .............. .. .....",
"..... .. .............. .. .....",
"..... .. .. .....",
"..... .................... .....",
"..... .................... .....",
"..... .................... .....",
"...... ......",
"................................"
};

View File

@ -1,40 +0,0 @@
/* XPM */
const static char *close[] = {
/* columns rows colors chars-per-pixel */
"32 32 2 1 ",
" c black",
". c None",
/* pixels */
"................................",
"................................",
"................................",
"............ ............",
".......... ...... ..........",
"........ ............ ........",
"....... .............. .......",
"...... ................ ......",
"..... .................. .....",
"..... ... ............ ... .....",
".... ..... .......... ..... ....",
".... ...... ........ ...... ....",
"... ....... ...... ....... ...",
"... ......... .... ......... ...",
"... .......... .. .......... ...",
"... ........... ........... ...",
"... ........... ........... ...",
"... .......... .. .......... ...",
"... ......... .... ......... ...",
"... ....... ...... ....... ...",
".... ...... ........ ...... ....",
".... ..... .......... ..... ....",
"..... ... ............ ... .....",
"..... .................. .....",
"...... ................ ......",
"....... .............. .......",
"........ ............ ........",
".......... ...... ..........",
"............ ............",
"................................",
"................................",
"................................"
};

View File

@ -1,40 +0,0 @@
/* XPM */
const static char *copy[] = {
/* columns rows colors chars-per-pixel */
"32 32 2 1 ",
" c #010101",
". c None",
/* pixels */
"................................",
"........... ...........",
".......... ......... ..........",
".......... ......... .........",
".......... ......... . ........",
".......... ......... .. .......",
".......... ......... ... ......",
"..... ..... .... .....",
".... ......... ..... ....",
".... ......... .......... ....",
".... ......... . ......... ....",
".... ......... .. ........ ....",
".... ......... ... ....... ....",
".... ......... .... ...... ....",
".... .......... ..... ....",
".... ................ ..... ....",
".... ................ ..... ....",
".... ................ ..... ....",
".... ................ ..... ....",
".... ................ ..... ....",
".... ................ ..... ....",
".... ................ ..... ....",
".... ................ ..... ....",
".... ................ ..... ....",
".... ................ .....",
".... ................ ..........",
".... ................ ..........",
".... ................ ..........",
".... ................ ..........",
".... ................ ..........",
"..... ...........",
"................................"
};

View File

@ -1,40 +0,0 @@
/* XPM */
const static char *diskette[] = {
/* columns rows colors chars-per-pixel */
"32 32 2 1 ",
" c #010101",
". c None",
/* pixels */
"................................",
"................................",
"................................",
"................................",
".... .......",
".... ...... ......... ... ......",
".... ...... ...... . .... .....",
".... ...... ...... . ..... ....",
".... ...... ...... . ..... ....",
".... ...... ...... . ..... ....",
".... ...... ...... . ..... ....",
".... ...... ......... ..... ....",
".... ...... ..... ....",
".... ...................... ....",
".... ...................... ....",
".... ...................... ....",
".... ... ... ....",
".... ... .............. ... ....",
".... ... .............. ... ....",
".... ... .............. ... ....",
".... ... .............. ... ....",
".... ... .............. ... ....",
".... ... .............. ... ....",
".... ... .............. ... ....",
".... ... .............. ... ....",
".... ... .............. ... ....",
".... ... .............. ... ....",
".... ....",
"................................",
"................................",
"................................",
"................................"
};

View File

@ -1,40 +0,0 @@
/* XPM */
const static char *file_add[] = {
/* columns rows colors chars-per-pixel */
"32 32 2 1 ",
" c #010101",
". c None",
/* pixels */
"................................",
"................................",
"....... .............",
"...... ........... ............",
"...... ........... ...........",
"...... ........... . ..........",
"...... ........... .. .........",
"...... ........... ... ........",
"...... ........... .... .......",
"...... ............ ......",
"...... .................. ......",
"...... .................. ......",
"...... .................. ......",
"...... ........ ......... ......",
"...... ........ ......... ......",
"...... ........ ......... ......",
"...... ..... ...... ......",
"...... ........ ......... ......",
"...... ........ ......... ......",
"...... ........ ......... ......",
"...... .................. ......",
"...... .................. ......",
"...... .................. ......",
"...... .................. ......",
"...... .................. ......",
"...... .................. ......",
"...... .................. ......",
"...... .................. ......",
"...... .................. ......",
"....... .......",
"................................",
"................................"
};

View File

@ -1,40 +0,0 @@
/* XPM */
const static char *folder[] = {
/* columns rows colors chars-per-pixel */
"32 32 2 1 ",
" c #010101",
". c None",
/* pixels */
"................................",
"................................",
"................................",
"................................",
"... .....................",
"... ...... .....................",
".. ....... ....................",
".. ........ ......",
".. ..................... ......",
".. ..................... .....",
".. ..... ..",
".. ... .",
".. ... ...................... .",
".. ... ...................... .",
".. .. ...................... ..",
".. .. ...................... ..",
".. .. ...................... ..",
".. .. ...................... ..",
".. .. ...................... ..",
".. . ...................... ...",
".. . ...................... ...",
".. . ...................... ...",
".. . ...................... ...",
".. ...................... ....",
".. ...................... ....",
"... ...................... ....",
"... .....",
"................................",
"................................",
"................................",
"................................",
"................................"
};

View File

@ -1,40 +0,0 @@
/* XPM */
const static char *scissors[] = {
/* columns rows colors chars-per-pixel */
"32 32 2 1 ",
" c #010101",
". c None",
/* pixels */
"................................",
"................................",
"......... ....................",
"........ ... ...................",
"....... ..... ..................",
"....... ..... ..................",
"....... ..... ..................",
"........ ... ..................",
"......... . ........ .....",
"............. ....... ... .....",
"............. ...... ..... ....",
"............. ..... ..... ....",
"............. ... . ..... ....",
"............. ... . .....",
"............ ... ..... ......",
"........... ... ...............",
".......... .. ...............",
"......... .. . ...............",
"........ .. .. ...............",
"........ .. .. ...............",
"....... .. . .. ...............",
"...... .. .. .. ...............",
"...... . ... .. ...............",
"..... . .... .. ...............",
"..... ..... . ................",
"..... ...... . ................",
"............. . ................",
"............. .................",
"............. .................",
"................................",
"................................",
"................................"
};

View File

@ -6,8 +6,9 @@
#define DEFINITIONS_H
// Application config
const wxString APP_NAME = _T("Tyro");
const wxString APP_VENDOR = _T("Aviat Ion");
const wxString APP_NAME = "Tyro";
const wxString APP_VENDOR = "Aviat Ion";
const wxString APP_VERSION = "0.0.1";
// EditPane file extension to lexer mapping
typedef pair<string, int> StringConstMapData;

View File

@ -58,6 +58,11 @@ bool EditPane::LoadAndHighlight(wxString filePath)
this->SetLexer(wxSTC_LEX_NULL);
}
// Some basic properties to set
this->SetProperty("technology", "2");
this->SetProperty("error.inline", "0");
this->SetProperty("font.quality", "3"); // LCD Optimized
// Get the list of keywords for the current language
JsonValue keywords_array = config->GetLangKeywords(lang);
@ -204,6 +209,9 @@ bool EditPane::SaveFile()
bool EditPane::SaveFile(const wxString &filename)
{
if ( ! this->IsModified()) return true;
this->SetSavePoint();
return wxStyledTextCtrl::SaveFile(filename);
}

View File

@ -5,7 +5,12 @@
MainFrame::MainFrame(wxFrame *frame, const wxString& title)
: wxFrame(frame, -1, title)
{
{
#include "../../resources/xpm/document.xpm"
wxIcon app_icon(document);
this->SetIcon(app_icon);
// Create menus and bars
this->SetupMenu();
this->SetupStatusBar();
@ -58,13 +63,13 @@ void MainFrame::SetupToolbar()
wxBitmap cut_icon(scissors);
wxBitmap paste_icon(clipboard);
#else
wxBitmap new_file_icon = wxArtProvider::GetBitmap(wxART_NEW);
wxBitmap open_file_icon = wxArtProvider::GetBitmap(wxART_FILE_OPEN);
wxBitmap save_file_icon = wxArtProvider::GetBitmap(wxART_FILE_SAVE);
wxBitmap close_file_icon = wxArtProvider::GetBitmap(wxART_CLOSE);
wxBitmap copy_icon = wxArtProvider::GetBitmap(wxART_COPY);
wxBitmap cut_icon = wxArtProvider::GetBitmap(wxART_CUT);
wxBitmap paste_icon = wxArtProvider::GetBitmap(wxART_PASTE);
wxBitmap new_file_icon = wxArtProvider::GetBitmap(wxART_NEW, wxART_TOOLBAR);
wxBitmap open_file_icon = wxArtProvider::GetBitmap(wxART_FILE_OPEN, wxART_TOOLBAR);
wxBitmap save_file_icon = wxArtProvider::GetBitmap(wxART_FILE_SAVE, wxART_TOOLBAR);
wxBitmap close_file_icon = wxArtProvider::GetBitmap(wxART_CLOSE, wxART_TOOLBAR);
wxBitmap copy_icon = wxArtProvider::GetBitmap(wxART_COPY, wxART_TOOLBAR);
wxBitmap cut_icon = wxArtProvider::GetBitmap(wxART_CUT, wxART_TOOLBAR);
wxBitmap paste_icon = wxArtProvider::GetBitmap(wxART_PASTE, wxART_TOOLBAR);
#endif
CreateToolBar(wxNO_BORDER | wxTB_FLAT | wxTB_HORIZONTAL);
@ -74,7 +79,9 @@ void MainFrame::SetupToolbar()
toolBar->AddTool(wxID_NEW, "New", new_file_icon, "New file");
toolBar->AddTool(wxID_OPEN, "Open", open_file_icon, "Open file");
toolBar->AddTool(wxID_SAVE, "Save", save_file_icon, "Save file");
#ifndef __WXWIN__
toolBar->AddTool(wxID_CLOSE, "Close", close_file_icon, "Close file");
#endif
toolBar->AddSeparator();
toolBar->AddTool(wxID_COPY, "Copy", copy_icon, "Copy");
toolBar->AddTool(wxID_CUT, "Cut", cut_icon, "Cut");
@ -210,10 +217,7 @@ void MainFrame::OnCloseTab(wxCommandEvent &WXUNUSED(event))
void MainFrame::OnSave(wxCommandEvent &WXUNUSED(event))
{
EditPane *editor = notebook->GetCurrentEditor();
wxString file = editor->fileName;
editor->SetSavePoint();
editor->SaveFile(file);
editor->SaveFile();
}
void MainFrame::OnSaveAs(wxCommandEvent &WXUNUSED(event))
@ -269,8 +273,8 @@ void MainFrame::OnAbout(wxCommandEvent &WXUNUSED(event))
{
wxAboutDialogInfo info;
info.SetName("Tyro");
info.SetVersion("0.0.1", "Prerelease");
info.SetName(APP_NAME);
info.SetVersion(APP_VERSION, "Prerelease");
info.AddDeveloper("Tim Warren, Programmer");
@ -288,8 +292,6 @@ void MainFrame::EnableEditControls()
fileMenu->Enable(wxID_SAVE, true);
fileMenu->Enable(wxID_SAVEAS, true);
//editMenu->Enable(wxID_UNDO, false);
//editMenu->Enable(wxID_REDO, false);
editMenu->Enable(wxID_CUT, true);
editMenu->Enable(wxID_COPY, true);
editMenu->Enable(wxID_PASTE, true);
@ -312,8 +314,6 @@ void MainFrame::DisableEditControls()
fileMenu->Enable(wxID_SAVE, false);
fileMenu->Enable(wxID_SAVEAS, false);
editMenu->Enable(wxID_UNDO, false);
editMenu->Enable(wxID_REDO, false);
editMenu->Enable(wxID_CUT, false);
editMenu->Enable(wxID_COPY, false);
editMenu->Enable(wxID_PASTE, false);