#include <hk_presentation.h>
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_database * | database (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_datasource * | get_datasource (long nr) |
| hk_datasource * | get_datasource (const hk_string &description) |
| hk_datasource * | get_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_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 | 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 *) |
| virtual void | widget_specific_set_name (void) |
| 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 |
| void hk_presentation::set_database | ( | hk_database * | db | ) |
set the database which is base of this presentation
References hk_class::hkdebug(), and hk_database::presentation_add().
Referenced by hk_reportsection::set_subreport().
| void hk_presentation::set_name | ( | const hk_string & | n | ) |
name of the presentation under which it will be stored
Referenced by hk_form::load_form(), and hk_form::save_form().
| 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.
References hk_class::hkclassname(), hk_class::hkdebug(), and hk_datasource::set_name().
Referenced by loaddata().
| hk_datasource * hk_presentation::get_datasource | ( | long | nr | ) |
returns the datasource with the unique identification number nr
References hk_class::hkdebug().
Referenced by loaddata(), hk_datasource::set_depending_on_presentationdatasource(), hk_dscombobox::set_listpresentationdatasource(), and unique_datasourcename().
| hk_string hk_presentation::unique_datasourcename | ( | long | nr | ) |
returns a unique name for a datasource looks like : nameofdatasource (uniquenumber) [dependingondatasource] | filter
References hk_datasource::depending_on_presentationdatasource(), hk_datasource::filter(), get_datasource(), hk_datasource::name(), and hk_datasource::p_dscounter.
| void hk_presentation::savedata | ( | ostream & | s | ) | [virtual] |
stores the object's values to stream s. Especially used to store queries, forms and reports
Reimplemented from hk_dsvisible.
Reimplemented in hk_form, and hk_report.
References hk_class::end_mastertag(), hk_class::hk_translate(), hk_class::hkdebug(), hk_class::set_tagvalue(), and hk_class::start_mastertag().
Referenced by hk_report::savedata(), and hk_form::savedata().
| void hk_presentation::loaddata | ( | xmlNodePtr | definition | ) | [virtual] |
loads the object's values out of the definition string. Especially used to load queries, forms and reports
Reimplemented from hk_dsvisible.
Reimplemented in hk_form, and hk_report.
References clear_datasourcelist(), get_datasource(), hk_class::get_tagvalue(), hk_class::hk_translate(), hk_class::hkdebug(), hk_dsvisible::loaddata(), hk_datasource::loaddata(), new_datasource(), hk_datasource::p_dscounter, set_designsize(), hk_datasource::set_name(), and hk_class::show_warningmessage().
Referenced by hk_report::loaddata(), and hk_form::loaddata().
| void hk_presentation::clear_datasourcelist | ( | void | ) |
resets the internal datasourcelist and deletes all datasourceobjects except of "nodelete"
References hk_datasource::disable(), hk_class::hkdebug(), and hk_datasource::store_changed_data().
Referenced by loaddata().
| 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.
References hk_class::hkdebug().
Referenced by loaddata(), hk_form::set_designsize(), and hk_report::set_pageformat().
| void hk_presentation::set_automatic_enable_datasources | ( | bool | b | ) |
if true (default) all datasources will be automatically enabled when mode changes to viewmode else you have to enable the datasources manually
| void hk_presentation::before_source_vanishes | ( | void | ) | [protected, virtual] |
FOR WIDGET DEVELOPERS ONLY: will be automatically called before the database will be closed.(i.e when a new database will be created and the old one will be destroyed by hk_connection
Reimplemented from hk_dsvisible.
1.5.6