Fl_Cairo_Window Class Reference
[Cairo Support Functions and Classes]

This defines a pre-configured cairo fltk window. More...

#include <Fl_Cairo_Window.H>

Inheritance diagram for Fl_Cairo_Window:
Fl_Double_Window Fl_Window Fl_Group Fl_Widget

List of all members.

Public Types

typedef void(* cairo_draw_cb )(Fl_Cairo_Window *self, cairo_t *def)
 This defines the cairo draw callback prototype that you must further.

Public Member Functions

 Fl_Cairo_Window (int w, int h)
void set_draw_cb (cairo_draw_cb cb)
 You must provide a draw callback which will implement your cairo rendering.

Protected Member Functions

void draw ()
 Overloaded to provide cairo callback support.

Detailed Description

This defines a pre-configured cairo fltk window.

This class overloads the virtual draw() method for you, so that the only thing you have to do is to provide your cairo code. All cairo context handling is achieved transparently.

Note:
You can alternatively define your custom cairo fltk window, and thus at least override the draw() method to provide custom cairo support. In this case you will probably use Fl::cairo_make_current(Fl_Window*) to attach a context to your window. You should do it only when your window is the current window.
See also:
Fl_Window::current()

Member Function Documentation

void Fl_Cairo_Window::set_draw_cb ( cairo_draw_cb  cb  )  [inline]

You must provide a draw callback which will implement your cairo rendering.

This method will permit you to set your cairo callback to cb.


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