00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef HK_DSIMAGE
00012 #define HK_DSIMAGE
00013 #include "hk_dsdatavisible.h"
00014 #include "hk_string.h"
00015 #include <map>
00016
00017 class hk_dsimageprivate;
00018 class hk_dsimagemodeprivate;
00019
00020 class hk_dsimage : public hk_dsdatavisible
00021 {
00022 public:
00023 hk_dsimage(hk_form* form=NULL);
00024 virtual ~hk_dsimage();
00025 void set_path(const hk_string& p,bool registerchange=true);
00026 void set_path(const hk_string& p,bool registerchange,bool force_setting);
00027 hk_string path(void) const;
00028 virtual void savedata(ostream& s );
00029 virtual void loaddata(xmlNodePtr definition);
00030 virtual void set_value(const hk_string&);
00031 virtual hk_string value(void);
00032 virtual hk_string value_at(unsigned long row);
00033
00034
00035
00036
00037 void set_zoom(int,bool registerchange=true);
00038 void set_zoom(int,bool registerchange,bool force_setting);
00039 int zoom(void) const;
00040
00041 virtual bool load_localimage(const hk_string& filename,bool registerchange=true);
00042 struct_raw_data* localimage();
00043
00044 virtual void show_image(void){}
00045
00046 static bool get_postscript_image(const hk_string& file,hk_string& psimagedata);
00047 static bool get_postscript_image(const struct_raw_data* data,hk_string& psimagedata);
00048 static void add_postscriptimagetype(const hk_string& name,psimagedatatype* f);
00049
00050 protected:
00051
00052 virtual void widget_specific_path_changed() {}
00053 virtual void widget_specific_zoom_changed() {}
00054 virtual bool datasource_enable(void);
00055
00056 private:
00057 hk_dsimagemodeprivate* p_designdata;
00058 hk_dsimagemodeprivate* p_viewdata;
00059 hk_dsimageprivate* p_private;
00060
00061 typedef map<hk_string,psimagedatatype*,less<hk_string> > imagetypelisttype ;
00062 static imagetypelisttype p_imagetypefunctions;
00063
00064
00065 };
00066 #endif // hk_dsimage