hk_dsdatavisible.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_DSDATAVISIBLE
00012 #define HK_DSDATAVISIBLE
00013 #include "hk_dsvisible.h"
00014 #include <vector>
00015 using namespace std;
00016 class hk_column;
00017 class hk_form;
00018 class hk_dsdatavisiblemodeprivate;
00019 class hk_dsdatavisibleprivate;
00020 
00021 
00022 
00032 class hk_dsdatavisible: public hk_dsvisible
00033 {
00034     friend class hk_column;
00035     public:
00036         hk_dsdatavisible(hk_presentation* p=NULL);
00037         virtual ~hk_dsdatavisible();
00045         void set_columnname(const hk_string& c,bool registerchange=true);
00046         void set_columnname(const hk_string& c, bool registerchange, int coloccurance);
00051         hk_column* column(void);
00052         hk_string columnname(void) const;
00056         virtual void set_datasource(hk_datasource* d);
00057         hk_datasource* datasource(void);
00058         virtual void savedata(ostream& s );
00059         virtual void loaddata(xmlNodePtr definition);
00063         bool    use_defaultvalue(void);
00077         void    set_defaultvalue(const hk_string& def,bool registerchange=true);
00081         hk_string raw_defaultvalue(void);
00085         hk_string defaultvalue(void);
00089         void    reset_default(bool registerchange=true);
00090 
00091         void    set_numberformat(bool use_numberseparator=false, int commadigits=-1,bool registerchange=true);
00092         void    set_numberformat(bool use_numberseparator, int commadigits,bool registerchange,bool force_setting);
00093         bool    use_numberseparator(void);
00097         int     commadigits(void);
00098         int precision(void);
00099         static void set_defaultnumberformat(bool use_thousandsseparator,int precision);
00100         static bool defaultuse_numberseparator(void);
00101         static int defaultprecision(void);
00105         virtual hk_string value_at(unsigned long row);
00106         virtual hk_string value(void);
00110         virtual void set_value(const hk_string&);
00111 
00112         unsigned int find(unsigned int from,unsigned int to,const hk_string& searchtext,bool wholephrase=false,bool casesensitive=false,bool backwards=false);
00113         unsigned int find(const hk_string& searchtext,bool wholephrase=false,bool casesensitive=false,bool backwards=false);
00114 
00115         void set_on_valuechanged_action(const hk_string&,bool registerchange=true,bool force_setting=true);
00116         hk_string on_valuechanged_action(void);
00117         virtual bool action_on_valuechanged(void);
00118     
00119     virtual hk_string tag_value(int tagnumber, bool& ok);
00120 bool set_filtervalue(const hk_string&);
00121  hk_string filtervalue(bool withcolumnnames=false) const;
00122 
00123         static bool parsed_value(hk_string& v,hk_connection* c);
00124     protected:
00128         void set_data_has_changed(void);
00129         virtual bool datasource_disable(void);
00130         virtual bool datasource_enable(void);
00131         virtual void datasource_delete(void);
00132         virtual bool before_columns_deleted(void);
00133         virtual void widget_specific_set_column(void);
00134         virtual void widget_specific_numberformat(void);
00135         virtual void columndata_has_changed(void){}
00136         virtual void before_insert_row(void);
00137         virtual void new_column_pointer_created(void);
00138         virtual bool    presentationmode_changed(void);
00139         hk_column* p_column;
00140 
00141     private:
00142         void set_column(void);
00143         bool           p_virginname;//used to find out whether to automatically set defaultvalues
00144         static  bool p_defaultthousandsseparator;
00145         static  int  p_defaultprecision;
00146         hk_dsdatavisiblemodeprivate* p_designdata;
00147         hk_dsdatavisiblemodeprivate* p_viewdata;
00148         hk_dsdatavisibleprivate* p_private;
00149 
00150 
00151 }
00152 
00153 
00154 ;
00155 #endif

Generated on Tue Nov 28 02:48:08 2006 for Databaseconnectionclasses by  doxygen 1.5.0