applied patch 446010 (unicode compilation fixes)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11263 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -284,7 +284,7 @@ private:
|
|||||||
// other
|
// other
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
static void SetControlClientData(const char *name,
|
static void SetControlClientData(const wxChar *name,
|
||||||
wxControlWithItems *control);
|
wxControlWithItems *control);
|
||||||
|
|
||||||
IMPLEMENT_APP(MyApp)
|
IMPLEMENT_APP(MyApp)
|
||||||
@@ -315,8 +315,8 @@ bool MyApp::OnInit()
|
|||||||
y = 50;
|
y = 50;
|
||||||
if ( argc == 3 )
|
if ( argc == 3 )
|
||||||
{
|
{
|
||||||
wxSscanf(argv[1], "%d", &x);
|
//wxSscanf(argv[1], "%d", &x);
|
||||||
wxSscanf(argv[2], "%d", &y);
|
//wxSscanf(argv[2], "%d", &y);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the main frame window
|
// Create the main frame window
|
||||||
@@ -569,7 +569,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
|
|||||||
wxBitmap bmp(s_iconNames[n]);
|
wxBitmap bmp(s_iconNames[n]);
|
||||||
if ( !bmp.Ok() || (imagelist->Add(bmp) == -1) )
|
if ( !bmp.Ok() || (imagelist->Add(bmp) == -1) )
|
||||||
{
|
{
|
||||||
wxLogWarning("Couldn't load the image '%s' for the notebook page %d.",
|
wxLogWarning(wxT("Couldn't load the image '%s' for the notebook page %d."),
|
||||||
s_iconNames[n], n);
|
s_iconNames[n], n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -596,8 +596,8 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
|
|||||||
wxPoint(10,90), wxSize(120,70),
|
wxPoint(10,90), wxSize(120,70),
|
||||||
5, choices, wxLB_SORT );
|
5, choices, wxLB_SORT );
|
||||||
|
|
||||||
SetControlClientData("listbox", m_listbox);
|
SetControlClientData(wxT("listbox"), m_listbox);
|
||||||
SetControlClientData("listbox", m_listboxSorted);
|
SetControlClientData(wxT("listbox"), m_listboxSorted);
|
||||||
|
|
||||||
m_listbox->SetCursor(*wxCROSS_CURSOR);
|
m_listbox->SetCursor(*wxCROSS_CURSOR);
|
||||||
#if wxUSE_TOOLTIPS
|
#if wxUSE_TOOLTIPS
|
||||||
@@ -634,8 +634,8 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
|
|||||||
m_choiceSorted = new wxChoice( panel, ID_CHOICE_SORTED, wxPoint(10,70), wxSize(120,-1),
|
m_choiceSorted = new wxChoice( panel, ID_CHOICE_SORTED, wxPoint(10,70), wxSize(120,-1),
|
||||||
5, choices, wxCB_SORT );
|
5, choices, wxCB_SORT );
|
||||||
|
|
||||||
SetControlClientData("choice", m_choice);
|
SetControlClientData(wxT("choice"), m_choice);
|
||||||
SetControlClientData("choice", m_choiceSorted);
|
SetControlClientData(wxT("choice"), m_choiceSorted);
|
||||||
|
|
||||||
m_choice->SetSelection(2);
|
m_choice->SetSelection(2);
|
||||||
m_choice->SetBackgroundColour( "red" );
|
m_choice->SetBackgroundColour( "red" );
|
||||||
@@ -1504,14 +1504,14 @@ void MyComboBox::OnKeyUp(wxKeyEvent& event)
|
|||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SetControlClientData(const char *name,
|
static void SetControlClientData(const wxChar *name,
|
||||||
wxControlWithItems *control)
|
wxControlWithItems *control)
|
||||||
{
|
{
|
||||||
size_t count = control->GetCount();
|
size_t count = control->GetCount();
|
||||||
for ( size_t n = 0; n < count; n++ )
|
for ( size_t n = 0; n < count; n++ )
|
||||||
{
|
{
|
||||||
wxString s;
|
wxString s;
|
||||||
s.Printf("%s client data for '%s'",
|
s.Printf(wxT("%s client data for '%s'"),
|
||||||
name, control->GetString(n).c_str());
|
name, control->GetString(n).c_str());
|
||||||
|
|
||||||
control->SetClientObject(n, new wxStringClientData(s));
|
control->SetClientObject(n, new wxStringClientData(s));
|
||||||
|
@@ -113,7 +113,7 @@ int wxCALLBACK MyCompareFunction(long item1, long item2, long sortData)
|
|||||||
bool MyApp::OnInit()
|
bool MyApp::OnInit()
|
||||||
{
|
{
|
||||||
// Create the main frame window
|
// Create the main frame window
|
||||||
MyFrame *frame = new MyFrame("wxListCtrl Test", 50, 50, 450, 340);
|
MyFrame *frame = new MyFrame(wxT("wxListCtrl Test"), 50, 50, 450, 340);
|
||||||
|
|
||||||
// Show the frame
|
// Show the frame
|
||||||
frame->Show(TRUE);
|
frame->Show(TRUE);
|
||||||
@@ -483,10 +483,10 @@ void MyFrame::OnShowSelInfo(wxCommandEvent& event)
|
|||||||
void MyFrame::OnShowColInfo(wxCommandEvent& event)
|
void MyFrame::OnShowColInfo(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
int count = m_listCtrl->GetColumnCount();
|
int count = m_listCtrl->GetColumnCount();
|
||||||
wxLogMessage("%d columns:", count);
|
wxLogMessage(wxT("%d columns:"), count);
|
||||||
for ( int c = 0; c < count; c++ )
|
for ( int c = 0; c < count; c++ )
|
||||||
{
|
{
|
||||||
wxLogMessage("\tcolumn %d has width %d", c,
|
wxLogMessage(wxT("\tcolumn %d has width %d"), c,
|
||||||
m_listCtrl->GetColumnWidth(c));
|
m_listCtrl->GetColumnWidth(c));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -504,7 +504,7 @@ void MyFrame::OnToggleMultiSel(wxCommandEvent& WXUNUSED(event))
|
|||||||
else
|
else
|
||||||
flags |= wxLC_SINGLE_SEL;
|
flags |= wxLC_SINGLE_SEL;
|
||||||
|
|
||||||
m_logWindow->WriteText(wxString::Format("Current selection mode: %sle\n",
|
m_logWindow->WriteText(wxString::Format(wxT("Current selection mode: %sle\n"),
|
||||||
(flags & wxLC_SINGLE_SEL) ? "sing" : "multip"));
|
(flags & wxLC_SINGLE_SEL) ? "sing" : "multip"));
|
||||||
|
|
||||||
RecreateList(flags);
|
RecreateList(flags);
|
||||||
@@ -554,35 +554,35 @@ void MyFrame::OnDeleteAll(wxCommandEvent& WXUNUSED(event))
|
|||||||
|
|
||||||
void MyListCtrl::OnCacheHint(wxListEvent& event)
|
void MyListCtrl::OnCacheHint(wxListEvent& event)
|
||||||
{
|
{
|
||||||
wxLogMessage( "OnCacheHint: cache items %ld..%ld",
|
wxLogMessage( wxT("OnCacheHint: cache items %ld..%ld"),
|
||||||
event.GetCacheFrom(), event.GetCacheTo() );
|
event.GetCacheFrom(), event.GetCacheTo() );
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyListCtrl::OnColClick(wxListEvent& event)
|
void MyListCtrl::OnColClick(wxListEvent& event)
|
||||||
{
|
{
|
||||||
wxLogMessage( "OnColumnClick at %d.", event.GetColumn() );
|
wxLogMessage( wxT("OnColumnClick at %d."), event.GetColumn() );
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyListCtrl::OnBeginDrag(wxListEvent& event)
|
void MyListCtrl::OnBeginDrag(wxListEvent& event)
|
||||||
{
|
{
|
||||||
wxLogMessage( "OnBeginDrag at %d,%d.",
|
wxLogMessage( wxT("OnBeginDrag at %d,%d."),
|
||||||
event.m_pointDrag.x, event.m_pointDrag.y );
|
event.m_pointDrag.x, event.m_pointDrag.y );
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyListCtrl::OnBeginRDrag(wxListEvent& event)
|
void MyListCtrl::OnBeginRDrag(wxListEvent& event)
|
||||||
{
|
{
|
||||||
wxLogMessage( "OnBeginRDrag at %d,%d.",
|
wxLogMessage( wxT("OnBeginRDrag at %d,%d."),
|
||||||
event.m_pointDrag.x, event.m_pointDrag.y );
|
event.m_pointDrag.x, event.m_pointDrag.y );
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyListCtrl::OnBeginLabelEdit(wxListEvent& event)
|
void MyListCtrl::OnBeginLabelEdit(wxListEvent& event)
|
||||||
{
|
{
|
||||||
wxLogMessage("OnBeginLabelEdit: %s", event.m_item.m_text.c_str());
|
wxLogMessage( wxT("OnBeginLabelEdit: %s"), event.m_item.m_text.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyListCtrl::OnEndLabelEdit(wxListEvent& event)
|
void MyListCtrl::OnEndLabelEdit(wxListEvent& event)
|
||||||
{
|
{
|
||||||
wxLogMessage("OnEndLabelEdit: %s", event.m_item.m_text.c_str());
|
wxLogMessage( wxT("OnEndLabelEdit: %s"), event.m_item.m_text.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyListCtrl::OnDeleteItem(wxListEvent& event)
|
void MyListCtrl::OnDeleteItem(wxListEvent& event)
|
||||||
@@ -640,12 +640,12 @@ void MyListCtrl::OnSelected(wxListEvent& event)
|
|||||||
info.m_mask = wxLIST_MASK_TEXT;
|
info.m_mask = wxLIST_MASK_TEXT;
|
||||||
if ( GetItem(info) )
|
if ( GetItem(info) )
|
||||||
{
|
{
|
||||||
wxLogMessage("Value of the 2nd field of the selected item: %s",
|
wxLogMessage(wxT("Value of the 2nd field of the selected item: %s"),
|
||||||
info.m_text.c_str());
|
info.m_text.c_str());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxFAIL_MSG("wxListCtrl::GetItem() failed");
|
wxFAIL_MSG(wxT("wxListCtrl::GetItem() failed"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user