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

hk_dscombobox.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_DSCOMBOBOX
00012 #define HK_DSCOMBOBOX
00013 #include "hk_dsdatavisible.h"
00014 using namespace std;
00015 class hk_listvisible;
00029 class hk_dscombobox:public hk_dsdatavisible
00030 {
00031     public:
00032         hk_dscombobox(hk_form* form=NULL);
00033 virtual        ~hk_dscombobox();
00040         void    set_listdatasource(hk_datasource* list);
00041         hk_datasource* listdatasource(void);
00042         virtual void set_datasource(hk_datasource* d);
00043 
00047         void    set_viewcolumnname(const hk_string& viewcolumn,bool registerchange=true);
00048         hk_string  viewcolumnname(void);
00052         void    set_listcolumnname(const hk_string& listcolumn,bool registerchange=true);
00053         hk_string listcolumnname(void);
00054         virtual void savedata(ostream& s );
00055         virtual void loaddata(const hk_string& definition);
00059         virtual bool        set_listpresentationdatasource(long n, bool registerchange=true);
00060         long        listpresentationdatasource(void);
00061         virtual void  load_listitems(void){}
00066         enum enum_mode{combo,combo_noedit,selector};
00067         void set_mode(enum_mode);
00068         enum_mode mode(void);
00069 
00070         hk_string     value_at(unsigned long);
00071         
00072         hk_column* viewcolumn(void);
00073         hk_column* listcolumn(void);
00074     
00075     
00076     protected:
00077         bool    datasource_enable(void);
00078         bool    datasource_disable(void);
00079         virtual bool    widget_specific_row_change(void);
00080         virtual void    widget_specific_mode_change(void){}
00081         virtual void    after_store_changed_data(void);
00082         virtual void columndata_has_changed(void);
00083     private:
00084         hk_listvisible* p_listvisible;
00085         long p_listdatasource;
00086         enum_mode p_mode;
00087 
00088 };
00089 #endif

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