--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cpp/CMakeLists.txt Sun Feb 13 07:57:02 2011 +0100
@@ -0,0 +1,13 @@
+PROJECT(lingvigilo)
+
+FIND_PACKAGE(wxWidgets)
+
+IF (wxWidgets_FOUND)
+ INCLUDE(${wxWidgets_USE_FILE})
+ENDIF (wxWidgets_FOUND)
+
+
+ADD_EXECUTABLE(lingvigilo
+ main.cpp
+ MainWindow.cpp)
+TARGET_LINK_LIBRARIES(lingvigilo ${wxWidgets_LIBRARIES})
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cpp/MainWindow.cpp Sun Feb 13 07:57:02 2011 +0100
@@ -0,0 +1,18 @@
+#include <wx/wx.h>
+#include <wx/image.h>
+#include "MainWindow.hpp"
+
+MainWindow::MainWindow()
+ :wxFrame(0, wxID_ANY, _("Lingvigilo"), wxDefaultPosition)
+{
+ wxBoxSizer *s = new wxBoxSizer(wxVERTICAL);
+ wxStaticText *label = new wxStaticText(this, wxID_ANY,
+ _("Introdueix la frase:"));
+ wxTextCtrl *text = new wxTextCtrl(this, wxID_ANY);
+ s->Add(label);
+ s->Add(text);
+
+ text->SetFocus();
+
+ SetSizerAndFit(s);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cpp/MainWindow.hpp Sun Feb 13 07:57:02 2011 +0100
@@ -0,0 +1,12 @@
+#ifndef _HEADER_MAINWINDOW_HPP_
+#define _HEADER_MAINWINDOW_HPP_
+
+#include <wx/wx.h>
+
+class MainWindow : public wxFrame
+{
+public:
+ MainWindow();
+};
+
+#endif /* _HEADER_MAINWINDOW_HPP_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cpp/main.cpp Sun Feb 13 07:57:02 2011 +0100
@@ -0,0 +1,27 @@
+#include <wx/wx.h>
+#include <wx/log.h>
+#include <wx/image.h>
+#include <wx/string.h>
+#include <wx/init.h>
+
+#include "MainWindow.hpp"
+
+class MyApp : public wxApp
+{
+ public:
+ virtual bool OnInit();
+};
+
+IMPLEMENT_APP(MyApp)
+
+bool MyApp::OnInit()
+{
+ if(!wxApp::OnInit())
+ return false;
+
+ MainWindow *mw = new MainWindow();
+ mw->Show();
+ SetTopWindow(mw);
+
+ return true;
+}