Xfce Foundation Classes
Main Page | Index | Namespace List | Alphabetical List | Class List | File List

# Xfc::Gtk::Plug Class Reference

A GtkPlug C++ wrapper class. More...

`#include <xfc/gtk/plug.hh>`

Inheritance diagram for Xfc::Gtk::Plug:

List of all members.

## Signal Prototypes

- const EmbeddedSignalType embedded_signal
    Embedded signal (see signal_embedded()).

## Public Member Functions

Constructors

- Plug (GdkNativeWindow socket_id, const Gdk::Display *display=0)
    Constructs a new plug widget inside the Socket identified by socket_id.
- virtual ~Plug ()
    Destructor.

Accessors

- GtkPlug * gtk_plug () const
    Get a pointer to the GtkPlug structure.
- operator GtkPlug * () const
    Conversion operator; safely converts a Plug to a GtkPlug pointer.
- bool has_socket () const
    Returns true if this plug is embedded into a socket.
- Gdk::Window * socket_window () const
    Returns the socket window the plug is embedded into, or null if it is not embedded.
- bool same_app () const
    Return true if the plug is embedded into a socket in the same application.
- GdkNativeWindow get_id () const
    Gets the window ID of a Plug widget, which can then be used to embed this window inside another window, for instance with Gtk::Socket::add_id().

Signal Proxies

- const EmbeddedSignalProxy signal_embedded ()
    Connect to the embedded_signal; emitted when a plug is embedded into a socket.

## Protected Member Functions

Constructors

- Plug (GtkPlug *plug, bool owns_reference=false)
    Construct a new Plug from an existing GtkPlug.

## Detailed Description

A GtkPlug C++ wrapper class.

Together with Socket, Plug provides the ability to embed widgets from one process into another process in a fashion that is transparent to the user. One process creates a Socket widget and, passes the ID of that widgets window to the other process, which then creates a Plug with that window ID. Any widgets contained in the Plug then will appear inside the first applications window.

## Constructor & Destructor Documentation

Xfc::Gtk::Plug::Plug | ( | GtkPlug * | plug,
|  | bool | owns_reference = `false`
| ) | `[explicit, protected]`

Construct a new Plug from an existing GtkPlug.

Parameters:

  | plug | A pointer to a GtkPlug.
  | owns_reference | Set false if the initial reference count is floating, set true if it's not.

The plug can be a newly created GtkPlug or an existing GtkPlug (see G::Object::Object).

Xfc::Gtk::Plug::Plug | ( | GdkNativeWindow | socket_id,
|  | const Gdk::Display * | display = `0`
| ) |

Constructs a new plug widget inside the Socket identified by socket_id.

Parameters:

  | socket_id | The XID of the socket's window.
  | display | The Gdk::Display on which socket_id is displayed, or null for the default display.

If socket_id is 0, the plug is left "unplugged" and can later be plugged into a Socket by Gtk::Socket::add_id().

Note: The default GDK display is the only display in the absence of MultiHead support.

## Member Function Documentation

GdkNativeWindow Xfc::Gtk::Plug::get_id | ( |  | ) | const

Gets the window ID of a Plug widget, which can then be used to embed this window inside another window, for instance with Gtk::Socket::add_id().

Returns:
  The window ID for the plug.

## Member Data Documentation

const EmbeddedSignalType Xfc::Gtk::Plug::embedded_signal `[static, protected]`

Embedded signal (see signal_embedded()).

Calls a slot with the signature:

                 void function();

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

- plug.hh

Xfce Foundation Classes

Copyright © 2004-2005 The XFC Development Team | XFC 4.3