cluttermm: Clutter::Canvas Class Reference

Inheritance diagram for Clutter::Canvas:
Collaboration diagram for Clutter::Canvas:

Public Member Functions

virtual ~Canvas ()
 
ClutterCanvas* gobj ()
 Provides access to the underlying C GObject. More...

 
const ClutterCanvas* gobj () const
 Provides access to the underlying C GObject. More...

 
ClutterCanvas* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...

 
Glib::SignalProxy3< bool,

const ::Cairo::RefPtr

< ::Cairo::Context > &, int,

int > 
signal_draw ()
 
void set_size (int width, int height)
 Sets the size of the canvas, and invalidates the content. More...

 

Static Public Member Functions

static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system. More...

 
static Glib::RefPtr< Canvascreate ()
 

Protected Member Functions

 Canvas ()
 
Glib::PropertyProxy< int > property_height ()
 The height of the canvas. More...

 
Glib::PropertyProxy_ReadOnly< int > property_height () const
 The height of the canvas. More...

 
Glib::PropertyProxy< int > property_width ()
 The width of the canvas. More...

 
Glib::PropertyProxy_ReadOnly< int > property_width () const
 The width of the canvas. More...

 
virtual bool on_draw (const ::Cairo::RefPtr< ::Cairo::Context >& p1, int width, int height)
 This is a default handler for the signal signal_draw(). More...

 

Related Functions

(Note that these are not member functions.)

Glib::RefPtr< Clutter::Canvaswrap (ClutterCanvas* object, bool take_copy=false)
 A Glib::wrap() method for this object. More...

 

Constructor & Destructor Documentation

virtual Clutter::Canvas::~Canvas ( )
virtual
Clutter::Canvas::Canvas ( )
protected

Member Function Documentation

static Glib::RefPtr<Canvas> Clutter::Canvas::create ( )
static
static GType Clutter::Canvas::get_type ( )
static

Get the GType for this class, for use with the underlying GObject type system.

ClutterCanvas* Clutter::Canvas::gobj ( )
inline

Provides access to the underlying C GObject.

const ClutterCanvas* Clutter::Canvas::gobj ( ) const
inline

Provides access to the underlying C GObject.

ClutterCanvas* Clutter::Canvas::gobj_copy ( )

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

virtual bool Clutter::Canvas::on_draw ( const ::Cairo::RefPtr< ::Cairo::Context > &  p1,
int  width,
int  height 
)
protectedvirtual

This is a default handler for the signal signal_draw().

Glib::PropertyProxy< int > Clutter::Canvas::property_height ( )
protected

The height of the canvas.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly< int > Clutter::Canvas::property_height ( ) const
protected

The height of the canvas.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.
Glib::PropertyProxy< int > Clutter::Canvas::property_width ( )
protected

The width of the canvas.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly< int > Clutter::Canvas::property_width ( ) const
protected

The width of the canvas.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.
void Clutter::Canvas::set_size ( int  width,
int  height 
)

Sets the size of the canvas, and invalidates the content.

This function will cause the canvas to be invalidated only if the size of the canvas surface has changed.

If you want to invalidate the contents of the canvas when setting the size, you can use the return value of the function to conditionally call Clutter::Content::invalidate():

[C example ellipted]

Since cluttermm 1.10:
Parameters
widthThe width of the canvas, in pixels.
heightThe height of the canvas, in pixels.
Returns
This function returns true if the size change caused a content invalidation, and false otherwise.
Glib::SignalProxy3< bool,const ::Cairo::RefPtr< ::Cairo::Context>&,int,int > Clutter::Canvas::signal_draw ( )
Slot Prototype:
bool on_my_draw(const ::Cairo::RefPtr< ::Cairo::Context>& p1, int width, int height)

The Clutter::Canvas::signal_draw() signal is emitted each time a canvas is invalidated.

It is safe to connect multiple handlers to this signal: each handler invocation will be automatically protected by cairo_save() and cairo_restore() pairs.

Since cluttermm 1.10:
Parameters
crThe Cairo context used to draw.
widthThe width of the canvas.
heightThe height of the canvas.
Returns
true if the signal emission should stop, and false otherwise.

Friends And Related Function Documentation

Glib::RefPtr< Clutter::Canvas > wrap ( ClutterCanvas *  object,
bool  take_copy = false 
)
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns
A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file:
  • cluttermm/canvas.h