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

hk_classes/hk_classes/hk_dsvisible.h

Go to the documentation of this file.
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;
00031 class hk_dsvisible:public hk_visible
00032 
00033 {
00034     friend class hk_datasource;
00035     public:
00036         hk_dsvisible(hk_presentation* presentation=NULL);
00037         virtual         ~hk_dsvisible(void);
00038         virtual void        set_datasource(hk_datasource* d);
00039         virtual bool        set_presentationdatasource(long n, bool registerchange=true);
00040         long        presentationdatasource(void);
00041         hk_datasource*  datasource(void);
00042         virtual void savedata(ostream& s, bool savedatasource,bool saveall);
00043         virtual void savedata(ostream& s  );
00044         virtual void loaddata(const hk_string& definition);
00045         void    set_readonly(bool readonly);
00046         bool    is_readonly(void) const;
00051         void set_before_row_change_action(const hk_string&, bool registerchange=true,bool force_setting=true);
00052         hk_string before_row_change_action(void);
00057         void set_after_row_change_action(const hk_string&, bool registerchange=true,bool force_setting=true);
00058         hk_string after_row_change_action(void);
00063         void set_before_update_action(const hk_string&, bool registerchange=true,bool force_setting=true);
00064         hk_string before_update_action(void);
00069         void set_after_update_action(const hk_string&, bool registerchange=true,bool force_setting=true);
00070         hk_string after_update_action(void);
00075         void set_before_delete_action(const hk_string&, bool registerchange=true,bool force_setting=true);
00076         hk_string before_delete_action(void);
00081         void set_after_delete_action(const hk_string&, bool registerchange=true,bool force_setting=true);
00082         hk_string after_delete_action(void);
00087         void set_before_insert_action(const hk_string&, bool registerchange=true,bool force_setting=true);
00088         hk_string before_insert_action(void);
00093         void set_after_insert_action(const hk_string&, bool registerchange=true,bool force_setting=true);
00094         hk_string after_insert_action(void);
00095 
00096 
00097 
00098 
00099 virtual void action_before_store_changed_data(void);
00100 virtual void action_after_store_changed_data(void);
00101 virtual void action_before_row_change(void);
00102 virtual void action_after_row_change(void);
00103 virtual void action_before_delete(void);
00104 virtual void action_after_delete(void);
00105 virtual void action_before_insert(void);
00106 virtual void action_after_insert(void);
00107 
00108 
00109 
00110 
00111 
00112     protected:
00113         void        row_change(void);
00114         void        batch_next(void);
00115         void        batch_previous(void);
00116 
00117         void        insert_mode(void);
00125         virtual void        widget_specific_insert_mode(void){}
00133         virtual bool        widget_specific_row_change(void) {return false;}
00134         virtual void        widget_specific_batch_next(void) {}
00135         virtual void        widget_specific_batch_previous(void) {}
00141         virtual void        widget_specific_enable_disable(void){}
00142         virtual void        widget_specific_enable(void){}
00143         virtual void        widget_specific_disable(void){}
00144         virtual void        widget_specific_row_added(void){}
00145         virtual void        widget_specific_row_deleted(void){}
00151         virtual void        before_row_change(void);
00152         virtual void        before_store_changed_data(void);
00153         virtual void        after_store_changed_data(void);
00154         virtual void        before_insert_row(void){}
00155         virtual void        before_datasource_enables(void){}
00160         virtual bool        datasource_disable(void);
00165         virtual bool        datasource_enable(void);
00170         virtual void        datasource_delete(void);
00177         virtual void        row_added(void);
00178         virtual void        row_deleted(void);
00179         virtual bool        columns_new_created(void){return true;}
00180         virtual void        list_changes(listtype type);
00189         virtual bool        before_columns_deleted(void){return true;}
00195         virtual bool        table_structure_changes(void){return true;}
00202         virtual void        before_source_vanishes(void);
00208         virtual void        widget_specific_presentationdatasource(long){}
00209         virtual bool    presentationmode_changed(void);
00210         hk_datasource*  p_datasource;
00211         hk_datetime p_date;
00212 #ifdef HK_DEBUG
00213         hk_string   debug_p_columnname;
00214 #endif
00215 
00216 
00217 
00218     private:
00219         hk_dsvisiblemodeprivate* p_designdata;
00220         hk_dsvisiblemodeprivate* p_viewdata;
00221         hk_dsvisibleprivate* p_private;
00222 //p_already_handled  is used from hk_datasource in bulk operations to find out if this object has been already handled.
00223         bool    p_already_handled;
00224 
00225 };
00226 #endif

Generated on Thu Mar 9 18:40:40 2006 for hk_classes by  doxygen 1.4.1