Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
45 lines (41 sloc)
934 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __IMAGEPANEL_H | |
#define __IMAGEPANEL_H | |
#include <wx/wx.h> | |
#include <wx/image.h> | |
#include <wx/string.h> | |
#include <wx/dynarray.h> | |
#include <wx/stream.h> | |
#include <wx/wfstream.h> | |
class ImagePanel : public wxPanel | |
{ | |
public: | |
ImagePanel(wxWindow *parent, | |
wxWindowID id, | |
const wxPoint &pos, | |
const wxSize &size, | |
long style, | |
const wxString &name); | |
ImagePanel(wxWindow *parent, | |
wxWindowID id, | |
const wxPoint &pos, | |
const wxSize &size, | |
long style, | |
const wxString &name, | |
wxImage &imageIn); | |
void SetImage(wxImage &imageIn); | |
virtual ~ImagePanel(); | |
wxString GetValue(); | |
void OnPaint(wxPaintEvent &event); | |
void OnResize(wxSizeEvent &event); | |
void Maximise(); | |
void DrawImage(); | |
void Scale(float scaleFactor); | |
void Proportion(int maxWidth,int maxHeight); | |
void Clear(); | |
private: | |
wxImage image; | |
float currentScale; | |
bool painting; | |
DECLARE_EVENT_TABLE() | |
}; | |
#endif |