Work continues...

This commit is contained in:
Simon Rozman 2016-02-04 12:20:43 +01:00
parent 4ba9924800
commit 9660e983c4
12 changed files with 120 additions and 100 deletions

View File

@ -3,6 +3,10 @@ Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZRCola", "ZRCola\ZRCola.vcxproj", "{CD9E4170-92DD-440E-980C-D15F62032249}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{6D85AD6A-69D6-40EB-BF0C-7495479DDCE5}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxExtend", "lib\wxExtend\build\wxExtend.vcxproj", "{A3A36689-AC35-4026-93DA-A3BA0C0E767C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@ -19,8 +23,19 @@ Global
{CD9E4170-92DD-440E-980C-D15F62032249}.Release|Win32.Build.0 = Release|Win32
{CD9E4170-92DD-440E-980C-D15F62032249}.Release|x64.ActiveCfg = Release|x64
{CD9E4170-92DD-440E-980C-D15F62032249}.Release|x64.Build.0 = Release|x64
{A3A36689-AC35-4026-93DA-A3BA0C0E767C}.Debug|Win32.ActiveCfg = Debug|Win32
{A3A36689-AC35-4026-93DA-A3BA0C0E767C}.Debug|Win32.Build.0 = Debug|Win32
{A3A36689-AC35-4026-93DA-A3BA0C0E767C}.Debug|x64.ActiveCfg = Debug|x64
{A3A36689-AC35-4026-93DA-A3BA0C0E767C}.Debug|x64.Build.0 = Debug|x64
{A3A36689-AC35-4026-93DA-A3BA0C0E767C}.Release|Win32.ActiveCfg = Release|Win32
{A3A36689-AC35-4026-93DA-A3BA0C0E767C}.Release|Win32.Build.0 = Release|Win32
{A3A36689-AC35-4026-93DA-A3BA0C0E767C}.Release|x64.ActiveCfg = Release|x64
{A3A36689-AC35-4026-93DA-A3BA0C0E767C}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{A3A36689-AC35-4026-93DA-A3BA0C0E767C} = {6D85AD6A-69D6-40EB-BF0C-7495479DDCE5}
EndGlobalSection
EndGlobal

14
ZRCola/ZRCola.props Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<OutDir>..\output\$(Platform).$(Configuration)\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\lib\wxExtend\include</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup />
</Project>

View File

@ -52,39 +52,27 @@
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\include\Win32.props" />
<Import Project="..\include\Debug.props" />
<Import Project="ZRCola.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\include\x64.props" />
<Import Project="..\include\Debug.props" />
<Import Project="ZRCola.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\include\Win32.props" />
<Import Project="..\include\Release.props" />
<Import Project="ZRCola.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\include\x64.props" />
<Import Project="..\include\Release.props" />
<Import Project="ZRCola.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>..\output\$(Platform).$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>..\output\$(Platform).$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>..\output\$(Platform).$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>..\output\$(Platform).$(Configuration)\</OutDir>
</PropertyGroup>
<ItemGroup>
<ClCompile Include="main.cpp" />
<ClCompile Include="stdafx.cpp">
@ -93,13 +81,19 @@
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="ZRColaApp.cpp" />
<ClCompile Include="ZRColaFrame.cpp" />
<ClCompile Include="zrcolaapp.cpp" />
<ClCompile Include="zrcolaframe.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\include\ZRCola.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="ZRCola.h" />
<ClInclude Include="zrcolaapp.h" />
<ClInclude Include="zrcolaframe.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\lib\wxExtend\build\wxExtend.vcxproj">
<Project>{a3a36689-ac35-4026-93da-a3ba0c0e767c}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View File

@ -21,10 +21,10 @@
<ClCompile Include="main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ZRColaFrame.cpp">
<ClCompile Include="zrcolaapp.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ZRColaApp.cpp">
<ClCompile Include="zrcolaframe.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
@ -35,7 +35,10 @@
<ClInclude Include="..\include\ZRCola.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="ZRCola.h">
<ClInclude Include="zrcolaapp.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="zrcolaframe.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>

View File

@ -20,4 +20,9 @@
#pragma once
#include "../include/ZRCola.h"
#include "ZRCola.h"
#include "zrcolaapp.h"
#include "zrcolaframe.h"
#include <wx/menu.h>
#include <wx/msgdlg.h>
#include <wxex/common.h>

View File

@ -33,8 +33,8 @@ bool ZRColaApp::OnInit()
wxString sPath(wxPathOnly(argv[0]));
sPath << wxT("\\..\\locale");
m_locale.AddCatalogLookupPathPrefix(sPath);
averify(m_locale.Init(wxLANGUAGE_SLOVENIAN));
averify(m_locale.AddCatalog(wxT("ZRCola")));
wxVERIFY(m_locale.Init(wxLANGUAGE_SLOVENIAN));
wxVERIFY(m_locale.AddCatalog(wxT("ZRCola")));
}
ZRColaFrame *frame = new ZRColaFrame(_("Hello World"), wxPoint(50, 50), wxSize(450, 340));

35
ZRCola/zrcolaapp.h Normal file
View File

@ -0,0 +1,35 @@
/*
Copyright 2016 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
#include <wx/app.h>
///
/// ZRCola application
///
class ZRColaApp: public wxApp
{
public:
virtual bool OnInit();
protected:
wxLocale m_locale;
};

View File

@ -24,17 +24,17 @@
// ZRColaFrame
//////////////////////////////////////////////////////////////////////////
wxBEGIN_EVENT_TABLE(ZRColaFrame, wxFrame)
wxBEGIN_EVENT_TABLE(ZRColaFrame, wxAppBar)
EVT_MENU(ZRColaFrame::ID_Hello, ZRColaFrame::OnHello)
EVT_MENU(wxID_EXIT, ZRColaFrame::OnExit)
EVT_MENU(wxID_ABOUT, ZRColaFrame::OnAbout)
EVT_MENU(wxID_EXIT, ZRColaFrame::OnExit)
EVT_MENU(wxID_ABOUT, ZRColaFrame::OnAbout)
wxEND_EVENT_TABLE()
ZRColaFrame::ZRColaFrame(const wxString& title, const wxPoint& pos, const wxSize& size) : wxFrame(NULL, wxID_ANY, title, pos, size)
ZRColaFrame::ZRColaFrame(const wxString& title, const wxPoint& pos, const wxSize& size) : wxAppBar(NULL, wxID_ANY, title, wxSTATE_FLOAT, wxFLAG_ALLOWFLOAT | wxFLAG_ALLOWDOCKHORIZONTAL | wxFLAG_ALLOWSIZING | wxFLAG_HIDETASKBARTABWHENDOCKED, pos, size)
{
wxMenu *menuFile = new wxMenu;
menuFile->Append(ZRColaFrame::ID_Hello, _("&Hello...\tShift+H"), _("Help string shown in status bar for this menu item"));
menuFile->Append(ZRColaFrame::ID_Hello, _("&Hello...\tCtrl+H"), _("Help string shown in status bar for this menu item"));
menuFile->AppendSeparator();
menuFile->Append(wxID_EXIT);
@ -46,8 +46,8 @@ ZRColaFrame::ZRColaFrame(const wxString& title, const wxPoint& pos, const wxSize
menuBar->Append(menuHelp, _("&Help"));
SetMenuBar(menuBar);
CreateStatusBar();
SetStatusText(_("Welcome to wxWidgets!"));
//CreateStatusBar();
//SetStatusText(_("Welcome to wxWidgets!"));
}

View File

@ -19,14 +19,13 @@
#pragma once
#include <wx/wx.h>
#include <wxex/appbar.h>
//////////////////////////////////////////////////////////////////////////
// ZRColaFrame
//////////////////////////////////////////////////////////////////////////
class ZRColaFrame : public wxFrame
///
/// ZRCola main frame
///
class ZRColaFrame : public wxAppBar
{
public:
ZRColaFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
@ -41,17 +40,3 @@ protected:
void OnAbout(wxCommandEvent& event);
wxDECLARE_EVENT_TABLE();
};
//////////////////////////////////////////////////////////////////////////
// ZRColaApp
//////////////////////////////////////////////////////////////////////////
class ZRColaApp: public wxApp
{
public:
virtual bool OnInit();
protected:
wxLocale m_locale;
};

View File

@ -18,33 +18,3 @@
*/
#pragma once
#include <Windows.h>
//////////////////////////////////////////////////////////////////////////
// _L(), __L()
//////////////////////////////////////////////////////////////////////////
#define __L(x) L ## x
#define _L(x) __L(x)
//////////////////////////////////////////////////////////////////////////
// aassert(), averify()
//////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
extern "C" {
#endif
_CRTIMP void __cdecl _wassert(_In_z_ const wchar_t * _Message, _In_z_ const wchar_t *_File, _In_ unsigned _Line);
#ifdef __cplusplus
}
#endif
#if defined(NDEBUG) // aassert() and averify() are defined according to NDEBUG for consistent experience with assert().
#define aassert(expr) ((void)0)
#define averify(expr) ((void)(expr))
#else
#define aassert(expr) ((void)((expr) || (_wassert(_L(#expr), _L(__FILE__), __LINE__), 0)))
#define averify(expr) aassert(expr)
#endif

Binary file not shown.

View File

@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: ZRCola\n"
"POT-Creation-Date: 2016-02-02 15:49+0100\n"
"PO-Revision-Date: 2016-02-02 16:35+0100\n"
"POT-Creation-Date: 2016-02-04 12:19+0100\n"
"PO-Revision-Date: 2016-02-04 12:19+0100\n"
"Last-Translator: Simon Rozman <simon.rozman@amebis.si>\n"
"Language-Team: Amebis, d. o. o., Kamnik <info@amebis.si>\n"
"Language: sl_SI\n"
@ -17,38 +17,37 @@ msgstr ""
"X-Poedit-KeywordsList: _\n"
"X-Poedit-SearchPath-0: .\n"
#: main.cpp:48
msgid "&Hello...\tShift+H"
msgstr "&Pozdrav ...\t⇧+H"
#: zrcolaapp.cpp:40
msgid "Hello World"
msgstr "Zdravo svet"
#: main.cpp:48
#: zrcolaframe.cpp:37
msgid "&Hello...\tCtrl+H"
msgstr "&Pozdrav ...\tCtrl+H"
#: zrcolaframe.cpp:37
msgid "Help string shown in status bar for this menu item"
msgstr "Niz s pomočjo prikazan v statusni vrstici za to točko menija"
#: main.cpp:56
#: zrcolaframe.cpp:45
msgid "&File"
msgstr "&Datoteka"
#: main.cpp:57
#: zrcolaframe.cpp:46
msgid "&Help"
msgstr "&Pomoč"
#: main.cpp:61
msgid "Welcome to wxWidgets!"
msgstr "Dobrodošli v wxWidgets!"
#: main.cpp:71
#: zrcolaframe.cpp:62
msgid "This is a wxWidgets' Hello world sample"
msgstr "To je primer Zdravo svet v wxWidgets"
#: main.cpp:71
#: zrcolaframe.cpp:62
msgid "About Hello World"
msgstr "O Zdravo svet"
#: main.cpp:76
#: zrcolaframe.cpp:68
msgid "Hello world from wxWidgets!"
msgstr "Zdravo svet iz wxWidgets!"
#: main.cpp:99
msgid "Hello World"
msgstr "Zdravo svet"
#~ msgid "Welcome to wxWidgets!"
#~ msgstr "Dobrodošli v wxWidgets!"