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>
Inheritshk_dsmodevisible [public ]
Inherited byhk_form, hk_kdesimpleform, hk_kdesimplereport, hk_report
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Public Static Methods

Protected Methods

Protected Members


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

[const]

enum enum_presentationtype {general,form,report,qbe}

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

[const]

bool  set_mode (enum_mode s)

set_mode

[virtual]

list<hk_datasource*>*  datasources (void)

datasources

[const]

a list of all existing datasources in this presentation

long  new_datasource (const hk_string& name,datasourcetype dt=dt_table)

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_datasource*  get_datasource_by_shortname (const hk_string& description)

get_datasource_by_shortname

hk_string  unique_datasourcename (long nr)

unique_datasourcename

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

hk_string  unique_shortdatasourcename (long nr)

unique_shortdatasourcename

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"

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  enable_datasources (bool enable,hk_datasource::enum_accessmode mode=hk_datasource::standard)

enable_datasources

void  remove_datasource (long nr, bool registerchange=true)

remove_datasource

[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  sizetype_changed (void)

sizetype_changed

[protected virtual]