hk_dscombobox Class Reference

base class for combobox fields More...

#include <hk_dscombobox.h>

Inheritance diagram for hk_dscombobox:

Inheritance graph
[legend]
Collaboration diagram for hk_dscombobox:

Collaboration graph
[legend]
List of all members.

Public Types

enum  enum_mode { combo, combo_noedit, selector }

Public Member Functions

 hk_dscombobox (hk_form *form=NULL)
void set_listdatasource (hk_datasource *list)
hk_datasourcelistdatasource (void)
virtual void set_datasource (hk_datasource *d)
void set_viewcolumnname (const hk_string &viewcolumn, bool registerchange=true)
hk_string viewcolumnname (void)
void set_listcolumnname (const hk_string &listcolumn, bool registerchange=true)
hk_string listcolumnname (void)
virtual void savedata (ostream &s)
virtual void loaddata (const hk_string &definition)
virtual bool set_listpresentationdatasource (long n, bool registerchange=true)
long listpresentationdatasource (void)
virtual void load_listitems (void)
void set_mode (enum_mode)
enum_mode mode (void)
hk_string value_at (unsigned long)
hk_columnviewcolumn (void)
hk_columnlistcolumn (void)
void set_gridcolumn (hk_dsgridcolumn *)
hk_dsgridcolumngridcolumn (void) const
void set_use_textlist (bool, bool registerchange=true)
bool use_textlist (void) const
void set_textlist (list< hk_string > &, bool registerchange=true)
void add_text (const hk_string &, bool registerchange=true)
list< hk_string > * textlist (void) const
virtual bool action_on_select (void)
hk_string on_select_action (void)
void set_on_select_action (const hk_string &, bool registerchange=true, bool force_setting=true)

Protected Member Functions

bool datasource_enable (void)
bool datasource_disable (void)
virtual bool widget_specific_row_change (void)
virtual void widget_specific_mode_change (void)
virtual void after_store_changed_data (void)
virtual void columndata_has_changed (void)
virtual bool presentationmode_changed (void)

Protected Attributes

hk_dsgridcolumnp_gridcolumn

Detailed Description

base class for combobox fields

Version:
Revision
1.22
Author:
Horst Knorr (hk_classes@knoda.org)
base class for combobox fields Just set the datasource and the column (defined in the parent class hk_dsdatavisible). To fill the listbox with values set the datasource which contains the wished values with set_listdatasource. The columnname of the row which should be displayed in the listbox must be set with set_viewcolumn. The row which contains the data to be written has to be specified with set_listcolumn.


Member Enumeration Documentation

enum hk_dscombobox::enum_mode
 

if the comboboxmode is set to combo it reacts like a normal datasource. If set to 'selector' the datasource will be moved to the selected row in the datasource. You then just have to add the listcolumnname


Member Function Documentation

bool hk_dscombobox::datasource_disable void   )  [protected, virtual]
 

FOR WIDGET DEVELOPERS ONLY: will be automatically called when the datasources is disabling

Reimplemented from hk_dsdatavisible.

bool hk_dscombobox::datasource_enable void   )  [protected, virtual]
 

FOR WIDGET DEVELOPERS ONLY: will be automatically called when the datasources is enabling

Reimplemented from hk_dsdatavisible.

void hk_dscombobox::loaddata const hk_string &  definition  )  [virtual]
 

loads the object's values out of the definition string. Especially used to load queries, forms and reports

Reimplemented from hk_dsdatavisible.

void hk_dscombobox::savedata ostream &  s  )  [virtual]
 

stores the object's values to stream s. Especially used to store queries, forms and reports

Reimplemented from hk_dsdatavisible.

void hk_dscombobox::set_datasource hk_datasource d  )  [virtual]
 

the datasource

Reimplemented from hk_dsdatavisible.

void hk_dscombobox::set_listcolumnname const hk_string &  listcolumn,
bool  registerchange = true
 

The column containing the equivalent key to the column set with set_column

void hk_dscombobox::set_listdatasource hk_datasource list  ) 
 

comboboxes need 2 datasources. One (the normal) datasource is set with set_datasource and stores the values in a field. The second datasource contains a list of possible values for this field.

Parameters:
list the datasource which contains the values displayed in the combobox

bool hk_dscombobox::set_listpresentationdatasource long  n,
bool  registerchange = true
[virtual]
 

if this combobox is part of a hk_presentation object (i.e. a form) you can set the listdatasource by its unique presentation number

void hk_dscombobox::set_viewcolumnname const hk_string &  viewcolumn,
bool  registerchange = true
 

The column of the listdatasource which will be displayed in the combobox

hk_string hk_dscombobox::value_at unsigned  long  )  [virtual]
 

returns the formatted value of the row 'row'

Reimplemented from hk_dsdatavisible.

bool hk_dscombobox::widget_specific_row_change void   )  [protected, virtual]
 

FOR WIDGET DEVELOPERS ONLY: will be automatically called when the datasource has changed the row. Has to be rewritten for a new widget

See also:
before_row_change.

Reimplemented from hk_dsvisible.


The documentation for this class was generated from the following files:
Generated on Tue May 2 09:15:44 2006 for Databaseconnectionclasses by  doxygen 1.4.6