2021-08-27 05:33:20 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* libragephoto RAGE Photo Parser
|
|
|
|
* Copyright (C) 2021 Syping
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without modification,
|
|
|
|
* are permitted provided that the following conditions are met:
|
|
|
|
*
|
|
|
|
* 1. Redistributions of source code must retain the above copyright notice,
|
|
|
|
* this list of conditions and the following disclaimer.
|
|
|
|
*
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
|
|
* this list of conditions and the following disclaimer in the documentation
|
|
|
|
* and/or other materials provided with the distribution.
|
|
|
|
*
|
|
|
|
* This software is provided as-is, no warranties are given to you, we are not
|
|
|
|
* responsible for anything with use of the software, you are self responsible.
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef PHOTOVIEWER_H
|
|
|
|
#define PHOTOVIEWER_H
|
|
|
|
|
|
|
|
#include <gdkmm/pixbuf.h>
|
2021-08-27 20:07:14 +02:00
|
|
|
#include <gtkmm/drawingarea.h>
|
|
|
|
#include <gtkmm/window.h>
|
2021-08-27 05:33:20 +02:00
|
|
|
|
|
|
|
class PhotoViewer : public Gtk::DrawingArea
|
|
|
|
{
|
|
|
|
public:
|
2021-08-27 20:07:14 +02:00
|
|
|
PhotoViewer(Gtk::Window *win);
|
2021-10-14 07:09:58 +02:00
|
|
|
void open_file(const std::string &filename);
|
2021-08-27 05:33:20 +02:00
|
|
|
|
|
|
|
protected:
|
|
|
|
bool on_draw(const Cairo::RefPtr<Cairo::Context>& cr) override;
|
|
|
|
Glib::RefPtr<Gdk::Pixbuf> p_image;
|
2021-08-27 20:07:14 +02:00
|
|
|
Gtk::Window *p_win;
|
2021-08-27 05:33:20 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // PHOTOVIEWER_H
|