#include <Surface.H>
|
| Surface () |
|
| Surface (int width, int height) |
|
virtual | ~Surface (void) |
|
GtkWidget * | getWidget (void) |
|
cairo_surface_t * | getSurface (void) |
|
void | setSurface (cairo_surface_t *surface_) |
|
void | clear () |
|
| Widget () |
| Construcotr. More...
|
|
| Widget (GtkWidget *w) |
|
virtual | ~Widget () |
| Destructor. More...
|
|
GtkWidget * | ref (void) |
|
void | unref (void) |
|
GtkWidget * | show (void) |
|
GtkWidget * | hide (void) |
|
bool | getVisible (void) |
|
GtkWidget * | getWidget (void) |
|
bool | getSensitive (void) |
|
void | setSensitive (bool sens) |
|
void | getSize (int &width, int &height) |
|
virtual void | setSize (int width, int height) |
|
void | getLocationSize (int &x, int &y, int &width, int &height) |
|
void | queueDraw () |
|
GdkWindow * | getWindow () |
|
void | connect (const char *event, GCallback callback, gpointer data) |
|
void | connectAfter (const char *event, GCallback callback, gpointer data) |
|
void | connectExposeEventCallback (GCallback callback, void *data) |
|
void | connectExposeEventCallback (GtkWidget *w, GCallback callback, void *data) |
|
void | connectConfigureEventCallback (GCallback callback, void *data) |
|
void | connectConfigureEventCallback (GtkWidget *w, GCallback callback, void *data) |
|
Widget & | operator<< (DragNDrop &dnd) |
|
Widget & | operator>> (DragNDrop &dnd) |
|
|
virtual gboolean | configureEvent (GdkEventConfigure *event) |
|
virtual bool | exposeEvent () |
|
void | destroySurface (void) |
|
void | init (int width, int height) |
|
void | connectDamagedCallback (GCallback callback, void *data) |
|
virtual bool | checkDropValidity (GtkWidget *w, GtkWidget *sourceWidget, int info, const unsigned char *selectionStoredData) |
|
virtual bool | dragDataReceived (GtkWidget *w, GtkWidget *sourceWidget, int info, const unsigned char *selectionStoredData, int length) |
|
virtual void | dragLeave (GtkWidget *w, GtkWidget *sourceWidget) |
|
virtual bool | dragMotion (GtkWidget *w, GtkWidget *sourceWidget, int x, int y) |
|
virtual int | chooseTheTargetToUse (GtkWidget *w, GtkWidget *sourceWidget, DragNDrop &dnd) |
|
virtual void | dragDataGet (GtkWidget *w, GtkSelectionData *selectionData, guint info) |
|
virtual void | dragDataDelete (GtkWidget *w) |
|
virtual void | dragBegin (GtkWidget *w) |
|
virtual void | dragEnd (GtkWidget *w) |
|
◆ Surface() [1/2]
Default constructor of size 200 by 200
Definition at line 161 of file Surface.H.
◆ Surface() [2/2]
Surface::Surface |
( |
int |
width, |
|
|
int |
height |
|
) |
| |
|
inline |
Construct a surface
- Parameters
-
width | the width of the surface |
height | the height of the surface |
Definition at line 168 of file Surface.H.
◆ ~Surface()
virtual Surface::~Surface |
( |
void |
| ) |
|
|
inlinevirtual |
◆ clear()
void Surface::clear |
( |
void |
| ) |
|
|
inline |
Redraw the background to the surface removing all changes.
Definition at line 217 of file Surface.H.
◆ configureEvent()
virtual gboolean Surface::configureEvent |
( |
GdkEventConfigure * |
event | ) |
|
|
inlineprotectedvirtual |
Overload this method to handle configure-event signals in your classes.
- Parameters
-
event | the event which triggered this configure-event signal. |
- Returns
- true to finish executing, false to allow other handlers to execute.
Definition at line 79 of file Surface.H.
◆ configureEventStatic()
static gboolean Surface::configureEventStatic |
( |
GtkWidget * |
widget, |
|
|
GdkEventConfigure * |
event, |
|
|
gpointer |
data |
|
) |
| |
|
inlinestaticprotected |
Create a new backing surface of the appropriate size. Also call the configureEvent method of the class instance.
- Parameters
-
widget | The widget receiving the event. |
event | The event which triggered the configure-event signal |
data | The instance of Surface which is associated with the widget/event |
- Returns
- true to finish processing, false to allow other handlers to process.
Definition at line 46 of file Surface.H.
◆ connectDamagedCallback()
void Surface::connectDamagedCallback |
( |
GCallback |
callback, |
|
|
void * |
data |
|
) |
| |
|
inlineprotected |
Connect a callback function for when the surface is changed.
- Parameters
-
callback | The callback to execute |
data | The user data to pass to the callback |
Definition at line 153 of file Surface.H.
◆ destroySurface()
void Surface::destroySurface |
( |
void |
| ) |
|
|
inlineprotected |
Method to dereference and set the surface to null
Definition at line 121 of file Surface.H.
◆ exposeEvent()
virtual bool Surface::exposeEvent |
( |
| ) |
|
|
inlineprotectedvirtual |
allow overloading of the expose event.
- Returns
- true to finish processing, false to allow other handlers to process.
Definition at line 107 of file Surface.H.
◆ exposeEventStatic()
static gboolean Surface::exposeEventStatic |
( |
GtkWidget * |
widget, |
|
|
GdkEventExpose * |
event, |
|
|
gpointer |
data |
|
) |
| |
|
inlinestaticprotected |
Redraw the screen from the backing surface. Calls an overloadable class method expose.
- Parameters
-
widget | The widget receiving the event. |
event | The event which triggered the expose-event signal |
data | The instance of Surface which is associated with the widget/event |
- Returns
- true to finish processing, false to allow other handlers to process.
Definition at line 89 of file Surface.H.
◆ getSurface()
cairo_surface_t* Surface::getSurface |
( |
void |
| ) |
|
|
inline |
◆ getWidget()
GtkWidget* Surface::getWidget |
( |
void |
| ) |
|
|
inline |
◆ init()
void Surface::init |
( |
int |
width, |
|
|
int |
height |
|
) |
| |
|
inlineprotected |
Initialise the member variables.
- Parameters
-
width | the width of the surface |
height | the height of the surface |
Definition at line 134 of file Surface.H.
◆ setSurface()
void Surface::setSurface |
( |
cairo_surface_t * |
surface_ | ) |
|
|
inline |
Set the backing surface
- Parameters
-
surface_ | The new backing surface |
Definition at line 209 of file Surface.H.
◆ surface
cairo_surface_t* Surface::surface |
|
protected |
The backing surface for the drawing area.
Definition at line 37 of file Surface.H.
The documentation for this class was generated from the following file: