From: Christian P. <cp...@se...> - 2005-01-18 09:28:57
|
Am Montag 17 Januar 2005 23:45 schrieb stephan beal: > Yo! > > i just remembered that i have some s11n-based clipboard code in > s11nbrowser (http://s11n.net/s11nbrowser/), and realized it would be > really useful in P2. Before i start porting it i'd like to ask which > module it should belong to? My original thought is App, but it's more > generic than that, and can be used at the general framework level. > Maybe the SIO module would be appropriate? In general, i like to have clipboard support in P2. It should belong to the UI module - cause it is highly UI dependant. While looking at your code i wonder why it is called "clipboard" ? For real clipboard support we need at least an interface to X11/Win32 clipboard. > > It requires sigs/slots, but this support could be easily removed, and of > course s11n (or SIO). Attached is the original (trivial) > implementation, for the curious. In short, it allows saving any > Serializable object to a clipboard (and an arbitrary number of > clipboards may exist). Slots are used to notify listeners when the > clipboard is updated. The slots support isn't strictly necessary, but > seems useful, and is definately useful in a UI context. For example, in > s11nbrowser we connect to slots to update the clipboard-related > menus/buttons to reflect the current clipboard state. |