Folding of procedures and/or selected areas
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Eddy.
it's possible with Richedit 20A
That's the way to do it :
if dbl-click on richedit and keyword = "procedure"
if search_end_procedure
add after procedure name ";//START_FOLDING"
add after end_procedure name ";//END_FOLDING"
update_highlight()
endif
endif
In update_highlight() procedure
add "\v" before "start_folding" comment
add "\v0" after "end_folding" comment
The only problem is that the folded procedure must be uneditable.
:)BlitzBASIC - PureBASIC
it's possible with Richedit 20A
That's the way to do it :
if dbl-click on richedit and keyword = "procedure"
if search_end_procedure
add after procedure name ";//START_FOLDING"
add after end_procedure name ";//END_FOLDING"
update_highlight()
endif
endif
In update_highlight() procedure
add "\v" before "start_folding" comment
add "\v0" after "end_folding" comment
The only problem is that the folded procedure must be uneditable.
:)BlitzBASIC - PureBASIC
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by mindplay.
\v and \v0, yes, that's what I was thinking - shouldn't be that difficult really, no need to "double-buffer" the file or anything ... but making the procedure uneditable, that does raise a number of problems, which can only be solved with hard work - a lot of special conditions have to be taken into consideration, like what happens when a folded procedure is copied/pasted/deleted etc... probably folded procedure should be automatically unfolded if, for example, a copy/paste operation is performed - but strange things could still happen. I gave it a shot, but this is too complicated for me - good luck!
\v and \v0, yes, that's what I was thinking - shouldn't be that difficult really, no need to "double-buffer" the file or anything ... but making the procedure uneditable, that does raise a number of problems, which can only be solved with hard work - a lot of special conditions have to be taken into consideration, like what happens when a folded procedure is copied/pasted/deleted etc... probably folded procedure should be automatically unfolded if, for example, a copy/paste operation is performed - but strange things could still happen. I gave it a shot, but this is too complicated for me - good luck!
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by shdancer.
Hello there.
I hade the same ideia and started to do some work but alone its not so easy as it seams, because the IDE is implemented in Richedit, and i dont know how that works.
I've started also a thread in "Feature Requests and Wishlists" but i've decided to join you guys if i may?
viewtopic.php?t=5492
Just made "cat /zImage > /dev/audio" and i think i've heard God.
Hello there.
I hade the same ideia and started to do some work but alone its not so easy as it seams, because the IDE is implemented in Richedit, and i dont know how that works.
I've started also a thread in "Feature Requests and Wishlists" but i've decided to join you guys if i may?
viewtopic.php?t=5492
Just made "cat /zImage > /dev/audio" and i think i've heard God.
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by GPI.
Ok, i tested /v.
It works, BUT it will hide the lines complete (so the line-counter doesn't show the right line, because he forget to count the hidden lines.
So, no alternate...
btw: have somebody a list of the Richedit-Tags (like \v \v0) ?
PII 333, 256MB, Asus TNT2Ultra 32MB, AWE Gold 64 4MB
Ok, i tested /v.
It works, BUT it will hide the lines complete (so the line-counter doesn't show the right line, because he forget to count the hidden lines.
So, no alternate...
btw: have somebody a list of the Richedit-Tags (like \v \v0) ?
PII 333, 256MB, Asus TNT2Ultra 32MB, AWE Gold 64 4MB
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by mindplay.
Full RTF 1.5 specification is here:
http://www.biblioscape.com/rtf15_spec.htm
Full RTF 1.5 specification is here:
http://www.biblioscape.com/rtf15_spec.htm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by El_Choni.
In http://www.wotsit.org you'll find rtf 1.7 specs too... But i would wait for RichEdit lib 2.0 if I were you
Just kidding, I don't know when I'll be able to release it, but never before June, I'm afraid.
Good luck,
El_Choni
In http://www.wotsit.org you'll find rtf 1.7 specs too... But i would wait for RichEdit lib 2.0 if I were you
Good luck,
El_Choni
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Rings.
be aware Theo, RTF is a deep hole
existing Editor uses only 10% or 30% of that what the Richedit-features can be.
As i read the RTF-Docu i see room for more improvement.
Automatic-Line-numbering for example.
Do you believe For example RichText (from WindowsXP beginning) can rotate the Text easily ? .......
Its a long way to the top if you wanna .....CodeGuru
be aware Theo, RTF is a deep hole
existing Editor uses only 10% or 30% of that what the Richedit-features can be.
As i read the RTF-Docu i see room for more improvement.
Automatic-Line-numbering for example.
Do you believe For example RichText (from WindowsXP beginning) can rotate the Text easily ? .......
Its a long way to the top if you wanna .....CodeGuru
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by ricardo.
This vb code folds a code similar than VB.NET IDE
There is a screenshot
http://www.planetsourcecode.com/vb/scri ... 1&lngWId=1
Best Regards
Ricardo
Dont cry for me Argentina...
This vb code folds a code similar than VB.NET IDE
There is a screenshot
http://www.planetsourcecode.com/vb/scri ... 1&lngWId=1
Best Regards
Ricardo
Dont cry for me Argentina...