Merge branch 'misc-changes' of https://github.com/MaartenBent/wxWidgets
Update CMake with recent changes, remove more Borland checks. See https://github.com/wxWidgets/wxWidgets/pull/2098
This commit is contained in:
@@ -132,13 +132,6 @@ if(NOT MSVC)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
wx_check_c_source_compiles(
|
|
||||||
"#define test(fmt, ...) printf(fmt, __VA_ARGS__)
|
|
||||||
test(\"%s %d %p\", \"test\", 1, 0);"
|
|
||||||
HAVE_VARIADIC_MACROS
|
|
||||||
stdio.h
|
|
||||||
)
|
|
||||||
#TODO: wxNO_VARIADIC_MACROS
|
|
||||||
if(wxUSE_STL AND CMAKE_CXX_STANDARD EQUAL 98)
|
if(wxUSE_STL AND CMAKE_CXX_STANDARD EQUAL 98)
|
||||||
wx_check_cxx_source_compiles("
|
wx_check_cxx_source_compiles("
|
||||||
std::vector<int> moo;
|
std::vector<int> moo;
|
||||||
|
@@ -164,6 +164,15 @@ set(TEST_GUI_DATA
|
|||||||
image/horse_box_average_100x100.png
|
image/horse_box_average_100x100.png
|
||||||
image/horse_box_average_150x150.png
|
image/horse_box_average_150x150.png
|
||||||
image/horse_box_average_300x300.png
|
image/horse_box_average_300x300.png
|
||||||
|
image/paste_input_background.png
|
||||||
|
image/paste_input_black.png
|
||||||
|
image/paste_input_overlay_transparent_border_opaque_square.png
|
||||||
|
image/paste_input_overlay_transparent_border_semitransparent_circle.png
|
||||||
|
image/paste_input_overlay_transparent_border_semitransparent_square.png
|
||||||
|
image/paste_result_background_plus_circle_plus_square.png
|
||||||
|
image/paste_result_background_plus_overlay_transparent_border_opaque_square.png
|
||||||
|
image/paste_result_background_plus_overlay_transparent_border_semitransparent_square.png
|
||||||
|
image/paste_result_no_background_square_over_circle.png
|
||||||
intl/ja/internat.mo
|
intl/ja/internat.mo
|
||||||
intl/ja/internat.po
|
intl/ja/internat.po
|
||||||
)
|
)
|
||||||
|
@@ -20,10 +20,7 @@
|
|||||||
#define wxID_NO 5104
|
#define wxID_NO 5104
|
||||||
|
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
#include <windows.h>
|
||||||
#if !defined(__GNUWIN32__) && !defined(__BORLANDC__)
|
|
||||||
#include <commctrl.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define APSTUDIO_READONLY_SYMBOLS
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
@@ -35,45 +35,45 @@ wxIMPLEMENT_APP(MyApp);
|
|||||||
|
|
||||||
bool MyApp::OnInit(void)
|
bool MyApp::OnInit(void)
|
||||||
{
|
{
|
||||||
if ( !wxApp::OnInit() )
|
if ( !wxApp::OnInit() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Create the main frame window
|
// Create the main frame window
|
||||||
MyFrame *frame = new MyFrame(NULL, wxID_ANY, "wxWidgets Native Dialog Sample", wxPoint(0, 0), wxSize(300, 250));
|
MyFrame* frame = new MyFrame(NULL, wxID_ANY, "wxWidgets Native Dialog Sample", wxDefaultPosition, wxDefaultSize);
|
||||||
|
|
||||||
#if wxUSE_STATUSBAR
|
#if wxUSE_STATUSBAR
|
||||||
// Give it a status line
|
// Give it a status line
|
||||||
frame->CreateStatusBar(2);
|
frame->CreateStatusBar(2);
|
||||||
#endif // wxUSE_STATUSBAR
|
#endif // wxUSE_STATUSBAR
|
||||||
|
|
||||||
// Make a menubar
|
// Make a menubar
|
||||||
wxMenu *file_menu = new wxMenu;
|
wxMenu* file_menu = new wxMenu;
|
||||||
|
|
||||||
file_menu->Append(RESOURCE_TEST1, "&Dialog box test", "Test dialog box resource");
|
file_menu->Append(RESOURCE_TEST1, "&Dialog box test", "Test dialog box resource");
|
||||||
file_menu->Append(RESOURCE_QUIT, "E&xit", "Quit program");
|
file_menu->Append(RESOURCE_QUIT, "E&xit", "Quit program");
|
||||||
|
|
||||||
wxMenuBar *menu_bar = new wxMenuBar;
|
wxMenuBar* menu_bar = new wxMenuBar;
|
||||||
|
|
||||||
menu_bar->Append(file_menu, "&File");
|
menu_bar->Append(file_menu, "&File");
|
||||||
|
|
||||||
// Associate the menu bar with the frame
|
// Associate the menu bar with the frame
|
||||||
frame->SetMenuBar(menu_bar);
|
frame->SetMenuBar(menu_bar);
|
||||||
|
|
||||||
// Make a panel
|
// Make a panel
|
||||||
frame->panel = new wxWindow(frame, wxID_ANY, wxPoint(0, 0), wxSize(400, 400), 0, "MyMainFrame");
|
frame->panel = new wxWindow(frame, wxID_ANY);
|
||||||
frame->Show(true);
|
frame->Show(true);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_MENU(RESOURCE_QUIT, MyFrame::OnQuit)
|
EVT_MENU(RESOURCE_QUIT, MyFrame::OnQuit)
|
||||||
EVT_MENU(RESOURCE_TEST1, MyFrame::OnTest1)
|
EVT_MENU(RESOURCE_TEST1, MyFrame::OnTest1)
|
||||||
wxEND_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
// Define my frame constructor
|
// Define my frame constructor
|
||||||
MyFrame::MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size):
|
MyFrame::MyFrame(wxWindow* parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size) :
|
||||||
wxFrame(parent, id, title, pos, size)
|
wxFrame(parent, id, title, pos, size)
|
||||||
{
|
{
|
||||||
SetIcon(wxICON(sample));
|
SetIcon(wxICON(sample));
|
||||||
|
|
||||||
@@ -82,19 +82,19 @@ MyFrame::MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, c
|
|||||||
|
|
||||||
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
Close(true);
|
Close(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnTest1(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnTest1(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
|
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
|
||||||
MyDialog dialog;
|
MyDialog dialog;
|
||||||
if (dialog.LoadNativeDialog(this, "dialog1"))
|
if ( dialog.LoadNativeDialog(this, "dialog1") )
|
||||||
{
|
{
|
||||||
dialog.ShowModal();
|
dialog.ShowModal();
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
wxMessageBox("No native dialog support","Platform limitation");
|
wxMessageBox("No native dialog support", "Platform limitation");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -9,31 +9,31 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// Define a new application
|
// Define a new application
|
||||||
class MyApp: public wxApp
|
class MyApp : public wxApp
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MyApp(void){}
|
MyApp(void) {}
|
||||||
bool OnInit(void) wxOVERRIDE;
|
bool OnInit(void) wxOVERRIDE;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MyFrame: public wxFrame
|
class MyFrame : public wxFrame
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxWindow *panel;
|
wxWindow* panel;
|
||||||
MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size);
|
MyFrame(wxWindow* parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size);
|
||||||
void OnQuit(wxCommandEvent& event);
|
void OnQuit(wxCommandEvent& event);
|
||||||
void OnTest1(wxCommandEvent& event);
|
void OnTest1(wxCommandEvent& event);
|
||||||
|
|
||||||
wxDECLARE_EVENT_TABLE();
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
class MyDialog : public wxDialog
|
class MyDialog : public wxDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void OnOk(wxCommandEvent& event);
|
void OnOk(wxCommandEvent& event);
|
||||||
void OnCancel(wxCommandEvent& event);
|
void OnCancel(wxCommandEvent& event);
|
||||||
|
|
||||||
wxDECLARE_EVENT_TABLE();
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
#define RESOURCE_QUIT 4
|
#define RESOURCE_QUIT 4
|
||||||
|
@@ -300,7 +300,6 @@ wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd)
|
|||||||
parent->AddChild(win);
|
parent->AddChild(win);
|
||||||
win->SubclassWin(hWnd);
|
win->SubclassWin(hWnd);
|
||||||
win->AdoptAttributesFromHWND();
|
win->AdoptAttributesFromHWND();
|
||||||
win->SetupColours();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return win;
|
return win;
|
||||||
|
@@ -18,9 +18,6 @@
|
|||||||
// for compilers that support precompilation, includes "wx.h".
|
// for compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_ACTIVITYINDICATOR
|
#if wxUSE_ACTIVITYINDICATOR
|
||||||
|
|
||||||
|
@@ -18,9 +18,6 @@
|
|||||||
// For compilers that support precompilation, includes "wx.h".
|
// For compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_DATEPICKCTRL
|
#if wxUSE_DATEPICKCTRL
|
||||||
|
|
||||||
|
@@ -19,9 +19,6 @@
|
|||||||
// for compilers that support precompilation, includes "wx.h".
|
// for compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/evtloop.h"
|
#include "wx/evtloop.h"
|
||||||
|
|
||||||
|
@@ -18,9 +18,6 @@
|
|||||||
|
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#if defined(__BORLANDC__)
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_GLCANVAS
|
#if wxUSE_GLCANVAS
|
||||||
|
|
||||||
|
@@ -19,9 +19,6 @@
|
|||||||
// For compilers that support precompilation, includes "wx.h".
|
// For compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Compilation guard
|
// Compilation guard
|
||||||
|
@@ -18,9 +18,6 @@
|
|||||||
// for compilers that support precompilation, includes "wx.h".
|
// for compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/nativewin.h"
|
#include "wx/nativewin.h"
|
||||||
|
|
||||||
|
@@ -18,9 +18,6 @@
|
|||||||
// for compilers that support precompilation, includes "wx.h".
|
// for compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/notifmsg.h"
|
#include "wx/notifmsg.h"
|
||||||
|
|
||||||
|
@@ -19,9 +19,6 @@
|
|||||||
// For compilers that support precompilation, includes "wx.h".
|
// For compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/overlay.h"
|
#include "wx/overlay.h"
|
||||||
|
|
||||||
|
@@ -18,9 +18,6 @@
|
|||||||
// for compilers that support precompilation, includes "wx.h".
|
// for compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_PREFERENCES_EDITOR
|
#if wxUSE_PREFERENCES_EDITOR
|
||||||
|
|
||||||
|
@@ -10,9 +10,6 @@
|
|||||||
// For compilers that support precompilation, includes "wx.h".
|
// For compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_SEARCHCTRL
|
#if wxUSE_SEARCHCTRL
|
||||||
|
|
||||||
|
@@ -18,9 +18,6 @@
|
|||||||
// For compilers that support precompilation, includes "wx.h".
|
// For compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_STATBMP
|
#if wxUSE_STATBMP
|
||||||
|
|
||||||
|
@@ -18,9 +18,6 @@
|
|||||||
// For compilers that support precompilation, includes "wx.h".
|
// For compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_STATLINE
|
#if wxUSE_STATLINE
|
||||||
|
|
||||||
|
@@ -19,9 +19,6 @@
|
|||||||
// for compilers that support precompilation, includes "wx.h".
|
// for compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/evtloop.h"
|
#include "wx/evtloop.h"
|
||||||
|
|
||||||
|
@@ -18,9 +18,6 @@
|
|||||||
|
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#if defined(__BORLANDC__)
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_GLCANVAS
|
#if wxUSE_GLCANVAS
|
||||||
|
|
||||||
|
@@ -18,9 +18,6 @@
|
|||||||
// For compilers that support precompilation, includes "wx.h".
|
// For compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_STATBMP
|
#if wxUSE_STATBMP
|
||||||
|
|
||||||
|
@@ -66,9 +66,6 @@
|
|||||||
<string name="cpp_implementation_preamble">"// For compilers that support precompilation, includes "wx/wx.h".
|
<string name="cpp_implementation_preamble">"// For compilers that support precompilation, includes "wx/wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/wx.h"
|
#include "wx/wx.h"
|
||||||
|
@@ -28,9 +28,6 @@
|
|||||||
// For compilers that support precompilation, includes "wx.h".
|
// For compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_STC
|
#if wxUSE_STC
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user