Main Page | Class Hierarchy | Class List | File List | Class Members

wxImageBox Class Reference

The widget to display a image with the zoom function. More...

#include <ImageBox.h>

Inheritance diagram for wxImageBox:

wxPaintBox List of all members.

Public Member Functions

 wxImageBox (wxWindow *parent, wxWindowID id=-1)
 Constructs a image box.

bool LoadFile (wxString fname)
 Loads an image from a file.

virtual void Clear ()
 Creates a empty image.

virtual bool IsEmpty ()
 Returns true if image is not empty.

virtual void Update ()
 Causes a event to be generated to repaint the image box.

virtual void UpdatePaintBox ()
 Repaints the image box.

void SetScale (double scale=scFIT_TO_PAGE)
 Adjusts a zoom factor/level.

float GetScale ()
 Returns the current zoom factor/level.

float GetScaleValue ()
 Returns the current zoom factor.

wxImage & GetImage ()
 Returns the image.

void SetPopupMenu (wxMenu *menu)
 Sets the pop up menu.

wxMenu * GetPopupMenu ()
 Returns the pop up menu if it was set, or null otherwise.


Protected Member Functions

bool UpdateScaleValue ()
wxRect getPaintRect ()
virtual void Paint ()
virtual void PaintImg (wxImage &img)
void OnPaint (wxPaintEvent &event)
void OnResize (wxSizeEvent &event)
virtual void OnMouseRightButton (wxMouseEvent &event)

Protected Attributes

wxImage m_image
double m_scale
double m_scaleV
bool m_repaint
wxMenu * m_pmenu

Detailed Description

The widget to display a image with the zoom function.


Member Function Documentation

void wxImageBox::SetScale double  scale = scFIT_TO_PAGE  ) 
 

Adjusts a zoom factor/level.

Zoom level can be:
scFIT_TO_PAGE - to fit a image to the image box
scFIT_TO_WIDTH - to fit a image to the width of image box
scFIT_TO_HEIGHT - to fit a image to the height of image box


The documentation for this class was generated from the following file:
Generated on Mon Nov 19 21:06:44 2007 for wxVillaLib by doxygen 1.3.7