No changes, just use symbolic NO_IMAGE constant instead of -1 or wxNOT_FOUND.

Existing declarations used -1 in several places to indicate the absence of the
image which wasn't especially clear and was also inconsistent with other
places that used wxNOT_FOUND which didn't make much sense in this context.

Add a new symbolic constant NO_IMAGE in wxWithImages and use it in the classes
deriving from it. This still doesn't help with wx{Tree,List}Ctrl but improves
clarity for the other classes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68810 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-08-21 14:08:49 +00:00
parent abfdefede3
commit 1871b9facb
16 changed files with 43 additions and 32 deletions

View File

@@ -181,7 +181,7 @@ public:
virtual bool AddPage(wxWindow *page,
const wxString& text,
bool bSelect = false,
int imageId = -1)
int imageId = NO_IMAGE)
{
DoInvalidateBestSize();
return InsertPage(GetPageCount(), page, text, bSelect, imageId);
@@ -192,7 +192,7 @@ public:
wxWindow *page,
const wxString& text,
bool bSelect = false,
int imageId = -1) = 0;
int imageId = NO_IMAGE) = 0;
// set the currently selected page, return the index of the previously
// selected one (or wxNOT_FOUND on error)