News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

CCManager settings dialogue plan

Started by Alpha, November 04, 2014, 12:58:28 AM

Previous topic - Next topic

ollydbg

Tooltip and calltip are different. The former is generated when mouse dwells. The later is shown when you are entering functions. So, do we need two options?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

scarphin

I don't think 2 separate options are needed. Only one 'enable on keypress only' for both of them would be enough imo. But I think it would be better if tooltips had a shortcut to launch them like debugger's 'Evaluate expression' tooltips.

Btw tooltips and calltips are displayed with a color (black on white background) which is not compatible with my theme colors (white on black background). But debugger's tooltips are displayed in compatible colors with my theme. Can this be applied to cc's tooltips and calltips too?

Alpha

Quote from: scarphin on January 18, 2015, 11:23:15 AM
Btw tooltips and calltips are displayed with a color (black on white background) which is not compatible with my theme colors (white on black background). But debugger's tooltips are displayed in compatible colors with my theme. Can this be applied to cc's tooltips and calltips too?
I believe the relevant API is wxScintilla::CallTipSetBackground(), CallTipSetForeground(), and CallTipSetForegroundHighlight().  If you want to write up a quick, that would be nice.  Otherwise I should hopefully get to it soon.

Alpha

Committed initial option.  Please report if it functions as expected.

scarphin

I thought the tooltip shortcut would activate the tooltip for the expression under the mouse not the cursor but it will do, one extra click won't do much harm imo. ;) Thanks.

However there is an issue. When a function with arguments is completed, calltip kicks in automatically. Can this also be tied to the 'keybound only' setting like not launching automatically?

And for the color preferences will it be okay if I manage to submit a patch to tie the back, fore and highlight color settings to the color manager as the documentation popup settings are already there?

Alpha

My thoughts had been that the logical expectation of a keyboard shortcut would be to activate on the keyboard's focus point (the caret/cursor), similar to how show calltips shortcut works.

Quote from: scarphin on January 19, 2015, 07:36:31 PM
When a function with arguments is completed, calltip kicks in automatically. Can this also be tied to the 'keybound only' setting like not launching automatically?
Yes, will do.

Tying to those settings sounds fine, in my opinion.

scarphin

Attached a patch for the color configuration of tooltips. I'm not sure where to load the colors for tooltips though. I opted to load them in 'OnEditorOpen' but would it be better to load them in 'DoUpdateCallTips'?

Alpha

Quote from: Alpha on January 19, 2015, 08:16:29 PM
Quote from: scarphin on January 19, 2015, 07:36:31 PM
When a function with arguments is completed, calltip kicks in automatically. Can this also be tied to the 'keybound only' setting like not launching automatically?
Yes, will do.
Committed.

scarphin

Works fine thanks. However I never could and still don't understand the purpose of the red closing parenthesis.

Alpha

Quote from: scarphin on January 20, 2015, 12:47:19 AM
Attached a patch for the color configuration of tooltips. I'm not sure where to load the colors for tooltips though. I opted to load them in 'OnEditorOpen' but would it be better to load them in 'DoUpdateCallTips'?
Committed, thanks (I did swap your values with default colours that better match previous settings).  I think that loading them once per editor should be fine.  No need for extra overhead.

Quote from: scarphin on January 21, 2015, 12:48:52 PM
However I never could and still don't understand the purpose of the red closing parenthesis.
Assuming we are talking about the same thing, that is "smart tab jump".  Press tab to jump the caret past closing parenthesis and quotes (one step at a time) for the remainder of the line.  Can be useful when inserting more code at the beginning of a pre-existing line.

scarphin

Quote from: Alpha on January 22, 2015, 03:26:02 AM
Assuming we are talking about the same thing, that is "smart tab jump".  Press tab to jump the caret past closing parenthesis and quotes (one step at a time) for the remainder of the line.  Can be useful when inserting more code at the beginning of a pre-existing line.
I now know what it is, thanks. I guess it's an editor feature that I can't disable?

ollydbg

Smart tab jump is a feature added by Loaden in our editor control several years ago. But he is inactive now. Not sure there is an option to disable it.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

ollydbg

Quote from: ollydbg on January 22, 2015, 04:06:30 PM
Smart tab jump is a feature added by Loaden in our editor control several years ago. But he is inactive now. Not sure there is an option to disable it.

@scarphin, the related code is in sdk\cbstyledtextctrl.cpp, and you can search the keyword by "m_tabSmartJump".
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

dmoore

Think you should seriously consider splitting the CodeCompletion settings out into their own dialog(ue). The way the debugger manager handles this is a good model IMHO.
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

Alpha

Quote from: dmoore on January 24, 2015, 10:12:59 PM
Think you should seriously consider splitting the CodeCompletion settings out into their own dialog(ue).
I put the global ones where they are now since that rectangle was just awkward empty space before.  I agree that a dedicated dialogue (dialog? ... I never figured this one out either) would make it more clear, but I myself do not have time to build one anytime soon.

(Sorry for the delay.)