X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..f155075229d771430f0793700f5048ad4be00e9d:/samples/artprov/artbrows.cpp diff --git a/samples/artprov/artbrows.cpp b/samples/artprov/artbrows.cpp index 2d4915d5a4..e58377e3da 100644 --- a/samples/artprov/artbrows.cpp +++ b/samples/artprov/artbrows.cpp @@ -6,7 +6,7 @@ // Created: 2002/04/05 // RCS-ID: $Id$ // Copyright: (c) Vaclav Slavik -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // For compilers that support precompilation, includes "wx/wx.h". @@ -34,12 +34,12 @@ { \ int ind; \ wxIcon icon = wxArtProvider::GetIcon(id, client, size); \ - if ( icon.Ok() ) \ + if ( icon.IsOk() ) \ ind = images->Add(icon); \ else \ ind = 0; \ list->InsertItem(index, wxT(#id), ind); \ - list->SetItemData(index, (long)id); \ + list->SetItemPtrData(index, wxPtrToUInt(id)); \ index++; \ } @@ -50,12 +50,13 @@ static void FillClients(wxChoice *choice) { ART_CLIENT(wxART_OTHER) + ART_CLIENT(wxART_BUTTON) ART_CLIENT(wxART_TOOLBAR) ART_CLIENT(wxART_MENU) ART_CLIENT(wxART_FRAME_ICON) ART_CLIENT(wxART_CMN_DIALOG) ART_CLIENT(wxART_HELP_BROWSER) - ART_CLIENT(wxART_MESSAGE_BOX) + ART_CLIENT(wxART_MESSAGE_BOX) // Keep this last, it's the initial shown one } static void FillBitmaps(wxImageList *images, wxListCtrl *list, @@ -79,6 +80,8 @@ static void FillBitmaps(wxImageList *images, wxListCtrl *list, ART_ICON(wxART_GO_DOWN) ART_ICON(wxART_GO_TO_PARENT) ART_ICON(wxART_GO_HOME) + ART_ICON(wxART_GOTO_FIRST) + ART_ICON(wxART_GOTO_LAST) ART_ICON(wxART_PRINT) ART_ICON(wxART_HELP) ART_ICON(wxART_TIP) @@ -103,6 +106,8 @@ static void FillBitmaps(wxImageList *images, wxListCtrl *list, ART_ICON(wxART_PASTE) ART_ICON(wxART_UNDO) ART_ICON(wxART_REDO) + ART_ICON(wxART_PLUS) + ART_ICON(wxART_MINUS) ART_ICON(wxART_QUIT) ART_ICON(wxART_FIND) ART_ICON(wxART_FIND_AND_REPLACE) @@ -164,7 +169,7 @@ wxArtBrowserDialog::wxArtBrowserDialog(wxWindow *parent) SetSizerAndFit(sizer); - choice->SetSelection(6/*wxART_MESSAGE_BOX*/); + choice->SetSelection(choice->GetCount() - 1); SetArtClient(wxART_MESSAGE_BOX); } @@ -188,18 +193,18 @@ void wxArtBrowserDialog::SetArtClient(const wxArtClient& client) m_list->SetItemState(sel, wxLIST_STATE_FOCUSED, wxLIST_STATE_FOCUSED); m_client = client; - SetArtBitmap((const wxChar*)m_list->GetItemData(sel), m_client); + SetArtBitmap((const char*)m_list->GetItemData(sel), m_client); } void wxArtBrowserDialog::OnSelectItem(wxListEvent &event) { - const wxChar *data = (const wxChar*)event.GetData(); + const char *data = (const char*)event.GetData(); SetArtBitmap(data, m_client, wxDefaultSize); } void wxArtBrowserDialog::OnChooseClient(wxCommandEvent &event) { - const wxChar *data = (const wxChar*)event.GetClientData(); + const char *data = (const char*)event.GetClientData(); SetArtClient(data); }