ZRCola connected to libZRCola for composition and decomposition.

This commit is contained in:
Simon Rozman 2016-02-08 14:58:25 +01:00
parent aad2b347a6
commit 3f94c919ba
4 changed files with 18 additions and 5 deletions

View File

@ -10,7 +10,7 @@
<OutputFile>..\output\locale\%(Filename)\$(ProjectName).mo</OutputFile>
</POCompile>
<ClCompile>
<AdditionalIncludeDirectories>..\lib\wxExtend\include</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\lib\wxExtend\include;..\lib\libZRCola\include</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup />

View File

@ -93,6 +93,9 @@
<ClInclude Include="zrcolagui.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\lib\libZRCola\build\libZRCola.vcxproj">
<Project>{3c61929e-7289-4101-8d0a-da22d6e1aea8}</Project>
</ProjectReference>
<ProjectReference Include="..\lib\wxExtend\build\wxExtend.vcxproj">
<Project>{a3a36689-ac35-4026-93da-a3ba0c0e767c}</Project>
</ProjectReference>

View File

@ -24,7 +24,11 @@
#include "zrcolacomppnl.h"
#include "zrcolafrm.h"
#include <zrcola\compose.h>
#include <zrcola\decompose.h>
#include <wx/msgdlg.h>
#include <wxex/common.h>
#include <string>
#include <vector>

View File

@ -42,9 +42,12 @@ void wxZRColaComposerPanel::OnDecomposedText(wxCommandEvent& event)
// We are being updated by wxZRColaComposerPanel::OnComposedText()
event.Skip();
} else {
// TODO: Do the real ZRCola composition here.
std::wstring composed;
ZRCola::Compose(m_decomposed->GetValue(), (size_t)-1, composed);
// Update composed text.
m_progress = true;
m_composed->SetValue(m_decomposed->GetValue());
m_composed->SetValue(composed);
event.Skip();
m_progress = false;
}
@ -57,9 +60,12 @@ void wxZRColaComposerPanel::OnComposedText(wxCommandEvent& event)
// We are being updated by wxZRColaComposerPanel::OnDecomposedText()
event.Skip();
} else {
// TODO: Do the real ZRCola decomposition here.
std::wstring decomposed;
ZRCola::Decompose(m_composed->GetValue(), (size_t)-1, decomposed);
// Update decomposed text.
m_progress = true;
m_decomposed->SetValue(m_composed->GetValue());
m_decomposed->SetValue(decomposed);
event.Skip();
m_progress = false;
}