wrong caption for html window, cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -16,8 +16,7 @@
|
|||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/wx.h"
|
#include "wx/app.h"
|
||||||
|
|
||||||
#include "wx/grid.h"
|
#include "wx/grid.h"
|
||||||
#include "wx/treectrl.h"
|
#include "wx/treectrl.h"
|
||||||
#include "wx/spinctrl.h"
|
#include "wx/spinctrl.h"
|
||||||
@@ -28,6 +27,13 @@
|
|||||||
#include "wx/wxhtml.h"
|
#include "wx/wxhtml.h"
|
||||||
#include "wx/imaglist.h"
|
#include "wx/imaglist.h"
|
||||||
#include "wx/dataobj.h"
|
#include "wx/dataobj.h"
|
||||||
|
#include "wx/dcclient.h"
|
||||||
|
#include "wx/bmpbuttn.h"
|
||||||
|
#include "wx/menu.h"
|
||||||
|
#include "wx/toolbar.h"
|
||||||
|
#include "wx/statusbr.h"
|
||||||
|
#include "wx/msgdlg.h"
|
||||||
|
#include "wx/textdlg.h"
|
||||||
|
|
||||||
#include "wx/aui/aui.h"
|
#include "wx/aui/aui.h"
|
||||||
#include "../sample.xpm"
|
#include "../sample.xpm"
|
||||||
@@ -138,7 +144,6 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// -- wxSizeReportCtrl --
|
// -- wxSizeReportCtrl --
|
||||||
// (a utility control that always reports it's client size)
|
// (a utility control that always reports it's client size)
|
||||||
|
|
||||||
@@ -222,10 +227,6 @@ BEGIN_EVENT_TABLE(wxSizeReportCtrl, wxControl)
|
|||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class SettingsPanel : public wxPanel
|
class SettingsPanel : public wxPanel
|
||||||
{
|
{
|
||||||
enum
|
enum
|
||||||
@@ -525,11 +526,6 @@ BEGIN_EVENT_TABLE(SettingsPanel, wxPanel)
|
|||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool MyApp::OnInit()
|
bool MyApp::OnInit()
|
||||||
{
|
{
|
||||||
wxFrame* frame = new MyFrame(NULL,
|
wxFrame* frame = new MyFrame(NULL,
|
||||||
@@ -543,8 +539,6 @@ bool MyApp::OnInit()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
EVT_ERASE_BACKGROUND(MyFrame::OnEraseBackground)
|
EVT_ERASE_BACKGROUND(MyFrame::OnEraseBackground)
|
||||||
EVT_SIZE(MyFrame::OnSize)
|
EVT_SIZE(MyFrame::OnSize)
|
||||||
@@ -589,7 +583,6 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
|||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
MyFrame::MyFrame(wxWindow* parent,
|
MyFrame::MyFrame(wxWindow* parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxString& title,
|
const wxString& title,
|
||||||
@@ -679,7 +672,6 @@ MyFrame::MyFrame(wxWindow* parent,
|
|||||||
tb1->Realize();
|
tb1->Realize();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wxToolBar* tb2 = new wxToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
|
wxToolBar* tb2 = new wxToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
|
||||||
wxTB_FLAT | wxTB_NODIVIDER);
|
wxTB_FLAT | wxTB_NODIVIDER);
|
||||||
tb2->SetToolBitmapSize(wxSize(16,16));
|
tb2->SetToolBitmapSize(wxSize(16,16));
|
||||||
@@ -714,7 +706,6 @@ MyFrame::MyFrame(wxWindow* parent,
|
|||||||
tb3->Realize();
|
tb3->Realize();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wxToolBar* tb4 = new wxToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
|
wxToolBar* tb4 = new wxToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
|
||||||
wxTB_FLAT | wxTB_NODIVIDER | wxTB_HORZ_TEXT);
|
wxTB_FLAT | wxTB_NODIVIDER | wxTB_HORZ_TEXT);
|
||||||
tb4->SetToolBitmapSize(wxSize(16,16));
|
tb4->SetToolBitmapSize(wxSize(16,16));
|
||||||
@@ -887,7 +878,6 @@ void MyFrame::DoUpdate()
|
|||||||
m_mgr.Update();
|
m_mgr.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MyFrame::OnEraseBackground(wxEraseEvent& event)
|
void MyFrame::OnEraseBackground(wxEraseEvent& event)
|
||||||
{
|
{
|
||||||
event.Skip();
|
event.Skip();
|
||||||
@@ -909,7 +899,6 @@ void MyFrame::OnSettings(wxCommandEvent& WXUNUSED(event))
|
|||||||
m_mgr.Update();
|
m_mgr.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MyFrame::OnGradient(wxCommandEvent& event)
|
void MyFrame::OnGradient(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
int gradient = 0;
|
int gradient = 0;
|
||||||
@@ -960,31 +949,31 @@ void MyFrame::OnUpdateUI(wxUpdateUIEvent& event)
|
|||||||
switch (event.GetId())
|
switch (event.GetId())
|
||||||
{
|
{
|
||||||
case ID_NoGradient:
|
case ID_NoGradient:
|
||||||
event.Check(m_mgr.GetArtProvider()->GetMetric(wxAUI_ART_GRADIENT_TYPE) == wxAUI_GRADIENT_NONE ? true : false);
|
event.Check(m_mgr.GetArtProvider()->GetMetric(wxAUI_ART_GRADIENT_TYPE) == wxAUI_GRADIENT_NONE);
|
||||||
break;
|
break;
|
||||||
case ID_VerticalGradient:
|
case ID_VerticalGradient:
|
||||||
event.Check(m_mgr.GetArtProvider()->GetMetric(wxAUI_ART_GRADIENT_TYPE) == wxAUI_GRADIENT_VERTICAL ? true : false);
|
event.Check(m_mgr.GetArtProvider()->GetMetric(wxAUI_ART_GRADIENT_TYPE) == wxAUI_GRADIENT_VERTICAL);
|
||||||
break;
|
break;
|
||||||
case ID_HorizontalGradient:
|
case ID_HorizontalGradient:
|
||||||
event.Check(m_mgr.GetArtProvider()->GetMetric(wxAUI_ART_GRADIENT_TYPE) == wxAUI_GRADIENT_HORIZONTAL ? true : false);
|
event.Check(m_mgr.GetArtProvider()->GetMetric(wxAUI_ART_GRADIENT_TYPE) == wxAUI_GRADIENT_HORIZONTAL);
|
||||||
break;
|
break;
|
||||||
case ID_AllowFloating:
|
case ID_AllowFloating:
|
||||||
event.Check(flags & wxAUI_MGR_ALLOW_FLOATING ? true : false);
|
event.Check((flags & wxAUI_MGR_ALLOW_FLOATING) != 0);
|
||||||
break;
|
break;
|
||||||
case ID_TransparentDrag:
|
case ID_TransparentDrag:
|
||||||
event.Check(flags & wxAUI_MGR_TRANSPARENT_DRAG ? true : false);
|
event.Check((flags & wxAUI_MGR_TRANSPARENT_DRAG) != 0);
|
||||||
break;
|
break;
|
||||||
case ID_TransparentHint:
|
case ID_TransparentHint:
|
||||||
event.Check(flags & wxAUI_MGR_TRANSPARENT_HINT ? true : false);
|
event.Check((flags & wxAUI_MGR_TRANSPARENT_HINT) != 0);
|
||||||
break;
|
break;
|
||||||
case ID_TransparentHintFade:
|
case ID_TransparentHintFade:
|
||||||
event.Check(flags & wxAUI_MGR_TRANSPARENT_HINT_FADE ? true : false);
|
event.Check((flags & wxAUI_MGR_TRANSPARENT_HINT_FADE) != 0);
|
||||||
break;
|
break;
|
||||||
case ID_DisableVenetian:
|
case ID_DisableVenetian:
|
||||||
event.Check(flags & wxAUI_MGR_DISABLE_VENETIAN_BLINDS ? true : false);
|
event.Check((flags & wxAUI_MGR_DISABLE_VENETIAN_BLINDS) != 0);
|
||||||
break;
|
break;
|
||||||
case ID_DisableVenetianFade:
|
case ID_DisableVenetianFade:
|
||||||
event.Check(flags & wxAUI_MGR_DISABLE_VENETIAN_BLINDS_FADE ? true : false);
|
event.Check((flags & wxAUI_MGR_DISABLE_VENETIAN_BLINDS_FADE) != 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1002,8 +991,6 @@ void MyFrame::OnPaneClose(wxFrameManagerEvent& evt)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void MyFrame::OnCreatePerspective(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnCreatePerspective(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxTextEntryDialog dlg(this, wxT("Enter a name for the new perspective:"),
|
wxTextEntryDialog dlg(this, wxT("Enter a name for the new perspective:"),
|
||||||
@@ -1070,7 +1057,7 @@ void MyFrame::OnCreateGrid(wxCommandEvent& WXUNUSED(event))
|
|||||||
void MyFrame::OnCreateHTML(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnCreateHTML(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
m_mgr.AddPane(CreateHTMLCtrl(), wxPaneInfo().
|
m_mgr.AddPane(CreateHTMLCtrl(), wxPaneInfo().
|
||||||
Name(wxT("Test")).Caption(wxT("Grid")).
|
Name(wxT("Test")).Caption(wxT("HTML Control")).
|
||||||
Float().FloatingPosition(GetStartPosition()).
|
Float().FloatingPosition(GetStartPosition()).
|
||||||
FloatingSize(wxSize(300,200)));
|
FloatingSize(wxSize(300,200)));
|
||||||
m_mgr.Update();
|
m_mgr.Update();
|
||||||
@@ -1103,12 +1090,12 @@ void MyFrame::OnCreateSizeReport(wxCommandEvent& WXUNUSED(event))
|
|||||||
|
|
||||||
void MyFrame::OnChangeContentPane(wxCommandEvent& event)
|
void MyFrame::OnChangeContentPane(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
m_mgr.GetPane(wxT("grid_content")).Show(event.GetId() == ID_GridContent ? true:false);
|
m_mgr.GetPane(wxT("grid_content")).Show(event.GetId() == ID_GridContent);
|
||||||
m_mgr.GetPane(wxT("text_content")).Show(event.GetId() == ID_TextContent ? true:false);
|
m_mgr.GetPane(wxT("text_content")).Show(event.GetId() == ID_TextContent);
|
||||||
m_mgr.GetPane(wxT("tree_content")).Show(event.GetId() == ID_TreeContent ? true:false);
|
m_mgr.GetPane(wxT("tree_content")).Show(event.GetId() == ID_TreeContent);
|
||||||
m_mgr.GetPane(wxT("sizereport_content")).Show(event.GetId() == ID_SizeReportContent ? true:false);
|
m_mgr.GetPane(wxT("sizereport_content")).Show(event.GetId() == ID_SizeReportContent);
|
||||||
m_mgr.GetPane(wxT("html_content")).Show(event.GetId() == ID_HTMLContent ? true:false);
|
m_mgr.GetPane(wxT("html_content")).Show(event.GetId() == ID_HTMLContent);
|
||||||
m_mgr.GetPane(wxT("notebook_content")).Show(event.GetId() == ID_NotebookContent ? true:false);
|
m_mgr.GetPane(wxT("notebook_content")).Show(event.GetId() == ID_NotebookContent);
|
||||||
m_mgr.Update();
|
m_mgr.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1129,7 +1116,7 @@ wxTextCtrl* MyFrame::CreateTextCtrl(const wxString& ctrl_text)
|
|||||||
wxString text;
|
wxString text;
|
||||||
if (ctrl_text.Length() > 0)
|
if (ctrl_text.Length() > 0)
|
||||||
text = ctrl_text;
|
text = ctrl_text;
|
||||||
else
|
else
|
||||||
text.Printf(wxT("This is text box %d"), ++n);
|
text.Printf(wxT("This is text box %d"), ++n);
|
||||||
|
|
||||||
return new wxTextCtrl(this,wxID_ANY, text,
|
return new wxTextCtrl(this,wxID_ANY, text,
|
||||||
|
Reference in New Issue
Block a user