fix compile against newer giflib
[rofl0r-obeditor.git] / src / common__wxFrameImage.h
blob70e2f16de0d2ee6b6132674181a250fc4890ed37
1 #ifndef WXFRAMEIMAGE_H_
2 #define WXFRAMEIMAGE_H_
4 #include <wx/control.h>
7 class MyImageCtrl : public wxControl
9 public:
10 MyImageCtrl(wxWindow *parent);
11 virtual ~MyImageCtrl();
13 void OnEraseBackground(wxEraseEvent& WXUNUSED(event));
14 virtual void OnPaint(wxPaintEvent& WXUNUSED(event));
15 virtual void EvtSize(wxSizeEvent& evt );
16 void EvtContextMenu( wxContextMenuEvent& event );
18 virtual void mySetSize(int& width, int& height);
19 virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
20 virtual void SetSize(int width, int height);
21 virtual void SetSize(const wxRect& rect);
22 virtual void SetSize(const wxSize& size);
24 void ScaleImage(double factor );
25 void Rotate90(int nb_crans );
26 void Set_Mirroring( bool b_mirroring = true );
28 void SetImage( wxImage* );
30 void Set_BoundDimensions( int max_x, int max_y = wxDefaultCoord, int min_x = wxDefaultCoord, int min_y = wxDefaultCoord );
32 int Height()const;
33 int Width()const;
34 int X()const;
35 int Y()const;
37 protected:
38 virtual wxSize DoGetBestSize() const;
39 float Get_Scale_Factor( int _x, int _y )const;
40 void ReboundSize( int& _x, int& _y )const;
41 void Get_TransformedImgSize(int& _w, int& _h )const;
43 void EvtMouseSomething(wxMouseEvent& event);
45 // The bitmap image is not owned by MyImageCtrl
46 wxImage* p_image;
47 mutable wxBitmap *theBitmap;
49 int max_x, max_y, min_x, min_y;
50 int nb_rotation_90;
51 int b_mirror;
53 DECLARE_EVENT_TABLE()
58 #endif /*WXFRAMEIMAGE_H_*/