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

hk_classes/hk_classes/hk_dsdatavisible.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_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_dsdatavisiblemodeprivate;
00018 class hk_dsdatavisibleprivate;
00028 class hk_dsdatavisible: public hk_dsvisible
00029 {
00030     friend class hk_column;
00031     public:
00032         hk_dsdatavisible(hk_presentation* p=NULL);
00033         virtual ~hk_dsdatavisible();
00041         void set_columnname(const hk_string& c,bool registerchange=true);
00042         void set_columnname(const hk_string& c, bool registerchange, int coloccurance);
00047         hk_column* column(void);
00048         hk_string columnname(void);
00052         virtual void set_datasource(hk_datasource* d);
00053         hk_datasource* datasource(void);
00054         virtual void savedata(ostream& s );
00055         virtual void loaddata(const hk_string& definition);
00059         bool    use_defaultvalue(void);
00073         void    set_defaultvalue(const hk_string& def,bool registerchange=true);
00077         hk_string raw_defaultvalue(void);
00081         hk_string defaultvalue(void);
00085         void    reset_default(bool registerchange=true);
00086 
00087         void    set_numberformat(bool use_numberseparator=false, int commadigits=-1,bool registerchange=true);
00088         void    set_numberformat(bool use_numberseparator, int commadigits,bool registerchange,bool force_setting);
00089         bool    use_numberseparator(void);
00093         int     commadigits(void);
00094         int precision(void);
00095         static void set_defaultnumberformat(bool use_thousandsseparator,int precision);
00096         static bool defaultuse_numberseparator(void);
00097         static int defaultprecision(void);
00101         virtual hk_string value_at(unsigned long row);
00102         virtual hk_string value(void);
00106         virtual void set_value(const hk_string&);
00107 
00108         unsigned int find(unsigned int from,unsigned int to,const hk_string& searchtext,bool wholephrase=false,bool casesensitive=false,bool backwards=false);
00109         unsigned int find(const hk_string& searchtext,bool wholephrase=false,bool casesensitive=false,bool backwards=false);
00110 
00111         void set_on_valuechanged_action(const hk_string&,bool registerchange=true,bool force_setting=true);
00112         hk_string on_valuechanged_action(void);
00113         virtual bool action_on_valuechanged(void);
00114     protected:
00118         void set_data_has_changed(void);
00119         virtual bool datasource_disable(void);
00120         virtual bool datasource_enable(void);
00121         virtual void datasource_delete(void);
00122         virtual bool before_columns_deleted(void);
00123         virtual void widget_specific_set_column(void);
00124         virtual void widget_specific_numberformat(void);
00125         virtual void columndata_has_changed(void){}
00126         virtual void before_insert_row(void);
00127         virtual void new_column_pointer_created(void);
00128         virtual bool    presentationmode_changed(void);
00129         hk_column* p_column;
00130 
00131     private:
00132 
00133         void set_column(void);
00134         bool           p_virginname;//used to find out whether to automatically set defaultvalues
00135         static  bool p_defaultthousandsseparator;
00136         static  int  p_defaultprecision;
00137         hk_dsdatavisiblemodeprivate* p_designdata;
00138         hk_dsdatavisiblemodeprivate* p_viewdata;
00139         hk_dsdatavisibleprivate* p_private;
00140 
00141 
00142 }
00143 
00144 
00145 ;
00146 #endif

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