- // X11 has two clipboards which get selected by this call. Empty on MSW.
- virtual void UsePrimarySelection( bool WXUNUSED(primary) = false ) { }
+ // this allows to choose whether we work with CLIPBOARD (default) or
+ // PRIMARY selection on X11-based systems
+ //
+ // on the other ones, working with primary selection does nothing: this
+ // allows to write code which sets the primary selection when something is
+ // selected without any ill effects (i.e. without overwriting the
+ // clipboard which would be wrong on the platforms without X11 PRIMARY)
+ virtual void UsePrimarySelection(bool usePrimary = false)
+ {
+ m_usePrimary = usePrimary;
+ }
+
+ // return true if we're using primary selection
+ bool IsUsingPrimarySelection() const { return m_usePrimary; }