vdk 2.4.0
vdkcomboentry.h
1/*
2 * ===========================
3 * VDK Visual Develeopment Kit
4 * Version 2.0.4
5 * March 2004
6 * ===========================
7 *
8 * Copyright (C) 1998 - 2004 Mario Motta
9 * Developed by Mario Motta <mmotta@guest.net>
10 *
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Library General Public
13 * License as published by the Free Software Foundation; either
14 * version 2 of the License, or (at your option) any later version.
15 *
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Library General Public License for more details.
20 *
21 * You should have received a copy of the GNU Library General Public
22 * License along with this library; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
24 * 02111-1307, USA.
25 */
26
27#ifndef _vdkcomboentry_h_
28#define _vdkcomboentry_h_
29
30#ifdef HAVE_CONFIG_H
31#include <config.h>
32#endif
33
34#include <vdk/vdkobj.h>
35#include <vdk/value_sem_list.h>
36
39
52{
53 protected:
54 static int FocusOutEvent(GtkWidget *, GdkEventFocus*, gpointer wid);
55 static int FocusInEvent(GtkWidget *, GdkEventFocus*, gpointer wid);
56 VDKObjectSignal s_activated, s_changed, s_selected;
57 public:
63 VDKComboEntry(VDKForm* owner, char** selections = NULL);
64 virtual ~VDKComboEntry();
65
71 VDKReadWriteValueProp<VDKComboEntry,bool> Editable;
72 void SetEditable(bool flag)
73 { gtk_entry_set_editable(GTK_ENTRY(GTK_BIN (widget)->child),flag); }
78 VDKReadWriteValueProp<VDKComboEntry,int> Selected;
79 int GetSelected()
80 { return gtk_combo_box_get_active (GTK_COMBO_BOX(widget)); }
81 void SetSelected(int index)
82 { gtk_combo_box_set_active (GTK_COMBO_BOX(widget),index); }
87 VDKReadWriteValueProp<VDKComboEntry,char*> Text;
88 void SetText(char* text);
89 char* GetText();
90 // properties
96 VDKReadWriteValueProp<VDKComboEntry,StringList*> Selections;
97 StringList* GetSelections(void);
98 void SetSelections(StringList* selections);
103 VDKReadWriteValueProp<VDKComboEntry,GtkListStore*> StoreModel;
104 void SetStoreModel(GtkListStore* store_model);
134 VDKReadWriteValueProp<VDKComboEntry,bool> Sorted;
135 void SetSorted(bool flag);
140 VDKReadWriteValueProp<VDKComboEntry,GtkSortType> SortingOrder;
141 // overriden
142 virtual void SetBackground(VDKRgb rgb, GtkStateType state);
143 virtual void SetForeground(VDKRgb rgb, GtkStateType state);
144 virtual void SetFont(VDKFont* font);
145};
146
147#endif
Provides a simplified wrapper for gtkcombo_entry.
Definition: vdkcomboentry.h:52
VDKReadWriteValueProp< VDKComboEntry, bool > Sorted
Definition: vdkcomboentry.h:134
virtual void SetBackground(VDKRgb rgb, GtkStateType state)
Definition: vdkcomboentry.cc:183
VDKReadWriteValueProp< VDKComboEntry, char * > Text
Definition: vdkcomboentry.h:87
VDKReadWriteValueProp< VDKComboEntry, int > Selected
Definition: vdkcomboentry.h:78
VDKReadWriteValueProp< VDKComboEntry, GtkListStore * > StoreModel
Definition: vdkcomboentry.h:103
VDKComboEntry(VDKForm *owner, char **selections=NULL)
Definition: vdkcomboentry.cc:53
VDKReadWriteValueProp< VDKComboEntry, StringList * > Selections
Definition: vdkcomboentry.h:96
VDKReadWriteValueProp< VDKComboEntry, bool > Editable
Definition: vdkcomboentry.h:71
virtual void SetForeground(VDKRgb rgb, GtkStateType state)
Definition: vdkcomboentry.cc:190
virtual void SetFont(VDKFont *font)
Definition: vdkcomboentry.cc:197
VDKReadWriteValueProp< VDKComboEntry, GtkSortType > SortingOrder
Definition: vdkcomboentry.h:140
Provides a raw font.
Definition: vdkfont.h:38
VDKForm widgets, generally the outermost widget container.
Definition: forms.h:69
Definition: vdkobj.h:141
GtkWidget * widget
Definition: vdkobj.h:241
Provides a simple RGB color structure.
Definition: vdkutils.h:38
provides a VDKValueList iterator
Definition: value_sem_list.h:180
Definition: vdkobj.h:62