Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

hk_dsvisible.h

00001 // ****************************************************************************
00002 // copyright (c) 2000-2005 Horst Knorr <hk_classes@knoda.org>
00003 // This file is part of the hk_classes library.
00004 // This file may be distributed and/or modified under the terms of the
00005 // GNU Library Public License version 2 as published by the Free Software
00006 // Foundation and appearing in the file COPYING included in the
00007 // packaging of this file.
00008 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00009 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00010 // ****************************************************************************
00011 #ifndef  HK_DSVISIBLE
00012 #define  HK_DSVISIBLE
00013 #include "hk_definitions.h"
00014 #include "hk_visible.h"
00015 #include "hk_datetime.h"
00016 
00017 using namespace std;
00018 class hk_datasource;
00019 class hk_dsvisiblemodeprivate;
00020 class hk_dsvisibleprivate;
00021 class hk_datasource;
00022 class hk_reportsectionpair;
00023 
00034 class hk_dsvisible:public hk_visible
00035 
00036 {
00037     friend class hk_datasource;
00038     public:
00039         hk_dsvisible(hk_presentation* presentation=NULL);
00040         virtual         ~hk_dsvisible(void);
00041         virtual void        set_datasource(hk_datasource* d);
00042         virtual bool        set_presentationdatasource(long n, bool registerchange=true);
00043         long        presentationdatasource(void);
00044         hk_datasource*  datasource(void);
00045         virtual void savedata(ostream& s, bool savedatasource,bool saveall);
00046         virtual void savedata(ostream& s  );
00047         virtual void loaddata(const hk_string& definition);
00048         void    set_readonly(bool readonly);
00049         bool    is_readonly(void) const;
00054         void set_before_row_change_action(const hk_string&, bool registerchange=true,bool force_setting=true);
00055         hk_string before_row_change_action(void);
00060         void set_after_row_change_action(const hk_string&, bool registerchange=true,bool force_setting=true);
00061         hk_string after_row_change_action(void);
00066         void set_before_update_action(const hk_string&, bool registerchange=true,bool force_setting=true);
00067         hk_string before_update_action(void);
00072         void set_after_update_action(const hk_string&, bool registerchange=true,bool force_setting=true);
00073         hk_string after_update_action(void);
00078         void set_before_delete_action(const hk_string&, bool registerchange=true,bool force_setting=true);
00079         hk_string before_delete_action(void);
00084         void set_after_delete_action(const hk_string&, bool registerchange=true,bool force_setting=true);
00085         hk_string after_delete_action(void);
00090         void set_before_insert_action(const hk_string&, bool registerchange=true,bool force_setting=true);
00091         hk_string before_insert_action(void);
00096         void set_after_insert_action(const hk_string&, bool registerchange=true,bool force_setting=true);
00097         hk_string after_insert_action(void);
00098 
00099 
00100 
00101 
00102 virtual void action_before_store_changed_data(void);
00103 virtual void action_after_store_changed_data(void);
00104 virtual void action_before_row_change(void);
00105 virtual void action_after_row_change(void);
00106 virtual void action_before_delete(void);
00107 virtual void action_after_delete(void);
00108 virtual void action_before_insert(void);
00109 virtual void action_after_insert(void);
00110 
00111 
00112 
00113 
00114 
00115     protected:
00116         void        row_change(void);
00117         void        batch_next(void);
00118         void        batch_previous(void);
00119 
00120         void        insert_mode(void);
00128         virtual void        widget_specific_insert_mode(void){}
00136         virtual bool        widget_specific_row_change(void) {return false;}
00137         virtual void        widget_specific_batch_next(void) {}
00138         virtual void        widget_specific_batch_previous(void) {}
00144         virtual void        widget_specific_enable_disable(void){}
00145         virtual void        widget_specific_enable(void){}
00146         virtual void        widget_specific_disable(void){}
00147         virtual void        widget_specific_row_added(void){}
00148         virtual void        widget_specific_row_deleted(void){}
00154         virtual void        before_row_change(void);
00155         virtual void        before_store_changed_data(void);
00156         virtual void        after_store_changed_data(void);
00157         virtual void        before_insert_row(void){}
00158         virtual void        before_datasource_enables(void){}
00163         virtual bool        datasource_disable(void);
00168         virtual bool        datasource_enable(void);
00173         virtual void        datasource_delete(void);
00180         virtual void        row_added(void);
00181         virtual void        row_deleted(void);
00182         virtual bool        columns_new_created(void){return true;}
00183         virtual void        list_changes(listtype type);
00192         virtual bool        before_columns_deleted(void){return true;}
00198         virtual bool        table_structure_changes(void){return true;}
00205         virtual void        before_source_vanishes(void);
00211         virtual void        widget_specific_presentationdatasource(long){}
00212         virtual bool    presentationmode_changed(void);
00213         hk_datasource*  p_datasource;
00214         hk_datetime p_date;
00215 #ifdef HK_DEBUG
00216         hk_string   debug_p_columnname;
00217 #endif
00218 
00219 
00220 
00221     private:
00222         hk_dsvisiblemodeprivate* p_designdata;
00223         hk_dsvisiblemodeprivate* p_viewdata;
00224         hk_dsvisibleprivate* p_private;
00225 //p_already_handled  is used from hk_datasource in bulk operations to find out if this object has been already handled.
00226         bool    p_already_handled;
00227 
00228 };
00229 #endif

Generated on Tue Sep 13 00:58:20 2005 for Databaseconnectionclasses by  doxygen 1.4.4