Merge branch 'master' into webview-chromium
This commit is contained in:
commit
ff59ef301b
342 changed files with 8214 additions and 4407 deletions
|
|
@ -18,17 +18,20 @@
|
|||
#include "wx/artprov.h"
|
||||
#include "wx/clipbrd.h"
|
||||
#include "wx/image.h"
|
||||
#include "wx/choice.h"
|
||||
#include "wx/colordlg.h"
|
||||
#include "wx/wxhtml.h"
|
||||
#include "wx/imaglist.h"
|
||||
#include "wx/dataobj.h"
|
||||
#include "wx/dcclient.h"
|
||||
#include "wx/bmpbuttn.h"
|
||||
#include "wx/log.h"
|
||||
#include "wx/menu.h"
|
||||
#include "wx/toolbar.h"
|
||||
#include "wx/statusbr.h"
|
||||
#include "wx/msgdlg.h"
|
||||
#include "wx/textdlg.h"
|
||||
#include "wx/stattext.h"
|
||||
|
||||
#include "wx/aui/aui.h"
|
||||
#include "../sample.xpm"
|
||||
|
|
@ -98,6 +101,8 @@ class MyFrame : public wxFrame
|
|||
ID_NotebookArtSimple,
|
||||
ID_NotebookAlignTop,
|
||||
ID_NotebookAlignBottom,
|
||||
ID_NotebookNewTab,
|
||||
ID_NotebookDeleteTab,
|
||||
|
||||
ID_SampleItem,
|
||||
|
||||
|
|
@ -158,6 +163,9 @@ private:
|
|||
void OnNotebookFlag(wxCommandEvent& evt);
|
||||
void OnUpdateUI(wxUpdateUIEvent& evt);
|
||||
|
||||
void OnNotebookNewTab(wxCommandEvent& evt);
|
||||
void OnNotebookDeleteTab(wxCommandEvent& evt);
|
||||
|
||||
void OnPaneClose(wxAuiManagerEvent& evt);
|
||||
|
||||
private:
|
||||
|
|
@ -605,6 +613,8 @@ wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||
EVT_MENU(ID_NotebookArtSimple, MyFrame::OnNotebookFlag)
|
||||
EVT_MENU(ID_NotebookAlignTop, MyFrame::OnTabAlignment)
|
||||
EVT_MENU(ID_NotebookAlignBottom, MyFrame::OnTabAlignment)
|
||||
EVT_MENU(ID_NotebookNewTab, MyFrame::OnNotebookNewTab)
|
||||
EVT_MENU(ID_NotebookDeleteTab, MyFrame::OnNotebookDeleteTab)
|
||||
EVT_MENU(ID_NoGradient, MyFrame::OnGradient)
|
||||
EVT_MENU(ID_VerticalGradient, MyFrame::OnGradient)
|
||||
EVT_MENU(ID_HorizontalGradient, MyFrame::OnGradient)
|
||||
|
|
@ -733,6 +743,9 @@ MyFrame::MyFrame(wxWindow* parent,
|
|||
notebook_menu->AppendCheckItem(ID_NotebookScrollButtons, _("Scroll Buttons Visible"));
|
||||
notebook_menu->AppendCheckItem(ID_NotebookWindowList, _("Window List Button Visible"));
|
||||
notebook_menu->AppendCheckItem(ID_NotebookTabFixedWidth, _("Fixed-width Tabs"));
|
||||
notebook_menu->AppendSeparator();
|
||||
notebook_menu->Append(ID_NotebookNewTab, _("Add a &New Tab"));
|
||||
notebook_menu->Append(ID_NotebookDeleteTab, _("&Delete Last Tab"));
|
||||
|
||||
m_perspectives_menu = new wxMenu;
|
||||
m_perspectives_menu->Append(ID_CreatePerspective, _("Create Perspective"));
|
||||
|
|
@ -1261,7 +1274,7 @@ void MyFrame::OnUpdateUI(wxUpdateUIEvent& event)
|
|||
break;
|
||||
|
||||
case ID_NotebookNoCloseButton:
|
||||
event.Check((m_notebook_style & (wxAUI_NB_CLOSE_BUTTON|wxAUI_NB_CLOSE_ON_ALL_TABS|wxAUI_NB_CLOSE_ON_ACTIVE_TAB)) != 0);
|
||||
event.Check((m_notebook_style & (wxAUI_NB_CLOSE_BUTTON|wxAUI_NB_CLOSE_ON_ALL_TABS|wxAUI_NB_CLOSE_ON_ACTIVE_TAB)) == 0);
|
||||
break;
|
||||
case ID_NotebookCloseButton:
|
||||
event.Check((m_notebook_style & wxAUI_NB_CLOSE_BUTTON) != 0);
|
||||
|
|
@ -1300,6 +1313,36 @@ void MyFrame::OnUpdateUI(wxUpdateUIEvent& event)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void MyFrame::OnNotebookNewTab(wxCommandEvent& WXUNUSED(evt))
|
||||
{
|
||||
auto* const book =
|
||||
wxCheckCast<wxAuiNotebook>(m_mgr.GetPane("notebook_content").window);
|
||||
|
||||
book->AddPage(new wxTextCtrl(book, wxID_ANY, "New Tab",
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
wxTE_MULTILINE | wxNO_BORDER),
|
||||
wxString::Format("Tab %zu", book->GetPageCount() + 1),
|
||||
true /* select */);
|
||||
}
|
||||
|
||||
|
||||
void MyFrame::OnNotebookDeleteTab(wxCommandEvent& WXUNUSED(evt))
|
||||
{
|
||||
auto* const book =
|
||||
wxCheckCast<wxAuiNotebook>(m_mgr.GetPane("notebook_content").window);
|
||||
|
||||
auto numPages = book->GetPageCount();
|
||||
if ( !numPages )
|
||||
{
|
||||
wxLogWarning("No pages to delete.");
|
||||
return;
|
||||
}
|
||||
|
||||
book->DeletePage(numPages - 1);
|
||||
}
|
||||
|
||||
|
||||
void MyFrame::OnPaneClose(wxAuiManagerEvent& evt)
|
||||
{
|
||||
if (evt.pane->name == "test10")
|
||||
|
|
|
|||
|
|
@ -419,7 +419,7 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
|||
wxChar ch = CharAt(x, y);
|
||||
if ( !ch )
|
||||
ch = ' ';
|
||||
#ifdef __WXOSX__
|
||||
#if defined(__WXOSX__) || defined(__WXQT__)
|
||||
dc.DrawText(ch, m_xMargin + x * m_widthChar,
|
||||
m_yMargin + y * m_heightChar );
|
||||
#else
|
||||
|
|
@ -427,9 +427,8 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifndef __WXOSX__
|
||||
dc.DrawText( line, m_xMargin, m_yMargin + y * m_heightChar );
|
||||
#endif
|
||||
if ( !line.empty() )
|
||||
dc.DrawText( line, m_xMargin, m_yMargin + y * m_heightChar );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -71,16 +71,19 @@ class MyApp: public wxApp
|
|||
{
|
||||
public:
|
||||
MyApp() { }
|
||||
MyApp(const MyApp&) = delete;
|
||||
MyApp& operator=(const MyApp&) = delete;
|
||||
|
||||
virtual bool OnInit() override;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(MyApp);
|
||||
};
|
||||
|
||||
class MyFrame: public wxFrame
|
||||
{
|
||||
public:
|
||||
MyFrame();
|
||||
MyFrame(const MyFrame&) = delete;
|
||||
MyFrame& operator=(const MyFrame&) = delete;
|
||||
|
||||
virtual ~MyFrame();
|
||||
|
||||
// Menu commands
|
||||
|
|
@ -103,13 +106,15 @@ private:
|
|||
wxBoxSizer *m_paneSizer;
|
||||
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
wxDECLARE_NO_COPY_CLASS(MyFrame);
|
||||
};
|
||||
|
||||
class MyDialog : public wxDialog
|
||||
{
|
||||
public:
|
||||
MyDialog(wxFrame *parent);
|
||||
MyDialog(const MyDialog&) = delete;
|
||||
MyDialog& operator=(const MyDialog&) = delete;
|
||||
|
||||
void OnToggleStatus(wxCommandEvent& WXUNUSED(ev));
|
||||
void OnAlignButton(wxCommandEvent& WXUNUSED(ev));
|
||||
void OnPaneChanged(wxCollapsiblePaneEvent& event);
|
||||
|
|
@ -119,7 +124,6 @@ private:
|
|||
wxGridSizer *m_paneSizer;
|
||||
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
wxDECLARE_NO_COPY_CLASS(MyDialog);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -245,6 +245,8 @@ class MyIndexListModel : public wxDataViewIndexListModel
|
|||
{
|
||||
public:
|
||||
MyIndexListModel() { }
|
||||
MyIndexListModel(const MyIndexListModel&) = delete;
|
||||
MyIndexListModel& operator=(const MyIndexListModel&) = delete;
|
||||
|
||||
void Fill(const wxArrayString& strings)
|
||||
{
|
||||
|
|
@ -266,8 +268,6 @@ public:
|
|||
|
||||
private:
|
||||
wxArrayString m_strings;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(MyIndexListModel);
|
||||
};
|
||||
|
||||
enum ModelFlags
|
||||
|
|
|
|||
|
|
@ -157,6 +157,8 @@ class MyFrame : public wxFrame
|
|||
{
|
||||
public:
|
||||
MyFrame();
|
||||
MyFrame(const MyFrame&) = delete;
|
||||
MyFrame& operator=(const MyFrame&) = delete;
|
||||
|
||||
private:
|
||||
void OnListLoadedDLLs(wxCommandEvent& event);
|
||||
|
|
@ -185,7 +187,6 @@ private:
|
|||
// number of lines drawn in OnPaint()
|
||||
int m_numLines;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(MyFrame);
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
};
|
||||
|
||||
|
|
@ -202,6 +203,8 @@ class MyApp : public wxApp
|
|||
public:
|
||||
// call wxHandleFatalExceptions here
|
||||
MyApp();
|
||||
MyApp(const MyApp&) = delete;
|
||||
MyApp& operator=(const MyApp&) = delete;
|
||||
|
||||
// create our main window here
|
||||
virtual bool OnInit() override;
|
||||
|
|
@ -219,8 +222,6 @@ public:
|
|||
|
||||
private:
|
||||
bool m_uploadReport;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(MyApp);
|
||||
};
|
||||
|
||||
wxIMPLEMENT_APP(MyApp);
|
||||
|
|
|
|||
|
|
@ -1318,6 +1318,8 @@ public:
|
|||
sizerBtns->Add(new wxButton(this, wxID_RESET, "&Reset all"),
|
||||
wxSizerFlags().Border(wxLEFT));
|
||||
}
|
||||
MyRearrangeDialog(const MyRearrangeDialog&) = delete;
|
||||
MyRearrangeDialog& operator=(const MyRearrangeDialog&) = delete;
|
||||
|
||||
// call this instead of ShowModal() to update order and labels array in
|
||||
// case the dialog was not cancelled
|
||||
|
|
@ -1409,7 +1411,6 @@ private:
|
|||
wxTextCtrl *m_text;
|
||||
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
wxDECLARE_NO_COPY_CLASS(MyRearrangeDialog);
|
||||
};
|
||||
|
||||
wxBEGIN_EVENT_TABLE(MyRearrangeDialog, wxRearrangeDialog)
|
||||
|
|
@ -1731,6 +1732,8 @@ public:
|
|||
: m_dialog(&dialog)
|
||||
{
|
||||
}
|
||||
MyCustomizeHook(const MyCustomizeHook&) = delete;
|
||||
MyCustomizeHook& operator=(const MyCustomizeHook&) = delete;
|
||||
|
||||
// Override pure virtual base class method to add our custom controls.
|
||||
virtual void AddCustomControls(wxFileDialogCustomize& customizer) override
|
||||
|
|
@ -1804,8 +1807,6 @@ private:
|
|||
wxFileDialogStaticText* m_label;
|
||||
|
||||
wxString m_info;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(MyCustomizeHook);
|
||||
};
|
||||
|
||||
void MyFrame::FileOpen(wxCommandEvent& WXUNUSED(event) )
|
||||
|
|
|
|||
|
|
@ -190,6 +190,8 @@ class TestMessageBoxDialog : public wxDialog
|
|||
{
|
||||
public:
|
||||
TestMessageBoxDialog(wxWindow *parent);
|
||||
TestMessageBoxDialog(const TestMessageBoxDialog&) = delete;
|
||||
TestMessageBoxDialog& operator=(const TestMessageBoxDialog&) = delete;
|
||||
|
||||
bool Create();
|
||||
|
||||
|
|
@ -256,7 +258,6 @@ private:
|
|||
wxStaticText *m_labelResult;
|
||||
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
wxDECLARE_NO_COPY_CLASS(TestMessageBoxDialog);
|
||||
};
|
||||
|
||||
#if wxUSE_RICHMSGDLG
|
||||
|
|
|
|||
|
|
@ -164,6 +164,8 @@ class wxTextDocument : public wxDocument
|
|||
{
|
||||
public:
|
||||
wxTextDocument() : wxDocument() { }
|
||||
wxTextDocument(const wxTextDocument&) = delete;
|
||||
wxTextDocument &operator=(const wxTextDocument&) = delete;
|
||||
|
||||
virtual bool OnCreate(const wxString& path, long flags) override;
|
||||
|
||||
|
|
@ -178,7 +180,6 @@ protected:
|
|||
|
||||
void OnTextChange(wxCommandEvent& event);
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxTextDocument);
|
||||
wxDECLARE_ABSTRACT_CLASS(wxTextDocument);
|
||||
};
|
||||
|
||||
|
|
@ -190,9 +191,11 @@ class TextEditDocument : public wxTextDocument
|
|||
{
|
||||
public:
|
||||
TextEditDocument() : wxTextDocument() { }
|
||||
TextEditDocument(const TextEditDocument&) = delete;
|
||||
TextEditDocument &operator=(const TextEditDocument&) = delete;
|
||||
|
||||
virtual wxTextCtrl* GetTextCtrl() const override;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(TextEditDocument);
|
||||
wxDECLARE_DYNAMIC_CLASS(TextEditDocument);
|
||||
};
|
||||
|
||||
|
|
@ -207,6 +210,8 @@ class ImageDocument : public wxDocument
|
|||
{
|
||||
public:
|
||||
ImageDocument() : wxDocument() { }
|
||||
ImageDocument(const ImageDocument&) = delete;
|
||||
ImageDocument &operator=(const ImageDocument&) = delete;
|
||||
|
||||
virtual bool OnOpenDocument(const wxString& file) override;
|
||||
|
||||
|
|
@ -218,7 +223,6 @@ protected:
|
|||
private:
|
||||
wxImage m_image;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(ImageDocument);
|
||||
wxDECLARE_DYNAMIC_CLASS(ImageDocument);
|
||||
};
|
||||
|
||||
|
|
@ -229,6 +233,8 @@ class ImageDetailsDocument : public wxDocument
|
|||
{
|
||||
public:
|
||||
ImageDetailsDocument(ImageDocument *parent);
|
||||
ImageDetailsDocument(const ImageDetailsDocument&) = delete;
|
||||
ImageDetailsDocument &operator=(const ImageDetailsDocument&) = delete;
|
||||
|
||||
// accessors for ImageDetailsView
|
||||
wxSize GetSize() const { return m_size; }
|
||||
|
|
@ -242,8 +248,6 @@ private:
|
|||
unsigned long m_numColours;
|
||||
wxBitmapType m_type;
|
||||
bool m_hasAlpha;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(ImageDetailsDocument);
|
||||
};
|
||||
|
||||
#endif // _WX_SAMPLES_DOCVIEW_DOC_H_
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ public:
|
|||
};
|
||||
|
||||
MyApp();
|
||||
MyApp(const MyApp&) = delete;
|
||||
MyApp& operator=(const MyApp&) = delete;
|
||||
|
||||
// override some wxApp virtual methods
|
||||
virtual bool OnInit() override;
|
||||
|
|
@ -90,7 +92,6 @@ private:
|
|||
wxMenu *m_menuEdit;
|
||||
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
wxDECLARE_NO_COPY_CLASS(MyApp);
|
||||
};
|
||||
|
||||
wxDECLARE_APP(MyApp);
|
||||
|
|
|
|||
|
|
@ -155,14 +155,14 @@ class ImageDetailsView : public wxView
|
|||
{
|
||||
public:
|
||||
ImageDetailsView(ImageDetailsDocument *doc);
|
||||
ImageDetailsView(const ImageDetailsView&) = delete;
|
||||
ImageDetailsView& operator=(const ImageDetailsView&) = delete;
|
||||
|
||||
virtual void OnDraw(wxDC *dc) override;
|
||||
virtual bool OnClose(bool deleteWindow) override;
|
||||
|
||||
private:
|
||||
wxFrame *m_frame;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(ImageDetailsView);
|
||||
};
|
||||
|
||||
#endif // _WX_SAMPLES_DOCVIEW_VIEW_H_
|
||||
|
|
|
|||
|
|
@ -49,6 +49,8 @@ public:
|
|||
m_colBg(colBg)
|
||||
{
|
||||
}
|
||||
CustomColumnHeaderRenderer(const CustomColumnHeaderRenderer&) = delete;
|
||||
CustomColumnHeaderRenderer& operator=(const CustomColumnHeaderRenderer&) = delete;
|
||||
|
||||
virtual void DrawLabel(const wxGrid& WXUNUSED(grid),
|
||||
wxDC& dc,
|
||||
|
|
@ -74,8 +76,6 @@ public:
|
|||
|
||||
private:
|
||||
const wxColour m_colFg, m_colBg;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(CustomColumnHeaderRenderer);
|
||||
};
|
||||
|
||||
// And a custom attributes provider which uses custom column header renderer
|
||||
|
|
@ -91,6 +91,8 @@ public:
|
|||
m_useCustom(false)
|
||||
{
|
||||
}
|
||||
CustomColumnHeadersProvider(const CustomColumnHeadersProvider&) = delete;
|
||||
CustomColumnHeadersProvider& operator=(const CustomColumnHeadersProvider&) = delete;
|
||||
|
||||
// enable or disable the use of custom renderer for column headers
|
||||
void UseCustomColHeaders(bool use = true) { m_useCustom = use; }
|
||||
|
|
@ -114,8 +116,6 @@ private:
|
|||
m_customEvenRenderer;
|
||||
|
||||
bool m_useCustom;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(CustomColumnHeadersProvider);
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
|
@ -2437,6 +2437,8 @@ class TabularGridFrame : public wxFrame
|
|||
{
|
||||
public:
|
||||
TabularGridFrame();
|
||||
TabularGridFrame(const TabularGridFrame&) = delete;
|
||||
TabularGridFrame& operator=(const TabularGridFrame&) = delete;
|
||||
|
||||
private:
|
||||
enum // control ids
|
||||
|
|
@ -2626,7 +2628,6 @@ private:
|
|||
bool m_shouldUpdateRowOrder,
|
||||
m_shouldUpdateColOrder;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(TabularGridFrame);
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -60,6 +60,8 @@ class MyHtmlListBox : public wxHtmlListBox
|
|||
public:
|
||||
MyHtmlListBox() { }
|
||||
MyHtmlListBox(wxWindow *parent, bool multi = false);
|
||||
MyHtmlListBox(const MyHtmlListBox&) = delete;
|
||||
MyHtmlListBox& operator=(const MyHtmlListBox&) = delete;
|
||||
|
||||
void SetChangeSelFg(bool change) { m_change = change; }
|
||||
void UpdateFirstItem();
|
||||
|
|
@ -90,7 +92,6 @@ public:
|
|||
wxTextFile m_file;
|
||||
#endif
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(MyHtmlListBox);
|
||||
wxDECLARE_DYNAMIC_CLASS(MyHtmlListBox);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@ public:
|
|||
// no custom background initially to avoid confusing people
|
||||
m_drawCustomBg = false;
|
||||
}
|
||||
MyHtmlWindow(const MyHtmlWindow&) = delete;
|
||||
MyHtmlWindow& operator=(const MyHtmlWindow&) = delete;
|
||||
|
||||
virtual wxHtmlOpeningStatus OnOpeningURL(wxHtmlURLType WXUNUSED(type),
|
||||
const wxString& WXUNUSED(url),
|
||||
|
|
@ -71,7 +73,6 @@ private:
|
|||
bool m_drawCustomBg;
|
||||
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
wxDECLARE_NO_COPY_CLASS(MyHtmlWindow);
|
||||
};
|
||||
|
||||
// Define a new frame type: this is going to be our main frame
|
||||
|
|
|
|||
|
|
@ -1261,6 +1261,8 @@ public:
|
|||
|
||||
Show();
|
||||
}
|
||||
MySVGFrame(const MySVGFrame&) = delete;
|
||||
MySVGFrame& operator=(const MySVGFrame&) = delete;
|
||||
|
||||
private:
|
||||
void OnPaint(wxPaintEvent&)
|
||||
|
|
@ -1290,8 +1292,6 @@ private:
|
|||
|
||||
const wxBitmapBundle m_bundle;
|
||||
wxBitmap m_bitmap;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(MySVGFrame);
|
||||
};
|
||||
|
||||
void MyFrame::OnNewSVGFrame(wxCommandEvent&)
|
||||
|
|
@ -1413,6 +1413,8 @@ public:
|
|||
|
||||
Show();
|
||||
}
|
||||
MyGraphicsFrame(const MyGraphicsFrame&) = delete;
|
||||
MyGraphicsFrame& operator=(const MyGraphicsFrame&) = delete;
|
||||
|
||||
private:
|
||||
void OnPaint(wxPaintEvent& WXUNUSED(event))
|
||||
|
|
@ -1433,8 +1435,6 @@ private:
|
|||
|
||||
wxImage m_image;
|
||||
wxBitmap m_bitmap;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(MyGraphicsFrame);
|
||||
};
|
||||
|
||||
void MyFrame::OnTestGraphics(wxCommandEvent& WXUNUSED(event))
|
||||
|
|
|
|||
|
|
@ -78,6 +78,8 @@ class BenchConnection : public wxConnection
|
|||
{
|
||||
public:
|
||||
BenchConnection() { m_advise = false; }
|
||||
BenchConnection(const BenchConnection&) = delete;
|
||||
BenchConnection& operator=(const BenchConnection&) = delete;
|
||||
|
||||
virtual bool OnPoke(const wxString& topic,
|
||||
const wxString& item,
|
||||
|
|
@ -99,8 +101,6 @@ private:
|
|||
|
||||
// should we notify the client about changes to m_item?
|
||||
bool m_advise;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(BenchConnection);
|
||||
};
|
||||
|
||||
// a simple server accepting connections to IPC_TOPIC and IPC_BENCHMARK_TOPIC
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ wxEND_EVENT_TABLE()
|
|||
|
||||
// My frame constructor
|
||||
MyFrame::MyFrame(const wxString& title)
|
||||
: wxFrame(nullptr, wxID_ANY, title, wxDefaultPosition, wxSize(600, 500))
|
||||
: wxFrame(nullptr, wxID_ANY, title)
|
||||
{
|
||||
m_listCtrl = nullptr;
|
||||
m_logWindow = nullptr;
|
||||
|
|
@ -293,6 +293,9 @@ MyFrame::MyFrame(const wxString& title)
|
|||
|
||||
RecreateList(wxLC_REPORT | wxLC_SINGLE_SEL);
|
||||
|
||||
// Make the list control big enough to show its initial contents.
|
||||
m_listCtrl->SetInitialSize(FromDIP(wxSize(600, 300)));
|
||||
|
||||
#ifdef __WXMSW__
|
||||
// this is useful to know specially when debugging :)
|
||||
wxLogMessage("Your version of comctl32.dll is: %d",
|
||||
|
|
|
|||
|
|
@ -20,11 +20,10 @@ class MyApp: public wxApp
|
|||
{
|
||||
public:
|
||||
MyApp() { }
|
||||
MyApp(const MyApp&) = delete;
|
||||
MyApp& operator=(const MyApp&) = delete;
|
||||
|
||||
virtual bool OnInit() override;
|
||||
|
||||
private:
|
||||
wxDECLARE_NO_COPY_CLASS(MyApp);
|
||||
};
|
||||
|
||||
class MyListCtrl: public wxListCtrl
|
||||
|
|
@ -40,6 +39,8 @@ public:
|
|||
m_updated = -1;
|
||||
|
||||
}
|
||||
MyListCtrl(const MyListCtrl&) = delete;
|
||||
MyListCtrl &operator=(const MyListCtrl&) = delete;
|
||||
|
||||
// add one item to the listctrl in report mode
|
||||
void InsertItemInReportView(int i);
|
||||
|
|
@ -90,7 +91,6 @@ private:
|
|||
// checked boxes in virtual list
|
||||
wxSelectionStore m_checked;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(MyListCtrl);
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
};
|
||||
|
||||
|
|
@ -99,6 +99,9 @@ class MyFrame: public wxFrame
|
|||
{
|
||||
public:
|
||||
MyFrame(const wxString& title);
|
||||
MyFrame(const MyFrame&) = delete;
|
||||
MyFrame &operator=(const MyFrame&) = delete;
|
||||
|
||||
virtual ~MyFrame();
|
||||
|
||||
protected:
|
||||
|
|
@ -185,8 +188,6 @@ private:
|
|||
// number of items to initialize list/report view with
|
||||
int m_numListItems;
|
||||
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(MyFrame);
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ public:
|
|||
m_frame(frame)
|
||||
{
|
||||
}
|
||||
MenuEventLogger(const MenuEventLogger&) = delete;
|
||||
MenuEventLogger& operator=(const MenuEventLogger&) = delete;
|
||||
|
||||
protected:
|
||||
void LogMenuOpenClose(wxMenuEvent& event, const char *action)
|
||||
|
|
@ -52,8 +54,6 @@ protected:
|
|||
|
||||
const wxString m_label;
|
||||
wxFrame* const m_frame;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(MenuEventLogger);
|
||||
};
|
||||
|
||||
class MyCanvas : public wxScrolledWindow,
|
||||
|
|
@ -155,6 +155,8 @@ private:
|
|||
{
|
||||
public:
|
||||
EventHandler(unsigned numChild) : m_numChild(numChild) { }
|
||||
EventHandler(const EventHandler&) = delete;
|
||||
EventHandler &operator=(const EventHandler&) = delete;
|
||||
|
||||
private:
|
||||
void OnRefresh(wxCommandEvent& event)
|
||||
|
|
@ -166,8 +168,6 @@ private:
|
|||
const unsigned m_numChild;
|
||||
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(EventHandler);
|
||||
};
|
||||
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<key>CFBundleExecutable</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>$(PRODUCT_NAME) version 3.3.0, (c) 2005-2023 wxWidgets</string>
|
||||
<string>$(PRODUCT_NAME) version 3.3.0, (c) 2005-2024 wxWidgets</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>wxmac.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
<string>3.3.0, (c) 2005-2023 wxWidgets</string>
|
||||
<string>3.3.0, (c) 2005-2024 wxWidgets</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
<key>CFBundleVersion</key>
|
||||
<string>3.3.0</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright 2005-2023 wxWidgets</string>
|
||||
<string>Copyright 2005-2024 wxWidgets</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>wxNSApplication</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ ifeq ($(USE_OPENGL),1)
|
|||
$(OBJS)\cube.exe: $(CUBE_OBJECTS) $(OBJS)\cube_sample_rc.o
|
||||
$(foreach f,$(subst \,/,$(CUBE_OBJECTS)),$(shell echo $f >> $(subst \,/,$@).rsp.tmp))
|
||||
@move /y $@.rsp.tmp $@.rsp >nul
|
||||
$(CXX) -o $@ @$@.rsp $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl -lopengl32 -lglu32 $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregexu$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lws2_32 -lwininet -loleacc -luxtheme
|
||||
$(CXX) -o $@ @$@.rsp $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl -lopengl32 $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregexu$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lws2_32 -lwininet -loleacc -luxtheme
|
||||
@-del $@.rsp
|
||||
endif
|
||||
|
||||
|
|
|
|||
|
|
@ -419,7 +419,7 @@ clean:
|
|||
!if "$(USE_OPENGL)" == "1"
|
||||
$(OBJS)\cube.exe: $(CUBE_OBJECTS) $(OBJS)\cube_sample.res
|
||||
link /NOLOGO /OUT:$@ $(__DEBUGINFO_1) /pdb:"$(OBJS)\cube.pdb" $(__DEBUGINFO_2) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(WIN32_DPI_LINKFLAG) /SUBSYSTEM:WINDOWS $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) @<<
|
||||
$(CUBE_OBJECTS) $(CUBE_RESOURCES) wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib opengl32.lib glu32.lib $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregexu$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib
|
||||
$(CUBE_OBJECTS) $(CUBE_RESOURCES) wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib opengl32.lib $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregexu$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib
|
||||
<<
|
||||
!endif
|
||||
|
||||
|
|
|
|||
|
|
@ -15,14 +15,11 @@
|
|||
#if defined(__WXMAC__)
|
||||
# ifdef __DARWIN__
|
||||
# include <OpenGL/gl.h>
|
||||
# include <OpenGL/glu.h>
|
||||
# else
|
||||
# include <gl.h>
|
||||
# include <glu.h>
|
||||
# endif
|
||||
#else
|
||||
# include <GL/gl.h>
|
||||
# include <GL/glu.h>
|
||||
#endif
|
||||
|
||||
// the maximum number of vertex in the loaded .dat file
|
||||
|
|
@ -47,6 +44,8 @@ public:
|
|||
TestGLCanvas(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
int *gl_attrib = nullptr);
|
||||
TestGLCanvas(const TestGLCanvas&) = delete;
|
||||
TestGLCanvas& operator=(const TestGLCanvas&) = delete;
|
||||
|
||||
virtual ~TestGLCanvas();
|
||||
|
||||
|
|
@ -69,7 +68,6 @@ private:
|
|||
GLfloat m_xrot;
|
||||
GLfloat m_yrot;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(TestGLCanvas);
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ ifeq ($(USE_OPENGL),1)
|
|||
$(OBJS)\isosurf.exe: $(ISOSURF_OBJECTS) $(OBJS)\isosurf_sample_rc.o
|
||||
$(foreach f,$(subst \,/,$(ISOSURF_OBJECTS)),$(shell echo $f >> $(subst \,/,$@).rsp.tmp))
|
||||
@move /y $@.rsp.tmp $@.rsp >nul
|
||||
$(CXX) -o $@ @$@.rsp $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl -lopengl32 -lglu32 $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregexu$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lws2_32 -lwininet -loleacc -luxtheme
|
||||
$(CXX) -o $@ @$@.rsp $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl -lopengl32 $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregexu$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lws2_32 -lwininet -loleacc -luxtheme
|
||||
@-del $@.rsp
|
||||
endif
|
||||
|
||||
|
|
|
|||
|
|
@ -419,7 +419,7 @@ clean:
|
|||
!if "$(USE_OPENGL)" == "1"
|
||||
$(OBJS)\isosurf.exe: $(ISOSURF_OBJECTS) $(OBJS)\isosurf_sample.res
|
||||
link /NOLOGO /OUT:$@ $(__DEBUGINFO_1) /pdb:"$(OBJS)\isosurf.pdb" $(__DEBUGINFO_2) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(WIN32_DPI_LINKFLAG) /SUBSYSTEM:WINDOWS $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) @<<
|
||||
$(ISOSURF_OBJECTS) $(ISOSURF_RESOURCES) wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib opengl32.lib glu32.lib $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregexu$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib
|
||||
$(ISOSURF_OBJECTS) $(ISOSURF_RESOURCES) wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib opengl32.lib $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregexu$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib
|
||||
<<
|
||||
!endif
|
||||
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ distclean: clean
|
|||
rm -f config.cache config.log config.status bk-deps bk-make-pch Makefile
|
||||
|
||||
@COND_USE_OPENGL_1@penguin$(EXEEXT): $(PENGUIN_OBJECTS) $(__penguin___win32rc)
|
||||
@COND_USE_OPENGL_1@ $(CXX) -o $@ $(PENGUIN_OBJECTS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(LDFLAGS) $(WX_LDFLAGS) -lwx_$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl-$(WX_RELEASE)$(HOST_SUFFIX) $(EXTRALIBS_OPENGL) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(LIBS)
|
||||
@COND_USE_OPENGL_1@ $(CXX) -o $@ $(PENGUIN_OBJECTS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(LDFLAGS) $(WX_LDFLAGS) -lwx_$(PORTNAME)$(WXUNIVNAME)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl-$(WX_RELEASE)$(HOST_SUFFIX) $(EXTRALIBS_OPENGL) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(LIBS)
|
||||
@COND_USE_OPENGL_1@ $(__penguin___os2_emxbindcmd)
|
||||
|
||||
@COND_PLATFORM_MACOSX_1_USE_OPENGL_1@penguin.app/Contents/PkgInfo: $(__penguin___depname) $(top_srcdir)/src/osx/carbon/Info.plist.in $(top_srcdir)/src/osx/carbon/wxmac.icns
|
||||
|
|
|
|||
|
|
@ -17,17 +17,12 @@
|
|||
|
||||
#include "wx/wfstream.h"
|
||||
#include "wx/txtstrm.h"
|
||||
#include "wx/glcanvas.h"
|
||||
|
||||
#if !wxUSE_GLCANVAS
|
||||
#error "OpenGL required: set wxUSE_GLCANVAS to 1 and rebuild the library"
|
||||
#endif
|
||||
|
||||
#ifdef __DARWIN__
|
||||
#include <OpenGL/glu.h>
|
||||
#else
|
||||
#include <GL/glu.h>
|
||||
#endif
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include "dxfrenderer.h"
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ ifeq ($(USE_OPENGL),1)
|
|||
$(OBJS)\penguin.exe: $(PENGUIN_OBJECTS) $(OBJS)\penguin_sample_rc.o
|
||||
$(foreach f,$(subst \,/,$(PENGUIN_OBJECTS)),$(shell echo $f >> $(subst \,/,$@).rsp.tmp))
|
||||
@move /y $@.rsp.tmp $@.rsp >nul
|
||||
$(CXX) -o $@ @$@.rsp $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl -lopengl32 -lglu32 $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregexu$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lws2_32 -lwininet -loleacc -luxtheme
|
||||
$(CXX) -o $@ @$@.rsp $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl -lopengl32 $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregexu$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lws2_32 -lwininet -loleacc -luxtheme
|
||||
@-del $@.rsp
|
||||
endif
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ test_for_selected_wxbuild:
|
|||
@$(WX_CONFIG) $(WX_CONFIG_FLAGS)
|
||||
|
||||
penguin: $(PENGUIN_OBJECTS)
|
||||
$(CXX) -o $@ $(PENGUIN_OBJECTS) $(LDFLAGS) `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs gl,core,base` -lGL -lGLU
|
||||
$(CXX) -o $@ $(PENGUIN_OBJECTS) $(LDFLAGS) `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs gl,core,base` -lGL
|
||||
|
||||
penguin_penguin.o: ./penguin.cpp
|
||||
$(CXX) -c -o $@ $(PENGUIN_CXXFLAGS) $(CPPDEPS) $<
|
||||
|
|
|
|||
|
|
@ -431,7 +431,7 @@ clean:
|
|||
!if "$(USE_OPENGL)" == "1"
|
||||
$(OBJS)\penguin.exe: $(PENGUIN_OBJECTS) $(OBJS)\penguin_sample.res
|
||||
link /NOLOGO /OUT:$@ $(__DEBUGINFO_1) /pdb:"$(OBJS)\penguin.pdb" $(__DEBUGINFO_2) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(WIN32_DPI_LINKFLAG) /SUBSYSTEM:WINDOWS $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) @<<
|
||||
$(PENGUIN_OBJECTS) $(PENGUIN_RESOURCES) wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib opengl32.lib glu32.lib $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregexu$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib
|
||||
$(PENGUIN_OBJECTS) $(PENGUIN_RESOURCES) wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib opengl32.lib $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregexu$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib
|
||||
<<
|
||||
!endif
|
||||
|
||||
|
|
|
|||
|
|
@ -8,13 +8,10 @@
|
|||
<set var="USE_OPENGL">1</set>
|
||||
</if>
|
||||
|
||||
<!-- Under Unix we need to link with GL and GLU explicitly too. -->
|
||||
<!-- Under Unix we need to link with GL explicitly too. -->
|
||||
<set var="SYS_GL_LIB">
|
||||
<if cond="PLATFORM_WIN32=='0' and OUT_OF_TREE_MAKEFILES=='1'">GL</if>
|
||||
</set>
|
||||
<set var="SYS_GLU_LIB">
|
||||
<if cond="PLATFORM_WIN32=='0' and OUT_OF_TREE_MAKEFILES=='1'">GLU</if>
|
||||
</set>
|
||||
|
||||
<exe id="penguin" template="wx_sample" template_append="wx_append" cond="USE_OPENGL=='1'">
|
||||
<sources>
|
||||
|
|
@ -31,7 +28,6 @@
|
|||
<wx-lib>core</wx-lib>
|
||||
<wx-lib>base</wx-lib>
|
||||
<sys-lib>$(SYS_GL_LIB)</sys-lib>
|
||||
<sys-lib>$(SYS_GLU_LIB)</sys-lib>
|
||||
</exe>
|
||||
|
||||
<wx-data id="data">
|
||||
|
|
|
|||
|
|
@ -21,11 +21,6 @@
|
|||
#endif
|
||||
|
||||
#include "penguin.h"
|
||||
#ifdef __DARWIN__
|
||||
#include <OpenGL/glu.h>
|
||||
#else
|
||||
#include <GL/glu.h>
|
||||
#endif
|
||||
|
||||
#include "../../sample.xpm"
|
||||
|
||||
|
|
@ -312,7 +307,9 @@ void TestGLCanvas::ResetProjectionMode()
|
|||
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
gluPerspective(45, double(ClientSize.x) / ClientSize.y, 1, 100);
|
||||
double fH = tan(M_PI / 8);
|
||||
double fW = fH * ClientSize.x / ClientSize.y;
|
||||
glFrustum(-fW, fW, -fH, fH, 1.0, 100.0);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,6 +79,8 @@ public:
|
|||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxString& name = "TestGLCanvas");
|
||||
TestGLCanvas(const TestGLCanvas&) = delete;
|
||||
TestGLCanvas& operator=(const TestGLCanvas&) = delete;
|
||||
|
||||
virtual ~TestGLCanvas();
|
||||
|
||||
|
|
@ -98,7 +100,6 @@ private:
|
|||
GLData m_gldata;
|
||||
DXFRenderer m_renderer;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(TestGLCanvas);
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ ifeq ($(USE_OPENGL),1)
|
|||
$(OBJS)\pyramid.exe: $(PYRAMID_OBJECTS) $(OBJS)\pyramid_sample_rc.o
|
||||
$(foreach f,$(subst \,/,$(PYRAMID_OBJECTS)),$(shell echo $f >> $(subst \,/,$@).rsp.tmp))
|
||||
@move /y $@.rsp.tmp $@.rsp >nul
|
||||
$(CXX) -o $@ @$@.rsp $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl -lopengl32 -lglu32 $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregexu$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lws2_32 -lwininet -loleacc -luxtheme
|
||||
$(CXX) -o $@ @$@.rsp $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl -lopengl32 $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregexu$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lversion -lws2_32 -lwininet -loleacc -luxtheme
|
||||
@-del $@.rsp
|
||||
endif
|
||||
|
||||
|
|
|
|||
|
|
@ -422,7 +422,7 @@ clean:
|
|||
!if "$(USE_OPENGL)" == "1"
|
||||
$(OBJS)\pyramid.exe: $(PYRAMID_OBJECTS) $(OBJS)\pyramid_sample.res
|
||||
link /NOLOGO /OUT:$@ $(__DEBUGINFO_1) /pdb:"$(OBJS)\pyramid.pdb" $(__DEBUGINFO_2) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) $(WIN32_DPI_LINKFLAG) /SUBSYSTEM:WINDOWS $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) @<<
|
||||
$(PYRAMID_OBJECTS) $(PYRAMID_RESOURCES) wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib opengl32.lib glu32.lib $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregexu$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib
|
||||
$(PYRAMID_OBJECTS) $(PYRAMID_RESOURCES) wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl.lib opengl32.lib $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_LEXILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregexu$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib ws2_32.lib wininet.lib
|
||||
<<
|
||||
!endif
|
||||
|
||||
|
|
|
|||
|
|
@ -339,7 +339,7 @@ public:
|
|||
|
||||
SingleChoiceProperty( const wxString& label,
|
||||
const wxString& name = wxPG_LABEL,
|
||||
const wxString& value = wxEmptyString )
|
||||
const wxString& value = wxString() )
|
||||
: wxStringProperty(label, name, value)
|
||||
{
|
||||
// Prepare choices
|
||||
|
|
@ -812,7 +812,7 @@ void FormMain::OnPropertyGridItemRightClick( wxPropertyGridEvent& event )
|
|||
}
|
||||
else
|
||||
{
|
||||
sb->SetStatusText( wxEmptyString );
|
||||
sb->SetStatusText( wxString() );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
@ -834,7 +834,7 @@ void FormMain::OnPropertyGridItemDoubleClick( wxPropertyGridEvent& event )
|
|||
}
|
||||
else
|
||||
{
|
||||
sb->SetStatusText ( wxEmptyString );
|
||||
sb->SetStatusText ( wxString() );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
@ -1280,7 +1280,7 @@ void FormMain::PopulateWithExamples ()
|
|||
soc.Add( "Look, it continues", 200 );
|
||||
soc.Add( "Even More", 240 );
|
||||
soc.Add( "And More", 280 );
|
||||
soc.Add( wxEmptyString, 300 );
|
||||
soc.Add( "", 300);
|
||||
soc.Add( "True End of the List", 320 );
|
||||
|
||||
// Test custom colours ([] operator of wxPGChoices returns
|
||||
|
|
@ -1331,8 +1331,7 @@ void FormMain::PopulateWithExamples ()
|
|||
pg->SetPropertyHelpString( "Password",
|
||||
"Has attribute wxPG_STRING_PASSWORD set to true" );
|
||||
|
||||
// String editor with dir selector button. Uses wxEmptyString as name, which
|
||||
// is allowed (naturally, in this case property cannot be accessed by name).
|
||||
// String editor with dir selector button.
|
||||
pg->Append( new wxDirProperty( "DirProperty", wxPG_LABEL, ::wxGetUserHome()) );
|
||||
pg->SetPropertyAttribute( "DirProperty",
|
||||
wxPG_DIALOG_TITLE,
|
||||
|
|
@ -1978,7 +1977,7 @@ FormMain::FormMain(const wxString& title)
|
|||
|
||||
//
|
||||
// Create menu bar
|
||||
wxMenu *menuFile = new wxMenu(wxEmptyString, wxMENU_TEAROFF);
|
||||
wxMenu *menuFile = new wxMenu("", wxMENU_TEAROFF);
|
||||
wxMenu *menuTry = new wxMenu;
|
||||
wxMenu *menuTools1 = new wxMenu;
|
||||
wxMenu *menuTools2 = new wxMenu;
|
||||
|
|
@ -2102,7 +2101,7 @@ FormMain::FormMain(const wxString& title)
|
|||
#if wxUSE_STATUSBAR
|
||||
// create a status bar
|
||||
CreateStatusBar(1);
|
||||
SetStatusText(wxEmptyString);
|
||||
SetStatusText(wxString());
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
// Register all editors (SpinCtrl etc.)
|
||||
|
|
@ -2440,7 +2439,7 @@ void FormMain::OnExtendedKeyNav( wxCommandEvent& WXUNUSED(event) )
|
|||
// Up, and Down keys for navigating between properties.
|
||||
wxPropertyGrid* propGrid = m_pPropGridManager->GetGrid();
|
||||
|
||||
propGrid->AddActionTrigger(wxPGKeyboardActions::NextProperty,
|
||||
propGrid->AddActionTrigger(wxPGKeyboardAction::NextProperty,
|
||||
WXK_RETURN);
|
||||
propGrid->DedicateKey(WXK_RETURN);
|
||||
|
||||
|
|
|
|||
|
|
@ -490,7 +490,7 @@ wxArrayDoubleProperty::wxArrayDoubleProperty (const wxString& label,
|
|||
// (i.e. can't use comma when comma acts as decimal point in float).
|
||||
wxChar use_delimiter = ',';
|
||||
|
||||
if (wxString::Format("%.2f",12.34).Find(use_delimiter) >= 0)
|
||||
if ( wxNumberFormatter::GetDecimalSeparator() == use_delimiter )
|
||||
use_delimiter = ';';
|
||||
|
||||
m_delimiter = use_delimiter;
|
||||
|
|
@ -505,11 +505,11 @@ void wxArrayDoubleProperty::OnSetValue()
|
|||
}
|
||||
|
||||
wxString wxArrayDoubleProperty::ValueToString( wxVariant& value,
|
||||
int argFlags ) const
|
||||
wxPGPropValFormatFlags flags ) const
|
||||
{
|
||||
wxString s;
|
||||
|
||||
if ( argFlags & wxPG_FULL_VALUE )
|
||||
if ( !!(flags & wxPGPropValFormatFlags::FullValue) )
|
||||
{
|
||||
GenerateValueAsString(s,-1,false);
|
||||
}
|
||||
|
|
@ -557,7 +557,7 @@ bool wxArrayDoubleProperty::DisplayEditorDialog(wxPropertyGrid* pg, wxVariant& v
|
|||
// Create editor dialog.
|
||||
wxArrayDoubleEditorDialog dlg;
|
||||
dlg.SetPrecision(m_precision);
|
||||
dlg.Create(pg->GetPanel(), wxEmptyString,
|
||||
dlg.Create(pg->GetPanel(), "",
|
||||
m_dlgTitle.empty() ? GetLabel() : m_dlgTitle, curValue, m_dlgStyle);
|
||||
dlg.Move( pg->GetGoodEditorDialogPosition(this,dlg.GetSize()) );
|
||||
|
||||
|
|
@ -571,7 +571,7 @@ bool wxArrayDoubleProperty::DisplayEditorDialog(wxPropertyGrid* pg, wxVariant& v
|
|||
return false;
|
||||
}
|
||||
|
||||
bool wxArrayDoubleProperty::StringToValue( wxVariant& variant, const wxString& text, int ) const
|
||||
bool wxArrayDoubleProperty::StringToValue( wxVariant& variant, const wxString& text, wxPGPropValFormatFlags ) const
|
||||
{
|
||||
// Add values to a temporary array so that in case
|
||||
// of error we can opt not to use them.
|
||||
|
|
@ -632,7 +632,7 @@ wxValidator* wxArrayDoubleProperty::DoGetValidator() const
|
|||
WX_PG_DOGETVALIDATOR_ENTRY()
|
||||
|
||||
wxTextValidator* validator =
|
||||
new wxNumericPropertyValidator(wxNumericPropertyValidator::Float);
|
||||
new wxNumericPropertyValidator(wxNumericPropertyValidator::NumericType::Float);
|
||||
|
||||
// Accept also a delimiter and space character
|
||||
validator->AddCharIncludes(m_delimiter);
|
||||
|
|
@ -707,12 +707,12 @@ wxColour MyColourProperty::GetColour(int index) const
|
|||
return wxColour();
|
||||
}
|
||||
|
||||
wxString MyColourProperty::ColourToString(const wxColour& col, int index, int argFlags) const
|
||||
wxString MyColourProperty::ColourToString(const wxColour& col, int index, wxPGPropValFormatFlags flags) const
|
||||
{
|
||||
if ( index == (int)(m_choices.GetCount() - 1) )
|
||||
return wxEmptyString;
|
||||
return wxString();
|
||||
|
||||
return wxColourProperty::ColourToString(col, index, argFlags);
|
||||
return wxColourProperty::ColourToString(col, index, flags);
|
||||
}
|
||||
|
||||
int MyColourProperty::GetCustomColourIndex() const
|
||||
|
|
|
|||
|
|
@ -116,10 +116,16 @@ public:
|
|||
virtual ~wxArrayDoubleProperty() = default;
|
||||
|
||||
virtual void OnSetValue() override;
|
||||
virtual wxString ValueToString( wxVariant& value, int argFlags = 0 ) const override;
|
||||
#if WXWIN_COMPATIBILITY_3_2
|
||||
// To prevent warnings that obsolete methods are hidden by overloads with new signature.
|
||||
using wxEditorDialogProperty::ValueToString;
|
||||
using wxEditorDialogProperty::StringToValue;
|
||||
#endif // WXWIN_COMPATIBILITY_3_2
|
||||
virtual wxString ValueToString(wxVariant& value,
|
||||
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
|
||||
virtual bool StringToValue( wxVariant& variant,
|
||||
const wxString& text,
|
||||
int argFlags = 0 ) const override;
|
||||
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null ) const override;
|
||||
virtual bool DoSetAttribute( const wxString& name, wxVariant& value ) override;
|
||||
|
||||
// Generates cache for displayed text
|
||||
|
|
@ -150,8 +156,12 @@ public:
|
|||
|
||||
virtual wxColour GetColour(int index) const override;
|
||||
|
||||
virtual wxString ColourToString(const wxColour& col,
|
||||
int index, int argFlags = 0) const override;
|
||||
#if WXWIN_COMPATIBILITY_3_2
|
||||
// To prevent warning that obsolete method is hidden by overload with new signature.
|
||||
using wxColourProperty::ColourToString;
|
||||
#endif // WXWIN_COMPATIBILITY_3_2
|
||||
virtual wxString ColourToString(const wxColour& col, int index,
|
||||
wxPGPropValFormatFlags flags = wxPGPropValFormatFlags::Null) const override;
|
||||
|
||||
virtual int GetCustomColourIndex() const override;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -71,16 +71,19 @@ class MyApp: public wxApp
|
|||
{
|
||||
public:
|
||||
MyApp() { }
|
||||
MyApp(const MyApp&) = delete;
|
||||
MyApp& operator=(const MyApp&) = delete;
|
||||
|
||||
virtual bool OnInit() override;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(MyApp);
|
||||
};
|
||||
|
||||
class MyFrame: public wxFrame
|
||||
{
|
||||
public:
|
||||
MyFrame();
|
||||
MyFrame(const MyFrame&) = delete;
|
||||
MyFrame& operator=(const MyFrame&) = delete;
|
||||
|
||||
virtual ~MyFrame();
|
||||
|
||||
void ToggleFlag(int flag, bool enable);
|
||||
|
|
@ -126,22 +129,24 @@ public:
|
|||
int GetSashPos() const { return m_sashPos; }
|
||||
|
||||
private:
|
||||
wxWindow *m_left, *m_right;
|
||||
wxWindow *m_left = nullptr,
|
||||
*m_right = nullptr;
|
||||
|
||||
wxSplitterWindow* m_splitter;
|
||||
wxWindow *m_replacewindow;
|
||||
int m_sashPos;
|
||||
bool m_lockSash;
|
||||
bool m_allowDClick;
|
||||
wxSplitterWindow* m_splitter = nullptr;
|
||||
wxWindow *m_replacewindow = nullptr;
|
||||
int m_sashPos = 0;
|
||||
bool m_lockSash = false;
|
||||
bool m_allowDClick = true;
|
||||
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
wxDECLARE_NO_COPY_CLASS(MyFrame);
|
||||
};
|
||||
|
||||
class MySplitterWindow : public wxSplitterWindow
|
||||
{
|
||||
public:
|
||||
MySplitterWindow(MyFrame *parent);
|
||||
MySplitterWindow(const MySplitterWindow&) = delete;
|
||||
MySplitterWindow &operator=(const MySplitterWindow &) = delete;
|
||||
|
||||
// event handlers
|
||||
void OnPositionChanged(wxSplitterEvent& event);
|
||||
|
|
@ -154,21 +159,21 @@ private:
|
|||
MyFrame *m_frame;
|
||||
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
wxDECLARE_NO_COPY_CLASS(MySplitterWindow);
|
||||
};
|
||||
|
||||
class MyCanvas: public wxScrolledWindow
|
||||
{
|
||||
public:
|
||||
MyCanvas(wxWindow* parent, bool mirror);
|
||||
MyCanvas(const MyCanvas&) = delete;
|
||||
MyCanvas &operator=(const MyCanvas &) = delete;
|
||||
|
||||
virtual ~MyCanvas(){}
|
||||
|
||||
virtual void OnDraw(wxDC& dc) override;
|
||||
|
||||
private:
|
||||
bool m_mirror;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(MyCanvas);
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
|
|
@ -225,13 +230,8 @@ wxEND_EVENT_TABLE()
|
|||
|
||||
// My frame constructor
|
||||
MyFrame::MyFrame()
|
||||
: wxFrame(nullptr, wxID_ANY, "wxSplitterWindow sample",
|
||||
wxDefaultPosition, wxSize(420, 300))
|
||||
: wxFrame(nullptr, wxID_ANY, "wxSplitterWindow sample")
|
||||
{
|
||||
m_lockSash = false;
|
||||
m_sashPos = 0;
|
||||
m_allowDClick = true;
|
||||
|
||||
SetIcon(wxICON(sample));
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
|
|
@ -254,7 +254,7 @@ MyFrame::MyFrame()
|
|||
"Toggle sash invisibility");
|
||||
splitMenu->AppendSeparator();
|
||||
|
||||
splitMenu->AppendCheckItem(SPLIT_LIVE,
|
||||
auto itemLive = splitMenu->AppendCheckItem(SPLIT_LIVE,
|
||||
"&Live update\tCtrl-L",
|
||||
"Toggle live update mode");
|
||||
splitMenu->AppendCheckItem(SPLIT_BORDER,
|
||||
|
|
@ -306,6 +306,12 @@ MyFrame::MyFrame()
|
|||
menuBar->Check(SPLIT_LIVE, true);
|
||||
m_splitter = new MySplitterWindow(this);
|
||||
|
||||
if ( m_splitter->AlwaysUsesLiveUpdate() )
|
||||
{
|
||||
// Only live update mode is supported, so this menu item can't be used.
|
||||
itemLive->Enable(false);
|
||||
}
|
||||
|
||||
// If you use non-zero gravity you must initialize the splitter with its
|
||||
// correct initial size, otherwise it will change the sash position by a
|
||||
// huge amount when it's resized from its initial default size to its real
|
||||
|
|
@ -334,14 +340,14 @@ MyFrame::MyFrame()
|
|||
m_splitter->Initialize(m_left);
|
||||
#else
|
||||
// you can also try -100
|
||||
m_splitter->SplitVertically(m_left, m_right, 100);
|
||||
m_splitter->SplitVertically(m_left, m_right, FromDIP(100));
|
||||
#endif
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
SetStatusText("Min pane size = 0", 1);
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
m_replacewindow = nullptr;
|
||||
SetInitialSize(FromDIP(wxSize(420, 300)));
|
||||
}
|
||||
|
||||
MyFrame::~MyFrame()
|
||||
|
|
@ -625,13 +631,13 @@ void MyCanvas::OnDraw(wxDC& dcOrig)
|
|||
wxMirrorDC dc(dcOrig, m_mirror);
|
||||
|
||||
dc.SetPen(*wxBLACK_PEN);
|
||||
dc.DrawLine(0, 0, 100, 200);
|
||||
dc.DrawLine(wxPoint(0, 0), dc.FromDIP(wxPoint(100, 200)));
|
||||
|
||||
dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
|
||||
dc.DrawText("Testing", 50, 50);
|
||||
dc.DrawText("Testing", dc.FromDIP(wxPoint(50, 50)));
|
||||
|
||||
dc.SetPen(*wxRED_PEN);
|
||||
dc.SetBrush(*wxGREEN_BRUSH);
|
||||
dc.DrawRectangle(120, 120, 100, 80);
|
||||
dc.DrawRectangle(dc.FromDIP(wxPoint(120, 120)), dc.FromDIP(wxSize(100, 80)));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -94,7 +94,6 @@ public:
|
|||
#if wxUSE_TIMER
|
||||
void OnTimer(wxTimerEvent& WXUNUSED(event)) { UpdateClock(); }
|
||||
#endif
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnToggleClock(wxCommandEvent& event);
|
||||
void OnIdle(wxIdleEvent& event);
|
||||
|
||||
|
|
@ -223,7 +222,6 @@ enum
|
|||
StatusBar_SetStyleShowTips
|
||||
};
|
||||
|
||||
static const int BITMAP_SIZE_X = 32;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// event tables and other macros for wxWidgets
|
||||
|
|
@ -271,7 +269,6 @@ wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||
wxEND_EVENT_TABLE()
|
||||
|
||||
wxBEGIN_EVENT_TABLE(MyStatusBar, wxStatusBar)
|
||||
EVT_SIZE(MyStatusBar::OnSize)
|
||||
#if wxUSE_CHECKBOX
|
||||
EVT_CHECKBOX(StatusBar_Checkbox, MyStatusBar::OnToggleClock)
|
||||
#endif
|
||||
|
|
@ -925,7 +922,7 @@ MyStatusBar::MyStatusBar(wxWindow *parent, long style)
|
|||
int widths[Field_Max];
|
||||
widths[Field_Text] = -1; // growable
|
||||
widths[Field_Checkbox] = 150;
|
||||
widths[Field_Bitmap] = BITMAP_SIZE_X;
|
||||
widths[Field_Bitmap] = -1; // growable
|
||||
widths[Field_NumLockIndicator] = sizeNumLock.x;
|
||||
widths[Field_Clock] = 100;
|
||||
widths[Field_CapsLockIndicator] = dc.GetTextExtent(capslockIndicators[1]).x;
|
||||
|
|
@ -936,9 +933,11 @@ MyStatusBar::MyStatusBar(wxWindow *parent, long style)
|
|||
#if wxUSE_CHECKBOX
|
||||
m_checkbox = new wxCheckBox(this, StatusBar_Checkbox, "&Toggle clock");
|
||||
m_checkbox->SetValue(true);
|
||||
AddFieldControl(Field_Checkbox, m_checkbox);
|
||||
#endif
|
||||
|
||||
m_statbmp = new wxStaticBitmap(this, wxID_ANY, wxIcon(green_xpm));
|
||||
AddFieldControl(Field_Bitmap, m_statbmp);
|
||||
|
||||
#if wxUSE_TIMER
|
||||
m_timer.Start(1000);
|
||||
|
|
@ -964,35 +963,6 @@ MyStatusBar::~MyStatusBar()
|
|||
#endif
|
||||
}
|
||||
|
||||
void MyStatusBar::OnSize(wxSizeEvent& event)
|
||||
{
|
||||
#if wxUSE_CHECKBOX
|
||||
if ( !m_checkbox )
|
||||
return;
|
||||
#endif
|
||||
|
||||
wxRect rect;
|
||||
if (!GetFieldRect(Field_Checkbox, rect))
|
||||
{
|
||||
event.Skip();
|
||||
return;
|
||||
}
|
||||
|
||||
#if wxUSE_CHECKBOX
|
||||
wxRect rectCheck = rect;
|
||||
rectCheck.Deflate(2);
|
||||
m_checkbox->SetSize(rectCheck);
|
||||
#endif
|
||||
|
||||
GetFieldRect(Field_Bitmap, rect);
|
||||
wxSize size = m_statbmp->GetSize();
|
||||
|
||||
m_statbmp->Move(rect.x + (rect.width - size.x) / 2,
|
||||
rect.y + (rect.height - size.y) / 2);
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void MyStatusBar::OnToggleClock(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
DoToggle();
|
||||
|
|
|
|||
|
|
@ -374,7 +374,7 @@ void ButtonWidgetsPage::CreateContent()
|
|||
#endif
|
||||
|
||||
// right pane
|
||||
m_sizerButton = new wxBoxSizer(wxHORIZONTAL);
|
||||
m_sizerButton = new wxBoxSizer(wxVERTICAL);
|
||||
m_sizerButton->SetMinSize(FromDIP(150), 0);
|
||||
|
||||
// the 3 panes panes compose the window
|
||||
|
|
@ -612,7 +612,7 @@ void ButtonWidgetsPage::CreateButton()
|
|||
|
||||
m_sizerButton->AddStretchSpacer();
|
||||
m_sizerButton->Add(m_button, wxSizerFlags().Centre().Border());
|
||||
m_sizerButton->AddStretchSpacer();
|
||||
m_sizerButton->AddStretchSpacer(2);
|
||||
|
||||
m_sizerButton->Layout();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -259,6 +259,15 @@ void ComboboxWidgetsPage::CreateContent()
|
|||
wxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
||||
// upper left pane
|
||||
wxStaticBoxSizer *sizerLeftTop = new wxStaticBoxSizer(wxVERTICAL, this, "&Popup");
|
||||
wxStaticBox* const sizerLeftTopBox = sizerLeftTop->GetStaticBox();
|
||||
|
||||
sizerLeftTop->Add(new wxButton(sizerLeftTopBox, ComboPage_Popup, "&Show"),
|
||||
wxSizerFlags().Border().Centre());
|
||||
sizerLeftTop->Add(new wxButton(sizerLeftTopBox, ComboPage_Dismiss, "&Hide"),
|
||||
wxSizerFlags().Border().Centre());
|
||||
|
||||
// lower left pane
|
||||
|
||||
// should be in sync with ComboKind_XXX values
|
||||
static const wxString kinds[] =
|
||||
|
|
@ -268,32 +277,23 @@ void ComboboxWidgetsPage::CreateContent()
|
|||
"drop down",
|
||||
};
|
||||
|
||||
wxStaticBoxSizer *sizerLeftTop = new wxStaticBoxSizer(wxVERTICAL, this, "&Set style");
|
||||
wxStaticBox* const sizerLeftTopBox = sizerLeftTop->GetStaticBox();
|
||||
wxStaticBoxSizer *sizerLeftBottom = new wxStaticBoxSizer(wxVERTICAL, this, "&Set style");
|
||||
wxStaticBox* const sizerLeftBottomBox = sizerLeftBottom->GetStaticBox();
|
||||
|
||||
m_radioKind = new wxRadioBox(sizerLeftTopBox, wxID_ANY, "Combobox &kind:",
|
||||
m_radioKind = new wxRadioBox(sizerLeftBottomBox, wxID_ANY, "Combobox &kind:",
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
WXSIZEOF(kinds), kinds,
|
||||
1, wxRA_SPECIFY_COLS);
|
||||
|
||||
m_chkSort = CreateCheckBoxAndAddToSizer(sizerLeftTop, "&Sort items", wxID_ANY, sizerLeftTopBox);
|
||||
m_chkReadonly = CreateCheckBoxAndAddToSizer(sizerLeftTop, "&Read only", wxID_ANY, sizerLeftTopBox);
|
||||
m_chkProcessEnter = CreateCheckBoxAndAddToSizer(sizerLeftTop, "Process &Enter", wxID_ANY, sizerLeftTopBox);
|
||||
m_chkSort = CreateCheckBoxAndAddToSizer(sizerLeftBottom, "&Sort items", wxID_ANY, sizerLeftBottomBox);
|
||||
m_chkReadonly = CreateCheckBoxAndAddToSizer(sizerLeftBottom, "&Read only", wxID_ANY, sizerLeftBottomBox);
|
||||
m_chkProcessEnter = CreateCheckBoxAndAddToSizer(sizerLeftBottom, "Process &Enter", wxID_ANY, sizerLeftBottomBox);
|
||||
|
||||
sizerLeftTop->Add(5, 5, 0, wxGROW | wxALL, 5); // spacer
|
||||
sizerLeftTop->Add(m_radioKind, 0, wxGROW | wxALL, 5);
|
||||
sizerLeftBottom->Add(5, 5, 0, wxGROW | wxALL, 5); // spacer
|
||||
sizerLeftBottom->Add(m_radioKind, 0, wxGROW | wxALL, 5);
|
||||
|
||||
wxButton *btn = new wxButton(sizerLeftTopBox, ComboPage_Reset, "&Reset");
|
||||
sizerLeftTop->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
|
||||
|
||||
// lower left pane
|
||||
wxStaticBoxSizer *sizerLeftBottom = new wxStaticBoxSizer(wxVERTICAL, this, "&Popup");
|
||||
wxStaticBox* const sizerLeftBottomBox = sizerLeftBottom->GetStaticBox();
|
||||
|
||||
sizerLeftBottom->Add(new wxButton(sizerLeftBottomBox, ComboPage_Popup, "&Show"),
|
||||
wxSizerFlags().Border().Centre());
|
||||
sizerLeftBottom->Add(new wxButton(sizerLeftBottomBox, ComboPage_Dismiss, "&Hide"),
|
||||
wxSizerFlags().Border().Centre());
|
||||
wxButton *btn = new wxButton(sizerLeftBottomBox, ComboPage_Reset, "&Reset");
|
||||
sizerLeftBottom->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
|
||||
|
||||
|
||||
wxSizer *sizerLeft = new wxBoxSizer(wxVERTICAL);
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@ public:
|
|||
{
|
||||
m_tracker->StartTrackingData();
|
||||
}
|
||||
TrackedClientData(const TrackedClientData&) = delete;
|
||||
TrackedClientData& operator=(const TrackedClientData&) = delete;
|
||||
|
||||
virtual ~TrackedClientData()
|
||||
{
|
||||
|
|
@ -54,8 +56,6 @@ public:
|
|||
private:
|
||||
ItemContainerWidgetsPage *m_tracker;
|
||||
int m_value;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(TrackedClientData);
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
|
|
|
|||
|
|
@ -37,6 +37,9 @@
|
|||
#include "wx/msgdlg.h"
|
||||
#endif
|
||||
|
||||
#include "wx/config.h"
|
||||
#include "wx/stdpaths.h"
|
||||
|
||||
#include "wx/sysopt.h"
|
||||
#include "wx/bookctrl.h"
|
||||
#include "wx/treebook.h"
|
||||
|
|
@ -141,7 +144,33 @@ public:
|
|||
#if USE_LOG
|
||||
m_logTarget = nullptr;
|
||||
#endif // USE_LOG
|
||||
|
||||
#ifdef wxHAS_CONFIG_AS_FILECONFIG
|
||||
// We want to put our config file (implicitly created for persistent
|
||||
// controls settings) in XDG-compliant location, so we want to change
|
||||
// the default file layout, but before doing this migrate any existing
|
||||
// config files to the new location as the previous versions of this
|
||||
// sample didn't use XDG layout.
|
||||
const auto
|
||||
res = wxFileConfig::MigrateLocalFile("widgets", wxCONFIG_USE_XDG);
|
||||
if ( !res.oldPath.empty() )
|
||||
{
|
||||
if ( res.error.empty() )
|
||||
{
|
||||
wxLogMessage("Config file was migrated from \"%s\" to \"%s\"",
|
||||
res.oldPath, res.newPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogWarning("Migrating old config failed: %s.", res.error);
|
||||
}
|
||||
}
|
||||
|
||||
wxStandardPaths::Get().SetFileLayout(wxStandardPaths::FileLayout_XDG);
|
||||
#endif // wxHAS_CONFIG_AS_FILECONFIG
|
||||
}
|
||||
WidgetsApp(const WidgetsApp&) = delete;
|
||||
WidgetsApp& operator=(const WidgetsApp&) = delete;
|
||||
|
||||
// override base class virtuals
|
||||
// ----------------------------
|
||||
|
|
@ -158,8 +187,6 @@ private:
|
|||
#if USE_LOG
|
||||
wxLog* m_logTarget;
|
||||
#endif // USE_LOG
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(WidgetsApp);
|
||||
};
|
||||
|
||||
wxDECLARE_APP(WidgetsApp); // This provides a convenient wxGetApp() accessor.
|
||||
|
|
@ -506,8 +533,9 @@ WidgetsFrame::WidgetsFrame(const wxString& title)
|
|||
// Uncomment to suppress page theme (draw in solid colour)
|
||||
//style |= wxNB_NOPAGETHEME;
|
||||
|
||||
// Give it some reasonably big minimal size by default.
|
||||
m_book = new WidgetsBookCtrl(m_panel, Widgets_BookCtrl,
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
wxDefaultPosition, FromDIP(wxSize(900, 500)),
|
||||
style, "Widgets");
|
||||
|
||||
InitBook();
|
||||
|
|
@ -771,7 +799,8 @@ void WidgetsFrame::OnPageChanged(WidgetsBookCtrlEvent& event)
|
|||
{
|
||||
wxWindowUpdateLocker noUpdates(curPage);
|
||||
curPage->CreateContent();
|
||||
curPage->Layout();
|
||||
curPage->SetScrollRate(10, 10);
|
||||
curPage->FitInside();
|
||||
|
||||
ConnectToWidgetEvents();
|
||||
}
|
||||
|
|
@ -1321,10 +1350,9 @@ WidgetsPageInfo *WidgetsPage::ms_widgetPages = nullptr;
|
|||
WidgetsPage::WidgetsPage(WidgetsBookCtrl *book,
|
||||
wxImageList *imaglist,
|
||||
const char *const icon[])
|
||||
: wxPanel(book, wxID_ANY,
|
||||
: wxScrolledWindow(book, wxID_ANY,
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
wxCLIP_CHILDREN |
|
||||
wxTAB_TRAVERSAL)
|
||||
wxCLIP_CHILDREN | wxTAB_TRAVERSAL)
|
||||
{
|
||||
imaglist->Add(wxBitmap(wxImage(icon).Scale(ICON_SIZE, ICON_SIZE)));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class WXDLLIMPEXP_FWD_CORE WidgetsBookCtrl;
|
|||
|
||||
class WidgetsPageInfo;
|
||||
|
||||
#include "wx/panel.h"
|
||||
#include "wx/scrolwin.h"
|
||||
#include "wx/vector.h"
|
||||
|
||||
// INTRODUCING NEW PAGES DON'T FORGET TO ADD ENTRIES TO 'WidgetsCategories'
|
||||
|
|
@ -119,7 +119,7 @@ struct WidgetAttributes
|
|||
long m_defaultFlags;
|
||||
};
|
||||
|
||||
class WidgetsPage : public wxPanel
|
||||
class WidgetsPage : public wxScrolledWindow
|
||||
{
|
||||
public:
|
||||
WidgetsPage(WidgetsBookCtrl *book,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue