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

hk_dsgridcolumn.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_DSGRIDCOLUMN_H
00012 #define HK_DSGRIDCOLUMN_H
00013 #include "hk_dsdatavisible.h"
00014 using namespace std;
00015 class hk_column;
00016 class hk_dsgrid;
00017 class hk_dscombobox;
00018 const int default_cellwidth=100;
00019 const int default_cellheight=20;
00020 
00028 class  hk_dsgridcolumn :public hk_dsdatavisible
00029 {
00030     friend class hk_dsgrid;
00031     public:
00032         enum  enum_columntype{columnedit,columnbool,columncombo};
00033         hk_dsgridcolumn(void);
00034         virtual ~hk_dsgridcolumn(void);
00038         void  set_displayname(hk_string,bool registerchange=true);
00039         hk_string displayname(void);
00044         void set_columntype(enum_columntype,bool registerchange=true);
00045         enum_columntype columntype(void);
00049         void set_columnwidth(int ,bool registerchange=true);
00050         int columnwidth(void);
00051         virtual   void  savedata(ostream& s);
00052         virtual   void loaddata(const hk_string& definition);
00053 
00060         void    set_listdatasource(const hk_string& datasourcename,datasourcetype dt=dt_table, bool registerchange=true);
00061         hk_datasource* listdatasource(void);
00062         hk_string      listdatasourcename(void);
00063         datasourcetype listdatasourcetype() const;
00067         void    set_viewcolumnname(const hk_string& viewcolumn,bool registerchange=true);
00068         hk_string  viewcolumnname(void);
00072         void    set_listcolumnname(const hk_string& listcolumn,bool registerchange=true);
00073         hk_string listcolumnname(void);
00074 
00078         virtual bool        set_listpresentationdatasource(long n, bool registerchange=true);
00079         long        listpresentationdatasource(void);
00080         hk_string   value_at(unsigned long);
00081 
00082         virtual void set_datasource(hk_datasource*);
00083         hk_dscombobox* combobox(void);
00084         
00085         unsigned int find(unsigned int from,unsigned int to,const hk_string& searchtext,bool wholephrase=false,bool casesensitive=false,bool backwards=false);
00086         bool is_findstring(unsigned int pos,const hk_string& searchtext,bool wholephrase=false,bool casesensitive=false);
00087 
00088     private:
00089         void set_grid(hk_dsgrid*);
00090         void set_combovalues(void);
00091         hk_string p_displayname;
00092         hk_string     p_comboviewcolumnname;
00093         hk_string p_combolistcolumnname;
00094         long      p_combopresentationdatasource;
00095         hk_string p_combolistdatasourcename;
00096         datasourcetype      p_combolistdatasourcetype;
00097 
00098         enum_columntype   p_columntype;
00099         int       p_columnwidth;
00100         hk_dsgrid* p_grid;
00101         hk_dscombobox* p_combobox;
00102 
00103 };
00104 #endif

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