Cut, Copy, Paste String Objects

Discuss GUI programming with the MUI Royale plugin here
Post Reply
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Cut, Copy, Paste String Objects

Post by djrikki »

Wondering...

1) How I am meant to get the contents of Marked Text in a String gadget to a) Cut them from the string or b) Copy them.

2) Paste into a String gadget at the current insertion point.
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
User avatar
airsoftsoftwair
Posts: 5443
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Cut, Copy, Paste String Objects

Post by airsoftsoftwair »

AFAICS MUI doesn't provide this functionality so you'd have to ask the MUI developers to implement this first.
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Re: Cut, Copy, Paste String Objects

Post by djrikki »

Well that's kinda odd because it means CCP through RMB Context Menus is not possible.
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
User avatar
airsoftsoftwair
Posts: 5443
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Cut, Copy, Paste String Objects

Post by airsoftsoftwair »

I think MUI offers this functionality for string gadget by default, but you cannot customize it (AFAIR).
bitRocky
Posts: 120
Joined: Fri Nov 14, 2014 6:01 pm

Re: Cut, Copy, Paste String Objects

Post by bitRocky »

Hi,

under MorphOS the String.mui is really a Textinput object, so you can use all the Textinput methods and attributes!
So you could use the MUIM_Textinput_DoCopy or _DoPaste methods for copying/pasting to/from clipboard.
Also MUIM_Textinput_InsertText could interest you.
And MUIA_Textinput_MarkStart/End would be the attrs you want to get, for copying the marked part into a local string.
User avatar
airsoftsoftwair
Posts: 5443
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Cut, Copy, Paste String Objects

Post by airsoftsoftwair »

Right, this should be the same on OS4 with MUI4 so I think I can implement this in MUI Royale for MUI 4 and up. Thanks for the pointer!
Post Reply