git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42028
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#include "wx/grid.h"
#include "wx/treectrl.h"
#include "wx/spinctrl.h"
#include "wx/grid.h"
#include "wx/treectrl.h"
#include "wx/spinctrl.h"
#include "wx/wxhtml.h"
#include "wx/imaglist.h"
#include "wx/dataobj.h"
#include "wx/wxhtml.h"
#include "wx/imaglist.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 "../sample.xpm"
#include "wx/aui/aui.h"
#include "../sample.xpm"
// -- wxSizeReportCtrl --
// (a utility control that always reports it's client size)
// -- wxSizeReportCtrl --
// (a utility control that always reports it's client size)
class SettingsPanel : public wxPanel
{
enum
class SettingsPanel : public wxPanel
{
enum
bool MyApp::OnInit()
{
wxFrame* frame = new MyFrame(NULL,
bool MyApp::OnInit()
{
wxFrame* frame = new MyFrame(NULL,
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_ERASE_BACKGROUND(MyFrame::OnEraseBackground)
EVT_SIZE(MyFrame::OnSize)
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_ERASE_BACKGROUND(MyFrame::OnEraseBackground)
EVT_SIZE(MyFrame::OnSize)
MyFrame::MyFrame(wxWindow* parent,
wxWindowID id,
const wxString& title,
MyFrame::MyFrame(wxWindow* parent,
wxWindowID id,
const wxString& title,
wxToolBar* tb2 = new wxToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
wxTB_FLAT | wxTB_NODIVIDER);
tb2->SetToolBitmapSize(wxSize(16,16));
wxToolBar* tb2 = new wxToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
wxTB_FLAT | wxTB_NODIVIDER);
tb2->SetToolBitmapSize(wxSize(16,16));
wxToolBar* tb4 = new wxToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
wxTB_FLAT | wxTB_NODIVIDER | wxTB_HORZ_TEXT);
tb4->SetToolBitmapSize(wxSize(16,16));
wxToolBar* tb4 = new wxToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
wxTB_FLAT | wxTB_NODIVIDER | wxTB_HORZ_TEXT);
tb4->SetToolBitmapSize(wxSize(16,16));
void MyFrame::OnEraseBackground(wxEraseEvent& event)
{
event.Skip();
void MyFrame::OnEraseBackground(wxEraseEvent& event)
{
event.Skip();
void MyFrame::OnGradient(wxCommandEvent& event)
{
int gradient = 0;
void MyFrame::OnGradient(wxCommandEvent& event)
{
int gradient = 0;
switch (event.GetId())
{
case ID_NoGradient:
switch (event.GetId())
{
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;
case ID_VerticalGradient:
break;
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;
case ID_HorizontalGradient:
break;
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;
case ID_AllowFloating:
break;
case ID_AllowFloating:
- event.Check(flags & wxAUI_MGR_ALLOW_FLOATING ? true : false);
+ event.Check((flags & wxAUI_MGR_ALLOW_FLOATING) != 0);
break;
case ID_TransparentDrag:
break;
case ID_TransparentDrag:
- event.Check(flags & wxAUI_MGR_TRANSPARENT_DRAG ? true : false);
+ event.Check((flags & wxAUI_MGR_TRANSPARENT_DRAG) != 0);
break;
case ID_TransparentHint:
break;
case ID_TransparentHint:
- event.Check(flags & wxAUI_MGR_TRANSPARENT_HINT ? true : false);
+ event.Check((flags & wxAUI_MGR_TRANSPARENT_HINT) != 0);
break;
case ID_TransparentHintFade:
break;
case ID_TransparentHintFade:
- event.Check(flags & wxAUI_MGR_TRANSPARENT_HINT_FADE ? true : false);
+ event.Check((flags & wxAUI_MGR_TRANSPARENT_HINT_FADE) != 0);
break;
case ID_DisableVenetian:
break;
case ID_DisableVenetian:
- event.Check(flags & wxAUI_MGR_DISABLE_VENETIAN_BLINDS ? true : false);
+ event.Check((flags & wxAUI_MGR_DISABLE_VENETIAN_BLINDS) != 0);
break;
case ID_DisableVenetianFade:
break;
case ID_DisableVenetianFade:
- event.Check(flags & wxAUI_MGR_DISABLE_VENETIAN_BLINDS_FADE ? true : false);
+ event.Check((flags & wxAUI_MGR_DISABLE_VENETIAN_BLINDS_FADE) != 0);
void MyFrame::OnCreatePerspective(wxCommandEvent& WXUNUSED(event))
{
wxTextEntryDialog dlg(this, wxT("Enter a name for the new perspective:"),
void MyFrame::OnCreatePerspective(wxCommandEvent& WXUNUSED(event))
{
wxTextEntryDialog dlg(this, wxT("Enter a name for the new perspective:"),
void MyFrame::OnCreateHTML(wxCommandEvent& WXUNUSED(event))
{
m_mgr.AddPane(CreateHTMLCtrl(), wxPaneInfo().
void MyFrame::OnCreateHTML(wxCommandEvent& WXUNUSED(event))
{
m_mgr.AddPane(CreateHTMLCtrl(), wxPaneInfo().
- Name(wxT("Test")).Caption(wxT("Grid")).
+ Name(wxT("Test")).Caption(wxT("HTML Control")).
Float().FloatingPosition(GetStartPosition()).
FloatingSize(wxSize(300,200)));
m_mgr.Update();
Float().FloatingPosition(GetStartPosition()).
FloatingSize(wxSize(300,200)));
m_mgr.Update();
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("text_content")).Show(event.GetId() == ID_TextContent ? true:false);
- m_mgr.GetPane(wxT("tree_content")).Show(event.GetId() == ID_TreeContent ? true:false);
- m_mgr.GetPane(wxT("sizereport_content")).Show(event.GetId() == ID_SizeReportContent ? true:false);
- m_mgr.GetPane(wxT("html_content")).Show(event.GetId() == ID_HTMLContent ? true:false);
- m_mgr.GetPane(wxT("notebook_content")).Show(event.GetId() == ID_NotebookContent ? true:false);
+ m_mgr.GetPane(wxT("grid_content")).Show(event.GetId() == ID_GridContent);
+ m_mgr.GetPane(wxT("text_content")).Show(event.GetId() == ID_TextContent);
+ m_mgr.GetPane(wxT("tree_content")).Show(event.GetId() == ID_TreeContent);
+ m_mgr.GetPane(wxT("sizereport_content")).Show(event.GetId() == ID_SizeReportContent);
+ m_mgr.GetPane(wxT("html_content")).Show(event.GetId() == ID_HTMLContent);
+ m_mgr.GetPane(wxT("notebook_content")).Show(event.GetId() == ID_NotebookContent);
wxString text;
if (ctrl_text.Length() > 0)
text = ctrl_text;
wxString text;
if (ctrl_text.Length() > 0)
text = ctrl_text;
text.Printf(wxT("This is text box %d"), ++n);
return new wxTextCtrl(this,wxID_ANY, text,
text.Printf(wxT("This is text box %d"), ++n);
return new wxTextCtrl(this,wxID_ANY, text,