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:
@@ -74,27 +74,27 @@ public:
|
||||
wxWindow *page,
|
||||
const wxString& text,
|
||||
bool bSelect = false,
|
||||
int imageId = wxNOT_FOUND);
|
||||
int imageId = NO_IMAGE);
|
||||
|
||||
// Inserts a new sub-page to the end of children of the page at given pos.
|
||||
virtual bool InsertSubPage(size_t pos,
|
||||
wxWindow *page,
|
||||
const wxString& text,
|
||||
bool bSelect = false,
|
||||
int imageId = wxNOT_FOUND);
|
||||
int imageId = NO_IMAGE);
|
||||
|
||||
// Adds a new page at top level after all other pages.
|
||||
virtual bool AddPage(wxWindow *page,
|
||||
const wxString& text,
|
||||
bool bSelect = false,
|
||||
int imageId = wxNOT_FOUND);
|
||||
int imageId = NO_IMAGE);
|
||||
|
||||
// Adds a new child-page to the last top-level page inserted.
|
||||
// Useful when constructing 1 level tree structure.
|
||||
virtual bool AddSubPage(wxWindow *page,
|
||||
const wxString& text,
|
||||
bool bSelect = false,
|
||||
int imageId = wxNOT_FOUND);
|
||||
int imageId = NO_IMAGE);
|
||||
|
||||
// Deletes the page and ALL its children. Could trigger page selection
|
||||
// change in a case when selected page is removed. In that case its parent
|
||||
@@ -169,16 +169,16 @@ private:
|
||||
wxWindow *page,
|
||||
const wxString& text,
|
||||
bool bSelect = false,
|
||||
int imageId = wxNOT_FOUND);
|
||||
int imageId = NO_IMAGE);
|
||||
bool DoInsertSubPage(size_t pos,
|
||||
wxWindow *page,
|
||||
const wxString& text,
|
||||
bool bSelect = false,
|
||||
int imageId = wxNOT_FOUND);
|
||||
int imageId = NO_IMAGE);
|
||||
bool DoAddSubPage(wxWindow *page,
|
||||
const wxString& text,
|
||||
bool bSelect = false,
|
||||
int imageId = wxNOT_FOUND);
|
||||
int imageId = NO_IMAGE);
|
||||
|
||||
// Sets selection in the tree control and updates the page being shown.
|
||||
int DoSetSelection(size_t pos, int flags = 0);
|
||||
|
Reference in New Issue
Block a user