removed SetAutoLayout(true) calls when a corresponding SetSizer() was also called (the latter already calls SetAutoLayout(true) in case of a non-NULL window); usual cleanup: removing tabs and end of line whitespace, TRUE->true, FALSE->false, -1->wxID_ANY, Enable(false)->Disable(), ""->wxEmptyString
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -112,28 +112,28 @@ BEGIN_EVENT_TABLE(wxArtBrowserDialog, wxDialog)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
wxArtBrowserDialog::wxArtBrowserDialog(wxWindow *parent)
|
||||
: wxDialog(parent, wxID_ANY, _T("Art resources browser"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
: wxDialog(parent, wxID_ANY, _T("Art resources browser"),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
|
||||
{
|
||||
wxSizer *sizer = new wxBoxSizer(wxVERTICAL);
|
||||
wxSizer *subsizer;
|
||||
|
||||
|
||||
wxChoice *choice = new wxChoice(this, wxID_ANY);
|
||||
FillClients(choice);
|
||||
|
||||
|
||||
subsizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
subsizer->Add(new wxStaticText(this, wxID_ANY, _T("Client:")), 0, wxALIGN_CENTER_VERTICAL);
|
||||
subsizer->Add(choice, 1, wxLEFT, 5);
|
||||
sizer->Add(subsizer, 0, wxALL | wxEXPAND, 10);
|
||||
|
||||
subsizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
||||
|
||||
m_list = new wxListCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(250, 300),
|
||||
wxLC_REPORT | wxSUNKEN_BORDER);
|
||||
m_list->InsertColumn(0, _T("wxArtID"));
|
||||
subsizer->Add(m_list, 1, wxEXPAND | wxRIGHT, 10);
|
||||
|
||||
|
||||
wxSizer *subsub = new wxBoxSizer(wxVERTICAL);
|
||||
m_canvas = new wxStaticBitmap(this, wxID_ANY, wxBitmap(null_xpm));
|
||||
subsub->Add(m_canvas);
|
||||
@@ -141,13 +141,12 @@ wxArtBrowserDialog::wxArtBrowserDialog(wxWindow *parent)
|
||||
subsizer->Add(subsub);
|
||||
|
||||
sizer->Add(subsizer, 1, wxEXPAND | wxLEFT|wxRIGHT, 10);
|
||||
|
||||
|
||||
wxButton *ok = new wxButton(this, wxID_OK, _T("Close"));
|
||||
ok->SetDefault();
|
||||
sizer->Add(ok, 0, wxALIGN_RIGHT | wxALL, 10);
|
||||
|
||||
|
||||
SetSizer(sizer);
|
||||
SetAutoLayout(true);
|
||||
sizer->Fit(this);
|
||||
|
||||
choice->SetSelection(6/*wxART_MESSAGE_BOX*/);
|
||||
@@ -158,7 +157,7 @@ wxArtBrowserDialog::wxArtBrowserDialog(wxWindow *parent)
|
||||
void wxArtBrowserDialog::SetArtClient(const wxArtClient& client)
|
||||
{
|
||||
wxBusyCursor bcur;
|
||||
|
||||
|
||||
wxImageList *img = new wxImageList(16, 16);
|
||||
img->Add(wxIcon(null_xpm));
|
||||
int index = 0;
|
||||
|
@@ -207,7 +207,7 @@ bool MyApp::OnInit()
|
||||
|
||||
// Make a menubar
|
||||
wxMenu *file_menu = new wxMenu;
|
||||
|
||||
|
||||
file_menu->Append(DIALOGS_MESSAGE_BOX, _T("&Message box\tCtrl-M"));
|
||||
|
||||
|
||||
@@ -312,15 +312,15 @@ bool MyApp::OnInit()
|
||||
|
||||
#if wxUSE_FINDREPLDLG
|
||||
wxMenu *find_menu = new wxMenu;
|
||||
find_menu->Append(DIALOGS_FIND, _T("&Find dialog\tCtrl-F"), _T(""), true);
|
||||
find_menu->Append(DIALOGS_REPLACE, _T("Find and &replace dialog\tShift-Ctrl-F"), _T(""), true);
|
||||
find_menu->Append(DIALOGS_FIND, _T("&Find dialog\tCtrl-F"), wxEmptyString, true);
|
||||
find_menu->Append(DIALOGS_REPLACE, _T("Find and &replace dialog\tShift-Ctrl-F"), wxEmptyString, true);
|
||||
file_menu->Append(wxID_ANY,_T("Searching"),find_menu);
|
||||
#endif // wxUSE_FINDREPLDLG
|
||||
|
||||
#if USE_MODAL_PRESENTATION
|
||||
wxMenu *modal_menu = new wxMenu;
|
||||
modal_menu->Append(DIALOGS_MODAL, _T("Mo&dal dialog\tCtrl-W"));
|
||||
modal_menu->Append(DIALOGS_MODELESS, _T("Modeless &dialog\tCtrl-Z"), _T(""), true);
|
||||
modal_menu->Append(DIALOGS_MODELESS, _T("Modeless &dialog\tCtrl-Z"), wxEmptyString, true);
|
||||
file_menu->Append(wxID_ANY,_T("Modal/Modeless"),modal_menu);
|
||||
#endif // USE_MODAL_PRESENTATION
|
||||
|
||||
@@ -357,15 +357,15 @@ MyFrame::MyFrame(wxWindow *parent,
|
||||
m_dlgFind =
|
||||
m_dlgReplace = NULL;
|
||||
#endif
|
||||
|
||||
#if wxUSE_COLOURDLG
|
||||
|
||||
#if wxUSE_COLOURDLG
|
||||
m_clrData.SetChooseFull(true);
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
m_clrData.SetCustomColour(i, wxColour(i*16, i*16, i*16));
|
||||
}
|
||||
#endif // wxUSE_COLOURDLG
|
||||
|
||||
|
||||
CreateStatusBar();
|
||||
}
|
||||
|
||||
@@ -531,7 +531,7 @@ void MyFrame::PasswordEntry(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxString pwd = wxGetPasswordFromUser(_T("Enter password:"),
|
||||
_T("Password entry dialog"),
|
||||
_T(""),
|
||||
wxEmptyString,
|
||||
this);
|
||||
if ( !!pwd )
|
||||
{
|
||||
@@ -616,8 +616,8 @@ void MyFrame::FileOpen(wxCommandEvent& WXUNUSED(event) )
|
||||
(
|
||||
this,
|
||||
_T("Testing open file dialog"),
|
||||
_T(""),
|
||||
_T(""),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
#ifdef __WXMOTIF__
|
||||
_T("C++ files (*.cpp)|*.cpp")
|
||||
#else
|
||||
@@ -649,7 +649,7 @@ void MyFrame::FileOpen2(wxCommandEvent& WXUNUSED(event) )
|
||||
static wxString s_extDef;
|
||||
wxString path = wxFileSelector(
|
||||
_T("Select the file to load"),
|
||||
_T(""), _T(""),
|
||||
wxEmptyString, wxEmptyString,
|
||||
s_extDef,
|
||||
_T("Waveform (*.wav)|*.wav|Plain text (*.txt)|*.txt|All files (*.*)|*.*"),
|
||||
wxCHANGE_DIR,
|
||||
@@ -668,14 +668,14 @@ void MyFrame::FileOpen2(wxCommandEvent& WXUNUSED(event) )
|
||||
|
||||
void MyFrame::FilesOpen(wxCommandEvent& WXUNUSED(event) )
|
||||
{
|
||||
wxString wildcards =
|
||||
wxString wildcards =
|
||||
#ifdef __WXMOTIF__
|
||||
_T("C++ files (*.cpp)|*.cpp");
|
||||
#else
|
||||
_T("All files (*.*)|*.*|C++ files (*.h;*.cpp)|*.h;*.cpp");
|
||||
#endif
|
||||
wxFileDialog dialog(this, _T("Testing open multiple file dialog"),
|
||||
_T(""), _T(""), wildcards,
|
||||
wxEmptyString, wxEmptyString, wildcards,
|
||||
wxMULTIPLE);
|
||||
|
||||
if (dialog.ShowModal() == wxID_OK)
|
||||
@@ -706,7 +706,7 @@ void MyFrame::FileSave(wxCommandEvent& WXUNUSED(event) )
|
||||
{
|
||||
wxFileDialog dialog(this,
|
||||
_T("Testing save file dialog"),
|
||||
_T(""),
|
||||
wxEmptyString,
|
||||
_T("myletter.doc"),
|
||||
_T("Text files (*.txt)|*.txt|Document files (*.doc)|*.doc"),
|
||||
wxSAVE|wxOVERWRITE_PROMPT);
|
||||
@@ -1050,7 +1050,6 @@ MyModelessDialog::MyModelessDialog(wxWindow *parent)
|
||||
sizerTop->Add(btn, 1, wxEXPAND | wxALL, 5);
|
||||
sizerTop->Add(check, 1, wxEXPAND | wxALL, 5);
|
||||
|
||||
SetAutoLayout(true);
|
||||
SetSizer(sizerTop);
|
||||
|
||||
sizerTop->SetSizeHints(this);
|
||||
@@ -1094,7 +1093,6 @@ MyModalDialog::MyModalDialog(wxWindow *parent)
|
||||
sizerTop->Add(m_btnDelete, 0, wxALIGN_CENTER | wxALL, 5);
|
||||
sizerTop->Add(btnOk, 0, wxALIGN_CENTER | wxALL, 5);
|
||||
|
||||
SetAutoLayout(true);
|
||||
SetSizer(sizerTop);
|
||||
|
||||
sizerTop->SetSizeHints(this);
|
||||
@@ -1118,7 +1116,7 @@ void MyModalDialog::OnButton(wxCommandEvent& event)
|
||||
#if wxUSE_TEXTDLG
|
||||
wxGetTextFromUser(_T("Dummy prompt"),
|
||||
_T("Modal dialog called from dialog"),
|
||||
_T(""), this);
|
||||
wxEmptyString, this);
|
||||
#else
|
||||
wxMessageBox(_T("Modal dialog called from dialog"));
|
||||
#endif // wxUSE_TEXTDLG
|
||||
|
@@ -146,18 +146,18 @@ GridFrame::GridFrame()
|
||||
fileMenu->Append( wxID_EXIT, _T("E&xit\tAlt-X") );
|
||||
|
||||
wxMenu *viewMenu = new wxMenu;
|
||||
viewMenu->Append( ID_TOGGLEROWLABELS, _T("&Row labels"), _T(""), wxITEM_CHECK );
|
||||
viewMenu->Append( ID_TOGGLECOLLABELS, _T("&Col labels"), _T(""), wxITEM_CHECK );
|
||||
viewMenu->Append( ID_TOGGLEEDIT, _T("&Editable"), _T(""), wxITEM_CHECK );
|
||||
viewMenu->Append( ID_TOGGLEROWSIZING, _T("Ro&w drag-resize"), _T(""), wxITEM_CHECK );
|
||||
viewMenu->Append( ID_TOGGLECOLSIZING, _T("C&ol drag-resize"), _T(""), wxITEM_CHECK );
|
||||
viewMenu->Append( ID_TOGGLEGRIDSIZING, _T("&Grid drag-resize"), _T(""), wxITEM_CHECK );
|
||||
viewMenu->Append( ID_TOGGLEGRIDLINES, _T("&Grid Lines"), _T(""), wxITEM_CHECK );
|
||||
viewMenu->Append( ID_SET_HIGHLIGHT_WIDTH, _T("&Set Cell Highlight Width..."), _T("") );
|
||||
viewMenu->Append( ID_SET_RO_HIGHLIGHT_WIDTH, _T("&Set Cell RO Highlight Width..."), _T("") );
|
||||
viewMenu->Append( ID_TOGGLEROWLABELS, _T("&Row labels"), wxEmptyString, wxITEM_CHECK );
|
||||
viewMenu->Append( ID_TOGGLECOLLABELS, _T("&Col labels"), wxEmptyString, wxITEM_CHECK );
|
||||
viewMenu->Append( ID_TOGGLEEDIT, _T("&Editable"), wxEmptyString, wxITEM_CHECK );
|
||||
viewMenu->Append( ID_TOGGLEROWSIZING, _T("Ro&w drag-resize"), wxEmptyString, wxITEM_CHECK );
|
||||
viewMenu->Append( ID_TOGGLECOLSIZING, _T("C&ol drag-resize"), wxEmptyString, wxITEM_CHECK );
|
||||
viewMenu->Append( ID_TOGGLEGRIDSIZING, _T("&Grid drag-resize"), wxEmptyString, wxITEM_CHECK );
|
||||
viewMenu->Append( ID_TOGGLEGRIDLINES, _T("&Grid Lines"), wxEmptyString, wxITEM_CHECK );
|
||||
viewMenu->Append( ID_SET_HIGHLIGHT_WIDTH, _T("&Set Cell Highlight Width...") );
|
||||
viewMenu->Append( ID_SET_RO_HIGHLIGHT_WIDTH, _T("&Set Cell RO Highlight Width...") );
|
||||
viewMenu->Append( ID_AUTOSIZECOLS, _T("&Auto-size cols") );
|
||||
viewMenu->Append( ID_CELLOVERFLOW, _T("&Overflow cells"), _T(""), wxITEM_CHECK );
|
||||
viewMenu->Append( ID_RESIZECELL, _T("&Resize cell (7,1)"), _T(""), wxITEM_CHECK );
|
||||
viewMenu->Append( ID_CELLOVERFLOW, _T("&Overflow cells"), wxEmptyString, wxITEM_CHECK );
|
||||
viewMenu->Append( ID_RESIZECELL, _T("&Resize cell (7,1)"), wxEmptyString, wxITEM_CHECK );
|
||||
|
||||
wxMenu *rowLabelMenu = new wxMenu;
|
||||
|
||||
@@ -344,7 +344,6 @@ GridFrame::GridFrame()
|
||||
0,
|
||||
wxEXPAND );
|
||||
|
||||
SetAutoLayout(true);
|
||||
SetSizer( topSizer );
|
||||
|
||||
topSizer->Fit( this );
|
||||
@@ -761,7 +760,7 @@ void GridFrame::OnAddToSelectToggle(wxCommandEvent& event)
|
||||
|
||||
void GridFrame::OnLabelLeftClick( wxGridEvent& ev )
|
||||
{
|
||||
logBuf = _T("");
|
||||
logBuf = wxEmptyString;
|
||||
if ( ev.GetRow() != -1 )
|
||||
{
|
||||
logBuf << _T("Left click on row label ") << ev.GetRow();
|
||||
@@ -787,7 +786,7 @@ void GridFrame::OnLabelLeftClick( wxGridEvent& ev )
|
||||
|
||||
void GridFrame::OnCellLeftClick( wxGridEvent& ev )
|
||||
{
|
||||
logBuf = _T("");
|
||||
logBuf = wxEmptyString;
|
||||
logBuf << _T("Left click at row ") << ev.GetRow()
|
||||
<< _T(" col ") << ev.GetCol();
|
||||
wxLogMessage( wxT("%s"), logBuf.c_str() );
|
||||
@@ -801,7 +800,7 @@ void GridFrame::OnCellLeftClick( wxGridEvent& ev )
|
||||
|
||||
void GridFrame::OnRowSize( wxGridSizeEvent& ev )
|
||||
{
|
||||
logBuf = _T("");
|
||||
logBuf = wxEmptyString;
|
||||
logBuf << _T("Resized row ") << ev.GetRowOrCol();
|
||||
wxLogMessage( wxT("%s"), logBuf.c_str() );
|
||||
|
||||
@@ -811,7 +810,7 @@ void GridFrame::OnRowSize( wxGridSizeEvent& ev )
|
||||
|
||||
void GridFrame::OnColSize( wxGridSizeEvent& ev )
|
||||
{
|
||||
logBuf = _T("");
|
||||
logBuf = wxEmptyString;
|
||||
logBuf << _T("Resized col ") << ev.GetRowOrCol();
|
||||
wxLogMessage( wxT("%s"), logBuf.c_str() );
|
||||
|
||||
@@ -821,7 +820,7 @@ void GridFrame::OnColSize( wxGridSizeEvent& ev )
|
||||
|
||||
void GridFrame::OnSelectCell( wxGridEvent& ev )
|
||||
{
|
||||
logBuf = _T("");
|
||||
logBuf = wxEmptyString;
|
||||
if ( ev.Selecting() )
|
||||
logBuf << _T("Selected ");
|
||||
else
|
||||
@@ -841,7 +840,7 @@ void GridFrame::OnSelectCell( wxGridEvent& ev )
|
||||
|
||||
void GridFrame::OnRangeSelected( wxGridRangeSelectEvent& ev )
|
||||
{
|
||||
logBuf = _T("");
|
||||
logBuf = wxEmptyString;
|
||||
if ( ev.Selecting() )
|
||||
logBuf << _T("Selected ");
|
||||
else
|
||||
@@ -861,7 +860,7 @@ void GridFrame::OnRangeSelected( wxGridRangeSelectEvent& ev )
|
||||
|
||||
void GridFrame::OnCellValueChanged( wxGridEvent& ev )
|
||||
{
|
||||
logBuf = _T("");
|
||||
logBuf = wxEmptyString;
|
||||
logBuf << _T("Value changed for cell at")
|
||||
<< _T(" row ") << ev.GetRow()
|
||||
<< _T(" col ") << ev.GetCol();
|
||||
|
@@ -595,7 +595,7 @@ void MyFrame::ShowHelp(int commandId, wxHelpControllerBase& helpController)
|
||||
{
|
||||
wxString key = wxGetTextFromUser(_T("Search for?"),
|
||||
_T("Search help for keyword"),
|
||||
_T(""),
|
||||
wxEmptyString,
|
||||
this);
|
||||
if(! key.IsEmpty())
|
||||
helpController.KeywordSearch(key);
|
||||
@@ -666,7 +666,6 @@ MyModalDialog::MyModalDialog(wxWindow *parent)
|
||||
sizerTop->Add(text, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
sizerTop->Add(sizerRow, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
SetAutoLayout(true);
|
||||
SetSizer(sizerTop);
|
||||
|
||||
sizerTop->SetSizeHints(this);
|
||||
|
@@ -166,19 +166,18 @@
|
||||
html = new wxHtmlWindow(&dlg, wxID_ANY, wxDefaultPosition, wxSize(380, 160), wxHW_SCROLLBAR_NEVER);
|
||||
html -> SetBorders(0);
|
||||
html -> LoadPage(wxT("data/about.htm"));
|
||||
html -> SetSize(html -> GetInternalRepresentation() -> GetWidth(),
|
||||
html -> SetSize(html -> GetInternalRepresentation() -> GetWidth(),
|
||||
html -> GetInternalRepresentation() -> GetHeight());
|
||||
|
||||
topsizer -> Add(html, 1, wxALL, 10);
|
||||
|
||||
topsizer -> Add(new wxStaticLine(&dlg, wxID_ANY), 0, wxEXPAND | wxLEFT | wxRIGHT, 10);
|
||||
|
||||
|
||||
wxButton *bu1 = new wxButton(&dlg, wxID_OK, _("OK"));
|
||||
bu1 -> SetDefault();
|
||||
|
||||
topsizer -> Add(bu1, 0, wxALL | wxALIGN_RIGHT, 15);
|
||||
|
||||
dlg.SetAutoLayout(true);
|
||||
dlg.SetSizer(topsizer);
|
||||
topsizer -> Fit(&dlg);
|
||||
|
||||
|
@@ -400,14 +400,14 @@ LboxTestFrame::LboxTestFrame(const wxString& title)
|
||||
|
||||
sizerRow = new wxBoxSizer(wxHORIZONTAL);
|
||||
btn = new wxButton(panel, LboxTest_Change, _T("C&hange current"));
|
||||
m_textChange = new wxTextCtrl(panel, LboxTest_ChangeText, _T(""));
|
||||
m_textChange = new wxTextCtrl(panel, LboxTest_ChangeText, wxEmptyString);
|
||||
sizerRow->Add(btn, 0, wxRIGHT, 5);
|
||||
sizerRow->Add(m_textChange, 1, wxLEFT, 5);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
|
||||
sizerRow = new wxBoxSizer(wxHORIZONTAL);
|
||||
btn = new wxButton(panel, LboxTest_Delete, _T("&Delete this item"));
|
||||
m_textDelete = new wxTextCtrl(panel, LboxTest_DeleteText, _T(""));
|
||||
m_textDelete = new wxTextCtrl(panel, LboxTest_DeleteText, wxEmptyString);
|
||||
sizerRow->Add(btn, 0, wxRIGHT, 5);
|
||||
sizerRow->Add(m_textDelete, 1, wxLEFT, 5);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
@@ -457,7 +457,6 @@ LboxTestFrame::LboxTestFrame(const wxString& title)
|
||||
Reset();
|
||||
m_dirty = false;
|
||||
|
||||
panel->SetAutoLayout(true);
|
||||
panel->SetSizer(sizerTop);
|
||||
|
||||
sizerTop->Fit(this);
|
||||
|
@@ -315,8 +315,6 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size,
|
||||
|
||||
m_panel->SetSizer(m_sizerFrame);
|
||||
|
||||
m_panel->SetAutoLayout(true);
|
||||
|
||||
m_sizerFrame->Fit(this);
|
||||
m_sizerFrame->SetSizeHints(this);
|
||||
|
||||
|
@@ -492,7 +492,6 @@ MyAboutDialog::MyAboutDialog(wxWindow *parent)
|
||||
sizerTop->Add(-1, 10, 1, wxGROW);
|
||||
sizerTop->Add(statbarBottom, 0, wxGROW);
|
||||
|
||||
SetAutoLayout(true);
|
||||
SetSizer(sizerTop);
|
||||
|
||||
sizerTop->Fit(this);
|
||||
@@ -620,7 +619,7 @@ void MyStatusBar::DoToggle()
|
||||
m_statbmp->Refresh();
|
||||
#endif
|
||||
|
||||
SetStatusText(_T(""), Field_Clock);
|
||||
SetStatusText(wxEmptyString, Field_Clock);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user