2007-12-30 16:41:49 +00:00
|
|
|
#ifndef __GCOMBOBOX_H
|
|
|
|
#define __GCOMBOBOX_H
|
|
|
|
|
|
|
|
#include "gtextbox.h"
|
|
|
|
|
|
|
|
class gComboBox : public gTextBox
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
gComboBox(gContainer *parent);
|
|
|
|
|
|
|
|
int count();
|
|
|
|
int index();
|
|
|
|
char* itemText(int ind);
|
|
|
|
virtual int length();
|
|
|
|
//char** list();
|
|
|
|
virtual bool isReadOnly();
|
|
|
|
bool sorted();
|
|
|
|
virtual char *text();
|
|
|
|
|
|
|
|
void setIndex(int vl);
|
2008-04-17 10:18:25 +00:00
|
|
|
void setItemText(int ind, const char *txt);
|
2007-12-30 16:41:49 +00:00
|
|
|
//void setList(char **vl);
|
|
|
|
virtual void setReadOnly(bool vl);
|
|
|
|
void setSorted(bool vl);
|
2008-04-17 10:18:25 +00:00
|
|
|
virtual void setText(const char *vl);
|
2007-12-30 16:41:49 +00:00
|
|
|
|
|
|
|
//"Methods"
|
|
|
|
void popup();
|
2008-04-17 10:18:25 +00:00
|
|
|
void add(const char *vl, int pos = -1);
|
2007-12-30 16:41:49 +00:00
|
|
|
virtual void clear();
|
2008-04-17 10:18:25 +00:00
|
|
|
int find(const char *ptr);
|
2007-12-30 16:41:49 +00:00
|
|
|
void remove(int pos);
|
|
|
|
|
|
|
|
virtual void resize(int w, int h);
|
|
|
|
virtual void setRealBackground(gColor vl);
|
|
|
|
virtual void setRealForeground(gColor vl);
|
|
|
|
virtual void setFont(gFont *f);
|
|
|
|
virtual void setFocus();
|
|
|
|
|
|
|
|
//"Signals"
|
|
|
|
void (*onClick)(gComboBox *sender);
|
|
|
|
|
|
|
|
//"Private"
|
|
|
|
bool sort;
|
|
|
|
GtkCellRenderer *cell;
|
|
|
|
virtual int minimumHeight();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|