
Public Types | |
| typedef void(* | upd_ctrl_f )(wxWindow *, const wxString &, Data_row_provider *) |
| Function, responsible for setting value of widget. | |
Public Member Functions | |
| Row_binding () | |
| Creates new object. | |
| Row_binding (Data_row_provider *data) | |
| Creates new object. | |
| virtual | ~Row_binding () |
| Destroys the object. | |
| Data_row_provider * | data () |
| Returns currently used data row. | |
| void | data (Data_row_provider *data) |
| Sets currently used data row. | |
| void | bind (wxWindow *w, wxString field, upd_ctrl_f f) |
| Binds widget. | |
| virtual void | unbind (wxWindow *w) |
| Unbind widget. | |
| virtual void | update_UI () |
| Update UI. | |
Protected Types | |
|
typedef std::pair< wxString, upd_ctrl_f > | ctrl_binding |
Protected Attributes | |
| Data_row_provider * | data_ |
|
std::map< wxWindow *, ctrl_binding > | ctrl_bindings_ |
| typedef void(* wxPg::Row_binding::upd_ctrl_f)(wxWindow *, const wxString &, Data_row_provider *) |
Function, responsible for setting value of widget.
| wxPg::Row_binding::Row_binding | ( | ) |
Creates new object.
Call data() to complete initialization of object.
| wxPg::Row_binding::Row_binding | ( | Data_row_provider * | data | ) | [explicit] |
Creates new object.
| data | - a row of query result to be used. |
| virtual wxPg::Row_binding::~Row_binding | ( | ) | [inline, virtual] |
Destroys the object.
| Data_row_provider* wxPg::Row_binding::data | ( | ) |
Returns currently used data row.
| void wxPg::Row_binding::data | ( | Data_row_provider * | data | ) |
Sets currently used data row.
| data | - new data row to be used. |
| void wxPg::Row_binding::bind | ( | wxWindow * | w, | |
| wxString | field, | |||
| upd_ctrl_f | f | |||
| ) |
Binds widget.
When update_UI() is called, the value of widget is set to the value of field. Usually you don't need to call this method directly - use binding macros, defined in binding_macros.h.
| w | - widget to be binded. | |
| field | - database field. | |
| f | - function, responsible for setting control value. |
| virtual void wxPg::Row_binding::unbind | ( | wxWindow * | w | ) | [virtual] |
| virtual void wxPg::Row_binding::update_UI | ( | ) | [virtual] |
1.5.6