Improve documentation of wxPGChoices ctor and Add() methods
Mention that the "labels" array must be NULL-terminated and that "values" must have at least as many items, if they're provided at all.
This commit is contained in:
@@ -719,7 +719,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Constructor.
|
// Constructor.
|
||||||
// labels - Labels for choices.
|
// labels - Labels for choices, NULL-terminated.
|
||||||
// values - Values for choices. If NULL, indexes are used.
|
// values - Values for choices. If NULL, indexes are used.
|
||||||
wxPGChoices( const wxChar* const* labels, const long* values = NULL )
|
wxPGChoices( const wxChar* const* labels, const long* values = NULL )
|
||||||
{
|
{
|
||||||
@@ -754,7 +754,7 @@ public:
|
|||||||
// Adds to current.
|
// Adds to current.
|
||||||
// If did not have own copies, creates them now. If was empty, identical
|
// If did not have own copies, creates them now. If was empty, identical
|
||||||
// to set except that creates copies.
|
// to set except that creates copies.
|
||||||
// labels - Labels for added choices.
|
// labels - Labels for added choices, NULL-terminated.
|
||||||
// values - Values for added choices. If empty, relevant entry indexes are used.
|
// values - Values for added choices. If empty, relevant entry indexes are used.
|
||||||
void Add( const wxChar* const* labels, const ValArrItem* values = NULL );
|
void Add( const wxChar* const* labels, const ValArrItem* values = NULL );
|
||||||
|
|
||||||
|
@@ -2488,10 +2488,11 @@ public:
|
|||||||
Constructor.
|
Constructor.
|
||||||
|
|
||||||
@param labels
|
@param labels
|
||||||
Labels for choices.
|
Labels for choices, @NULL-terminated.
|
||||||
|
|
||||||
@param values
|
@param values
|
||||||
Values for choices. If @NULL, indexes are used.
|
Values for choices. If @NULL, indexes are used. Otherwise must have
|
||||||
|
at least the same size as @a labels.
|
||||||
*/
|
*/
|
||||||
wxPGChoices( const wxChar** labels, const long* values = NULL );
|
wxPGChoices( const wxChar** labels, const long* values = NULL );
|
||||||
|
|
||||||
@@ -2502,7 +2503,8 @@ public:
|
|||||||
Labels for choices.
|
Labels for choices.
|
||||||
|
|
||||||
@param values
|
@param values
|
||||||
Values for choices. If empty, indexes are used.
|
Values for choices. If empty, indexes are used. Otherwise must have
|
||||||
|
at least the same size as @a labels.
|
||||||
*/
|
*/
|
||||||
wxPGChoices( const wxArrayString& labels, const wxArrayInt& values = wxArrayInt() );
|
wxPGChoices( const wxArrayString& labels, const wxArrayInt& values = wxArrayInt() );
|
||||||
|
|
||||||
@@ -2521,10 +2523,11 @@ public:
|
|||||||
identical to set except that creates copies.
|
identical to set except that creates copies.
|
||||||
|
|
||||||
@param labels
|
@param labels
|
||||||
Labels for added choices.
|
Labels for added choices, @NULL-terminated.
|
||||||
|
|
||||||
@param values
|
@param values
|
||||||
Values for added choices. If empty, relevant entry indexes are used.
|
Values for added choices. If empty, relevant entry indexes are
|
||||||
|
used. Otherwise must have at least the same size as @a labels.
|
||||||
*/
|
*/
|
||||||
void Add( const wxChar** labels, const ValArrItem* values = NULL );
|
void Add( const wxChar** labels, const ValArrItem* values = NULL );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user