wxTextEntryDialog dlg(this, wxT("Enter a name for the new perspective:"),
wxT("wxAUI Test"));
- dlg.SetValue(wxString::Format(wxT("Perspective %d"), m_perspectives.GetCount()+1));
+ dlg.SetValue(wxString::Format(wxT("Perspective %u"), unsigned(m_perspectives.GetCount() + 1)));
if (dlg.ShowModal() != wxID_OK)
return;
protected:
// number of pushed event handlers
- size_t m_nPush;
+ unsigned m_nPush;
private:
// any class wishing to process wxWidgets events must use this macro
}
private:
- size_t m_level;
+ unsigned m_level;
DECLARE_EVENT_TABLE()
};
void OnLboxSelect(wxCommandEvent& event);
void OnLboxDClick(wxCommandEvent& event)
{
- wxLogMessage(_T("Listbox item %ld double clicked."), event.GetInt());
+ wxLogMessage(_T("Listbox item %d double clicked."), event.GetInt());
}
private:
void MyFrame::OnLboxSelect(wxCommandEvent& event)
{
- wxLogMessage(_T("Listbox selection is now %ld."), event.GetInt());
+ wxLogMessage(_T("Listbox selection is now %d."), event.GetInt());
if ( m_hlbox->HasMultipleSelection() )
{
void LboxTestFrame::OnButtonAdd(wxCommandEvent& WXUNUSED(event))
{
- static size_t s_item = 0;
+ static unsigned s_item = 0;
wxString s = m_textAdd->GetValue();
if ( !m_textAdd->IsModified() )
void LboxTestFrame::OnButtonAddMany(wxCommandEvent& WXUNUSED(event))
{
// "many" means 1000 here
- for ( size_t n = 0; n < 1000; n++ )
+ for ( unsigned n = 0; n < 1000; n++ )
{
m_lbox->Append(wxString::Format(_T("item #%u"), n));
}
{
wxStopWatch sw;
- size_t itemCount = m_listCtrl->GetItemCount();
+ int itemCount = m_listCtrl->GetItemCount();
m_listCtrl->DeleteAllItems();
#if wxUSE_DISPLAY
else
{
- size_t count = wxDisplay::GetCount();
- wxLogDebug ( _T("I detected %i display(s) on your system"), count );
- size_t i = 0;
- while ( i < count )
+ unsigned count = wxDisplay::GetCount();
+ wxLogDebug ( _T("I detected %u display(s) on your system"), count );
+ for (unsigned i = 0; i < count; i++)
{
wxDisplay display ( i );
wxRect r = display.GetGeometry();
- wxLogDebug ( _T("Display #%i \"%s\" = ( %i, %i, %i, %i ) @ %i bits"),
+ wxLogDebug ( _T("Display #%u \"%s\" = ( %i, %i, %i, %i ) @ %i bits"),
i, display.GetName().c_str(), r.GetLeft(), r.GetTop(), r.GetWidth(), r.GetHeight(),
display.GetCurrentMode().GetDepth() );
- i++;
}
}
#endif
void SimpleTransientPopup::OnSpinCtrl(wxSpinEvent& event)
{
- wxLogMessage( wxT("0x%lx SimpleTransientPopup::OnSpinCtrl ID %d Value %ld"), long(this), event.GetId(), event.GetInt());
+ wxLogMessage( wxT("0x%lx SimpleTransientPopup::OnSpinCtrl ID %d Value %d"), long(this), event.GetId(), event.GetInt());
event.Skip();
}
CalcScrolledPosition(0, y, NULL, &yPhys);
dc.DrawText(wxString::Format(_T("Line %u (logical %d, physical %d)"),
- line, y, yPhys), 0, y);
+ unsigned(line), y, yPhys), 0, y);
y += m_hLine;
}
}
CalcScrolledPosition(0, y, NULL, &yPhys);
dc.DrawText(wxString::Format(_T("Line %u (logical %d, physical %d)"),
- line, y, yPhys), 0, y);
+ unsigned(line), y, yPhys), 0, y);
y += m_hLine;
}
}
void WriteText(const wxString& text);
public:
- size_t m_count;
+ unsigned m_count;
MyFrame *m_frame;
};
public:
MyFrame *m_frame;
- size_t m_count;
+ unsigned m_count;
};
MyWorkerThread::MyWorkerThread(MyFrame *frame)
void MyFrame::OnStartThreads(wxCommandEvent& WXUNUSED(event) )
{
- static long s_num = 10;
+ static long s_num;
s_num = wxGetNumberFromUser(_T("How many threads to start: "), _T(""),
_T("wxThread sample"), s_num, 1, 10000, this);
return;
}
- size_t count = (size_t)s_num, n;
+ unsigned count = unsigned(s_num), n;
wxArrayThread threads;
m_nRunning = nRunning;
m_nCount = nCount;
- wxLogStatus(this, wxT("%u threads total, %u running."), nCount, nRunning);
+ wxLogStatus(this, wxT("%u threads total, %u running."), unsigned(nCount), unsigned(nRunning));
}
//else: avoid flicker - don't print anything
wxArrayTreeItemIds array;
size_t count = m_treeCtrl->GetSelections(array);
- wxLogMessage(wxT("%u items selected"), count);
+ wxLogMessage(wxT("%u items selected"), unsigned(count));
for ( size_t n = 0; n < count; n++ )
{
{
// at depth 1 elements won't have any more children
if ( hasChildren )
- str.Printf(wxT("%s child %d"), wxT("Folder"), n + 1);
+ str.Printf(wxT("%s child %u"), wxT("Folder"), unsigned(n + 1));
else
- str.Printf(wxT("%s child %d.%d"), wxT("File"), folder, n + 1);
+ str.Printf(wxT("%s child %u.%u"), wxT("File"), unsigned(folder), unsigned(n + 1));
// here we pass to AppendItem() normal and selected item images (we
// suppose that selected image follows the normal one in the enum)
Bool2String(tree->IsSelected(GetId())),
Bool2String(tree->IsExpanded(GetId())),
Bool2String(tree->IsBold(GetId())),
- tree->GetChildrenCount(GetId()),
- tree->GetChildrenCount(GetId(), false));
+ unsigned(tree->GetChildrenCount(GetId())),
+ unsigned(tree->GetChildrenCount(GetId(), false)));
}
void BookWidgetsPage::OnUpdateUINumPagesText(wxUpdateUIEvent& event)
{
if(m_book)
- event.SetText( wxString::Format(_T("%d"), m_book->GetPageCount()) );
+ event.SetText( wxString::Format(_T("%u"), unsigned(m_book->GetPageCount())) );
}
void BookWidgetsPage::OnUpdateUICurSelectText(wxUpdateUIEvent& event)