Canola  0.8.D001
lib/program_card/functor/image/pixbuf.h
Go to the documentation of this file.
00001 //
00002 // canola - canon canola 1614p emulator
00003 // Copyright (C) 2012 Peter Miller
00004 //
00005 // This program is free software; you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License, version 3, as
00007 // published by the Free Software Foundation.
00008 //
00009 // This program is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012 // General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU General Public License along
00015 // with this program. If not, see <http://www.gnu.org/licenses/>.
00016 //
00017 
00018 #ifndef LIB_PROGRAM_CARD_FUNCTOR_IMAGE_PIXBUF_H
00019 #define LIB_PROGRAM_CARD_FUNCTOR_IMAGE_PIXBUF_H
00020 
00021 #include <lib/config.h>
00022 #include <gtkmm.h>
00023 
00024 #include <lib/program_card/functor/image.h>
00025 
00030 class program_card_functor_image_pixbuf:
00031     public program_card_functor_image
00032 {
00033 public:
00037     virtual ~program_card_functor_image_pixbuf();
00038 
00039     typedef Glib::RefPtr<Gdk::Pixbuf> pixbuf_ptr_t;
00040 
00041     typedef std::vector<pixbuf_ptr_t> result_t;
00042 
00054     static pointer create(result_t &result, double dpi);
00055 
00056     // See base class for documentation.
00057     void operator()(unsigned card_num, unsigned card_count,
00058         const unsigned char *data, size_t data_size);
00059 
00060 private:
00070     program_card_functor_image_pixbuf(result_t &result, double dpi);
00071 
00072     result_t &result;
00073     double dots_per_inch;
00074 
00079     program_card_functor_image_pixbuf();
00080 
00088     program_card_functor_image_pixbuf(
00089         const program_card_functor_image_pixbuf &rhs);
00090 
00098     program_card_functor_image_pixbuf &operator=(
00099         const program_card_functor_image_pixbuf &rhs);
00100 };
00101 
00102 #endif // LIB_PROGRAM_CARD_FUNCTOR_IMAGE_PIXBUF_H