<HTML> <HEAD> <TITLE>Source: hk_classes/hk_classes/hk_dsgridcolumn.h</TITLE> <META NAME="Generator" CONTENT="KDOC "> </HEAD> <BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= "#ffffff"> <TABLE WIDTH="100%" BORDER="0"> <TR> <TD> <TABLE BORDER="0"> <TR><TD valign="top" align="left" cellspacing="10"> <h1>Source: hk_classes/hk_classes/hk_dsgridcolumn.h</h1> </TD> <TD valign="top" align="right" colspan="1"></TD></TR> </TABLE> <HR> <TABLE BORDER="0"> </TABLE> </TD> <TD align="right"><TABLE BORDER="0"><TR><TD><small><A HREF="index-long.html">Annotated List</A></small></TD></TR> <TR><TD><small><A HREF="header-list.html">Files</A></small></TD></TR> <TR><TD><small><A HREF="all-globals.html">Globals</A></small></TD></TR> <TR><TD><small><A HREF="hier.html">Hierarchy</A></small></TD></TR> <TR><TD><small><A HREF="index.html">Index</A></small></TD></TR> </TABLE></TD></TR></TABLE> <pre> // **************************************************************************** // copyright (c) 2000-2002 Horst Knorr <hk_classes@knoda.org> // This file is part of the hk_classes library. // This file may be distributed and/or modified under the terms of the // GNU Library Public License version 2 as published by the Free Software // Foundation and appearing in the file COPYING included in the // packaging of this file. // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. // **************************************************************************** #ifndef HK_DSGRIDCOLUMN_H #define HK_DSGRIDCOLUMN_H #include "hk_dsdatavisible.h" using namespace std; class hk_column; class hk_dsgrid; class hk_dscombobox; const int default_cellwidth=100; const int default_cellheight=20; /** *@short structure of a column in a grid *@version $Revision: 1.2 $ *@author Horst Knorr (hk_classes@knoda.org) * *structure of a column in a grid. */ class hk_dsgridcolumn :public hk_dsdatavisible { friend class hk_dsgrid; public: enum enum_columntype{columnedit,columnbool,columncombo}; hk_dsgridcolumn(void); /** *the text displayed in the column header. If not set the columnname will be displayed */ void set_displayname(hk_string,bool registerchange=true); hk_string displayname(void); /** *if columntype is columnedit the celldata will be shown as a string *if columntype is columnbool the celldata will be shown as a boolean field */ void set_columntype(enum_columntype,bool registerchange=true); enum_columntype columntype(void); /** *the (visible) width of the column */ void set_columnwidth(int ,bool registerchange=true); int columnwidth(void); virtual void savedata(ostream& s); virtual void loaddata(const hk_string& definition); /** *comboboxes need 2 datasources. One (the normal) datasource is set with @ref set_datasource and stores the values in a field. *The second datasource contains a list of possible values for this field. *@param list the datasource which contains the values displayed in the combobox */ void set_listdatasource(const hk_string& datasourcename,bool is_table=true, bool registerchange=true); hk_datasource* listdatasource(void); hk_string listdatasourcename(void); bool listdatasource_is_table(void); /** * The column of the listdatasource which will be displayed in the combobox */ void set_viewcolumnname(const hk_string& viewcolumn,bool registerchange=true); hk_string viewcolumnname(void); /** * The column containing the equivalent key to the column set with @ref set_column */ void set_listcolumnname(const hk_string& listcolumn,bool registerchange=true); hk_string listcolumnname(void); /** *if this combobox is part of a hk_presentation object (i.e. a form) you can set the listdatasource by its unique presentation number */ virtual bool set_listpresentationdatasource(long n, bool registerchange=true); long listpresentationdatasource(void); hk_string value_at(unsigned long); virtual void set_datasource(hk_datasource*); hk_dscombobox* combobox(void); unsigned int find(unsigned int from,unsigned int to,const hk_string& searchtext,bool wholephrase=false,bool casesensitive=false,bool backwards=false); bool is_findstring(unsigned int pos,const hk_string& searchtext,bool wholephrase=false,bool casesensitive=false); private: void set_grid(hk_dsgrid*); void set_combovalues(void); hk_string p_displayname; hk_string p_comboviewcolumnname; hk_string p_combolistcolumnname; long p_combopresentationdatasource; hk_string p_combolistdatasourcename; bool p_combolistdatasource_is_table; enum_columntype p_columntype; int p_columnwidth; hk_dsgrid* p_grid; hk_dscombobox* p_combobox; }; #endif </pre> <HR> <table> <tr><td><small>Generated by: horst on horstnotebook on Wed Sep 24 10:38:50 2003, using kdoc 2.0a54.</small></td></tr> </table> </BODY> </HTML>