home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2001 Mobile
/
Chip_Mobile_2001.iso
/
palm
/
business
/
printcar
/
printcar.exe
/
src
/
UI
/
ListChoices.h
< prev
next >
Wrap
C/C++ Source or Header
|
2000-06-03
|
1KB
|
57 lines
//
// $Id: ListChoices.h,v 1.1.1.1 2000/06/02 22:23:00 sergey Exp $
//
#ifndef _ListChoices_h_
#define _ListChoices_h_
namespace UI
{
class ListChoices
{
public:
ListChoices();
~ListChoices();
// Copy transferring the ownership
ListChoices(const ListChoices& other);
ListChoices& operator =(const ListChoices& other);
// operations
void add(const char* text);
// attributes
int count() const { return _count; }
const char* textItem(int index) const;
const char** textItems() const;
// implementation
private:
void createItems();
void initItems(const char** items, const char* buffer, int count);
void deleteItems();
bool ensureBufferSize(int size);
void deleteBuffer();
int bufferSize() const;
void copyTextToBuffer(int offset, const char* text);
void cleanUp();
void release();
// data members
private:
int _count;
VoidHand _bufferHandle;
const char** _items;
};
}
// namespace UI
#endif // _ListChoices_h_