HotspotWidget Class Reference

Widget that allows the user to select areas on an image. More...

#include <hotspotwidget.h>

List of all members.

Public Member Functions

 HotspotWidget ()
 Default constructor.
void update_coords (int x, int y)
 Update (x,y) coordinate pair for the rectangle.
void update_dimensions (int w, int h)
 Update the dimensions of the rectangle.
void set_image (const Glib::RefPtr< Gdk::Pixbuf > &pb)
 Set the pixbuf for the background image to draw.
Case::Hotspot get_hotspot () const
 Get the inputted hotspot.
sigc::signal< void,
int, int > 
signal_point_changed () const
 Signal emitted when (x,y) pair has changed.
sigc::signal< void,
int, int > 
signal_dimensions_changed () const
 Signal emitted when width/height have changed.

Private Member Functions

virtual void on_realize ()
virtual bool on_expose_event (GdkEventExpose *e)
virtual bool on_button_press_event (GdkEventButton *e)
virtual bool on_motion_notify_event (GdkEventMotion *e)

Private Attributes

sigc::signal< void,
int, int > 
m_SigPointChanged
sigc::signal< void,
int, int > 
m_SigDimensionsChanged
Glib::RefPtr
< Gdk::Pixbuf > 
m_Pixbuf
Glib::RefPtr< Gdk::GC > m_GC
Gdk::Color m_Red
bool m_MouseDown
 Flag if the mouse button is down.
Case::Hotspot m_Hotspot
 The hotspot we are editing.


Detailed Description

Widget that allows the user to select areas on an image.

Although this widget can be used for a variety of reasons, it's primary goal is to facilitate adding examinable hotspots to a location.


Member Function Documentation

void HotspotWidget::update_coords ( int  x,
int  y 
)

Update (x,y) coordinate pair for the rectangle.

Parameters:
x X-coordinate
y Y-coordinate

void HotspotWidget::update_dimensions ( int  w,
int  h 
)

Update the dimensions of the rectangle.

Parameters:
w New width
h New height

void HotspotWidget::set_image ( const Glib::RefPtr< Gdk::Pixbuf > &  pb  )  [inline]

Set the pixbuf for the background image to draw.

Parameters:
pb The pixbug containing image data

Case::Hotspot HotspotWidget::get_hotspot (  )  const [inline]

Get the inputted hotspot.

Returns:
A completed Case::Hotspot struct with new hotspot definition


The documentation for this class was generated from the following files:
Generated on Fri Feb 22 22:34:18 2008 for Phoenix Wright Case Editor API by  doxygen 1.5.3