#include <hotspotwidget.h>
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. |
Although this widget can be used for a variety of reasons, it's primary goal is to facilitate adding examinable hotspots to a location.
void HotspotWidget::update_coords | ( | int | x, | |
int | y | |||
) |
Update (x,y) coordinate pair for the rectangle.
x | X-coordinate | |
y | Y-coordinate |
void HotspotWidget::update_dimensions | ( | int | w, | |
int | h | |||
) |
Update the dimensions of the rectangle.
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.
pb | The pixbug containing image data |
Case::Hotspot HotspotWidget::get_hotspot | ( | ) | const [inline] |
Get the inputted hotspot.