X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8cdb648efa5ec88c29848311a589bec7ddd2ffb0..cbba971f2fff5ccb5d65c7508dcde8556de83b99:/contrib/samples/gizmos/dynsash/dynsash.cpp diff --git a/contrib/samples/gizmos/dynsash/dynsash.cpp b/contrib/samples/gizmos/dynsash/dynsash.cpp index c651456317..e31b11c036 100644 --- a/contrib/samples/gizmos/dynsash/dynsash.cpp +++ b/contrib/samples/gizmos/dynsash/dynsash.cpp @@ -10,11 +10,25 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +// for all others, include the necessary headers (this file is usually all you +// need because it includes almost all "standard" wxWindows headers) +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + #include #include #include #include #include +#include class Demo : public wxApp { public: @@ -25,7 +39,7 @@ class SashHtmlWindow : public wxHtmlWindow { public: SashHtmlWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxHW_SCROLLBAR_NEVER, const wxString& name = "sashHtmlWindow"); + long style = wxHW_SCROLLBAR_NEVER, const wxString& name = wxT("sashHtmlWindow")); wxSize DoGetBestSize() const; @@ -37,19 +51,18 @@ private: IMPLEMENT_APP(Demo) -char *HTML_content = -"

wxDynamicSashWindow demo

" +wxChar *HTML_content = +wxT("

wxDynamicSashWindow demo

" "

Here is an example of how you can use wxDynamicSashWindow to allow your users to " "dynamically split and unify the views of your windows. Try dragging out a few splits " "and then reunifying the window." "

Also, see the dynsash_switch sample for an example of an application which " -"manages the scrollbars provided by wxDynamicSashWindow itself." -; +"manages the scrollbars provided by wxDynamicSashWindow itself."); bool Demo::OnInit() { wxInitAllImageHandlers(); - wxFrame *frame = new wxFrame(NULL, -1, "Dynamic Sash Demo"); + wxFrame *frame = new wxFrame(NULL, -1, wxT("Dynamic Sash Demo")); frame->SetSize(480, 480); wxDynamicSashWindow *sash = new wxDynamicSashWindow(frame, -1); @@ -65,7 +78,8 @@ bool Demo::OnInit() { SashHtmlWindow::SashHtmlWindow(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name) : wxHtmlWindow(parent, id, pos, size, style, name) { - Connect(-1, wxEVT_DYNAMIC_SASH_SPLIT, (wxObjectEventFunction)&SashHtmlWindow::OnSplit); + Connect(-1, wxEVT_DYNAMIC_SASH_SPLIT, + (wxObjectEventFunction)(wxCommandEventFunction)(wxDynamicSashSplitEventFunction) &SashHtmlWindow::OnSplit); m_dyn_sash = parent; }