Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dbf3354a1a | ||
|
|
0891f44f33 | ||
|
|
771dd9f1f7 | ||
|
|
c4f2726256 | ||
|
|
bc4b6b30d1 | ||
|
|
34e409ef2f | ||
|
|
e43a5a0ef0 | ||
|
|
ddc8b00416 | ||
|
|
9f128a96d1 | ||
|
|
74e95b95b5 | ||
|
|
f3bb513545 | ||
|
|
72f8b179d7 | ||
|
|
fa2fb03cf8 | ||
|
|
12c2889ea3 |
Submodule MSI/MSIBuild updated: 538cea0945...2036f3bc8a
Submodule MSI/MSICA updated: 6133c0e76c...ef5e73f72f
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 1991-2020 Amebis
|
||||
# Copyright © 1991-2021 Amebis
|
||||
#
|
||||
# This file is part of ZRCola.
|
||||
#
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 1991-2020 Amebis
|
||||
# Copyright © 1991-2021 Amebis
|
||||
#
|
||||
# This file is part of ZRCola.
|
||||
#
|
||||
|
||||
BIN
MakefileLang.mak
BIN
MakefileLang.mak
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
MakefilePlat.mak
BIN
MakefilePlat.mak
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 1991-2020 Amebis
|
||||
# Copyright © 1991-2021 Amebis
|
||||
#
|
||||
# This file is part of ZRCola.
|
||||
#
|
||||
|
||||
2
Updater
2
Updater
Submodule Updater updated: e3c9b3aa62...625549838e
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 1991-2020 Amebis
|
||||
# Copyright © 1991-2021 Amebis
|
||||
#
|
||||
# This file is part of ZRCola.
|
||||
#
|
||||
|
||||
BIN
ZRCola/ZRCola.rc
BIN
ZRCola/ZRCola.rc
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
BIN
ZRCola/res/warn_pua.ico
Normal file
BIN
ZRCola/res/warn_pua.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 51 KiB |
1690
ZRCola/res/warn_pua.pdf
Normal file
1690
ZRCola/res/warn_pua.pdf
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,11 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Aug 8 2018)
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __ZRCOLAGUI_H__
|
||||
#define __ZRCOLAGUI_H__
|
||||
#pragma once
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
@@ -55,10 +54,10 @@ class wxZRColaComposerPanel;
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaFrameBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaFrameBase : public wxFrame
|
||||
class wxZRColaFrameBase : public wxFrame
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
enum
|
||||
{
|
||||
@@ -68,7 +67,8 @@ class wxZRColaFrameBase : public wxFrame
|
||||
wxID_SEND_SOURCE,
|
||||
wxID_COPY_SOURCE_AND_RETURN,
|
||||
wxID_SEND_ABORT,
|
||||
wxID_COMPOSITION_MENU,
|
||||
wxID_COMPOSITION,
|
||||
wxID_WARN_PUA,
|
||||
wxID_SETTINGS,
|
||||
wxID_TOOLBAR_EDIT,
|
||||
wxID_TOOLBAR_TRANSLATE,
|
||||
@@ -76,60 +76,61 @@ class wxZRColaFrameBase : public wxFrame
|
||||
wxID_HELP_INSTRUCTIONS,
|
||||
wxID_HELP_SHORTCUTS,
|
||||
wxID_HELP_REQCHAR,
|
||||
wxID_HELP_UPDATE,
|
||||
wxID_COMPOSITION_TOOLBAR
|
||||
wxID_HELP_UPDATE
|
||||
};
|
||||
|
||||
|
||||
wxMenuBar* m_menubar;
|
||||
wxMenu* m_menuProgram;
|
||||
wxMenu* m_menuEdit;
|
||||
wxMenuItem* m_menuItemComposition;
|
||||
wxMenu* m_menuTranslationSeq;
|
||||
wxMenuItem* m_menuItemComposition;
|
||||
wxMenuItem* m_menuItemWarnPUA;
|
||||
wxMenu* m_menuView;
|
||||
wxMenu* m_menuHelp;
|
||||
wxAuiToolBar* m_toolbarEdit;
|
||||
wxAuiToolBarItem* m_toolEditCut;
|
||||
wxAuiToolBarItem* m_toolEditCopy;
|
||||
wxAuiToolBarItem* m_toolEditPaste;
|
||||
wxAuiToolBarItem* m_toolEditCut;
|
||||
wxAuiToolBarItem* m_toolEditCopy;
|
||||
wxAuiToolBarItem* m_toolEditPaste;
|
||||
wxAuiToolBar* m_toolbarTranslate;
|
||||
wxAuiToolBarItem* m_toolCharSelect;
|
||||
wxAuiToolBarItem* m_toolSendDestination;
|
||||
wxAuiToolBarItem* m_toolSendSource;
|
||||
wxAuiToolBarItem* m_toolComposition;
|
||||
wxAuiToolBarItem* m_toolCharSelect;
|
||||
wxAuiToolBarItem* m_toolSendDestination;
|
||||
wxAuiToolBarItem* m_toolSendSource;
|
||||
wxChoice* m_toolTranslationSeq;
|
||||
wxAuiToolBarItem* m_toolComposition;
|
||||
wxAuiToolBarItem* m_toolWarnPUA;
|
||||
wxZRColaCharacterCatalogPanel* m_panelChrCat;
|
||||
wxStatusBar* m_statusBar;
|
||||
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
|
||||
virtual void OnIconize( wxIconizeEvent& event ) { event.Skip(); }
|
||||
virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); }
|
||||
virtual void OnTranslationSeqChoice( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
wxZRColaComposerPanel* m_panel;
|
||||
|
||||
|
||||
wxZRColaFrameBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("ZRCola"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 600,400 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL, const wxString& name = wxT("ZRCola") );
|
||||
wxAuiManager m_mgr;
|
||||
|
||||
|
||||
~wxZRColaFrameBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaComposerPanelBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaComposerPanelBase : public wxPanel
|
||||
class wxZRColaComposerPanelBase : public wxPanel
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
enum
|
||||
{
|
||||
wxID_TIMER_SAVE = 1000
|
||||
};
|
||||
|
||||
|
||||
wxSplitterWindow* m_splitterSource;
|
||||
wxPanel* m_panelSourceEdit;
|
||||
wxPanel* m_panelSourceHex;
|
||||
@@ -139,7 +140,7 @@ class wxZRColaComposerPanelBase : public wxPanel
|
||||
wxPanel* m_panelDestinationHex;
|
||||
wxTextCtrl* m_destinationHex;
|
||||
wxTimer m_timerSave;
|
||||
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnSourcePaint( wxPaintEvent& event ) { event.Skip(); }
|
||||
virtual void OnSourceText( wxCommandEvent& event ) { event.Skip(); }
|
||||
@@ -148,62 +149,62 @@ class wxZRColaComposerPanelBase : public wxPanel
|
||||
virtual void OnDestinationText( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnDestinationHexPaint( wxPaintEvent& event ) { event.Skip(); }
|
||||
virtual void OnSaveTimer( wxTimerEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
wxTextCtrl* m_source;
|
||||
wxTextCtrl* m_destination;
|
||||
|
||||
wxZRColaComposerPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxT("ZRColaComposerPanel") );
|
||||
|
||||
wxZRColaComposerPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxT("ZRColaComposerPanel") );
|
||||
~wxZRColaComposerPanelBase();
|
||||
|
||||
|
||||
void m_splitterSourceOnIdle( wxIdleEvent& )
|
||||
{
|
||||
m_splitterSource->SetSashPosition( -5 );
|
||||
m_splitterSource->Disconnect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaComposerPanelBase::m_splitterSourceOnIdle ), NULL, this );
|
||||
}
|
||||
|
||||
|
||||
void m_splitterDestinationOnIdle( wxIdleEvent& )
|
||||
{
|
||||
m_splitterDestination->SetSashPosition( -5 );
|
||||
m_splitterDestination->Disconnect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaComposerPanelBase::m_splitterDestinationOnIdle ), NULL, this );
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaCharacterCatalogPanelBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaCharacterCatalogPanelBase : public wxPanel
|
||||
class wxZRColaCharacterCatalogPanelBase : public wxPanel
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxChoice* m_choice;
|
||||
wxZRColaCharGrid* m_grid;
|
||||
wxCheckBox* m_show_all;
|
||||
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnChoice( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnGridClick( wxGridEvent& event ) { event.Skip(); }
|
||||
virtual void OnGridKeyDown( wxKeyEvent& event ) { event.Skip(); }
|
||||
virtual void OnShowAll( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaCharacterCatalogPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxT("ZRColaCharacterCatalog") );
|
||||
|
||||
wxZRColaCharacterCatalogPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxT("ZRColaCharacterCatalog") );
|
||||
~wxZRColaCharacterCatalogPanelBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaCharSelectBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaCharSelectBase : public wxDialog
|
||||
class wxZRColaCharSelectBase : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxSearchCtrl* m_search;
|
||||
wxHyperlinkCtrl* m_search_more;
|
||||
@@ -225,7 +226,7 @@ class wxZRColaCharSelectBase : public wxDialog
|
||||
wxHyperlinkCtrl* m_navigateForward;
|
||||
wxZRColaCharGrid* m_gridRelated;
|
||||
wxButton* m_buttonInsert;
|
||||
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); }
|
||||
virtual void OnSearchText( wxCommandEvent& event ) { event.Skip(); }
|
||||
@@ -247,22 +248,22 @@ class wxZRColaCharSelectBase : public wxDialog
|
||||
virtual void OnRelatedSelectCell( wxGridEvent& event ) { event.Skip(); }
|
||||
virtual void OnInsert( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnInsertUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaCharSelectBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Character Search"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaCharSelect") );
|
||||
|
||||
wxZRColaCharSelectBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Character Search"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaCharSelect") );
|
||||
~wxZRColaCharSelectBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaSettingsBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaSettingsBase : public wxDialog
|
||||
class wxZRColaSettingsBase : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxListbook* m_listbook;
|
||||
wxPanel* m_panelLanguage;
|
||||
@@ -277,28 +278,28 @@ class wxZRColaSettingsBase : public wxDialog
|
||||
wxButton* m_sdbSizerButtonsOK;
|
||||
wxButton* m_sdbSizerButtonsApply;
|
||||
wxButton* m_sdbSizerButtonsCancel;
|
||||
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
|
||||
virtual void OnLanguageUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void OnApplyButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaSettingsBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaSettings") );
|
||||
|
||||
wxZRColaSettingsBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaSettings") );
|
||||
~wxZRColaSettingsBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaAboutBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaAboutBase : public wxDialog
|
||||
class wxZRColaAboutBase : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxStaticBitmap* m_bitmapIcon;
|
||||
wxStaticText* m_staticTextZRCola;
|
||||
@@ -310,46 +311,46 @@ class wxZRColaAboutBase : public wxDialog
|
||||
wxTextCtrl* m_declaration;
|
||||
wxStdDialogButtonSizer* m_sdbSizerButtons;
|
||||
wxButton* m_sdbSizerButtonsOK;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaAboutBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About ZRCola"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaAbout") );
|
||||
|
||||
wxZRColaAboutBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About ZRCola"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaAbout") );
|
||||
~wxZRColaAboutBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaUpdaterBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaUpdaterBase : public wxDialog
|
||||
class wxZRColaUpdaterBase : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxTextCtrl* m_log;
|
||||
wxButton* m_buttonUpdate;
|
||||
wxButton* m_buttonClose;
|
||||
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); }
|
||||
virtual void OnUpdate( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnClose( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaUpdaterBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Product Update"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaUpdater") );
|
||||
|
||||
wxZRColaUpdaterBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Product Update"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaUpdater") );
|
||||
~wxZRColaUpdaterBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaCharRequestBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaCharRequestBase : public wxDialog
|
||||
class wxZRColaCharRequestBase : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxStaticText* m_characterLbl;
|
||||
wxTextCtrl* m_character;
|
||||
@@ -360,25 +361,25 @@ class wxZRColaCharRequestBase : public wxDialog
|
||||
wxStdDialogButtonSizer* m_sdbSizerButtons;
|
||||
wxButton* m_sdbSizerButtonsOK;
|
||||
wxButton* m_sdbSizerButtonsCancel;
|
||||
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaCharRequestBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Request a New Character"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaCharRequest") );
|
||||
|
||||
wxZRColaCharRequestBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Request a New Character"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaCharRequest") );
|
||||
~wxZRColaCharRequestBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaTranslationSeqBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaTranslationSeqBase : public wxDialog
|
||||
class wxZRColaTranslationSeqBase : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxStaticText* m_transLbl;
|
||||
wxStaticText* m_availableLbl;
|
||||
@@ -392,7 +393,7 @@ class wxZRColaTranslationSeqBase : public wxDialog
|
||||
wxStdDialogButtonSizer* m_sdbSizerButtons;
|
||||
wxButton* m_sdbSizerButtonsOK;
|
||||
wxButton* m_sdbSizerButtonsCancel;
|
||||
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
|
||||
virtual void OnUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
@@ -405,13 +406,12 @@ class wxZRColaTranslationSeqBase : public wxDialog
|
||||
virtual void OnSelectedUp( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnSelectedDown( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaTranslationSeqBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Custom Translation Sequence"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaTranslationSeq") );
|
||||
|
||||
wxZRColaTranslationSeqBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Custom Translation Sequence"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaTranslationSeq") );
|
||||
~wxZRColaTranslationSeqBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif //__ZRCOLAGUI_H__
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
@@ -19,6 +19,11 @@
|
||||
|
||||
#include "pch.h"
|
||||
|
||||
static inline bool is_pua(_In_ wchar_t c)
|
||||
{
|
||||
return L'\ue000' <= c && c <= L'\uf8ff';
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// wxZRColaComposerPanel
|
||||
@@ -27,10 +32,18 @@
|
||||
wxZRColaComposerPanel::wxZRColaComposerPanel(wxWindow* parent) :
|
||||
m_sourceChanged(false),
|
||||
m_destinationChanged(false),
|
||||
m_sourceRestyled(false),
|
||||
m_destinationRestyled(false),
|
||||
m_styleNormal(*wxBLACK, *wxWHITE, wxFont(20, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxT("ZRCola"))),
|
||||
m_stylePUA(*wxBLUE, *wxWHITE, wxFont(20, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxT("ZRCola"))),
|
||||
m_selSource(0, 0),
|
||||
m_selDestination(0, 0),
|
||||
wxZRColaComposerPanelBase(parent)
|
||||
{
|
||||
// RichEdit control has no inner margins by default.
|
||||
m_source->SetMargins(FromDIP(wxPoint(5, 2)));
|
||||
m_destination->SetMargins(FromDIP(wxPoint(5, 2)));
|
||||
|
||||
m_source->PushEventHandler(&m_keyhandler);
|
||||
|
||||
// Restore the previously saved state (if exists).
|
||||
@@ -88,8 +101,8 @@ void wxZRColaComposerPanel::SynchronizePanels()
|
||||
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
|
||||
wxString src;
|
||||
size_t len = GetValue(m_source, src);
|
||||
wxString src = m_source->GetValue();
|
||||
size_t len = src.Length();
|
||||
std::wstring dst(src.data(), len), dst2;
|
||||
ZRCola::mapping_vector map;
|
||||
|
||||
@@ -132,8 +145,8 @@ void wxZRColaComposerPanel::SynchronizePanels()
|
||||
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
|
||||
wxString src;
|
||||
size_t len = GetValue(m_destination, src);
|
||||
wxString src = m_destination->GetValue();
|
||||
size_t len = src.Length();
|
||||
std::wstring dst(src.data(), len), dst2;
|
||||
ZRCola::mapping_vector map;
|
||||
|
||||
@@ -185,6 +198,9 @@ void wxZRColaComposerPanel::OnSourcePaint(wxPaintEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
if (m_sourceRestyled)
|
||||
return;
|
||||
|
||||
long from, to;
|
||||
m_source->GetSelection(&from, &to);
|
||||
|
||||
@@ -239,8 +255,15 @@ void wxZRColaComposerPanel::OnSourceText(wxCommandEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
if (m_sourceRestyled)
|
||||
return;
|
||||
|
||||
// Set the flag the source text changed to trigger idle-time translation.
|
||||
m_sourceChanged = true;
|
||||
|
||||
m_sourceRestyled = true;
|
||||
m_source->SetStyle(0, GetWindowTextLength(m_source->GetHWND()), m_styleNormal);
|
||||
m_sourceRestyled = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -248,6 +271,9 @@ void wxZRColaComposerPanel::OnDestinationPaint(wxPaintEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
if (m_destinationRestyled)
|
||||
return;
|
||||
|
||||
long from, to;
|
||||
m_destination->GetSelection(&from, &to);
|
||||
|
||||
@@ -302,8 +328,26 @@ void wxZRColaComposerPanel::OnDestinationText(wxCommandEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
if (m_destinationRestyled)
|
||||
return;
|
||||
|
||||
// Set the flag the destination text changed to trigger idle-time inverse translation.
|
||||
m_destinationChanged = true;
|
||||
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
m_destinationRestyled = true;
|
||||
if (app->m_mainWnd->m_warnPUA) {
|
||||
wxString src = m_destination->GetValue();
|
||||
size_t len = src.Length();
|
||||
for (size_t i = 0, j; i < len;) {
|
||||
bool pua_i = is_pua(src[i]);
|
||||
for (j = i + 1; j < len && pua_i == is_pua(src[j]); j++);
|
||||
m_destination->SetStyle((long)i, (long)j, pua_i ? m_stylePUA : m_styleNormal);
|
||||
i = j;
|
||||
}
|
||||
} else
|
||||
m_destination->SetStyle(0, GetWindowTextLength(m_destination->GetHWND()), m_styleNormal);
|
||||
m_destinationRestyled = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -312,18 +356,21 @@ void wxZRColaComposerPanel::OnSaveTimer(wxTimerEvent& event)
|
||||
wxString fileName(GetStateFileName());
|
||||
wxFFile file(fileName, wxT("wb"));
|
||||
if (file.IsOpened()) {
|
||||
wxString text;
|
||||
size_t len;
|
||||
{
|
||||
// Save source text.
|
||||
wxString text = m_source->GetValue();
|
||||
size_t len = text.Length();
|
||||
file.Write(&len, sizeof(len));
|
||||
file.Write((const wchar_t*)text, sizeof(wchar_t)*len);
|
||||
}
|
||||
|
||||
// Save source text.
|
||||
len = GetValue(m_source, text);
|
||||
file.Write(&len, sizeof(len));
|
||||
file.Write((const wchar_t*)text, sizeof(wchar_t)*len);
|
||||
|
||||
// Save destination text.
|
||||
len = GetValue(m_destination, text);
|
||||
file.Write(&len, sizeof(len));
|
||||
file.Write((const wchar_t*)text, sizeof(wchar_t)*len);
|
||||
{
|
||||
// Save destination text.
|
||||
wxString text = m_destination->GetValue();
|
||||
size_t len = text.Length();
|
||||
file.Write(&len, sizeof(len));
|
||||
file.Write((const wchar_t*)text, sizeof(wchar_t)*len);
|
||||
}
|
||||
}
|
||||
|
||||
event.Skip();
|
||||
@@ -348,31 +395,6 @@ wxString wxZRColaComposerPanel::GetStateFileName()
|
||||
}
|
||||
|
||||
|
||||
size_t wxZRColaComposerPanel::GetValue(wxTextCtrl *wnd, wxString &text)
|
||||
{
|
||||
#ifdef __WINDOWS__
|
||||
// Use Windows GetWindowText() function to avoid line ending conversion incompletely imposed by wxWidgets.
|
||||
WXHWND hWnd = wnd->GetHWND();
|
||||
size_t len = ::GetWindowTextLengthW(hWnd);
|
||||
if (len < 0x100) {
|
||||
WCHAR buf[0x100];
|
||||
::GetWindowTextW(hWnd, buf, (int)(len + 1));
|
||||
text.assign(buf, len);
|
||||
} else {
|
||||
LPWSTR buf = new WCHAR[len + 1];
|
||||
::GetWindowTextW(hWnd, buf, (int)(len + 1));
|
||||
text.assign(buf, len);
|
||||
delete [] buf;
|
||||
}
|
||||
|
||||
return len;
|
||||
#else
|
||||
text = wnd->GetValue();
|
||||
return text.Length();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaComposerPanel::SetHexValue(wxTextCtrl *wnd, std::pair<long, long> &range, ZRCola::mapping_vector &mapping, const wchar_t *src, size_t len, long from, long to)
|
||||
{
|
||||
wxString hex;
|
||||
@@ -381,8 +403,8 @@ void wxZRColaComposerPanel::SetHexValue(wxTextCtrl *wnd, std::pair<long, long> &
|
||||
mapping.clear();
|
||||
for (size_t i = 0; i < len && src[i]; i++) {
|
||||
wchar_t c = src[i];
|
||||
if (c == L'\n' || c == '\r') {
|
||||
hex += c;
|
||||
if (c == L'\n') {
|
||||
hex += L"\r\n";
|
||||
first = true;
|
||||
} else {
|
||||
hex += wxString::Format(first ? wxT("%04X") : wxT(" %04X"), src[i]);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
@@ -66,12 +66,17 @@ protected:
|
||||
inline void GetTranslationSeq(_Out_ const ZRCola::transetid_t *&sets_begin, _Out_ const ZRCola::transetid_t *&sets_end) const;
|
||||
|
||||
static wxString GetStateFileName();
|
||||
static size_t GetValue(wxTextCtrl *wnd, wxString &text);
|
||||
static void SetHexValue(wxTextCtrl *wnd, std::pair<long, long> &range, ZRCola::mapping_vector &mapping, const wchar_t *src, size_t len, long from, long to);
|
||||
|
||||
protected:
|
||||
bool m_sourceChanged; ///< Boolean flag to mark source text "dirty" to trigger translation
|
||||
bool m_destinationChanged; ///< Boolean flag to mark destination text "dirty" to trigger inverse translation
|
||||
volatile bool
|
||||
m_sourceRestyled, ///< Boolean flag to mark source text is being restyled
|
||||
m_destinationRestyled; ///< Boolean flag to mark destination text is being restyled
|
||||
wxTextAttr
|
||||
m_styleNormal, ///< Normal text style
|
||||
m_stylePUA; ///< PUA character text style
|
||||
std::vector<ZRCola::mapping_vector> m_mapping; ///< Character index mapping vector between source and normalized text
|
||||
std::pair<long, long>
|
||||
m_selSource, ///< Character index of selected text in source text control
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
@@ -42,8 +42,8 @@ wxBEGIN_EVENT_TABLE(wxZRColaFrame, wxZRColaFrameBase)
|
||||
EVT_MENU (wxID_SEND_SOURCE , wxZRColaFrame::OnSendSource )
|
||||
EVT_MENU (wxID_SEND_ABORT , wxZRColaFrame::OnSendAbort )
|
||||
|
||||
EVT_MENU (wxID_COMPOSITION_MENU , wxZRColaFrame::OnCompositionMenu )
|
||||
EVT_MENU (wxID_COMPOSITION_TOOLBAR , wxZRColaFrame::OnCompositionToolbar )
|
||||
EVT_MENU (wxID_COMPOSITION , wxZRColaFrame::OnComposition )
|
||||
EVT_MENU (wxID_WARN_PUA , wxZRColaFrame::OnWarnPUA )
|
||||
EVT_MENU_RANGE (wxID_TRANSLATION_SEQ_DEFAULT, wxID_TRANSLATION_SEQ_END, wxZRColaFrame::OnTranslationSeqMenu )
|
||||
|
||||
EVT_MENU (wxID_SETTINGS , wxZRColaFrame::OnSettings )
|
||||
@@ -75,6 +75,7 @@ wxZRColaFrame::wxZRColaFrame() :
|
||||
m_settings(NULL),
|
||||
m_chrReq(NULL),
|
||||
m_composition(true),
|
||||
m_warnPUA(false),
|
||||
m_transeq_id(ZRCOLA_TRANSEQID_DEFAULT),
|
||||
m_transeq(NULL),
|
||||
wxZRColaFrameBase(NULL)
|
||||
@@ -195,6 +196,14 @@ wxZRColaFrame::wxZRColaFrame() :
|
||||
m_toolComposition->SetState(m_toolComposition->GetState() & ~wxAUI_BUTTON_STATE_CHECKED);
|
||||
}
|
||||
|
||||
if (m_warnPUA) {
|
||||
m_menuItemWarnPUA->Check(true);
|
||||
m_toolWarnPUA->SetState(m_toolWarnPUA->GetState() | wxAUI_BUTTON_STATE_CHECKED);
|
||||
} else {
|
||||
m_menuItemWarnPUA->Check(false);
|
||||
m_toolWarnPUA->SetState(m_toolWarnPUA->GetState() & ~wxAUI_BUTTON_STATE_CHECKED);
|
||||
}
|
||||
|
||||
// Update translation sequence selection.
|
||||
for (unsigned int i = 0, n = m_toolTranslationSeq->GetCount(); ; i++) {
|
||||
if (i < n) {
|
||||
@@ -343,9 +352,10 @@ void wxZRColaFrame::OnSendAbort(wxCommandEvent& event)
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaFrame::OnCompositionMenu(wxCommandEvent& event)
|
||||
void wxZRColaFrame::OnComposition(wxCommandEvent& event)
|
||||
{
|
||||
m_composition = m_menuItemComposition->IsChecked();
|
||||
m_composition = !m_composition;
|
||||
m_menuItemComposition->Check(m_composition);
|
||||
m_toolComposition->SetState((m_toolComposition->GetState() & ~wxAUI_BUTTON_STATE_CHECKED) | (m_composition ? wxAUI_BUTTON_STATE_CHECKED : 0));
|
||||
m_toolbarTranslate->Refresh();
|
||||
|
||||
@@ -357,14 +367,16 @@ void wxZRColaFrame::OnCompositionMenu(wxCommandEvent& event)
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaFrame::OnCompositionToolbar(wxCommandEvent& event)
|
||||
void wxZRColaFrame::OnWarnPUA(wxCommandEvent& event)
|
||||
{
|
||||
m_composition = (m_toolComposition->GetState() & wxAUI_BUTTON_STATE_CHECKED) ? true : false;
|
||||
m_menuItemComposition->Check(m_composition);
|
||||
m_warnPUA = !m_warnPUA;
|
||||
m_menuItemWarnPUA->Check(m_warnPUA);
|
||||
m_toolWarnPUA->SetState((m_toolWarnPUA->GetState() & ~wxAUI_BUTTON_STATE_CHECKED) | (m_warnPUA ? wxAUI_BUTTON_STATE_CHECKED : 0));
|
||||
m_toolbarTranslate->Refresh();
|
||||
|
||||
// Notify source text something changed and should re-translate.
|
||||
// Notify destination text something changed and should re-paint.
|
||||
wxCommandEvent event2(wxEVT_COMMAND_TEXT_UPDATED);
|
||||
m_panel->m_source->ProcessWindowEvent(event2);
|
||||
m_panel->m_destination->ProcessWindowEvent(event2);
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
@@ -746,6 +758,7 @@ void wxPersistentZRColaFrame::Save() const
|
||||
auto wnd = static_cast<const wxZRColaFrame*>(GetWindow()); // dynamic_cast is not reliable as we are typically called late in the wxTopLevelWindowMSW destructor.
|
||||
|
||||
SaveValue(wxT("composition"), wnd->m_composition);
|
||||
SaveValue(wxT("warnPUA"), wnd->m_warnPUA);
|
||||
SaveValue(wxT("transeqId"), static_cast<int>(wnd->m_transeq_id));
|
||||
|
||||
wxPersistentZRColaComposerPanel(wnd->m_panel).Save();
|
||||
@@ -769,6 +782,10 @@ bool wxPersistentZRColaFrame::Restore()
|
||||
wnd->m_composition = b;
|
||||
else
|
||||
wnd->m_composition = wnd->m_transeq_id == ZRCOLA_TRANSEQID_DEFAULT;
|
||||
if (RestoreValue(wxT("warnPUA"), &b))
|
||||
wnd->m_warnPUA = b;
|
||||
else
|
||||
wnd->m_warnPUA = false;
|
||||
|
||||
int guiLevel;
|
||||
return RestoreValue(wxT("guiLevel"), &guiLevel) && guiLevel == s_guiLevel ? wxPersistentTLWEx::Restore() : true;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
@@ -90,8 +90,8 @@ protected:
|
||||
void OnSendSource(wxCommandEvent& event);
|
||||
void OnCopySourceAndReturn(wxCommandEvent& event);
|
||||
void OnSendAbort(wxCommandEvent& event);
|
||||
void OnCompositionMenu(wxCommandEvent& event);
|
||||
void OnCompositionToolbar(wxCommandEvent& event);
|
||||
void OnComposition(wxCommandEvent& event);
|
||||
void OnWarnPUA(wxCommandEvent& event);
|
||||
void OnSettings(wxCommandEvent& event);
|
||||
virtual void OnIdle(wxIdleEvent& event);
|
||||
void OnTaskbarIconClick(wxTaskBarIconEvent& event);
|
||||
@@ -149,6 +149,7 @@ protected:
|
||||
wxZRColaCharRequest *m_chrReq; ///< Request a New Character dialog
|
||||
wxZRColaSettings *m_settings; ///< Configuration dialog
|
||||
bool m_composition; ///< Is (de)composition enabled?
|
||||
bool m_warnPUA; ///< Mark Private-Use-Area characters in destination text
|
||||
ZRCola::transeqid_t m_transeq_id; ///< Translation sequence ID
|
||||
wxZRColaTranslationSeq *m_transeq; ///< Custom translation sequence dialog
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,11 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Aug 8 2018)
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __ZRCOLAGUI_H__
|
||||
#define __ZRCOLAGUI_H__
|
||||
#pragma once
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
@@ -55,10 +54,10 @@ class wxZRColaComposerPanel;
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaFrameBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaFrameBase : public wxFrame
|
||||
class wxZRColaFrameBase : public wxFrame
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
enum
|
||||
{
|
||||
@@ -68,7 +67,8 @@ class wxZRColaFrameBase : public wxFrame
|
||||
wxID_SEND_SOURCE,
|
||||
wxID_COPY_SOURCE_AND_RETURN,
|
||||
wxID_SEND_ABORT,
|
||||
wxID_COMPOSITION_MENU,
|
||||
wxID_COMPOSITION,
|
||||
wxID_WARN_PUA,
|
||||
wxID_SETTINGS,
|
||||
wxID_TOOLBAR_EDIT,
|
||||
wxID_TOOLBAR_TRANSLATE,
|
||||
@@ -76,60 +76,61 @@ class wxZRColaFrameBase : public wxFrame
|
||||
wxID_HELP_INSTRUCTIONS,
|
||||
wxID_HELP_SHORTCUTS,
|
||||
wxID_HELP_REQCHAR,
|
||||
wxID_HELP_UPDATE,
|
||||
wxID_COMPOSITION_TOOLBAR
|
||||
wxID_HELP_UPDATE
|
||||
};
|
||||
|
||||
|
||||
wxMenuBar* m_menubar;
|
||||
wxMenu* m_menuProgram;
|
||||
wxMenu* m_menuEdit;
|
||||
wxMenuItem* m_menuItemComposition;
|
||||
wxMenu* m_menuTranslationSeq;
|
||||
wxMenuItem* m_menuItemComposition;
|
||||
wxMenuItem* m_menuItemWarnPUA;
|
||||
wxMenu* m_menuView;
|
||||
wxMenu* m_menuHelp;
|
||||
wxAuiToolBar* m_toolbarEdit;
|
||||
wxAuiToolBarItem* m_toolEditCut;
|
||||
wxAuiToolBarItem* m_toolEditCopy;
|
||||
wxAuiToolBarItem* m_toolEditPaste;
|
||||
wxAuiToolBarItem* m_toolEditCut;
|
||||
wxAuiToolBarItem* m_toolEditCopy;
|
||||
wxAuiToolBarItem* m_toolEditPaste;
|
||||
wxAuiToolBar* m_toolbarTranslate;
|
||||
wxAuiToolBarItem* m_toolCharSelect;
|
||||
wxAuiToolBarItem* m_toolSendDestination;
|
||||
wxAuiToolBarItem* m_toolSendSource;
|
||||
wxAuiToolBarItem* m_toolComposition;
|
||||
wxAuiToolBarItem* m_toolCharSelect;
|
||||
wxAuiToolBarItem* m_toolSendDestination;
|
||||
wxAuiToolBarItem* m_toolSendSource;
|
||||
wxChoice* m_toolTranslationSeq;
|
||||
wxAuiToolBarItem* m_toolComposition;
|
||||
wxAuiToolBarItem* m_toolWarnPUA;
|
||||
wxZRColaCharacterCatalogPanel* m_panelChrCat;
|
||||
wxStatusBar* m_statusBar;
|
||||
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
|
||||
virtual void OnIconize( wxIconizeEvent& event ) { event.Skip(); }
|
||||
virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); }
|
||||
virtual void OnTranslationSeqChoice( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
wxZRColaComposerPanel* m_panel;
|
||||
|
||||
|
||||
wxZRColaFrameBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("ZRCola"), const wxPoint& pos = wxDefaultPosition, long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL, const wxString& name = wxT("ZRCola") );
|
||||
wxAuiManager m_mgr;
|
||||
|
||||
|
||||
~wxZRColaFrameBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaComposerPanelBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaComposerPanelBase : public wxPanel
|
||||
class wxZRColaComposerPanelBase : public wxPanel
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
enum
|
||||
{
|
||||
wxID_TIMER_SAVE = 1000
|
||||
};
|
||||
|
||||
|
||||
wxSplitterWindow* m_splitterSource;
|
||||
wxPanel* m_panelSourceEdit;
|
||||
wxPanel* m_panelSourceHex;
|
||||
@@ -139,7 +140,7 @@ class wxZRColaComposerPanelBase : public wxPanel
|
||||
wxPanel* m_panelDestinationHex;
|
||||
wxTextCtrl* m_destinationHex;
|
||||
wxTimer m_timerSave;
|
||||
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnSourcePaint( wxPaintEvent& event ) { event.Skip(); }
|
||||
virtual void OnSourceText( wxCommandEvent& event ) { event.Skip(); }
|
||||
@@ -148,62 +149,62 @@ class wxZRColaComposerPanelBase : public wxPanel
|
||||
virtual void OnDestinationText( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnDestinationHexPaint( wxPaintEvent& event ) { event.Skip(); }
|
||||
virtual void OnSaveTimer( wxTimerEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
wxTextCtrl* m_source;
|
||||
wxTextCtrl* m_destination;
|
||||
|
||||
wxZRColaComposerPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxT("ZRColaComposerPanel") );
|
||||
|
||||
wxZRColaComposerPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxT("ZRColaComposerPanel") );
|
||||
~wxZRColaComposerPanelBase();
|
||||
|
||||
|
||||
void m_splitterSourceOnIdle( wxIdleEvent& )
|
||||
{
|
||||
m_splitterSource->SetSashPosition( FromDIP(-5) );
|
||||
m_splitterSource->Disconnect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaComposerPanelBase::m_splitterSourceOnIdle ), NULL, this );
|
||||
}
|
||||
|
||||
|
||||
void m_splitterDestinationOnIdle( wxIdleEvent& )
|
||||
{
|
||||
m_splitterDestination->SetSashPosition( FromDIP(-5) );
|
||||
m_splitterDestination->Disconnect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaComposerPanelBase::m_splitterDestinationOnIdle ), NULL, this );
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaCharacterCatalogPanelBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaCharacterCatalogPanelBase : public wxPanel
|
||||
class wxZRColaCharacterCatalogPanelBase : public wxPanel
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxChoice* m_choice;
|
||||
wxZRColaCharGrid* m_grid;
|
||||
wxCheckBox* m_show_all;
|
||||
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnChoice( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnGridClick( wxGridEvent& event ) { event.Skip(); }
|
||||
virtual void OnGridKeyDown( wxKeyEvent& event ) { event.Skip(); }
|
||||
virtual void OnShowAll( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaCharacterCatalogPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxT("ZRColaCharacterCatalog") );
|
||||
|
||||
wxZRColaCharacterCatalogPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxT("ZRColaCharacterCatalog") );
|
||||
~wxZRColaCharacterCatalogPanelBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaCharSelectBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaCharSelectBase : public wxDialog
|
||||
class wxZRColaCharSelectBase : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxSearchCtrl* m_search;
|
||||
wxHyperlinkCtrl* m_search_more;
|
||||
@@ -225,7 +226,7 @@ class wxZRColaCharSelectBase : public wxDialog
|
||||
wxHyperlinkCtrl* m_navigateForward;
|
||||
wxZRColaCharGrid* m_gridRelated;
|
||||
wxButton* m_buttonInsert;
|
||||
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); }
|
||||
virtual void OnSearchText( wxCommandEvent& event ) { event.Skip(); }
|
||||
@@ -247,22 +248,22 @@ class wxZRColaCharSelectBase : public wxDialog
|
||||
virtual void OnRelatedSelectCell( wxGridEvent& event ) { event.Skip(); }
|
||||
virtual void OnInsert( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnInsertUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaCharSelectBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Character Search"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaCharSelect") );
|
||||
|
||||
wxZRColaCharSelectBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Character Search"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaCharSelect") );
|
||||
~wxZRColaCharSelectBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaSettingsBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaSettingsBase : public wxDialog
|
||||
class wxZRColaSettingsBase : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxListbook* m_listbook;
|
||||
wxPanel* m_panelLanguage;
|
||||
@@ -277,28 +278,28 @@ class wxZRColaSettingsBase : public wxDialog
|
||||
wxButton* m_sdbSizerButtonsOK;
|
||||
wxButton* m_sdbSizerButtonsApply;
|
||||
wxButton* m_sdbSizerButtonsCancel;
|
||||
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
|
||||
virtual void OnLanguageUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void OnApplyButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaSettingsBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaSettings") );
|
||||
|
||||
wxZRColaSettingsBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaSettings") );
|
||||
~wxZRColaSettingsBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaAboutBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaAboutBase : public wxDialog
|
||||
class wxZRColaAboutBase : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxStaticBitmap* m_bitmapIcon;
|
||||
wxStaticText* m_staticTextZRCola;
|
||||
@@ -310,46 +311,46 @@ class wxZRColaAboutBase : public wxDialog
|
||||
wxTextCtrl* m_declaration;
|
||||
wxStdDialogButtonSizer* m_sdbSizerButtons;
|
||||
wxButton* m_sdbSizerButtonsOK;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaAboutBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About ZRCola"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaAbout") );
|
||||
|
||||
wxZRColaAboutBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About ZRCola"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaAbout") );
|
||||
~wxZRColaAboutBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaUpdaterBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaUpdaterBase : public wxDialog
|
||||
class wxZRColaUpdaterBase : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxTextCtrl* m_log;
|
||||
wxButton* m_buttonUpdate;
|
||||
wxButton* m_buttonClose;
|
||||
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); }
|
||||
virtual void OnUpdate( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnClose( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaUpdaterBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Product Update"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaUpdater") );
|
||||
|
||||
wxZRColaUpdaterBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Product Update"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaUpdater") );
|
||||
~wxZRColaUpdaterBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaCharRequestBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaCharRequestBase : public wxDialog
|
||||
class wxZRColaCharRequestBase : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxStaticText* m_characterLbl;
|
||||
wxTextCtrl* m_character;
|
||||
@@ -360,25 +361,25 @@ class wxZRColaCharRequestBase : public wxDialog
|
||||
wxStdDialogButtonSizer* m_sdbSizerButtons;
|
||||
wxButton* m_sdbSizerButtonsOK;
|
||||
wxButton* m_sdbSizerButtonsCancel;
|
||||
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaCharRequestBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Request a New Character"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaCharRequest") );
|
||||
|
||||
wxZRColaCharRequestBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Request a New Character"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaCharRequest") );
|
||||
~wxZRColaCharRequestBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaTranslationSeqBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaTranslationSeqBase : public wxDialog
|
||||
class wxZRColaTranslationSeqBase : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxStaticText* m_transLbl;
|
||||
wxStaticText* m_availableLbl;
|
||||
@@ -392,7 +393,7 @@ class wxZRColaTranslationSeqBase : public wxDialog
|
||||
wxStdDialogButtonSizer* m_sdbSizerButtons;
|
||||
wxButton* m_sdbSizerButtonsOK;
|
||||
wxButton* m_sdbSizerButtonsCancel;
|
||||
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
|
||||
virtual void OnUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
@@ -405,13 +406,12 @@ class wxZRColaTranslationSeqBase : public wxDialog
|
||||
virtual void OnSelectedUp( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnSelectedDown( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaTranslationSeqBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Custom Translation Sequence"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaTranslationSeq") );
|
||||
|
||||
wxZRColaTranslationSeqBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Custom Translation Sequence"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaTranslationSeq") );
|
||||
~wxZRColaTranslationSeqBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif //__ZRCOLAGUI_H__
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
@@ -729,6 +729,27 @@ bool ZRCola::DBSource::GetNormPerm(const winstd::com_obj<ADORecordset>& rs, std:
|
||||
}
|
||||
|
||||
|
||||
bool ZRCola::DBSource::SelectAllTranslations(com_obj<ADORecordset> &rs) const
|
||||
{
|
||||
// Create a new recordset.
|
||||
rs.free();
|
||||
wxCHECK(SUCCEEDED(::CoCreateInstance(CLSID_CADORecordset, NULL, CLSCTX_ALL, IID_IADORecordset, (LPVOID*)&rs)), false);
|
||||
|
||||
// Open it.
|
||||
if (FAILED(rs->Open(variant(
|
||||
L"SELECT [komb], [rang_komb], [Kano], [Kanoniziraj], [znak], [rang_znak] "
|
||||
L"FROM [VRS_ReplChar] "
|
||||
L"ORDER BY [rang_komb], LEN([komb]) DESC"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText)))
|
||||
{
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0040: Error loading translations from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str());
|
||||
LogErrors();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ZRCola::DBSource::SelectTranslations(com_obj<ADORecordset> &rs) const
|
||||
{
|
||||
// Create a new recordset.
|
||||
@@ -1239,6 +1260,30 @@ bool ZRCola::DBSource::SelectCharacters(com_obj<ADORecordset>& rs) const
|
||||
}
|
||||
|
||||
|
||||
bool ZRCola::DBSource::SelectPUACharacters(com_obj<ADORecordset>& rs) const
|
||||
{
|
||||
// Create a new recordset.
|
||||
rs.free();
|
||||
wxCHECK(SUCCEEDED(::CoCreateInstance(CLSID_CADORecordset, NULL, CLSCTX_ALL, IID_IADORecordset, (LPVOID*)&rs)), false);
|
||||
|
||||
// Open it.
|
||||
if (FAILED(rs->Open(variant(
|
||||
L"SELECT [znak], [opis_en], [kat], [znak_v], [znak_m] "
|
||||
L"FROM [VRS_CharList] "
|
||||
L"WHERE "
|
||||
L"[znak]>='E000' AND [znak]<='F8FF' AND " // Private-Use-Area
|
||||
L"[aktiven]=1 " // Active characters only
|
||||
L"ORDER BY [znak]"), variant(m_db), adOpenStatic, adLockReadOnly, adCmdText)))
|
||||
{
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0120: Error loading characters from database. Please make sure the file is ZRCola.zrc compatible.\n"), m_filename.c_str());
|
||||
LogErrors();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ZRCola::DBSource::GetCharacter(const com_obj<ADORecordset>& rs, character& chr) const
|
||||
{
|
||||
wxASSERT_MSG(rs, wxT("recordset is empty"));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
@@ -131,8 +131,12 @@ namespace ZRCola {
|
||||
charseq src; ///< Source sequence
|
||||
std::string norm; ///< Normalization footprint
|
||||
charseq dst; ///< Destination sequence
|
||||
double score; ///< Score
|
||||
|
||||
inline translation() : set(0) {}
|
||||
inline translation() :
|
||||
set((int)ZRCOLA_TRANSEQID_DEFAULT),
|
||||
score(0)
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
@@ -145,7 +149,7 @@ namespace ZRCola {
|
||||
std::wstring src; ///< Source name
|
||||
std::wstring dst; ///< Destination name
|
||||
|
||||
inline transet() : set(0) {}
|
||||
inline transet() : set((int)ZRCOLA_TRANSEQID_DEFAULT) {}
|
||||
};
|
||||
|
||||
|
||||
@@ -621,6 +625,17 @@ namespace ZRCola {
|
||||
///
|
||||
bool GetNormPerm(const winstd::com_obj<ADORecordset>& rs, std::string& norm, normperm& np) const;
|
||||
|
||||
///
|
||||
/// Returns all character translations
|
||||
///
|
||||
/// \param[out] rs Recordset with results
|
||||
///
|
||||
/// \returns
|
||||
/// - true when query succeeds
|
||||
/// - false otherwise
|
||||
///
|
||||
bool SelectAllTranslations(winstd::com_obj<ADORecordset>& rs) const;
|
||||
|
||||
///
|
||||
/// Returns character translations
|
||||
///
|
||||
@@ -805,6 +820,17 @@ namespace ZRCola {
|
||||
///
|
||||
bool SelectCharacters(winstd::com_obj<ADORecordset>& rs) const;
|
||||
|
||||
///
|
||||
/// Returns Private-Use-Area characters
|
||||
///
|
||||
/// \param[out] rs Recordset with results
|
||||
///
|
||||
/// \returns
|
||||
/// - true when query succeeds
|
||||
/// - false otherwise
|
||||
///
|
||||
bool SelectPUACharacters(winstd::com_obj<ADORecordset>& rs) const;
|
||||
|
||||
///
|
||||
/// Returns character data
|
||||
///
|
||||
@@ -908,7 +934,7 @@ namespace ZRCola {
|
||||
inline ZRCola::translation_db& operator<<(_Inout_ ZRCola::translation_db &db, _In_ const ZRCola::DBSource::translation &rec)
|
||||
{
|
||||
unsigned __int32 idx = db.data.size();
|
||||
wxASSERT_MSG((int)0xffff8000 <= rec.set && rec.set <= (int)0x00007fff, wxT("translation set id out of bounds"));
|
||||
wxASSERT_MSG((int)0xffff0000 <= rec.set && rec.set <= (int)0x0000ffff, wxT("translation set id out of bounds"));
|
||||
db.data.push_back((unsigned __int16)rec.set);
|
||||
wxASSERT_MSG((int)0xffff8000 <= rec.dst.rank && rec.dst.rank <= (int)0x00007fff, wxT("destination character rank out of bounds"));
|
||||
db.data.push_back((unsigned __int16)rec.dst.rank);
|
||||
@@ -932,7 +958,7 @@ inline ZRCola::translation_db& operator<<(_Inout_ ZRCola::translation_db &db, _I
|
||||
inline ZRCola::transet_db& operator<<(_Inout_ ZRCola::transet_db &db, _In_ const ZRCola::DBSource::transet &rec)
|
||||
{
|
||||
unsigned __int32 idx = db.data.size();
|
||||
wxASSERT_MSG((int)0xffff8000 <= rec.set && rec.set <= (int)0x00007fff, wxT("translation set id out of bounds"));
|
||||
wxASSERT_MSG((int)0xffff0000 <= rec.set && rec.set <= (int)0x0000ffff, wxT("translation set id out of bounds"));
|
||||
db.data.push_back((unsigned __int16)rec.set);
|
||||
std::wstring::size_type n = rec.src.length();
|
||||
wxASSERT_MSG(n <= 0xffff, wxT("translation set source name overflow"));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
@@ -19,6 +19,10 @@
|
||||
|
||||
#include "pch.h"
|
||||
|
||||
#define FONT_MATCH_WIDTH 512 // must be a multiple of 8
|
||||
#define FONT_MATCH_HEIGHT 512
|
||||
#define FONT_MATCH_THRESHOLD 8e-2
|
||||
|
||||
using namespace std;
|
||||
using namespace stdex;
|
||||
using namespace winstd;
|
||||
@@ -224,6 +228,56 @@ static inline set<ZRCola::DBSource::charseq> permutate_and_translate_inv(_In_ co
|
||||
}
|
||||
|
||||
|
||||
static bool contains_pua(_In_ const wstring &str)
|
||||
{
|
||||
for (auto p = str.c_str(), p_end = str.c_str() + str.size(); p < p_end; p++)
|
||||
if (L'\ue000' <= *p && *p <= L'\uf8ff')
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
static void replace_all(_Inout_ wstring &str, _In_ const wstring &from, _In_ const wstring &to)
|
||||
{
|
||||
size_t start_pos = 0;
|
||||
while ((start_pos = str.find(from, start_pos)) != wstring::npos) {
|
||||
str.replace(start_pos, from.length(), to);
|
||||
start_pos += to.length();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static double compare_bitmaps(
|
||||
_In_count_c_(FONT_MATCH_WIDTH * FONT_MATCH_HEIGHT / 8) const unsigned char *bits_orig,
|
||||
_In_count_c_(FONT_MATCH_WIDTH * FONT_MATCH_HEIGHT / 8) const unsigned char *bits)
|
||||
{
|
||||
#define B2(n) n, n + 1, n + 1, n + 2
|
||||
#define B4(n) B2(n), B2(n + 1), B2(n + 1), B2(n + 2)
|
||||
#define B6(n) B4(n), B4(n + 1), B4(n + 1), B4(n + 2)
|
||||
static const unsigned char number_of_bits[256] = { B6(0), B6(1), B6(1), B6(2) };
|
||||
#undef B2
|
||||
#undef B4
|
||||
#undef B6
|
||||
// Set divisors to 1 to prevent divide-by-zero.
|
||||
size_t b_orig = 1, b = 1, x = 0;
|
||||
for (size_t i = 0; i < FONT_MATCH_WIDTH * FONT_MATCH_HEIGHT / 8; ++i) {
|
||||
b_orig += number_of_bits[bits_orig[i]];
|
||||
b += number_of_bits[bits [i]];
|
||||
x += number_of_bits[bits_orig[i] ^ bits[i]];
|
||||
}
|
||||
return (double)x/b_orig * (double)x/b;
|
||||
}
|
||||
|
||||
|
||||
static string make_unicode(_In_ const wstring &str)
|
||||
{
|
||||
string out;
|
||||
for (size_t i = 0, n = str.length(); i < n; i++)
|
||||
out += string_printf(i ? "+%04X" : "%04X", str[i]);
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/// Main function
|
||||
///
|
||||
@@ -299,10 +353,14 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
bool build_pot = parser.GetParamCount() > 2;
|
||||
set<wstring> pot;
|
||||
|
||||
bool build_csv = parser.GetParamCount() > 3;
|
||||
vector<ZRCola::DBSource::translation> csv;
|
||||
|
||||
// Open file ID.
|
||||
streamoff dst_start = idrec::open<ZRCola::recordid_t, ZRCola::recordsize_t>(dst, ZRCOLA_DB_ID);
|
||||
|
||||
ZRCola::translation_db db_trans;
|
||||
ZRCola::transet_db db_transset;
|
||||
normperm_db db_np;
|
||||
|
||||
{
|
||||
@@ -334,6 +392,19 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
}
|
||||
|
||||
{
|
||||
// Build ZRCola Decomposed to ZRCola Composed translation set.
|
||||
ZRCola::DBSource::transet ts;
|
||||
ts.set = (int)ZRCOLA_TRANSEQID_DEFAULT;
|
||||
ts.src = L"ZRCola Decomposed";
|
||||
ts.dst = L"ZRCola Composed";
|
||||
if (build_pot) {
|
||||
pot.insert(ts.src);
|
||||
pot.insert(ts.dst);
|
||||
}
|
||||
|
||||
// Add translation set to index and data.
|
||||
db_transset << ts;
|
||||
|
||||
// Get translations.
|
||||
com_obj<ADORecordset> rs;
|
||||
if (src.SelectTranslations(rs)) {
|
||||
@@ -413,30 +484,244 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// Build ZRCola to Unicode translation set.
|
||||
ZRCola::DBSource::transet ts;
|
||||
ts.set = (int)ZRCOLA_TRANSEQID_UNICODE;
|
||||
ts.src = L"ZRCola Composed";
|
||||
ts.dst = L"Unicode";
|
||||
if (build_pot) {
|
||||
pot.insert(ts.src);
|
||||
pot.insert(ts.dst);
|
||||
}
|
||||
|
||||
// Add translation set to index and data.
|
||||
db_transset << ts;
|
||||
|
||||
// Get all translations.
|
||||
com_obj<ADORecordset> rs;
|
||||
if (src.SelectAllTranslations(rs)) {
|
||||
// Parse translations and build temporary database.
|
||||
vector<ZRCola::DBSource::translation> db_all, db_combining;
|
||||
for (; !ZRCola::DBSource::IsEOF(rs); rs->MoveNext()) {
|
||||
// Read translation from the database.
|
||||
ZRCola::DBSource::translation trans;
|
||||
if (src.GetTranslation(rs, trans)) {
|
||||
// Add translation to temporary databases.
|
||||
db_all.push_back(trans);
|
||||
if (!trans.src.str.empty() && trans.src.str[0] == L'\u203f') {
|
||||
trans.src.str.erase(0, 1);
|
||||
db_combining.push_back(trans);
|
||||
}
|
||||
} else
|
||||
has_errors = true;
|
||||
}
|
||||
|
||||
com_obj<ADORecordset> rs2;
|
||||
if (src.SelectPUACharacters(rs2)) {
|
||||
// Parse characters and build translations.
|
||||
static const LOGFONT lf_zrcola = {
|
||||
-FONT_MATCH_HEIGHT/2, 0,
|
||||
0, 0,
|
||||
FW_NORMAL,
|
||||
FALSE, FALSE, FALSE,
|
||||
ANSI_CHARSET,
|
||||
OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
|
||||
DEFAULT_PITCH | FF_DONTCARE,
|
||||
TEXT("ZRCola")
|
||||
};
|
||||
gdi_handle<HFONT> fnt_zrcola(::CreateFontIndirect(&lf_zrcola));
|
||||
gdi_handle<HBRUSH> brush_bg(::CreateSolidBrush(RGB(0x00, 0x00, 0x00)));
|
||||
gdi_handle<HBITMAP>
|
||||
bmp_orig(::CreateBitmap(FONT_MATCH_WIDTH, FONT_MATCH_HEIGHT, 1, 1, NULL)),
|
||||
bmp_comb(::CreateBitmap(FONT_MATCH_WIDTH, FONT_MATCH_HEIGHT, 1, 1, NULL)),
|
||||
bmp_pre (::CreateBitmap(FONT_MATCH_WIDTH, FONT_MATCH_HEIGHT, 1, 1, NULL));
|
||||
dc
|
||||
dc_orig(::CreateCompatibleDC(NULL)),
|
||||
dc_comb(::CreateCompatibleDC(NULL)),
|
||||
dc_pre (::CreateCompatibleDC(NULL));
|
||||
SetBkColor(dc_orig, RGB(0x00, 0x00, 0x00));
|
||||
SetBkColor(dc_comb, RGB(0x00, 0x00, 0x00));
|
||||
SetBkColor(dc_pre , RGB(0x00, 0x00, 0x00));
|
||||
SetBkMode (dc_orig, TRANSPARENT);
|
||||
SetBkMode (dc_comb, TRANSPARENT);
|
||||
SetBkMode (dc_pre , TRANSPARENT);
|
||||
SetTextColor(dc_orig, RGB(0xff, 0xff, 0xff));
|
||||
SetTextColor(dc_comb, RGB(0xff, 0xff, 0xff));
|
||||
SetTextColor(dc_pre , RGB(0xff, 0xff, 0xff));
|
||||
SetTextAlign(dc_orig, TA_BASELINE | TA_CENTER | TA_NOUPDATECP);
|
||||
SetTextAlign(dc_comb, TA_BASELINE | TA_CENTER | TA_NOUPDATECP);
|
||||
SetTextAlign(dc_pre , TA_BASELINE | TA_CENTER | TA_NOUPDATECP);
|
||||
dc_selector
|
||||
selector_font_orig(dc_orig, fnt_zrcola),
|
||||
selector_font_comb(dc_comb, fnt_zrcola),
|
||||
selector_font_pre (dc_pre , fnt_zrcola);
|
||||
struct {
|
||||
BITMAPINFOHEADER bmiHeader;
|
||||
RGBQUAD bmiColors[2];
|
||||
} bmi =
|
||||
{
|
||||
{
|
||||
sizeof(BITMAPINFOHEADER),
|
||||
FONT_MATCH_WIDTH,
|
||||
FONT_MATCH_HEIGHT,
|
||||
1,
|
||||
1,
|
||||
BI_RGB,
|
||||
0,
|
||||
3780, 3780,
|
||||
2, 0
|
||||
},
|
||||
{
|
||||
{ 0x00, 0x00, 0x00 },
|
||||
{ 0xff, 0xff, 0xff },
|
||||
}
|
||||
};
|
||||
vector<unsigned char>
|
||||
bits_orig(FONT_MATCH_WIDTH * FONT_MATCH_HEIGHT / 8),
|
||||
bits_comb(FONT_MATCH_WIDTH * FONT_MATCH_HEIGHT / 8),
|
||||
bits_pre (FONT_MATCH_WIDTH * FONT_MATCH_HEIGHT / 8);
|
||||
map<wstring, map<wstring, pair<double, int>>> trans;
|
||||
for (; !ZRCola::DBSource::IsEOF(rs2); rs2->MoveNext()) {
|
||||
// Read character from the database.
|
||||
ZRCola::DBSource::character chr;
|
||||
if (src.GetCharacter(rs2, chr)) {
|
||||
for (auto t = db_all.cbegin(), t_end = db_all.cend(); t != t_end; ++t) {
|
||||
if (t->dst.str != chr.first)
|
||||
continue;
|
||||
// Replace ZRCola decomposition with Unicode combining characters wherever possible.
|
||||
const auto &comp_orig = chr.first;
|
||||
const auto &decomp_orig = t->src.str;
|
||||
wstring decomp = decomp_orig;
|
||||
for (auto i = db_combining.cbegin(), i_end = db_combining.cend(); i != i_end; ++i)
|
||||
replace_all(decomp, i->src.str, i->dst.str);
|
||||
wstring comp = decomp;
|
||||
for (auto i = db_all.cbegin(), i_end = db_all.cend(); i != i_end; ++i)
|
||||
replace_all(comp, i->src.str, i->dst.str);
|
||||
// Check if we got anything useful.
|
||||
if (comp_orig == comp ||
|
||||
contains_pua(comp))
|
||||
continue;
|
||||
// Do the Unicode C and D normalizations to get two variants:
|
||||
// - Use precomposed characters as much as possible
|
||||
// - Use combining characters only
|
||||
wstring comp_comb, comp_pre;
|
||||
NormalizeString(NormalizationC, comp , comp_pre );
|
||||
NormalizeString(NormalizationD, comp_pre, comp_comb);
|
||||
{
|
||||
// Paint original character and Unicode precomposed/combining one.
|
||||
dc_selector
|
||||
selector_bmp_orig(dc_orig, bmp_orig),
|
||||
selector_bmp_comb(dc_comb, bmp_comb),
|
||||
selector_bmp_pre (dc_pre , bmp_pre );
|
||||
static const RECT bounds = { 0, 0, FONT_MATCH_WIDTH, FONT_MATCH_HEIGHT };
|
||||
FillRect(dc_orig, &bounds, brush_bg);
|
||||
FillRect(dc_comb, &bounds, brush_bg);
|
||||
FillRect(dc_pre , &bounds, brush_bg);
|
||||
TextOutW(dc_orig, FONT_MATCH_WIDTH/2, FONT_MATCH_HEIGHT*5/8, comp_orig.c_str(), comp_orig.length());
|
||||
TextOutW(dc_comb, FONT_MATCH_WIDTH/2, FONT_MATCH_HEIGHT*5/8, comp_comb.c_str(), comp_comb.length());
|
||||
TextOutW(dc_pre , FONT_MATCH_WIDTH/2, FONT_MATCH_HEIGHT*5/8, comp_pre .c_str(), comp_pre .length());
|
||||
}
|
||||
// Compare bitmaps.
|
||||
if (!GetDIBits(dc_orig, bmp_orig, 0, FONT_MATCH_HEIGHT, bits_orig.data(), (BITMAPINFO*)&bmi, DIB_PAL_COLORS) ||
|
||||
!GetDIBits(dc_comb, bmp_comb, 0, FONT_MATCH_HEIGHT, bits_comb.data(), (BITMAPINFO*)&bmi, DIB_PAL_COLORS) ||
|
||||
!GetDIBits(dc_pre , bmp_pre , 0, FONT_MATCH_HEIGHT, bits_pre .data(), (BITMAPINFO*)&bmi, DIB_PAL_COLORS))
|
||||
continue;
|
||||
double
|
||||
score_comb = compare_bitmaps(bits_orig.data(), bits_comb.data()),
|
||||
score_pre = compare_bitmaps(bits_orig.data(), bits_pre .data());
|
||||
// Add results to a temporary database.
|
||||
auto hit = trans.find(comp_orig);
|
||||
if (hit != trans.end()) {
|
||||
if (build_csv || score_pre <= FONT_MATCH_THRESHOLD) {
|
||||
if (hit->second.find(comp_pre) == hit->second.end())
|
||||
hit->second.insert(make_pair(comp_pre, make_pair(score_pre, 1)));
|
||||
} if ((build_csv || score_comb <= FONT_MATCH_THRESHOLD) && comp_pre != comp_comb) {
|
||||
if (hit->second.find(comp_comb) == hit->second.end())
|
||||
hit->second.insert(make_pair(comp_comb, make_pair(score_comb, 100)));
|
||||
}
|
||||
} else {
|
||||
map<wstring, pair<double, int>> v;
|
||||
if (build_csv || score_pre <= FONT_MATCH_THRESHOLD)
|
||||
v.insert(make_pair(comp_pre, make_pair(score_pre, 1)));
|
||||
if ((build_csv || score_comb <= FONT_MATCH_THRESHOLD) && comp_pre != comp_comb)
|
||||
v.insert(make_pair(comp_comb, make_pair(score_comb, 100)));
|
||||
if (!v.empty())
|
||||
trans.insert(make_pair(comp_orig, std::move(v)));
|
||||
}
|
||||
}
|
||||
} else
|
||||
has_errors = true;
|
||||
}
|
||||
|
||||
// Preallocate memory.
|
||||
size_t reserve = db_trans.idxSrc.size() + trans.size()*2;
|
||||
db_trans.idxSrc.reserve(reserve);
|
||||
db_trans.idxDst.reserve(reserve);
|
||||
db_trans.data .reserve(reserve*5);
|
||||
if (build_csv)
|
||||
csv.reserve(trans.size()*2);
|
||||
|
||||
ZRCola::DBSource::translation t;
|
||||
t.set = (int)ZRCOLA_TRANSEQID_UNICODE;
|
||||
t.dst.rank = 1;
|
||||
vector<pair<double, pair<wstring, int>>> results;
|
||||
for (auto i = trans.cbegin(), i_end = trans.cend(); i != i_end; ++i) {
|
||||
// Sort results by score.
|
||||
results.clear();
|
||||
results.reserve(i->second.size());
|
||||
for (auto j = i->second.cbegin(), j_end = i->second.cend(); j != j_end; ++j)
|
||||
results.push_back(make_pair(j->second.first, make_pair(j->first, j->second.second)));
|
||||
sort(results.begin(), results.end(), [] (pair<double, pair<wstring, int>> const& a, pair<double, pair<wstring, int>> const& b) { return a.first < b.first; });
|
||||
int rank_comb = 0, rank_pre = 0;
|
||||
for (auto j = results.cbegin(), j_end = results.cend(); j != j_end; ++j) {
|
||||
t.src.str = i->first;
|
||||
t.src.rank = j->second.second + (j->second.second >= 100 ? rank_comb++ : rank_pre++);
|
||||
t.dst.str = j->second.first;
|
||||
t.score = j->first;
|
||||
db_trans << t;
|
||||
if (build_csv)
|
||||
csv.push_back(t);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0016: Error getting characters from database. Please make sure the file is ZRCola.zrc compatible.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
has_errors = true;
|
||||
}
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0003: Error getting translations from database. Please make sure the file is ZRCola.zrc compatible.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
has_errors = true;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// Get translation sets.
|
||||
com_obj<ADORecordset> rs;
|
||||
if (src.SelectTranlationSets(rs)) {
|
||||
size_t count = src.GetRecordsetCount(rs);
|
||||
if (count < 0xffffffff) { // 4G check (-1 is reserved for error condition)
|
||||
ZRCola::transet_db db;
|
||||
|
||||
// Preallocate memory.
|
||||
db.idxTranSet.reserve((count+1));
|
||||
db.data .reserve((count+1)*4);
|
||||
db_transset.idxTranSet.reserve((count+2));
|
||||
db_transset.data .reserve((count+2)*4);
|
||||
|
||||
// Parse translation sets and build index and data.
|
||||
for (; !ZRCola::DBSource::IsEOF(rs); rs->MoveNext()) {
|
||||
// Read translation set from the database.
|
||||
ZRCola::DBSource::transet ts;
|
||||
if (src.GetTranslationSet(rs, ts)) {
|
||||
if (ts.set <= (int)ZRCOLA_TRANSEQID_DEFAULT) {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0008: Translation set is using reserved ID %i.\n"), (LPCTSTR)filenameIn.c_str(), ts.set);
|
||||
has_errors = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (build_pot) {
|
||||
pot.insert(ts.src);
|
||||
pot.insert(ts.dst);
|
||||
}
|
||||
|
||||
// Add translation set to index and data.
|
||||
db << ts;
|
||||
db_transset << ts;
|
||||
|
||||
// Get translations.
|
||||
com_obj<ADORecordset> rs_tran;
|
||||
@@ -464,12 +749,6 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
} else
|
||||
has_errors = true;
|
||||
}
|
||||
|
||||
// Sort indices.
|
||||
db.idxTranSet.sort();
|
||||
|
||||
// Write translation sets to file.
|
||||
dst << ZRCola::transet_rec(db);
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0009: Error getting translation set count from database or too many translation sets.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
has_errors = true;
|
||||
@@ -480,6 +759,12 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
// Sort indices.
|
||||
db_transset.idxTranSet.sort();
|
||||
|
||||
// Write translation sets to file.
|
||||
dst << ZRCola::transet_rec(db_transset);
|
||||
|
||||
// Sort indices.
|
||||
db_trans.idxSrc.sort();
|
||||
db_trans.idxDst.sort();
|
||||
@@ -960,6 +1245,43 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if (!has_errors && build_csv) {
|
||||
const wxString& filenameCsv = parser.GetParam(3);
|
||||
fstream dst_csv((LPCTSTR)filenameCsv, ios_base::out | ios_base::trunc);
|
||||
if (dst_csv.good()) {
|
||||
dst_csv
|
||||
<< "\xef\xbb\xbf" // UTF-8 BOM
|
||||
<< "\"znak\";"
|
||||
<< "\"znakZRCola\";"
|
||||
<< "\"znakRank\";"
|
||||
<< "\"komb\";"
|
||||
<< "\"kombZRCola\";"
|
||||
<< "\"kombRank\";"
|
||||
<< "\"razlika\"" << endl;
|
||||
wstring_convert<codecvt_utf8<wchar_t>> conv;
|
||||
for (auto i = csv.cbegin(), i_end = csv.cend(); i != i_end; ++i) {
|
||||
dst_csv
|
||||
<< "\"" << make_unicode(i->src.str) << "\";"
|
||||
<< "\"" << conv.to_bytes(i->src.str) << "\";"
|
||||
<< i->src.rank << ";"
|
||||
<< "\"" << make_unicode(i->dst.str) << "\";"
|
||||
<< "\"" << conv.to_bytes(i->dst.str) << "\";"
|
||||
<< i->dst.rank << ";"
|
||||
<< i->score << endl;
|
||||
}
|
||||
|
||||
if (dst_csv.fail()) {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0013: Writing to CSV report failed.\n"), (LPCTSTR)filenameOut.c_str());
|
||||
has_errors = true;
|
||||
}
|
||||
|
||||
dst_csv.close();
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0012: Error opening CSV report.\n"), filenameOut.fn_str());
|
||||
has_errors = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (has_errors) {
|
||||
dst.close();
|
||||
wxRemoveFile(filenameOut);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2018-2020 Amebis
|
||||
Copyright © 2018-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2018-2020 Amebis
|
||||
Copyright © 2018-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <stdex/idrec.h>
|
||||
|
||||
#include <WinStd/Common.h>
|
||||
#include <WinStd/GDI.h>
|
||||
|
||||
#include <initguid.h> // GUID helper to prevent LNK2001 errors (unresolved external symbol IID_IADO...)
|
||||
#pragma warning(push)
|
||||
@@ -45,6 +46,7 @@
|
||||
#include <adoid.h>
|
||||
#pragma warning(pop)
|
||||
|
||||
#include <memory.h>
|
||||
#include <process.h>
|
||||
#include <tchar.h>
|
||||
|
||||
@@ -56,4 +58,5 @@
|
||||
#include <fstream>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2017-2020 Amebis
|
||||
Copyright © 2017-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2016-2020 Amebis
|
||||
Copyright © 2016-2021 Amebis
|
||||
|
||||
This file is part of InstFont.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 1991-2015-2020 Amebis
|
||||
Copyright © 1991-2015-2021 Amebis
|
||||
|
||||
This file is part of MkLink.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2016-2020 Amebis
|
||||
Copyright © 2016-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2016-2020 Amebis
|
||||
Copyright © 2016-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2016-2020 Amebis
|
||||
Copyright © 2016-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2016-2020 Amebis
|
||||
Copyright © 2016-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2016-2020 Amebis
|
||||
Copyright © 2016-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2016-2020 Amebis
|
||||
Copyright © 2016-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// Product version as a single DWORD
|
||||
// Note: Used for version comparison within C/C++ code.
|
||||
//
|
||||
#define PRODUCT_VERSION 0x02040100
|
||||
#define PRODUCT_VERSION 0x02050100
|
||||
|
||||
//
|
||||
// Product version by components
|
||||
@@ -33,26 +33,26 @@
|
||||
//
|
||||
#define PRODUCT_VERSION_MAJ 2
|
||||
#define PRODUCT_VERSION_MIN 5
|
||||
#define PRODUCT_VERSION_REV 0
|
||||
#define PRODUCT_VERSION_REV 1
|
||||
#define PRODUCT_VERSION_BUILD 0
|
||||
|
||||
//
|
||||
// Human readable product version and build year for UI
|
||||
//
|
||||
#define PRODUCT_VERSION_STR "2.5"
|
||||
#define PRODUCT_BUILD_YEAR_STR "2020"
|
||||
#define PRODUCT_VERSION_STR "2.5.1"
|
||||
#define PRODUCT_BUILD_YEAR_STR "2021"
|
||||
|
||||
//
|
||||
// Numerical version presentation for ProductVersion propery in
|
||||
// MSI packages (syntax: N.N[.N[.N]])
|
||||
//
|
||||
#define PRODUCT_VERSION_INST "2.5"
|
||||
#define PRODUCT_VERSION_INST "2.5.1"
|
||||
|
||||
//
|
||||
// The product code for ProductCode property in MSI packages
|
||||
// Replace with new on every version change, regardless how minor it is.
|
||||
//
|
||||
#define PRODUCT_VERSION_GUID "{5AF185D8-163C-434A-8ED2-D310484027D8}"
|
||||
#define PRODUCT_VERSION_GUID "{A0B4DD52-8EDF-48D1-BC01-5055353E7DF8}"
|
||||
|
||||
//
|
||||
// The product vendor and application name for configuration keeping.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2016-2020 Amebis
|
||||
Copyright © 2016-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 1991-2020 Amebis
|
||||
Copyright © 1991-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 1991-2020 Amebis
|
||||
Copyright © 1991-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 1991-2020 Amebis
|
||||
Copyright © 1991-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
Submodule lib/WinStd updated: 7196b4298e...b8816476e5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "common.h"
|
||||
|
||||
#include <stdex/idrec.h>
|
||||
#include <assert.h>
|
||||
#include <algorithm>
|
||||
#include <istream>
|
||||
#include <map>
|
||||
@@ -48,7 +49,7 @@ namespace ZRCola {
|
||||
/// Character category ID type
|
||||
/// Two letter abbreviation, non-terminated
|
||||
///
|
||||
struct ZRCOLA_API chrcatid_t {
|
||||
struct chrcatid_t {
|
||||
char data[2];
|
||||
|
||||
inline chrcatid_t& operator=(const chrcatid_t &src)
|
||||
@@ -176,7 +177,7 @@ namespace ZRCola {
|
||||
///
|
||||
/// Character Database
|
||||
///
|
||||
class ZRCOLA_API character_db {
|
||||
class character_db {
|
||||
public:
|
||||
#pragma pack(push)
|
||||
#pragma pack(2)
|
||||
@@ -334,13 +335,13 @@ namespace ZRCola {
|
||||
};
|
||||
|
||||
|
||||
typedef ZRCOLA_API stdex::idrec::record<character_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> character_rec;
|
||||
typedef stdex::idrec::record<character_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> character_rec;
|
||||
|
||||
|
||||
///
|
||||
/// Character category database
|
||||
///
|
||||
class ZRCOLA_API chrcat_db {
|
||||
class chrcat_db {
|
||||
public:
|
||||
#pragma pack(push)
|
||||
#pragma pack(2)
|
||||
@@ -502,7 +503,7 @@ namespace ZRCola {
|
||||
};
|
||||
|
||||
|
||||
typedef ZRCOLA_API stdex::idrec::record<chrcat_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> chrcat_rec;
|
||||
typedef stdex::idrec::record<chrcat_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> chrcat_rec;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
@@ -29,11 +29,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
///
|
||||
/// Public function calling convention
|
||||
///
|
||||
#define ZRCOLA_API
|
||||
#define ZRCOLA_NOVTABLE __declspec(novtable)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4251)
|
||||
#pragma warning(disable: 4512)
|
||||
@@ -75,7 +70,7 @@ namespace ZRCola {
|
||||
/// Language ID type
|
||||
/// Three letter abbreviation, zero terminated
|
||||
///
|
||||
struct ZRCOLA_API langid_t {
|
||||
struct langid_t {
|
||||
char data[4];
|
||||
|
||||
inline langid_t& operator=(const langid_t &src)
|
||||
@@ -221,7 +216,7 @@ namespace ZRCola {
|
||||
/// \param[in] lang_win Windows language ID
|
||||
/// \param[in,out] lang ZRCola language ID
|
||||
///
|
||||
void ZRCOLA_API LangConvert(_In_ LANGID lang_win, _Inout_ langid_t &lang);
|
||||
void LangConvert(_In_ LANGID lang_win, _Inout_ langid_t &lang);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -505,7 +500,7 @@ namespace ZRCola {
|
||||
///
|
||||
/// Source-destination index transformation mapping
|
||||
///
|
||||
class ZRCOLA_NOVTABLE ZRCOLA_API mapping {
|
||||
class __declspec(novtable) mapping {
|
||||
public:
|
||||
size_t src; ///< Character index in source string
|
||||
size_t dst; ///< Character index in destination string
|
||||
@@ -523,7 +518,7 @@ namespace ZRCola {
|
||||
///
|
||||
/// A vector for destination-source index transformation mapping
|
||||
///
|
||||
class ZRCOLA_API mapping_vector : public std::vector<mapping> {
|
||||
class mapping_vector : public std::vector<mapping> {
|
||||
public:
|
||||
///
|
||||
/// Transforms character index of destination to source
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace ZRCola {
|
||||
///
|
||||
/// Language Character Database
|
||||
///
|
||||
class ZRCOLA_API langchar_db {
|
||||
class langchar_db {
|
||||
public:
|
||||
#pragma pack(push)
|
||||
#pragma pack(2)
|
||||
@@ -195,13 +195,13 @@ namespace ZRCola {
|
||||
};
|
||||
|
||||
|
||||
typedef ZRCOLA_API stdex::idrec::record<langchar_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> langchar_rec;
|
||||
typedef stdex::idrec::record<langchar_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> langchar_rec;
|
||||
|
||||
|
||||
///
|
||||
/// Language database
|
||||
///
|
||||
class ZRCOLA_API language_db {
|
||||
class language_db {
|
||||
public:
|
||||
#pragma pack(push)
|
||||
#pragma pack(2)
|
||||
@@ -298,7 +298,7 @@ namespace ZRCola {
|
||||
};
|
||||
|
||||
|
||||
typedef ZRCOLA_API stdex::idrec::record<language_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> language_rec;
|
||||
typedef stdex::idrec::record<language_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> language_rec;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "common.h"
|
||||
|
||||
#include <stdex/idrec.h>
|
||||
#include <assert.h>
|
||||
#include <istream>
|
||||
#include <ostream>
|
||||
#include <vector>
|
||||
@@ -39,7 +40,7 @@ namespace ZRCola {
|
||||
///
|
||||
/// Character Tag Database
|
||||
///
|
||||
class ZRCOLA_API chrtag_db {
|
||||
class chrtag_db {
|
||||
public:
|
||||
#pragma pack(push)
|
||||
#pragma pack(2)
|
||||
@@ -227,13 +228,13 @@ namespace ZRCola {
|
||||
};
|
||||
|
||||
|
||||
typedef ZRCOLA_API stdex::idrec::record<chrtag_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> chrtag_rec;
|
||||
typedef stdex::idrec::record<chrtag_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> chrtag_rec;
|
||||
|
||||
|
||||
///
|
||||
/// Tag name database
|
||||
///
|
||||
class ZRCOLA_API tagname_db {
|
||||
class tagname_db {
|
||||
public:
|
||||
#pragma pack(push)
|
||||
#pragma pack(2)
|
||||
@@ -440,7 +441,7 @@ namespace ZRCola {
|
||||
};
|
||||
|
||||
|
||||
typedef ZRCOLA_API stdex::idrec::record<tagname_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> tagname_rec;
|
||||
typedef stdex::idrec::record<tagname_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> tagname_rec;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
@@ -37,12 +37,17 @@
|
||||
///
|
||||
/// Translation disabled/ZRCola (De)Composition
|
||||
///
|
||||
#define ZRCOLA_TRANSEQID_DEFAULT ((ZRCola::transeqid_t)0)
|
||||
#define ZRCOLA_TRANSEQID_DEFAULT ((ZRCola::transeqid_t)0x0000)
|
||||
|
||||
///
|
||||
/// Custom translation sequence ID
|
||||
///
|
||||
#define ZRCOLA_TRANSEQID_CUSTOM ((ZRCola::transeqid_t)-1)
|
||||
#define ZRCOLA_TRANSEQID_CUSTOM ((ZRCola::transeqid_t)0xffff)
|
||||
|
||||
///
|
||||
/// ZRCola to Unicode translation sequence ID
|
||||
///
|
||||
#define ZRCOLA_TRANSEQID_UNICODE ((ZRCola::transeqid_t)0xfffe)
|
||||
|
||||
|
||||
namespace ZRCola {
|
||||
@@ -59,7 +64,7 @@ namespace ZRCola {
|
||||
///
|
||||
/// Translation database
|
||||
///
|
||||
class ZRCOLA_API translation_db {
|
||||
class translation_db {
|
||||
public:
|
||||
#pragma pack(push)
|
||||
#pragma pack(2)
|
||||
@@ -324,13 +329,13 @@ namespace ZRCola {
|
||||
};
|
||||
|
||||
|
||||
typedef ZRCOLA_API stdex::idrec::record<translation_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> translation_rec;
|
||||
typedef stdex::idrec::record<translation_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> translation_rec;
|
||||
|
||||
|
||||
///
|
||||
/// Translation set database
|
||||
///
|
||||
class ZRCOLA_API transet_db {
|
||||
class transet_db {
|
||||
public:
|
||||
#pragma pack(push)
|
||||
#pragma pack(2)
|
||||
@@ -440,13 +445,13 @@ namespace ZRCola {
|
||||
};
|
||||
|
||||
|
||||
typedef ZRCOLA_API stdex::idrec::record<transet_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> transet_rec;
|
||||
typedef stdex::idrec::record<transet_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> transet_rec;
|
||||
|
||||
|
||||
///
|
||||
/// Translation sequence database
|
||||
///
|
||||
class ZRCOLA_API transeq_db {
|
||||
class transeq_db {
|
||||
public:
|
||||
#pragma pack(push)
|
||||
#pragma pack(2)
|
||||
@@ -621,7 +626,7 @@ namespace ZRCola {
|
||||
};
|
||||
|
||||
|
||||
typedef ZRCOLA_API stdex::idrec::record<transeq_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> transeq_rec;
|
||||
typedef stdex::idrec::record<transeq_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> transeq_rec;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 1991-2020 Amebis
|
||||
# Copyright © 1991-2021 Amebis
|
||||
#
|
||||
# This file is part of ZRCola.
|
||||
#
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\include\zrcolaui\chargroup.h" />
|
||||
<ClInclude Include="..\include\zrcolaui\common.h" />
|
||||
<ClInclude Include="..\include\zrcolaui\keyboard.h" />
|
||||
<ClInclude Include="..\src\pch.h" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -29,9 +29,6 @@
|
||||
<ClInclude Include="..\src\pch.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\zrcolaui\common.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\zrcolaui\keyboard.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common.h"
|
||||
#include <zrcola/common.h>
|
||||
|
||||
#include <stdex/idrec.h>
|
||||
@@ -45,7 +44,7 @@ namespace ZRCola {
|
||||
///
|
||||
/// Character group database
|
||||
///
|
||||
class ZRCOLAUI_API chrgrp_db {
|
||||
class chrgrp_db {
|
||||
public:
|
||||
#pragma pack(push)
|
||||
#pragma pack(2)
|
||||
@@ -184,7 +183,7 @@ namespace ZRCola {
|
||||
};
|
||||
|
||||
|
||||
typedef ZRCOLAUI_API stdex::idrec::record<chrgrp_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> chrgrp_rec;
|
||||
typedef stdex::idrec::record<chrgrp_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> chrgrp_rec;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
///
|
||||
/// Public function calling convention
|
||||
///
|
||||
#define ZRCOLAUI_API
|
||||
#define ZRCOLA_NOVTABLE __declspec(novtable)
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common.h"
|
||||
#include <zrcola/common.h>
|
||||
|
||||
#include <stdex/idrec.h>
|
||||
@@ -44,7 +43,7 @@ namespace ZRCola {
|
||||
///
|
||||
/// Key sequence database
|
||||
///
|
||||
class ZRCOLAUI_API keyseq_db {
|
||||
class keyseq_db {
|
||||
public:
|
||||
#pragma pack(push)
|
||||
#pragma pack(2)
|
||||
@@ -288,7 +287,7 @@ namespace ZRCola {
|
||||
};
|
||||
|
||||
|
||||
typedef ZRCOLAUI_API stdex::idrec::record<keyseq_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> keyseq_rec;
|
||||
typedef stdex::idrec::record<keyseq_db, recordid_t, recordsize_t, ZRCOLA_RECORD_ALIGN> keyseq_rec;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2015-2020 Amebis
|
||||
Copyright © 2015-2021 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
|
||||
Submodule lib/stdex updated: 7a7030b9e3...3d90357905
Submodule lib/wxExtend updated: 11638bb2b4...fcfe641d5c
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user