29 #include <vdk/vdkobj.h>
30 #include <vdk/value_sem_list.h>
31 #include <vdk/vdkarray.h>
32 #include <vdk/colors.h>
33 #include <vdk/vdkprops.h>
34 #ifndef _string_array_def
35 #define _string_array_def
54 int operator <(
Tuple& t)
56 return (*
this)[KeyIndex] < t[KeyIndex];
58 int operator==(
Tuple& t)
60 return (*
this)[KeyIndex] == t[KeyIndex];
98 int select_connect,unselect_connect;
104 VDKReadWriteValueProp<VDKCustom,GtkPolicyType>
VPolicy;
108 VDKReadWriteValueProp<VDKCustom,GtkPolicyType>
HPolicy;
159 GtkWidget* custom_widget;
161 GtkSelectionMode mode;
162 virtual void ConnectSignals();
163 static void ColumnClick(GtkWidget* , gint column, gpointer s);
164 void SetRowHeight(
int rh)
165 { gtk_clist_set_row_height(GTK_CLIST(custom_widget),rh); }
166 void SetAutoResize(
bool flag);
167 GtkPolicyType GetVPolicy() {
return VPolicy; }
168 GtkPolicyType GetHPolicy() {
return HPolicy; }
170 void SetVPolicy(GtkPolicyType p)
172 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (
widget),
176 void SetHPolicy(GtkPolicyType p)
178 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (
widget),
182 void SetBorderShadow(GtkShadowType bs)
183 { gtk_clist_set_shadow_type (GTK_CLIST(custom_widget),bs); }
185 GtkShadowType GetBorderShadow() {
return BorderShadow; }
188 GtkStateType state = GTK_STATE_NORMAL);
190 void SetSelectedForeground(
VDKRgb );
191 void SetUnselectedBackground(
VDKRgb );
192 void SetUnselectedForeground(
VDKRgb );
196 char **titles = NULL,
197 GtkSelectionMode mode = GTK_SELECTION_SINGLE);
232 void Freeze(){ gtk_clist_freeze(GTK_CLIST(custom_widget)); }
236 void Thaw() { gtk_clist_thaw(GTK_CLIST(custom_widget)); }
240 virtual void Clear() { gtk_clist_clear (GTK_CLIST(custom_widget)); }
244 int Size() {
return GTK_CLIST(custom_widget)->rows; }
263 #ifdef USE_SIGCPLUSPLUS
265 VDKSignal1<void, int> OnColumnClick;
267 static void make_gtksigc_connection(
VDKCustom*);
269 static void _handle_click_column(GtkWidget* wid,
int col,
VDKReadWriteValueProp< VDKCustom, GtkPolicyType > VPolicy
Definition: vdkcustom.h:104
void AutoResizeColumn(int col, bool flag)
Definition: vdkcustom.cc:222
GtkSelectionMode SelectionMode()
Definition: vdkcustom.cc:197
Tuple(int n=0, int key=0)
Definition: vdkcustom.h:52
virtual void SetFont(VDKFont *)
Definition: vdkcustom.cc:162
provides a templatized array
Definition: vdkarray.h:72
VDKReadWriteValueProp< VDKCustom, VDKRgb > UnselectedForeground
Definition: vdkcustom.h:142
VDKReadWriteValueProp< VDKCustom, VDKRgb > UnselectedBackground
Definition: vdkcustom.h:138
virtual void SetBackground(VDKRgb color, GtkStateType state=GTK_STATE_NORMAL)
Definition: vdkcustom.cc:99
GtkWidget * CustomWidget()
Definition: vdkcustom.h:213
virtual void SetForeground(VDKRgb, GtkStateType)
Definition: vdkcustom.cc:119
VDKReadWriteValueProp< VDKCustom, VDKRgb > SelectedForeground
Definition: vdkcustom.h:134
void ActiveTitles(bool flag=true)
Definition: vdkcustom.cc:181
void Thaw()
Definition: vdkcustom.h:236
void ActiveTitle(int col, bool flag=true)
Definition: vdkcustom.cc:170
Provides a simple RGB color structure.
Definition: vdkutils.h:37
int ColumnClicked()
Definition: vdkcustom.h:202
Definition: vdkcustom.h:43
void EnableTitles(bool flag=true)
Definition: vdkcustom.cc:189
void ColumnSize(int col, int size)
Definition: vdkcustom.cc:202
This is a base class for derived VDKCustomList and VDKCustomTree Provides common functionalities for ...
Definition: vdkcustom.h:95
GtkWidget * widget
Definition: vdkobj.h:241
VDKObjectArray Titles
Definition: vdkcustom.h:151
virtual void Clear()
Definition: vdkcustom.h:240
VDKReadWriteValueProp< VDKCustom, bool > AutoResize
Definition: vdkcustom.h:122
VDKReadOnlyValueProp< VDKCustom, int > SelectedTitle
Definition: vdkcustom.h:156
Provides a raw font.
Definition: vdkfont.h:37
provides a VDKValueList iterator
Definition: value_sem_list.h:55
VDKReadWriteValueProp< VDKCustom, int > RowHeight
Definition: vdkcustom.h:118
void Freeze()
Definition: vdkcustom.h:232
int Size()
Definition: vdkcustom.h:244
VDKReadWriteValueProp< VDKCustom, GtkPolicyType > HPolicy
Definition: vdkcustom.h:108
VDKReadWriteValueProp< VDKCustom, GtkShadowType > BorderShadow
Definition: vdkcustom.h:112