#endif
// for all others, include the necessary headers (this file is usually all you
-// need because it includes almost all "standard" wxWindows headers)
+// need because it includes almost all "standard" wxWidgets headers)
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
class SashHtmlWindow : public wxHtmlWindow {
public:
- SashHtmlWindow(wxWindow *parent, wxWindowID id = -1,
+ SashHtmlWindow(wxWindow *parent, wxWindowID id = wxID_ANY,
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;
IMPLEMENT_APP(Demo)
-char *HTML_content =
-"<P><H1>wxDynamicSashWindow demo</H1>"
-"<P>Here is an example of how you can use <TT>wxDynamicSashWindow</TT> 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."
-"<P>Also, see the <TT>dynsash_switch</TT> sample for an example of an application which "
-"manages the scrollbars provided by <TT>wxDynamicSashWindow</TT> itself."
-;
+wxChar *HTML_content =
+wxT("<P><H1>wxDynamicSashWindow demo</H1>")
+wxT("<P>Here is an example of how you can use <TT>wxDynamicSashWindow</TT> to allow your users to ")
+wxT("dynamically split and unify the views of your windows. Try dragging out a few splits ")
+wxT("and then reunifying the window.")
+wxT("<P>Also, see the <TT>dynsash_switch</TT> sample for an example of an application which ")
+wxT("manages the scrollbars provided by <TT>wxDynamicSashWindow</TT> itself.");
bool Demo::OnInit() {
wxInitAllImageHandlers();
- wxFrame *frame = new wxFrame(NULL, -1, "Dynamic Sash Demo");
+ wxFrame *frame = new wxFrame(NULL, wxID_ANY, wxT("Dynamic Sash Demo"));
frame->SetSize(480, 480);
- wxDynamicSashWindow *sash = new wxDynamicSashWindow(frame, -1);
- wxHtmlWindow *html = new SashHtmlWindow(sash, -1);
+ wxDynamicSashWindow *sash = new wxDynamicSashWindow(frame, wxID_ANY);
+ wxHtmlWindow *html = new SashHtmlWindow(sash, wxID_ANY);
html->SetPage(HTML_content);
frame->Show();
- return TRUE;
+ return true;
}
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)(wxCommandEventFunction)(wxDynamicSashSplitEventFunction) &SashHtmlWindow::OnSplit);
+ Connect(wxID_ANY, wxEVT_DYNAMIC_SASH_SPLIT, (wxObjectEventFunction)
+ (wxEventFunction)
+ (wxDynamicSashSplitEventFunction)&SashHtmlWindow::OnSplit);
m_dyn_sash = parent;
}
return wxHtmlWindow::GetBestSize();
}
-void SashHtmlWindow::OnSplit(wxDynamicSashSplitEvent& event) {
- wxHtmlWindow *html = new SashHtmlWindow(m_dyn_sash, -1);
+void SashHtmlWindow::OnSplit(wxDynamicSashSplitEvent& WXUNUSED(event)) {
+ wxHtmlWindow *html = new SashHtmlWindow(m_dyn_sash, wxID_ANY);
html->SetPage(HTML_content);
}