GTK+ IOStream  Beta
<< GTK+ >> add C++ IOStream operators to GTK+. Now with extra abilities ... like network serialisation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Static Private Member Functions | List of all members
DrawingArea Class Reference

#include <DrawingArea.H>

Inheritance diagram for DrawingArea:
Inheritance graph
[legend]
Collaboration diagram for DrawingArea:
Collaboration graph
[legend]

Public Member Functions

 DrawingArea (void)
 
 DrawingArea (int width, int height)
 
virtual ~DrawingArea (void)
 
void draw_brush (GtkWidget *widget, gdouble x, gdouble y)
 
- Public Member Functions inherited from Pixmap
 Pixmap ()
 
 Pixmap (int width, int height)
 
virtual ~Pixmap (void)
 
GtkWidget * getWidget (void)
 
GdkPixmap * getPixmap (void)
 
void setPixmap (GdkPixmap *pixmap_)
 

Private Member Functions

void init (void)
 

Static Private Member Functions

static gint button_press_event (GtkWidget *widget, GdkEventButton *event, gpointer data)
 
static gint motion_notify_event (GtkWidget *widget, GdkEventMotion *event, gpointer data)
 

Additional Inherited Members

- Protected Member Functions inherited from Pixmap
GtkWidget * show (void)
 
GtkWidget * hide (void)
 
void destroyPixmap (void)
 
void init (int width, int height)
 
- Static Protected Member Functions inherited from Pixmap
static gboolean configure_event (GtkWidget *widget, GdkEventConfigure *event, gpointer data)
 
static gboolean expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer data)
 
- Protected Attributes inherited from Pixmap
GtkWidget * widget
 The drawing area widget. More...
 
GdkPixmap * pixmap
 Backing pixmap for drawing area. More...
 

Detailed Description

DrawingArea

This class allows the user to draw within a window by moving the mouse. It uses a backing pixmap to store drawing strokes.

DrawingAreaTest.jpg

Definition at line 29 of file DrawingArea.H.

Constructor & Destructor Documentation

DrawingArea::DrawingArea ( void  )
inline
Constructor

Create a drawing of default size (200 by 200)

Definition at line 80 of file DrawingArea.H.

Here is the call graph for this function:

DrawingArea::DrawingArea ( int  width,
int  height 
)
inline
Constructor

Create a drawing area of particular size

Definition at line 87 of file DrawingArea.H.

Here is the call graph for this function:

virtual DrawingArea::~DrawingArea ( void  )
inlinevirtual

Destructor

Definition at line 93 of file DrawingArea.H.

Member Function Documentation

static gint DrawingArea::button_press_event ( GtkWidget *  widget,
GdkEventButton *  event,
gpointer  data 
)
inlinestaticprivate
Handler for when the button is pressed
Parameters
widgetWhich widget the button is pressed in.
eventThe event to handle
Returns
TRUE to continue processing the event

Definition at line 36 of file DrawingArea.H.

Here is the call graph for this function:

Here is the caller graph for this function:

void DrawingArea::draw_brush ( GtkWidget *  widget,
gdouble  x,
gdouble  y 
)
inline

Draw a rectangle on the screen

Definition at line 97 of file DrawingArea.H.

Here is the caller graph for this function:

void DrawingArea::init ( void  )
inlineprivate
Create a valid drawing area of particular size
Parameters
widthThe width of the area
heightThe height of the area

Definition at line 68 of file DrawingArea.H.

Here is the call graph for this function:

Here is the caller graph for this function:

static gint DrawingArea::motion_notify_event ( GtkWidget *  widget,
GdkEventMotion *  event,
gpointer  data 
)
inlinestaticprivate

Definition at line 45 of file DrawingArea.H.

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following file: