Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » LineEdit, EditFields, DocEdit » need some expert advice to extend the LineEdit
Re: need some expert advice to extend the LineEdit [message #38145 is a reply to message #38142] Sun, 02 December 2012 19:16 Go to previous messageGo to previous message
navi is currently offline  navi
Messages: 107
Registered: February 2012
Location: Sydney, Australia
Experienced Member
Quote:

OK, so the reason is curiosity/self-education Smile I am OK with that...

Thanks for accepting the reason to help me. big thanks for spending your time helping me.

Quote:

The EditorBar as you correctly found is what makes the line numbers work. In theory, it is nothing more than a FrameCtrl in the CodeEditors frame that paints the line numbers and other info. The "friend class" declaration is there only to allow direct access to the private members and thus make the implementation a bit simpler.

The EditorBar in CodeEditor does actually much more then line numbering. It takes alo care of annotations, breakpoints, ifdef tracking etc... To show it to you in simpler form, here is a commented example of it's very stupid cousin Wink

It is not complex at all, if you remove all the clutter around Wink Basically just a Paint function and some simple overrides in the LineEditExtended class to keep things synced.



again, big thanks and I really appreciate the you dumb down the EditorBar for me. Amazing! It would have taken me hours and hours or perhaps days to go through EditorBar's code to understand what you manage to explain in few lines of comment!

Quote:

Also, just for your reference, I attach a very simple tool I wrote for myself some time ago. It uses CodeEditor to issue commands to SqlLite database. It is rather stupid, but you can see that using CodeEditor can be very simple Wink


looking at your example program, indeed it does look codeeditor is quite easy to use. I will read the public interface thoroughly to learn how to customize it to my needs.

Quote:

To get idea of other capabilities of any class, it is always good to read the public part of its interface, the methods in U++ are usually quite self-explaining.

I agree. Most of the times they are. public interfaces of U++ class are almost hundreds of times easier then trying to make seance of the inner working of the classes themselves. though rarely but unfortunately at times the public interface aren't enough to extend the classes if need be. since codes and more impotently variables are un-commented make some times quite hard to understand them.
but thankfully for those times, great members of U++ community like yourself are around and very very helpful.

regards
navi

p.s. A question lingering in my mind, in your dumb down version of Editorbar, it is not declared as friend in LineEditExtended class unlike the CodeEditor. was that because in this version there was no need to access any private members?






 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Custom check for EditIntXxxx controls
Next Topic: How to capture Key Press events?
Goto Forum:
  


Current Time: Wed May 08 21:00:06 CEST 2024

Total time taken to generate the page: 0.02310 seconds