# class hk_presentation

base class for multidatasource based classes like forms and reports. More...

Internal Use Only
Definition | `#include <hk_classes/hk_classes/hk_presentation.h>`
Inherits | hk_dsmodevisible [public ]
Inherited by | hk_form, hk_kdesimpleform, hk_kdesimplereport, hk_report
List of all Methods

Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

- enum enum_presentationtype {general,form,report}
- enum enum_bulkoperation {bulkfont,bulkforeground,bulkbackground}
- enum enum_sizetype {relative,absolute}

#### Public Methods

- hk_presentation (void)
- virtual ~hk_presentation (void)
- void set_database (hk_database* db)
- hk_database* database (void)
- enum_presentationtype presentationtype (void) const
- void set_name (const hk_string& n)
- hk_string name (void)
- virtual bool set_mode (enum_mode s)
- list<hk_datasource*>* datasources (void)
- long new_datasource (const hk_string& name,bool query=false)
- hk_datasource* get_datasource (long nr)
- hk_datasource* get_datasource (const hk_string& description)
- hk_string unique_datasourcename (long nr)
- virtual void savedata (ostream& s)
- virtual void loaddata (const hk_string& definition)
- void clear_datasourcelist (void)
- bool has_changed (void)
- void has_changed (bool registerchange)
- void set_designsize (unsigned int width, unsigned int height,bool registerchange=true)
- virtual void set_presentationsize (unsigned int,unsigned int)
- unsigned int designwidth (void)
- unsigned int designheight (void)
- unsigned int horizontal2relativ (unsigned int h)
- unsigned int vertical2relativ (unsigned int v)
- unsigned int relativ2horizontal (unsigned int r)
- unsigned int relativ2vertical (unsigned int r)
- virtual void register_object (hk_visible*)
- void set_automatic_enable_datasources (bool)
- bool automatic_enable_datasources (void)
- virtual void bulk_operation (enum_bulkoperation bulkoperation)
- void set_sizetype (enum_sizetype type,bool registerchange=true)
- enum_sizetype sizetype (void)
- hk_interpreter* interpreter (void)
- virtual void script_error (hk_visible*, hk_interpreter::enum_action)
- void set_interpretername (const hk_string&,bool registerchange=true)
- hk_string interpretername (void) const
- void reset_has_changed (void)

#### Public Static Methods

- static void set_defaultsizetype (enum_sizetype type)
- static enum_sizetype defaultsizetype (void)
- static void set_snap2gridx (int)
- static int snap2gridx (void)
- static void set_snap2gridy (int)
- static int snap2gridy (void)

#### Protected Methods

- void remove_datasource (long nr)
- void set_has_changed (void)
- virtual void widget_specific_presentationresize (void)
- virtual void widget_specific_fieldresize (hk_visible* )
- void database_delete (void)
- virtual void database_has_vanished (void)
- void before_source_vanishes (void)
- bool ask_name (void)
- virtual void raise_widget (hk_visible*)
- virtual void lower_widget (hk_visible*)
- void enable_datasources (bool enable,hk_datasource::enum_accessmode mode=hk_datasource::standard)
- virtual void sizetype_changed (void)

#### Protected Members

- enum_presentationtype p_presentationtype
- unsigned int p_actualwidth
- unsigned int p_actualheight

## Detailed Description

hk_presentation is the base class for multidatasource based classes like forms and reports. A presentation can be designed when mode is 'design' or the data will be presented when mode is 'view'.

In 'design' mode you can create new datasource by calling the function new_datasource. Each datasource get's a unique number (see hk_datasource::presentationnumber) with which you can identifiy each datasource. All used datasources will be automatically enabled when the presentation is in 'view'-mode.

hk_presentation (void)

### hk_presentation

~hk_presentation (void)

### ~hk_presentation

[virtual]

void set_database (hk_database* db)

### set_database

set the database which is base of this presentation

hk_database* database (void)

### database

enum enum_presentationtype {general,form,report}

### enum_presentationtype

enum_presentationtype presentationtype (void)

### presentationtype

[const]

void set_name (const hk_string& n)

### set_name

name of the presentation under which it will be stored

hk_string name (void)

### name

bool set_mode (enum_mode s)

### set_mode

[virtual]

list<hk_datasource*>* datasources (void)

### datasources

a list of all existing datasources in this presentation

long new_datasource (const hk_string& name,bool query=false)

### new_datasource

loads an existing datasource "name". if query=false this datasource is a table else a query.

Returns: each presentationdatasource gets a unique number as an identifier.

hk_datasource* get_datasource (long nr)

### get_datasource

returns the datasource with the unique identification number nr

hk_datasource* get_datasource (const hk_string& description)

### get_datasource

hk_string unique_datasourcename (long nr)

### unique_datasourcename

returns a unique name for a datasource looks like : nameofdatasource (uniquenumber) [dependingondatasource] | filter

void savedata (ostream& s)

### savedata

[virtual]

void loaddata (const hk_string& definition)

### loaddata

[virtual]

void clear_datasourcelist (void)

### clear_datasourcelist

resets the internal datasourcelist and deletes all datasourceobjects except of "nodelete"

bool has_changed (void)

### has_changed

Returns: true if the presentation has changed (i.e. a datasource has been created or deleted )

void has_changed (bool registerchange)

### has_changed

void set_designsize (unsigned int width, unsigned int height,bool registerchange=true)

### set_designsize

sets the logic size of the form.

void set_presentationsize (unsigned int,unsigned int)

### set_presentationsize

[virtual]

unsigned int designwidth (void)

### designwidth

unsigned int designheight (void)

### designheight

unsigned int horizontal2relativ (unsigned int h)

### horizontal2relativ

unsigned int vertical2relativ (unsigned int v)

### vertical2relativ

unsigned int relativ2horizontal (unsigned int r)

### relativ2horizontal

unsigned int relativ2vertical (unsigned int r)

### relativ2vertical

void register_object (hk_visible*)

### register_object

[virtual]

void set_automatic_enable_datasources (bool)

### set_automatic_enable_datasources

if true (default) all datasources will be automatically enabled when mode changes to viewmode else you have to enable the datasources manually

bool automatic_enable_datasources (void)

### automatic_enable_datasources

enum enum_bulkoperation {bulkfont,bulkforeground,bulkbackground}

### enum_bulkoperation

void bulk_operation (enum_bulkoperation bulkoperation)

### bulk_operation

[virtual]

enum enum_sizetype {relative,absolute}

### enum_sizetype

void set_sizetype (enum_sizetype type,bool registerchange=true)

### set_sizetype

enum_sizetype sizetype (void)

### sizetype

void set_defaultsizetype (enum_sizetype type)

### set_defaultsizetype

[static]

enum_sizetype defaultsizetype (void)

### defaultsizetype

[static]

void set_snap2gridx (int)

### set_snap2gridx

[static]

int snap2gridx (void)

### snap2gridx

[static]

void set_snap2gridy (int)

### set_snap2gridy

[static]

int snap2gridy (void)

### snap2gridy

[static]

hk_interpreter* interpreter (void)

### interpreter

void script_error (hk_visible*, hk_interpreter::enum_action)

### script_error

[virtual]

void set_interpretername (const hk_string&,bool registerchange=true)

### set_interpretername

hk_string interpretername (void)

### interpretername

[const]

void reset_has_changed (void)

### reset_has_changed

void remove_datasource (long nr)

### remove_datasource

[protected]

void set_has_changed (void)

### set_has_changed

[protected]

void widget_specific_presentationresize (void)

### widget_specific_presentationresize

[protected virtual]

void widget_specific_fieldresize (hk_visible* )

### widget_specific_fieldresize

[protected virtual]

enum_presentationtype p_presentationtype

### p_presentationtype

[protected]

void database_delete (void)

### database_delete

[protected]

void database_has_vanished (void)

### database_has_vanished

[protected virtual]

void before_source_vanishes (void)

### before_source_vanishes

[protected]

bool ask_name (void)

### ask_name

[protected]

void raise_widget (hk_visible*)

### raise_widget

[protected virtual]

void lower_widget (hk_visible*)

### lower_widget

[protected virtual]

unsigned int p_actualwidth

### p_actualwidth

[protected]

unsigned int p_actualheight

### p_actualheight

[protected]

void enable_datasources (bool enable,hk_datasource::enum_accessmode mode=hk_datasource::standard)

### enable_datasources

[protected]

void sizetype_changed (void)

### sizetype_changed

[protected virtual]

- Version: $Revision: 1.41 $
- Author: Horst Knorr (hk_classes@knoda.org)
- Generated: horst on horstnotebook on Tue Mar 30 19:06:43 2004, using kdoc 2.0a54.