Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::Gtk::Plug Class Reference

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

`#include <inti/gtk/plug.h>`

Inheritance diagram for Inti::Gtk::Plug:

List of all members.

## 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.
- GtkPlugClass * gtk_plug_class () const
    Get a pointer to the GtkPlugClass 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().

Methods

- void add_to_socket (Socket &socket)
    Adds a plug to a socket within the same application.
- void remove_from_socket (Socket &socket)
    Removes a plug from a socket within the same application.

Signal Proxies

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

## Protected Member Functions

Constructors

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

Signal Handlers

- virtual void on_embedded ()
    Called when a plug is embedded into a socket.

## 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

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

  | Construct a new Plug from an existing GtkPlug. Parameters:
  plug | A pointer to a GtkPlug.
  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).

Inti::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

void Inti::Gtk::Plug::add_to_socket | ( | Socket & | socket | ) |

  | Adds a plug to a socket within the same application. Parameters:
  socket: | A Socket.

GdkNativeWindow Inti::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.

void Inti::Gtk::Plug::remove_from_socket | ( | Socket & | socket | ) |

  | Removes a plug from a socket within the same application. Parameters:
  socket: | A Socket.

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

- plug.h

Main Page - Footer