11 #ifndef HK_PRESENTATION
12 #define HK_PRESENTATION
16 #include "hk_dsmodevisible.h"
19 #include "hk_datasource.h"
20 #include "hk_interpreter.h"
55 enum enum_presentationtype {general,form,report,qbe,referentialintegrity};
56 enum_presentationtype presentationtype(
void)
const {
return p_presentationtype;}
60 void set_name(
const hk_string& n);
61 hk_string name(
void)
const;
62 virtual bool set_mode(enum_mode s);
67 list<hk_datasource*>* datasources(
void)
const;
72 long new_datasource(
const hk_string& name,datasourcetype dt=dt_table);
78 hk_datasource* get_datasource_by_shortname(
const hk_string& description);
83 hk_string unique_datasourcename(
long nr);
84 hk_string unique_shortdatasourcename(
long nr);
86 virtual void loaddata(xmlNodePtr definition);
90 void clear_datasourcelist(
void);
95 void set_designsize(
unsigned int width,
unsigned int height,
bool registerchange=
true);
96 virtual void set_presentationsize(
unsigned int,
unsigned int);
97 unsigned int designwidth(
void);
98 unsigned int designheight(
void);
100 unsigned int horizontal2relativ(
unsigned int h);
101 unsigned int vertical2relativ(
unsigned int v);
102 unsigned int relativ2horizontal(
unsigned int r);
103 unsigned int relativ2vertical(
unsigned int r);
109 void set_automatic_enable_datasources(
bool);
110 bool automatic_enable_datasources(
void);
111 enum enum_bulkoperation {bulkfont,bulkforeground,bulkbackground};
112 virtual void bulk_operation(enum_bulkoperation bulkoperation);
113 enum enum_sizetype {relative,absolute};
114 void set_sizetype(enum_sizetype type,
bool registerchange=
true);
115 enum_sizetype sizetype(
void);
116 static void set_defaultsizetype(enum_sizetype type);
117 static enum_sizetype defaultsizetype(
void);
118 static void set_snap2gridx(
int);
119 static int snap2gridx(
void) ;
120 static void set_snap2gridy(
int);
121 static int snap2gridy(
void) ;
125 virtual void script_error(
hk_visible*, hk_interpreter::enum_action){}
126 void set_interpretername(
const hk_string&,
bool registerchange=
true);
127 hk_string interpretername(
void)
const;
129 virtual bool is_subpresentation(
void);
130 virtual bool while_loading(
void){
return false;}
131 virtual bool intervaltasks(
void) {
return true;}
133 bool load_module(
const hk_string& modulename);
136 void remove_datasource(
long nr,
bool registerchange=
true);
137 virtual void widget_specific_presentationresize(
void){}
138 virtual void widget_specific_fieldresize(
hk_visible* ){}
139 virtual void widget_specific_set_name(
void){}
140 enum_presentationtype p_presentationtype;
141 void database_delete(
void);
143 virtual void database_has_vanished(
void);
144 void before_source_vanishes(
void);
149 unsigned int p_actualwidth;
150 unsigned int p_actualheight;
151 bool p_while_errorhandling;
152 virtual void sizetype_changed(
void);
155 void remove_datasource(
hk_datasource* d,
bool registerchange);
158 static enum_sizetype p_defaultsizetype;
159 static int p_snap_to_gridx;
160 static int p_snap_to_gridy;
enum_accessmode
Definition: hk_datasource.h:187
represents a particular database on the SQL Server
Definition: hk_database.h:48
base class for visible widgets without column data connection
Definition: hk_dsvisible.h:31
Definition: hk_dsmodevisible.h:17
represents a resultquery or a table of a database.
Definition: hk_datasource.h:45
base class for visible widgets
Definition: hk_visible.h:35
virtual void lower_widget(bool registerchange=true)
Definition: hk_visible.cpp:1056
base class for multidatasource based classes like forms and reports
Definition: hk_presentation.h:40
virtual void raise_widget(bool registerchange=true)
Definition: hk_visible.cpp:1064
basic class for script handling
Definition: hk_interpreter.h:44
Definition: hk_presentation.cpp:23
virtual void loaddata(xmlNodePtr definition)
Definition: hk_visible.cpp:555
virtual void savedata(ostream &s)
Definition: hk_visible.cpp:480