XGP::XAttributeEntry< T, P > Class Template Reference

Class to display and change an attribute inside and entry box. More...

List of all members.

Public Member Functions

 XAttributeEntry (T &attr)
 ~XAttributeEntry ()
bool hasChanged () const
void commit ()
void update ()
void setText (const Glib::ustring &value)
T & getAttribute ()
template<>
 XAttributeEntry (std::string &attr)
template<>
void update ()
template<>
void setText (const Glib::ustring &value)
template<>
bool on_focus_in_event (GdkEventFocus *ev)
template<>
bool on_focus_out_event (GdkEventFocus *ev)
template<>
 XAttributeEntry (Glib::ustring &attr)
template<>
void update ()
template<>
void setText (const Glib::ustring &value)
template<>
bool on_focus_in_event (GdkEventFocus *ev)
template<>
bool on_focus_out_event (GdkEventFocus *ev)

Protected Member Functions

virtual bool on_focus_in_event (GdkEventFocus *ev)
virtual bool on_focus_out_event (GdkEventFocus *ev)
bool takeFocus ()


Detailed Description

template<typename T, typename P = Gtk::Entry>
class XGP::XAttributeEntry< T, P >

Class to display and change an attribute inside and entry box.

The value of the attribute is displayed formatted (localized) when not edited.

An "attribute" is any of the standard C++ data types and the types direved from href="../YGP/classAttributValue.html">AttributValue of the YGP library (such as ADate, ANumeric, ...).

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.


Constructor & Destructor Documentation

template<typename T, typename P = Gtk::Entry>
XGP::XAttributeEntry< T, P >::XAttributeEntry ( T &  attr  )  [inline]

Constructor; sets the attribute to handle.

template<typename T, typename P = Gtk::Entry>
XGP::XAttributeEntry< T, P >::~XAttributeEntry (  )  [inline]

Destructor.


Member Function Documentation

template<typename T, typename P = Gtk::Entry>
void XGP::XAttributeEntry< T, P >::commit (  )  [inline]

Actualizes the value of the attribute with the value entered in the entry field.

template<typename T, typename P = Gtk::Entry>
T& XGP::XAttributeEntry< T, P >::getAttribute (  )  [inline]

Returns the handled attribute.

template<typename T, typename P = Gtk::Entry>
bool XGP::XAttributeEntry< T, P >::hasChanged (  )  const [inline]

Returns if the field has been changed.

template<typename T, typename P = Gtk::Entry>
void XGP::XAttributeEntry< T, P >::setText ( const Glib::ustring &  value  )  [inline]

Actualizes the displayed value with the passed value.

The value of the attribute is not (yet) changed (this happens at commit ()).

template<typename T, typename P = Gtk::Entry>
void XGP::XAttributeEntry< T, P >::update (  )  [inline]

Actualizes the displayed value with the (changed) value of the attribute.


The documentation for this class was generated from the following file:

XGP Version 0.9.31 - Generated on Wed Nov 18 11:25:29 2009 by doxygen 1.5.8