# class hk_dsdatavisible

base class for visible widgets with data connection. More...

Definition | `#include <hk_classes/hk_classes/hk_dsdatavisible.h>`
Inherits | hk_dsvisible [public ]
Inherited by | hk_dsgridcolumn, hk_reportdata, hk_reportsection
List of all Methods

Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- hk_dsdatavisible (hk_presentation* p=NULL)
- virtual ~hk_dsdatavisible ()
- void set_columnname (const hk_string& c,bool registerchange=true)
- void set_columnname (const hk_string& c, bool registerchange, int coloccurance)
- hk_column* column (void)
- hk_string columnname (void)
- virtual void set_datasource (hk_datasource* d)
- hk_datasource* datasource (void)
- virtual void savedata (ostream& s )
- virtual void loaddata (const hk_string& definition)
- bool use_defaultvalue (void)
- void set_defaultvalue (const hk_string& def,bool registerchange=true)
- hk_string raw_defaultvalue (void)
- hk_string defaultvalue (void)
- void reset_default (bool registerchange=true)
- void set_numberformat (bool use_numberseparator=false, int commadigits=-1,bool registerchange=true)
- void set_numberformat (bool use_numberseparator, int commadigits,bool registerchange,bool force_setting)
- bool use_numberseparator (void)
- int commadigits (void)
- int precision (void)
- virtual hk_string value_at (unsigned long row)
- virtual hk_string value (void)
- virtual void set_value (const hk_string&)
- unsigned int find (unsigned int from,unsigned int to,const hk_string& searchtext,bool wholephrase=false,bool casesensitive=false,bool backwards=false)
- unsigned int find (const hk_string& searchtext,bool wholephrase=false,bool casesensitive=false,bool backwards=false)

#### Public Static Methods

- static void set_defaultnumberformat (bool use_thousandsseparator,int precision)
- static bool defaultuse_numberseparator (void)
- static int defaultprecision (void)

#### Protected Methods

- virtual bool datasource_disable (void)
- virtual bool datasource_enable (void)
- virtual void datasource_delete (void)
- virtual bool before_columns_deleted (void)
- virtual void widget_specific_set_column (void)
- virtual void widget_specific_numberformat (void)
- virtual void columndata_has_changed (void)
- virtual void before_insert_row (void)
- virtual void new_column_pointer_created (void)

#### Protected Members

- hk_column* p_column

## Detailed Description

hk_dsdatavisible (hk_presentation* p=NULL)

### hk_dsdatavisible

~hk_dsdatavisible ()

### ~hk_dsdatavisible

[virtual]

void set_columnname (const hk_string& c,bool registerchange=true)

### set_columnname

column name in the datasource. If there is no column with this name the widget will not be enabled

Parameters:

column | the wished column
registerchange | : If this object will be displayed on a form you can decide whether changing the column name should mark the form as changed (then it will be saved when closed). Default is "true".

void set_columnname (const hk_string& c, bool registerchange, int coloccurance)

### set_columnname

hk_column* column (void)

### column

Returns: NULL if there is no column with the defined name. An object of type hk_column if it was found in the datasource

hk_string columnname (void)

### columnname

void set_datasource (hk_datasource* d)

### set_datasource

[virtual]

the datasource

Reimplemented from hk_dsvisible.

hk_datasource* datasource (void)

### datasource

Reimplemented from hk_dsvisible.

void savedata (ostream& s )

### savedata

[virtual]

Reimplemented from hk_dsvisible.

void loaddata (const hk_string& definition)

### loaddata

[virtual]

Reimplemented from hk_dsvisible.

bool use_defaultvalue (void)

### use_defaultvalue

true if the default value will be used while inserting a new row

void set_defaultvalue (const hk_string& def,bool registerchange=true)

### set_defaultvalue

sets the default value

    The following variables are available:
     %NOW% the actual date, time or datetime, depending on the fieldtype. Default ist datetime
     %NOWDATE% the actual date
     %NOWTIME% the actual time
     %TRUE% the driver specific true value.
     %FALSE% the driver specific false value.

Parameters:

def | the new default value
registerchange | if true and this widget is part of a form the new default value will be stored when closing the form.

hk_string raw_defaultvalue (void)

### raw_defaultvalue

Returns: the default value as set with set_defaultvalue

hk_string defaultvalue (void)

### defaultvalue

Returns: the default value, but variables are replaced by its values

void reset_default (bool registerchange=true)

### reset_default

resets the default value. After that no default value will be used

void set_numberformat (bool use_numberseparator=false, int commadigits=-1,bool registerchange=true)

### set_numberformat

void set_numberformat (bool use_numberseparator, int commadigits,bool registerchange,bool force_setting)

### set_numberformat

bool use_numberseparator (void)

### use_numberseparator

int commadigits (void)

### commadigits

int precision (void)

### precision

void set_defaultnumberformat (bool use_thousandsseparator,int precision)

### set_defaultnumberformat

[static]

bool defaultuse_numberseparator (void)

### defaultuse_numberseparator

[static]

int defaultprecision (void)

### defaultprecision

[static]

hk_string value_at (unsigned long row)

### value_at

[virtual]

returns the formatted value of the row 'row'

hk_string value (void)

### value

[virtual]

void set_value (const hk_string&)

### set_value

[virtual]

sets the display value. If this object has an existing column() the data will be changed

unsigned int find (unsigned int from,unsigned int to,const hk_string& searchtext,bool wholephrase=false,bool casesensitive=false,bool backwards=false)

### find

unsigned int find (const hk_string& searchtext,bool wholephrase=false,bool casesensitive=false,bool backwards=false)

### find

bool datasource_disable (void)

### datasource_disable

[protected virtual]

Reimplemented from hk_dsvisible.

bool datasource_enable (void)

### datasource_enable

[protected virtual]

Reimplemented from hk_dsvisible.

void datasource_delete (void)

### datasource_delete

[protected virtual]

Reimplemented from hk_dsvisible.

bool before_columns_deleted (void)

### before_columns_deleted

[protected virtual]

Reimplemented from hk_dsvisible.

void widget_specific_set_column (void)

### widget_specific_set_column

[protected virtual]

void widget_specific_numberformat (void)

### widget_specific_numberformat

[protected virtual]

void columndata_has_changed (void)

### columndata_has_changed

[protected virtual]

void before_insert_row (void)

### before_insert_row

[protected virtual]

Reimplemented from hk_dsvisible.

void new_column_pointer_created (void)

### new_column_pointer_created

[protected virtual]

hk_column* p_column

### p_column

[protected]

- Version: $Revision: 1.35 $
- Author: Horst Knorr (hk_classes@knoda.org) This is the base class for visible widgets that provides access to a specific column and its data. To use visible objects you have to define the datasource and the column.
- Generated: horst on horstnotebook on Tue Mar 30 19:06:43 2004, using kdoc 2.0a54.