Public Member Functions | |
XAttributeSpinEntry (T &attr, Gtk::Adjustment &adjustment, double climbRate=0.0, guint digits=0) | |
XAttributeSpinEntry (T &attr, double climbRate=0.0, guint digits=0) | |
~XAttributeSpinEntry () | |
bool | hasChanged () const |
void | commit () |
void | update () |
void | setValue (T value) |
T & | getAttribute () |
template<> | |
XAttributeSpinEntry (YGP::ANumeric &attr, Gtk::Adjustment &adjustment, double climbRate, guint digits) | |
template<> | |
XAttributeSpinEntry (YGP::ANumeric &attr, double climbRate, guint digits) | |
template<> | |
void | commit () |
template<> | |
void | setValue (YGP::ANumeric value) |
Protected Member Functions | |
virtual bool | on_focus_in_event (GdkEventFocus *ev) |
virtual bool | on_focus_out_event (GdkEventFocus *ev) |
bool | takeFocus () |
The value of the attribute is displayed formatted (localized) when not edited.
An "attribute" is any of the numeric C++ data types and ANumeric of the YGP library.
If the curser enters the entry field, the value is displayed unformatted. When leaving the field, the new value is checked for vality (causing a message box with an error message if the user entered an invalid value).
The commit() method transfers the input to the attribute.
XGP::XAttributeSpinEntry< T, P >::XAttributeSpinEntry | ( | T & | attr, | |
Gtk::Adjustment & | adjustment, | |||
double | climbRate = 0.0 , |
|||
guint | digits = 0 | |||
) | [inline] |
Constructor; sets the attribute to handle.
XGP::XAttributeSpinEntry< T, P >::~XAttributeSpinEntry | ( | ) | [inline] |
Destructor.
void XGP::XAttributeSpinEntry< YGP::ANumeric >::commit | ( | ) | [inline] |
void XGP::XAttributeSpinEntry< T, P >::commit | ( | ) | [inline] |
Actualizes the value of the attribute with the value entered in the entry field.
T& XGP::XAttributeSpinEntry< T, P >::getAttribute | ( | ) | [inline] |
Returns the handled attribute.
bool XGP::XAttributeSpinEntry< T, P >::hasChanged | ( | ) | const [inline] |
Returns if the field has been changed.
void XGP::XAttributeSpinEntry< YGP::ANumeric >::setValue | ( | YGP::ANumeric | value | ) | [inline] |
The value of the attribute is not (yet) changed (this happens at commit ()).
void XGP::XAttributeSpinEntry< T, P >::setValue | ( | T | value | ) | [inline] |
Actualizes the displayed value with the passed value.
The value of the attribute is not (yet) changed (this happens at commit ()).
void XGP::XAttributeSpinEntry< T, P >::update | ( | ) | [inline] |
Actualizes the displayed value with the (changed) value of the attribute.