hk_dsimage.h

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_DSIMAGE
00012 #define HK_DSIMAGE
00013 #include "hk_dsdatavisible.h"
00014 #include "hk_string.h"
00015 
00016 class hk_dsimageprivate;
00017 class hk_dsimagemodeprivate;
00018 
00019 class hk_dsimage : public hk_dsdatavisible
00020 {
00021 public:
00022 hk_dsimage(hk_form* form=NULL);
00023 virtual ~hk_dsimage();
00024 void set_path(const hk_string& p,bool registerchange=true);
00025 void set_path(const hk_string& p,bool registerchange,bool force_setting);
00026 hk_string path(void) const;
00027 virtual void savedata(ostream& s );
00028 virtual void loaddata(const hk_string& definition);
00029         virtual void set_value(const hk_string&);
00030         virtual hk_string value(void);
00031         virtual hk_string value_at(unsigned long row);
00032 /*
00033 zoom the image in percent. Values of 0 or smaller than 0 means 'fit to size',
00034 100 (%) is the original size
00035 */
00036 void set_zoom(int,bool registerchange=true);
00037 void set_zoom(int,bool registerchange,bool force_setting);
00038 int  zoom(void) const;
00039 
00040 virtual bool load_localimage(const hk_string& filename,bool registerchange=true);
00041 struct_raw_data* localimage();
00042 
00043 virtual void show_image(void){}
00044 
00045 protected:
00046 
00047 virtual void widget_specific_path_changed() {}
00048 virtual void widget_specific_zoom_changed() {}
00049         virtual bool datasource_enable(void);
00050 
00051 private:
00052         hk_dsimagemodeprivate* p_designdata;
00053         hk_dsimagemodeprivate* p_viewdata;
00054         hk_dsimageprivate* p_private;
00055 
00056 };
00057 #endif // hk_dsimage

Generated on Tue May 2 09:15:35 2006 for Databaseconnectionclasses by  doxygen 1.4.6