Logo Search packages:      
Sourcecode: agave version File versions  Download package

void gcs::Widgets::TextSwatch::on_action_copy ( void   )  [protected, virtual]

Handles the action of pressing a mouse button on a ColorSwatch object. Will pop up a context menu if one is defined, else will do nothing Handler for 'copy' item in the popup menu

Definition at line 234 of file gcs-textswatch.cc.

References gcs::Widgets::ColorSwatch::m_background, m_clipboardBuffer, on_clipboard_clear(), and on_clipboard_get().

        {
            LOG("Colorswatch on_action_copy");
            m_clipboardBuffer = m_background->get_hexstring();

            Glib::RefPtr<Gtk::Clipboard> refClipboard = Gtk::Clipboard::get();

            //Targets:
            std::list<Gtk::TargetEntry> listTargets;
            listTargets.push_back(Gtk::TargetEntry("UTF8_STRING")); 

            refClipboard->set(listTargets, 
                    sigc::mem_fun(*this, &TextSwatch::on_clipboard_get), 
                    sigc::mem_fun(*this, &TextSwatch::on_clipboard_clear));
        }


Generated by  Doxygen 1.6.0   Back to index