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

@@ -30,6 +30,12 @@
class wxBookCtrlBase : public wxControl
{
public:
enum
{
/// Symbolic constant indicating that no image should be used.
NO_IMAGE = -1
};
/**
Default ctor.
*/
@@ -243,7 +249,7 @@ public:
@see InsertPage()
*/
virtual bool AddPage(wxWindow* page, const wxString& text,
bool select = false, int imageId = wxNOT_FOUND);
bool select = false, int imageId = NO_IMAGE);
/**
Deletes all pages.
@@ -280,7 +286,7 @@ public:
wxWindow* page,
const wxString& text,
bool select = false,
int imageId = wxNOT_FOUND) = 0;
int imageId = NO_IMAGE) = 0;
/**
Deletes the specified page, without deleting the associated window.