I am using a linked list to store all line data of my edit control.
Now i am facing this problem with the wm_paint msg-
To paint the window i have to iterate through the whole list to get the data of the topline through which i start painting. Now in a big file this iteration can really slow down the editor.
So how do i get rid of this problem?
What should i do? Is it that this whole approach is wrong and i should use some other abstraction? if yes, which one?
Now i am facing this problem with the wm_paint msg-
To paint the window i have to iterate through the whole list to get the data of the topline through which i start painting. Now in a big file this iteration can really slow down the editor.
So how do i get rid of this problem?
What should i do? Is it that this whole approach is wrong and i should use some other abstraction? if yes, which one?
On my edit control, I store the topline in a var, so that I always know where to start drawing.
This var is updating on scrolling, moving, etc...
Just an idea... Tell me if it's not a good one !
(s)
This var is updating on scrolling, moving, etc...
Just an idea... Tell me if it's not a good one !
(s)
i had thought of that first but then as these C pointer confuse the hell outts me i somehow got the notion that i would have to store the entire list 2 times. but f0dder just cleared my doubts on icq.
Thanks for replying anyway:)
btw, how far have you reached with your edit control, (scalp).
Thanks for replying anyway:)
btw, how far have you reached with your edit control, (scalp).
For the moment, it can display asm text with some syntax highlighting (comment and string). When you type "displaylable" char, it update the buffer.
It also do horizontal scroll if the line is too big.
For the moment, no caret, no moving...
(s)
It also do horizontal scroll if the line is too big.
For the moment, no caret, no moving...
(s)
umm..... What do u use to search for keywords for syntax highlighting? A binary tree or something?
for the moment, it only display string in green and comment in blue.
I don't search for keyword yet... i have some other thing to think of (like using the mouse, moving the caret left/right...)
(s)
I don't search for keyword yet... i have some other thing to think of (like using the mouse, moving the caret left/right...)
(s)