The Clipboard

Enkel kopiera/klistra in-funktionalitet för text tillhandahålls på köpet av komponenter som Gtk::Entry och Gtk::TextView, men du kan behöva specialkod för att hantera dina egna dataformat. Exempelvis skulle ett ritprogram behöva specialkod för att tillåta kopiering och inklistring i en vy, eller mellan dokument.

You can get a clipboard instance with Gtk::Widget::get_clipboard() or Gdk::Display::get_clipboard().

Your application doesn't need to wait for clipboard operations, particularly between the time when the user chooses Copy and then later chooses Paste. Many Gdk::Clipboard methods take sigc::slots which specify callback methods. When Gdk::Clipboard is ready, it will call these methods, providing the requested data.

Referens