StringList Class Reference

Inherits List.

List of all members.

Public Member Functions

virtual int children (const Menu *, const int *indexes, int level)
virtual Widgetchild (const Menu *, const int *indexes, int level)
 StringList (const char *const *a, int n)
 StringList (const char *const *a)
 StringList (const char *S)


Detailed Description

A very simple type of List that allows a menu to display an array of C strings, or a nul-seperated single string:

  const char* names[] = {"alpha", "beta", "gamma", 0}
  StringList* list = new StringList(names);
  // Identical result can be made with this:
  // StringList* list = new StringList("alpha\0beta\0gamma\0");
  menu->list(list);


Constructor & Destructor Documentation

StringList::StringList const char *const *  a,
int  n
[inline]
 

Sets the string list to return n items, where the labels are from the array a. Warning: the array is not copied, it should be in static memory!

StringList::StringList const char *const *  a  ) 
 

Sets the string list to return items who's labels are from the array a. The number of items is determined by the first null pointer in the array. Warning: the array is not copied, it should be in static memory!

StringList::StringList const char *  s  ) 
 

Sets the string list to return the nul-seperated list of strings. The list is terminated by two nul characters. Warning: the string is not copied! Also the current implementation leaks the created array when the StringList is deleted.


The documentation for this class was generated from the following files:
Sun Jan 7 00:55:18 2007. FLTK ©2006 Bill Spitzak and others.
Permission is granted to reproduce this manual or any portion for any purpose, provided this copyright and permission notice are preserved.