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 SPINS_H
00028
#define SPINS_H
00029
#include <vdk/vdkobj.h>
00030
#include <vdk/vdkprops.h>
00051 class VDKSpinButton:
public VDKObject
00052 {
00053
static void ValueChanged(GtkWidget *wid, gpointer gp);
00054
static void OnValueChanged(GtkWidget *wid, gpointer gp);
00055 GtkObject* adj;
00056
public:
00057
00061 VDKReadWriteValueProp<VDKSpinButton,float>
ValueAsFloat;
00065 VDKReadOnlyValueProp<VDKSpinButton,int>
ValueAsInt;
00069 VDKReadWriteValueProp<VDKSpinButton, int>
Digits;
00073 VDKReadWriteValueProp<VDKSpinButton, float>
LowerBound;
00077 VDKReadWriteValueProp<VDKSpinButton, float>
UpperBound;
00087
VDKSpinButton(
VDKForm* owner,
00088
float defValue,
00089
float lower,
00090
float upper,
00091
float step_increment,
00092
float climb_rate);
00096
virtual ~VDKSpinButton();
00097
00098
void SetDigits(
int digits);
00099
int GetValueAsInt();
00100
void SetValueAsFloat(
float f);
00101
float GetValueAsFloat();
00102
void SetLowerBound(
float f);
00103
float GetLowerBound();
00104
void SetUpperBound(
float f);
00105
float GetUpperBound();
00111
virtual void SetForeground(
VDKRgb color,
00112 GtkStateType state = GTK_STATE_NORMAL);
00118
virtual void SetBackground(
VDKRgb color,
00119 GtkStateType state = GTK_STATE_NORMAL);
00120
00121
#ifdef USE_SIGCPLUSPLUS
00122
public:
00128 VDKSignal1<void, float>
OnSpinValueChanged;
00129
#endif
00130 };
00131
#endif