Would it be possible to make a tripleclick select the entire paragraph, in the way that webbrowsers do it too? I regularly need to copy a certain post or message of someone which is rather long, and a simple tripleclick could speed such things up. I don't think it would clash with any existing functionality already in MUSHclient.
Triple click: select paragraph?
Posted by Worstje on Sat 02 Aug 2008 05:51 AM — 5 posts, 15,847 views.
Oh, and as an addendum... it would be nice that if the third click were to be held down, and not released, and dragged up/down, the selection would be expandable in units of entire paragraphs. Again, like a webbrowser would do it.
The triple-click is a bit of a fudge, I think. I get a ON_WM_LBUTTONDOWN message and a ON_WM_LBUTTONDBLCLK (from Windows) but not a LBUTTONTRIPLECLICK.
To make that work, I would have to:
* do nothing on a double click
* when I got a single-click, check if a double click had recently preceded it
* if I got a double-click and then no click within a certain time, process the original double click
It's all a bit of a mess.
Maybe easier if we had something like Ctrl+Alt+double-click selects a paragraph.
Mind you, how to you define "a paragraph"?
At present, if you shift + double-click it selects the current "line", which is something that can span multiple lines on the screen. That is, effectively a paragraph. Put another way, Shift+double-click selects to the next newline, and the previous newline, which may be a dozen visible lines.
If you want to select a paragraph that is defined in a different way than "to the next newline" you would need a method of knowing when we reached the end of it.
For example:
Does the paragraph (in this case lots of individual lines) end at "... rising to the northwest." or "... south west up northeast northwest.". And whatever your answer is, how do we know that, as a programmatic rule?
To make that work, I would have to:
* do nothing on a double click
* when I got a single-click, check if a double click had recently preceded it
* if I got a double-click and then no click within a certain time, process the original double click
It's all a bit of a mess.
Maybe easier if we had something like Ctrl+Alt+double-click selects a paragraph.
Mind you, how to you define "a paragraph"?
At present, if you shift + double-click it selects the current "line", which is something that can span multiple lines on the screen. That is, effectively a paragraph. Put another way, Shift+double-click selects to the next newline, and the previous newline, which may be a dozen visible lines.
If you want to select a paragraph that is defined in a different way than "to the next newline" you would need a method of knowing when we reached the end of it.
For example:
You are standing within the expanse of the famous Darkhaven Square. A
stone statue of occupies the square's center, surrounded by gardens of
shrubbery which enhance the air of serenity and peace here in the center
of the city. The main road lead away in the cardinal directions, while
to the northeast and northwest are forested paths. The spires of a
cathedral can be seen rising to the northwest.
Exits: north east south west up northeast northwest.
Does the paragraph (in this case lots of individual lines) end at "... rising to the northwest." or "... south west up northeast northwest.". And whatever your answer is, how do we know that, as a programmatic rule?
Right, shift+doubleclick has my tripleclick functionality... except that it is less intuitive and less useful. It doesn't allow to drag down on the third click and select other paragraphs.
It gets really annoying when copy-pasting something in your buffer, and finding you lack the first few characters or even first line, and/or the last few characters or last line because you didn't pixel-perfectly select the proper lines. Then you end up scrolling back, finding it, manually re-copy-pasting and fixing your original copy-paste. :(
For as far your question goes on 'other than a newline', I'm not sure. Newlines would work fine for me.
Implementation doesn't seem too difficult from what I read here: http://blogs.msdn.com/oldnewthing/archive/2004/10/18/243925.aspx. Maybe it can give you some insights on how to make it easier to implement?
On a sidenote... time after time, I find out MUSH tends to have some functionality I'm looking for, but uses some strange kind of shift/ctrl/alt combination that I honestly don't think about trying. Are those documented anywhere? (besides that, triple click would still be preferred. :P)
It gets really annoying when copy-pasting something in your buffer, and finding you lack the first few characters or even first line, and/or the last few characters or last line because you didn't pixel-perfectly select the proper lines. Then you end up scrolling back, finding it, manually re-copy-pasting and fixing your original copy-paste. :(
For as far your question goes on 'other than a newline', I'm not sure. Newlines would work fine for me.
Implementation doesn't seem too difficult from what I read here: http://blogs.msdn.com/oldnewthing/archive/2004/10/18/243925.aspx. Maybe it can give you some insights on how to make it easier to implement?
On a sidenote... time after time, I find out MUSH tends to have some functionality I'm looking for, but uses some strange kind of shift/ctrl/alt combination that I honestly don't think about trying. Are those documented anywhere? (besides that, triple click would still be preferred. :P)
Ah no, I can't find that documented anywhere, strangely enough.
Apart from here: http://www.gammon.com.au/forum/?id=7540
and here: http://www.gammon.com.au/forum/?id=6592
Well actually, I found the official documentation. :)
In tips.txt, this line:
SHIFT + double-click to select an entire paragraph in the output window.
Apart from here: http://www.gammon.com.au/forum/?id=7540
and here: http://www.gammon.com.au/forum/?id=6592
Well actually, I found the official documentation. :)
In tips.txt, this line:
SHIFT + double-click to select an entire paragraph in the output window.