libgnomedbmm Reference Documentation
Main Page   Namespaces   Book  

Gnome::Db::DataWidget Class Reference

Base class to control data-bound widgets. More...

Inheritance diagram for Gnome::Db::DataWidget:

Inheritance graph
[legend]
List of all members.

Public Member Functions

void column_hide (int column)
 Hides the data at column in the data model iface operates on.
void column_set_editable (int column, bool editable=true)
 Sets if the data entry in the iface widget at column (in the data model iface operates on) can be edited or not.
void column_show (int column)
 Shows the data at column in the data model iface operates on.
void column_show_actions (int column, bool show_actions=true)
 Sets if the data entry in the iface widget at column (in the data model iface operates on) must show its actions menu or not.
Glib::RefPtr<const Gtk::ActionGroupget_actions_group () const
 Each widget imlplementing the Gnome::DbDataWidget interface provides actions.
Glib::RefPtr<Gtk::ActionGroupget_actions_group ()
 Each widget imlplementing the Gnome::DbDataWidget interface provides actions.
Glib::RefPtr<const Gda::DataModelIter> get_current_data () const
 Get the Gda::DataModelIter object which contains all the parameters which in turn contain the actual data stored in iface .
Glib::RefPtr<Gda::DataModelIter> get_current_data ()
 Get the Gda::DataModelIter object which contains all the parameters which in turn contain the actual data stored in iface .
Glib::RefPtr<const Gda::DataModel> get_gda_model () const
 Get the current Gda::DataModel used by iface.
Glib::RefPtr<Gda::DataModel> get_gda_model ()
 Get the current Gda::DataModel used by iface.
Glib::RefPtr<const Gda::DataProxy> get_proxy () const
 Get a pointer to the Gda::DataProxy being used by iface.
Glib::RefPtr<Gda::DataProxy> get_proxy ()
 Get a pointer to the Gda::DataProxy being used by iface.
DataWidgetWriteMode get_write_mode () const
const GnomeDbDataWidget* gobj () const
 Provides access to the underlying C GObject.
GnomeDbDataWidget* gobj ()
 Provides access to the underlying C GObject.
void perform_action (Action action)
 Forces the widget to perform the selected action , as if the user had pressed on the corresponding action button in the iface widget, if the corresponding action is possible and if the iface widget supports the action.
void set_gda_model (const Glib::RefPtr<Gda::DataModel>& model)
 Sets the data model which is used by iface .
void set_write_mode (DataWidgetWriteMode mode)
Glib::SignalProxy1< void,
const Glib::RefPtr<Gnome::Gda::DataProxy >&> 
signal_proxy_changed ()
 
Prototype:
void proxy_changed(const Glib::RefPtr<Gnome::Gda::DataProxy>& proxy)

virtual ~DataWidget ()

Static Public Member Functions

static void add_interface (GType gtype_implementer)

Protected Member Functions

virtual void col_set_show_vfunc (int column, bool shown)
virtual Glib::RefPtr<Gtk::ActionGroupget_actions_group_vfunc ()
virtual GdaDataModelIter* get_data_set_vfunc ()
virtual Glib::RefPtr<Gda::DataModel> get_gda_model_vfunc ()
virtual Glib::RefPtr<Gda::DataProxy> get_proxy_vfunc ()
virtual void on_proxy_changed (const Glib::RefPtr<Gnome::Gda::DataProxy>& proxy)
virtual void set_column_editable_vfunc (int column, bool editable)
virtual void set_gda_model_vfunc (const Glib::RefPtr<Gda::DataModel>& model)
virtual void show_column_actions_vfunc (int column, bool show_actions)

Related Functions

(Note that these are not member functions.)

Glib::RefPtr<Gnome::Db::DataWidgetwrap (GnomeDbDataWidget* object, bool take_copy=false)
 
Parameters:
object The C instance


Detailed Description

Base class to control data-bound widgets.

This is a common interface inherited by some data-bound widgets which have the following in common:


Constructor & Destructor Documentation

virtual Gnome::Db::DataWidget::~DataWidget (  )  [virtual]


Member Function Documentation

static void Gnome::Db::DataWidget::add_interface ( GType  gtype_implementer  )  [static]

virtual void Gnome::Db::DataWidget::col_set_show_vfunc ( int  column,
bool  shown 
) [protected, virtual]

void Gnome::Db::DataWidget::column_hide ( int  column  ) 

Hides the data at column in the data model iface operates on.

Parameters:
column Column number to hide.

void Gnome::Db::DataWidget::column_set_editable ( int  column,
bool  editable = true 
)

Sets if the data entry in the iface widget at column (in the data model iface operates on) can be edited or not.

Parameters:
column Column number of the data.
editable Whether the data entry can be edited.

void Gnome::Db::DataWidget::column_show ( int  column  ) 

Shows the data at column in the data model iface operates on.

Parameters:
column Column number to show.

void Gnome::Db::DataWidget::column_show_actions ( int  column,
bool  show_actions = true 
)

Sets if the data entry in the iface widget at column (in the data model iface operates on) must show its actions menu or not.

Parameters:
column Column number of the data.
show_actions Whether to show the actions menu.

Glib::RefPtr<const Gtk::ActionGroup> Gnome::Db::DataWidget::get_actions_group (  )  const

Each widget imlplementing the Gnome::DbDataWidget interface provides actions.

Actions can be triggered using the perform_action() method, but using this method allows for the creation of toolbars, menus, etc calling these actions.

The actions are among: <itemizedlist><listitem>Data edition actions: "ActionNew", "ActionCommit", "ActionDelete, "ActionUndelete, "ActionReset", </listitem> <listitem>Record by record moving: "ActionFirstRecord", "ActionPrevRecord", "ActionNextRecord", "ActionLastRecord",</listitem> <listitem>Chuncks of records moving: "ActionFirstChunck", "ActionPrevChunck", "ActionNextChunck", "ActionLastChunck".</listitem></itemizedlist>

Returns:
The Gtk::ActionGroup with all the possible actions on the widget.

Glib::RefPtr<Gtk::ActionGroup> Gnome::Db::DataWidget::get_actions_group (  ) 

Each widget imlplementing the Gnome::DbDataWidget interface provides actions.

Actions can be triggered using the perform_action() method, but using this method allows for the creation of toolbars, menus, etc calling these actions.

The actions are among: <itemizedlist><listitem>Data edition actions: "ActionNew", "ActionCommit", "ActionDelete, "ActionUndelete, "ActionReset", </listitem> <listitem>Record by record moving: "ActionFirstRecord", "ActionPrevRecord", "ActionNextRecord", "ActionLastRecord",</listitem> <listitem>Chuncks of records moving: "ActionFirstChunck", "ActionPrevChunck", "ActionNextChunck", "ActionLastChunck".</listitem></itemizedlist>

Returns:
The Gtk::ActionGroup with all the possible actions on the widget.

virtual Glib::RefPtr<Gtk::ActionGroup> Gnome::Db::DataWidget::get_actions_group_vfunc (  )  [protected, virtual]

Glib::RefPtr<const Gda::DataModelIter> Gnome::Db::DataWidget::get_current_data (  )  const

Get the Gda::DataModelIter object which contains all the parameters which in turn contain the actual data stored in iface .

When the user changes what's displayed or what's selected (depending on the actual widget) in iface , then the parameter's values change as well.

Returns:
The Gda::ParameterList object for data (not a new object).

Glib::RefPtr<Gda::DataModelIter> Gnome::Db::DataWidget::get_current_data (  ) 

Get the Gda::DataModelIter object which contains all the parameters which in turn contain the actual data stored in iface .

When the user changes what's displayed or what's selected (depending on the actual widget) in iface , then the parameter's values change as well.

Returns:
The Gda::ParameterList object for data (not a new object).

virtual GdaDataModelIter* Gnome::Db::DataWidget::get_data_set_vfunc (  )  [protected, virtual]

Glib::RefPtr<const Gda::DataModel> Gnome::Db::DataWidget::get_gda_model (  )  const

Get the current Gda::DataModel used by iface.

Returns:
The Gda::DataModel, or 0 if there is none.

Glib::RefPtr<Gda::DataModel> Gnome::Db::DataWidget::get_gda_model (  ) 

Get the current Gda::DataModel used by iface.

Returns:
The Gda::DataModel, or 0 if there is none.

virtual Glib::RefPtr<Gda::DataModel> Gnome::Db::DataWidget::get_gda_model_vfunc (  )  [protected, virtual]

Glib::RefPtr<const Gda::DataProxy> Gnome::Db::DataWidget::get_proxy (  )  const

Get a pointer to the Gda::DataProxy being used by iface.

Returns:
A Gda::DataProxy pointer.

Glib::RefPtr<Gda::DataProxy> Gnome::Db::DataWidget::get_proxy (  ) 

Get a pointer to the Gda::DataProxy being used by iface.

Returns:
A Gda::DataProxy pointer.

virtual Glib::RefPtr<Gda::DataProxy> Gnome::Db::DataWidget::get_proxy_vfunc (  )  [protected, virtual]

DataWidgetWriteMode Gnome::Db::DataWidget::get_write_mode (  )  const

const GnomeDbDataWidget* Gnome::Db::DataWidget::gobj (  )  const [inline]

Provides access to the underlying C GObject.

Reimplemented from Glib::Interface.

Reimplemented in Gnome::Db::RawForm, and Gnome::Db::RawGrid.

GnomeDbDataWidget* Gnome::Db::DataWidget::gobj (  )  [inline]

Provides access to the underlying C GObject.

Reimplemented from Glib::Interface.

Reimplemented in Gnome::Db::RawForm, and Gnome::Db::RawGrid.

virtual void Gnome::Db::DataWidget::on_proxy_changed ( const Glib::RefPtr< Gnome::Gda::DataProxy > &  proxy  )  [protected, virtual]

void Gnome::Db::DataWidget::perform_action ( Action  action  ) 

Forces the widget to perform the selected action , as if the user had pressed on the corresponding action button in the iface widget, if the corresponding action is possible and if the iface widget supports the action.

Parameters:
action A Gnome::DbAction action.

virtual void Gnome::Db::DataWidget::set_column_editable_vfunc ( int  column,
bool  editable 
) [protected, virtual]

void Gnome::Db::DataWidget::set_gda_model ( const Glib::RefPtr< Gda::DataModel > &  model  ) 

Sets the data model which is used by iface .

Parameters:
model A valid Gda::DataModel.

virtual void Gnome::Db::DataWidget::set_gda_model_vfunc ( const Glib::RefPtr< Gda::DataModel > &  model  )  [protected, virtual]

void Gnome::Db::DataWidget::set_write_mode ( DataWidgetWriteMode  mode  ) 

virtual void Gnome::Db::DataWidget::show_column_actions_vfunc ( int  column,
bool  show_actions 
) [protected, virtual]

Glib::SignalProxy1< void,const Glib::RefPtr<Gnome::Gda::DataProxy>& > Gnome::Db::DataWidget::signal_proxy_changed (  ) 

Prototype:
void proxy_changed(const Glib::RefPtr<Gnome::Gda::DataProxy>& proxy)


Friends And Related Function Documentation

Glib::RefPtr<Gnome::Db::DataWidget> wrap ( GnomeDbDataWidget *  object,
bool  take_copy = false 
) [related]

Parameters:
object The C instance

Parameters:
take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns:
A C++ instance that wraps this C instance.


The documentation for this class was generated from the following file:
Generated for libgnomedbmm by Doxygen 1.5.1 © 1997-2001