00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
#ifndef _vdkcomboentry_h_
00028
#define _vdkcomboentry_h_
00029
00030
#ifdef HAVE_CONFIG_H
00031
#include <config.h>
00032
#endif
00033
00034
#include <vdk/vdkobj.h>
00035
#include <vdk/value_sem_list.h>
00036
00037
typedef VDKValueList<VDKString> StringList;
00038
typedef VDKValueListIterator<VDKString> StringListIterator;
00039
00051 class VDKComboEntry:
public VDKObject
00052 {
00053
protected:
00054
static int VDKComboEntry::FocusOutEvent(GtkWidget *, GdkEventFocus*, gpointer wid);
00055
static int VDKComboEntry::FocusInEvent(GtkWidget *, GdkEventFocus*, gpointer wid);
00056
VDKObjectSignal s_activated, s_changed, s_selected;
00057
public:
00063
VDKComboEntry(
VDKForm* owner,
char** selections = NULL);
00064
virtual ~
VDKComboEntry();
00065
00071 VDKReadWriteValueProp<VDKComboEntry,bool>
Editable;
00072
void SetEditable(
bool flag)
00073 { gtk_entry_set_editable(GTK_ENTRY(GTK_BIN (widget)->child),flag); }
00078 VDKReadWriteValueProp<VDKComboEntry,int>
Selected;
00079
int GetSelected()
00080 {
return gtk_combo_box_get_active (GTK_COMBO_BOX(widget)); }
00081
void SetSelected(
int index)
00082 { gtk_combo_box_set_active (GTK_COMBO_BOX(widget),index); }
00087 VDKReadWriteValueProp<VDKComboEntry,char*>
Text;
00088
void SetText(
char* text);
00089
char* GetText();
00090
00096 VDKReadWriteValueProp<VDKComboEntry,StringList*>
Selections;
00097 StringList* GetSelections(
void);
00098
void SetSelections(StringList* selections);
00103 VDKReadWriteValueProp<VDKComboEntry,GtkListStore*>
StoreModel;
00104
void SetStoreModel(GtkListStore* store_model);
00134 VDKReadWriteValueProp<VDKComboEntry,bool>
Sorted;
00135
void SetSorted(
bool flag);
00140 VDKReadWriteValueProp<VDKComboEntry,GtkSortType>
SortingOrder;
00141
00142
virtual void SetBackground(
VDKRgb rgb, GtkStateType state);
00143
virtual void SetForeground(
VDKRgb rgb, GtkStateType state);
00144
virtual void SetFont(
VDKFont* font);
00145 };
00146
00147
#endif