Author Topic: CCManager settings dialogue plan  (Read 20156 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: CCManager settings dialogue plan
« Reply #15 on: January 18, 2015, 10:24:22 am »
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.

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: CCManager settings dialogue plan
« Reply #16 on: January 18, 2015, 11:23:15 am »
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?

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: CCManager settings dialogue plan
« Reply #17 on: January 18, 2015, 06:34:38 pm »
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.

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: CCManager settings dialogue plan
« Reply #18 on: January 19, 2015, 04:41:51 pm »
Committed initial option.  Please report if it functions as expected.

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: CCManager settings dialogue plan
« Reply #19 on: January 19, 2015, 07:36:31 pm »
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?

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: CCManager settings dialogue plan
« Reply #20 on: January 19, 2015, 08:16:29 pm »
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.

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.

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: CCManager settings dialogue plan
« Reply #21 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'?

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: CCManager settings dialogue plan
« Reply #22 on: January 20, 2015, 08:49:59 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.

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: CCManager settings dialogue plan
« Reply #23 on: January 21, 2015, 12:48:52 pm »
Works fine thanks. However I never could and still don't understand the purpose of the red closing parenthesis.

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: CCManager settings dialogue plan
« Reply #24 on: January 22, 2015, 03:26:02 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.

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.

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: CCManager settings dialogue plan
« Reply #25 on: January 22, 2015, 09:31:42 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?

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: CCManager settings dialogue plan
« Reply #26 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.
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.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: CCManager settings dialogue plan
« Reply #27 on: January 24, 2015, 03:28:15 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.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: CCManager settings dialogue plan
« Reply #28 on: January 24, 2015, 10:12:59 pm »
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.

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: CCManager settings dialogue plan
« Reply #29 on: January 31, 2015, 12:07:18 am »
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.)