hk_presentation Class Reference

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

#include <hk_presentation.h>

Inheritance diagram for hk_presentation:

Inheritance graph
[legend]
List of all members.

Public Types

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

Public Member Functions

void set_database (hk_database *db)
hk_databasedatabase (void) const
enum_presentationtype presentationtype (void) const
void set_name (const hk_string &n)
hk_string name (void) const
virtual bool set_mode (enum_mode s)
list< hk_datasource * > * datasources (void) const
long new_datasource (const hk_string &name, datasourcetype dt=dt_table)
hk_datasourceget_datasource (long nr)
hk_datasourceget_datasource (const hk_string &description)
hk_datasourceget_datasource_by_shortname (const hk_string &description)
hk_string unique_datasourcename (long nr)
hk_string unique_shortdatasourcename (long nr)
virtual void savedata (ostream &s)
virtual void loaddata (xmlNodePtr definition)
void clear_datasourcelist (void)
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_interpreterinterpreter (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 enable_datasources (bool enable, hk_datasource::enum_accessmode mode=hk_datasource::standard)
virtual bool is_subpresentation (void)
virtual bool while_loading (void)
virtual bool intervaltasks (void)
bool load_module (const hk_string &modulename)

Static Public Member Functions

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 Member Functions

void remove_datasource (long nr, bool registerchange=true)
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 *)
virtual void sizetype_changed (void)

Protected Attributes

enum_presentationtype p_presentationtype
unsigned int p_actualwidth
unsigned int p_actualheight
bool p_while_errorhandling

Friends

class hk_datasource
class hk_database
class hk_dsvisible
class hk_visible

Detailed Description

base class for multidatasource based classes like forms and reports

Version:
Revision
1.55
Author:
Horst Knorr (hk_classes@knoda.org)


Member Function Documentation

void hk_presentation::set_database ( hk_database db  ) 

set the database which is base of this presentation

void hk_presentation::set_name ( const hk_string &  n  ) 

name of the presentation under which it will be stored

list< hk_datasource * > * hk_presentation::datasources ( void   )  const

a list of all existing datasources in this presentation

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

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 * hk_presentation::get_datasource ( long  nr  ) 

returns the datasource with the unique identification number nr

hk_string hk_presentation::unique_datasourcename ( long  nr  ) 

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

void hk_presentation::clear_datasourcelist ( void   ) 

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

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

sets the logic size of the form.

Reimplemented in hk_form.

void hk_presentation::set_automatic_enable_datasources ( bool   ) 

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


The documentation for this class was generated from the following files:
Generated on Tue Nov 28 02:48:38 2006 for Databaseconnectionclasses by  doxygen 1.5.0