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

hk_dsdatavisible.h

00001 // ****************************************************************************
00002 // copyright (c) 2000-2004 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 using namespace std;
00015 class hk_column;
00016 class hk_form;
00017 class hk_dsdatavisibleprivate;
00027 class hk_dsdatavisible: public hk_dsvisible
00028 {
00029     friend class hk_column;
00030     public:
00031         hk_dsdatavisible(hk_presentation* p=NULL);
00032         virtual ~hk_dsdatavisible();
00040         void set_columnname(const hk_string& c,bool registerchange=true);
00041         void set_columnname(const hk_string& c, bool registerchange, int coloccurance);
00046         hk_column* column(void);
00047         hk_string columnname(void);
00051         virtual void set_datasource(hk_datasource* d);
00052         hk_datasource* datasource(void);
00053         virtual void savedata(ostream& s );
00054         virtual void loaddata(const hk_string& definition);
00058         bool    use_defaultvalue(void);
00072         void    set_defaultvalue(const hk_string& def,bool registerchange=true);
00076         hk_string raw_defaultvalue(void);
00080         hk_string defaultvalue(void);
00084         void    reset_default(bool registerchange=true);
00085 
00086         void    set_numberformat(bool use_numberseparator=false, int commadigits=-1,bool registerchange=true);
00087         void    set_numberformat(bool use_numberseparator, int commadigits,bool registerchange,bool force_setting);
00088         bool    use_numberseparator(void);
00092         int     commadigits(void);
00093         int precision(void);
00094         static void set_defaultnumberformat(bool use_thousandsseparator,int precision);
00095         static bool defaultuse_numberseparator(void);
00096         static int defaultprecision(void);
00100         virtual hk_string value_at(unsigned long row);
00101         virtual hk_string value(void);
00105         virtual void set_value(const hk_string&);
00106 
00107         unsigned int find(unsigned int from,unsigned int to,const hk_string& searchtext,bool wholephrase=false,bool casesensitive=false,bool backwards=false);
00108         unsigned int find(const hk_string& searchtext,bool wholephrase=false,bool casesensitive=false,bool backwards=false);
00109 
00110 
00111     protected:
00112 
00113         virtual bool datasource_disable(void);
00114         virtual bool datasource_enable(void);
00115         virtual void datasource_delete(void);
00116         virtual bool before_columns_deleted(void);
00117         virtual void widget_specific_set_column(void);
00118         virtual void widget_specific_numberformat(void);
00119         virtual void columndata_has_changed(void){}
00120         virtual void before_insert_row(void);
00121         virtual void new_column_pointer_created(void);
00122         virtual void    presentationmode_changed(void);
00123         hk_column* p_column;
00124 
00125     private:
00126 
00127         void set_column(void);
00128         bool           p_usedefault;
00129         bool           p_virginname;//used to find out whether to automatically set defaultvalues
00130         static  bool p_defaultthousandsseparator;
00131         static  int  p_defaultprecision;
00132         hk_dsdatavisibleprivate* p_designdata;
00133         hk_dsdatavisibleprivate* p_viewdata;
00134 
00135 
00136 }
00137 
00138 
00139 ;
00140 #endif

Generated on Tue Mar 22 19:28:08 2005 for Databaseconnectionclasses by  doxygen 1.4.1