Main Page Widgets Namespaces Book

# Gdk::Cursor Class Reference

This represents a cursor. More...

List of all members.

## Public Member Functions
| Cursor (const Glib::RefPtr<Display>& display, const Glib::ustring& name)
| Cursor (const Glib::RefPtr<Display>& display, const Glib::RefPtr<Pixbuf>& pixbuf, int x, int y)
| Cursor (const Glib::RefPtr<Display>& display, CursorType cursor_type)
| Cursor (const Glib::RefPtr<Pixmap>& source, const Glib::RefPtr<Pixmap>& mask, const Color& fg, const Color& bg, int x, int y)
| Cursor (CursorType cursor_type)
| Cursor (const Cursor& other)
| Cursor (GdkCursor* gobject, bool make_a_copy=true)
| Cursor ()
Glib::RefPtr<const Display> | get_display () const
| Returns: the Gdk::Display associated to cursor.
Glib::RefPtr<Display> | get_display ()
| Returns: the Gdk::Display associated to cursor.
Glib::RefPtr<const Gdk::Pixbuf> | get_image () const
| Returns: a Gdk::Pixbuf representing cursor, or `0`.
Glib::RefPtr<Gdk::Pixbuf> | get_image ()
| Returns: a Gdk::Pixbuf representing cursor, or `0`.
const GdkCursor* | gobj () const
| Provides access to the underlying C instance.
GdkCursor* | gobj ()
| Provides access to the underlying C instance.
GdkCursor* | gobj_copy () const
| Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
Cursor& | operator= (const Cursor& other)
void | swap (Cursor& other)
| ~Cursor ()
## Protected Attributes
GdkCursor* | gobject_
## Related Functions
(Note that these are not member functions.)
void | swap (Cursor& lhs, Cursor& rhs)
Gdk::Cursor | wrap (GdkCursor* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

This represents a cursor.

## Constructor & Destructor Documentation

Gdk::Cursor::Cursor | ( |  | ) |

Gdk::Cursor::Cursor | ( | GdkCursor * | gobject,
|  | bool | make_a_copy = `true` |
| ) |  |  | `[explicit]`

Gdk::Cursor::Cursor | ( | const Cursor& | other | ) |

Gdk::Cursor::~Cursor | ( |  | ) |

Gdk::Cursor::Cursor | ( | CursorType | cursor_type | ) | `[explicit]`

Gdk::Cursor::Cursor | ( | const Glib::RefPtr<Pixmap>& | source,
|  | const Glib::RefPtr<Pixmap>& | mask,
|  | const Color& | fg,
|  | const Color& | bg,
|  | int | x,
|  | int | y |
| ) |  |  |

Gdk::Cursor::Cursor | ( | const Glib::RefPtr<Display>& | display,
|  | CursorType | cursor_type |
| ) |  |  | `[explicit]`

Gdk::Cursor::Cursor | ( | const Glib::RefPtr<Display>& | display,
|  | const Glib::RefPtr<Pixbuf>& | pixbuf,
|  | int | x,
|  | int | y |
| ) |  |  |

Gdk::Cursor::Cursor | ( | const Glib::RefPtr<Display>& | display,
|  | const Glib::ustring & | name |
| ) |  |  | `[explicit]`

## Member Function Documentation

Glib::RefPtr<const Display> Gdk::Cursor::get_display | ( |  | ) | const

Returns: the Gdk::Display associated to cursor.

Returns:
  The Gdk::Display associated to cursor

Since gtkmm 2.2:

Glib::RefPtr<Display> Gdk::Cursor::get_display | ( |  | ) |

Returns: the Gdk::Display associated to cursor.

Returns:
  The Gdk::Display associated to cursor

Since gtkmm 2.2:

Glib::RefPtr<const Gdk::Pixbuf> Gdk::Cursor::get_image | ( |  | ) | const

Returns: a Gdk::Pixbuf representing cursor, or `0`.

Returns:
  A Gdk::Pixbuf representing cursor, or `0`

Since gtkmm 2.8:

Glib::RefPtr<Gdk::Pixbuf> Gdk::Cursor::get_image | ( |  | ) |

Returns: a Gdk::Pixbuf representing cursor, or `0`.

Returns:
  A Gdk::Pixbuf representing cursor, or `0`

Since gtkmm 2.8:

const GdkCursor* Gdk::Cursor::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C instance.

References gobject_.

GdkCursor* Gdk::Cursor::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C instance.

References gobject_.

GdkCursor* Gdk::Cursor::gobj_copy | ( |  | ) | const

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

Cursor& Gdk::Cursor::operator= | ( | const Cursor& | other | ) |

void Gdk::Cursor::swap | ( | Cursor& | other | ) |

Referenced by swap().

## Friends And Related Function Documentation

void swap | ( | Cursor& | lhs,
|  | Cursor& | rhs |
| ) |  |  | `[related]`

Parameters:

  | lhs | The left-hand side
  | rhs | The right-hand side

References swap().

Gdk::Cursor wrap | ( | GdkCursor * | object,
|  | bool | take_copy = `false` |
| ) |  |  | `[related]`

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

Parameters:

  | object | The C instance.
  | take_copy | False 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.

## Member Data Documentation

GdkCursor* Gdk::Cursor::gobject_`[protected]`

Referenced by gobj().

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

- cursor.h