It is currently Sat Oct 31, 2020 5:17 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 35 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: PBEdit - a Canvas-based Texteditor
PostPosted: Wed Sep 09, 2020 10:06 pm 
Offline
User
User

Joined: Sun Oct 09, 2011 7:39 am
Posts: 22
a canvas-based Texteditor - PureBasic only - no external libraries

Features
- Basic editing
- Mouse support
- Multicursor
- Split view (needs improvement when resizing)
- Syntax highlighting
- Indentation (none, block, automatic)
- Autocomplete
- Folding
- Case correction
- Linenumbers
- "real" tabs or spaces
- Undo / Redo
- Drag & Drop
- Find / Replace Dialog (Regular Expressions supported)
- Bookmarks
- Zooming
- Repeated selections
- Horizontal / Vertical Scrollbars (optional)
- Customizable (via xml)
- DPI aware (not sure about that) - check compiler option!
- should run on Windows and Linux (Mac not tested)

Experimental (or under construction):
- Mark matching or missiong keywords and brackets
- Line continuation
- Beautify textline after return

v1.0.1
added: multilanguage support (language.cfg file)

v1.0.2
added: settings file (PBEdit.xml)

v1.0.3
a few bugs fixed

v1.0.4
fixed: bug in horizontal scroll (last chars of long textline not visible)
bug when inserting text with multiple cursors
missing colors in settings.xml
beautify procedure removed indentation when in block-mode

changed: redraw of cursor only if needed (avoid flickering)
default style is black/white
tokenizing and styling simplified

added: enhanced character table (use all 65535 characters instead of only 255)
if needed, set #TE_CharRange to 65536

v1.0.5
changed: the cursor now has its own timer and the scroll timer is only activated if needed
added: french translation (thx, Mesa!)

v1.0.6
fixed: a few scrolling related issues
changed: removed the "ID" Parameter from the Procedure "Editor_New". The return value now is a pointer to the TE_STRUCT
(not the canvas ID anymore)
added: PostEvent to signal cursor changes (#TE_Event_Cursor) or selection changes (#TE_Event_Selection)

Download


Last edited by Mr.L on Mon Sep 28, 2020 7:08 am, edited 9 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: PBEdit - a Canvas-based Texteditor
PostPosted: Wed Sep 09, 2020 10:27 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Apr 27, 2003 8:12 am
Posts: 2075
Location: USA
Very nice! It runs fine on OS X. I edited line 3438. The font size was small on my MacBook Air 11".

Code:
*font\nr   = LoadFont(#PB_Any, fontName, (fontSize / DesktopResolutionY()) * 1.5, fontStyle)


At idle, it uses 12% CPU and 64 MB of memory. I have an Intel 1.4 Ghz dual core CPU. Not bad. ;)

_________________
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef

Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT


Even the vine knows it surroundings but the man with eyes does not.


Top
 Profile  
Reply with quote  
 Post subject: Re: PBEdit - a Canvas-based Texteditor
PostPosted: Wed Sep 09, 2020 10:54 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 6:14 pm
Posts: 1860
Location: Germany (Saxony, Deutscheinsiedel)
Well done, thanks for sharing! :D

_________________
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)


Top
 Profile  
Reply with quote  
 Post subject: Re: PBEdit - a Canvas-based Texteditor
PostPosted: Wed Sep 09, 2020 11:09 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jan 10, 2008 1:30 pm
Posts: 1306
Location: Germany, Glienicke
Wow, that's impressive.
I think this code is one of the first really working editors.

Many thanks for sharing.

How long did you worked on this version?

_________________
ImageImage


Last edited by STARGÅTE on Wed Sep 09, 2020 11:17 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: PBEdit - a Canvas-based Texteditor
PostPosted: Wed Sep 09, 2020 11:16 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Mar 02, 2004 1:20 pm
Posts: 1150
Location: Amphibios 9
Amazing! Image

Thanks for sharing ... Peter

_________________
Hygge


Top
 Profile  
Reply with quote  
 Post subject: Re: PBEdit - a Canvas-based Texteditor
PostPosted: Thu Sep 10, 2020 12:04 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Jun 24, 2006 3:29 am
Posts: 262
Location: Edinburgh, Scotland.
Very cool work. Multiple cursors mode seems to work great. Column selection mode like UltraEdit would be a nice addition.

Impressive and very useful. Thx.

_________________
Proud supporter of PB! * Musician * C64/6502 Freak


Top
 Profile  
Reply with quote  
 Post subject: Re: PBEdit - a Canvas-based Texteditor
PostPosted: Thu Sep 10, 2020 7:54 am 
Offline
Addict
Addict
User avatar

Joined: Wed Apr 30, 2003 8:15 am
Posts: 1049
Location: Germany
Wow, very impressive! Thx Mr. L!

_________________
"Daddy, I'll run faster, then it is not so far..."


Top
 Profile  
Reply with quote  
 Post subject: Re: PBEdit - a Canvas-based Texteditor
PostPosted: Thu Sep 10, 2020 8:39 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Apr 05, 2020 11:28 am
Posts: 288
Location: Pandora
An amazing work, really very beautiful !

_________________
地球上の平和


Top
 Profile  
Reply with quote  
 Post subject: Re: PBEdit - a Canvas-based Texteditor
PostPosted: Thu Sep 10, 2020 8:54 am 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14122
Location: France
Very nice


Top
 Profile  
Reply with quote  
 Post subject: Re: PBEdit - a Canvas-based Texteditor
PostPosted: Thu Sep 10, 2020 9:09 am 
Offline
Addict
Addict

Joined: Wed Nov 12, 2008 5:01 pm
Posts: 1128
Location: Russia
The editor only supports English characters and numbers.

_________________
Library XP_Menu_Lib - office menu; HID_Lib - USB Library
Torrent client - pbTorrent (source code); Create driver in PureBasic.


Top
 Profile  
Reply with quote  
 Post subject: Re: PBEdit - a Canvas-based Texteditor
PostPosted: Thu Sep 10, 2020 9:10 am 
Offline
Addict
Addict

Joined: Sun Sep 07, 2008 12:45 pm
Posts: 4995
Location: Germany
Nice work.

I think horizontal and vertical split are swapped :wink:


Top
 Profile  
Reply with quote  
 Post subject: Re: PBEdit - a Canvas-based Texteditor
PostPosted: Thu Sep 10, 2020 10:00 am 
Offline
Enthusiast
Enthusiast

Joined: Fri Feb 24, 2012 10:19 am
Posts: 197
Very impressive.

With windows XP 32, there is something wrong with the pop-up menu.
I had to replace, line 874 and under:
Code:
MenuItem(#TE_Menu_Cut, "Cut" + RSet("", 5, #TAB$) + "Ctrl+X")

by
Code:
MenuItem(#TE_Menu_Cut, "Cut" + #TAB$ + RSet("", 5, " ") + "Ctrl+X")

etc.

Multi languages might be very useful :)


M.


Top
 Profile  
Reply with quote  
 Post subject: Re: PBEdit - a Canvas-based Texteditor
PostPosted: Thu Sep 10, 2020 12:41 pm 
Offline
User
User

Joined: Wed May 13, 2009 8:38 am
Posts: 87
Location: Arizona, USA
Amazing, Thank You for sharing.


Top
 Profile  
Reply with quote  
 Post subject: Re: PBEdit - a Canvas-based Texteditor
PostPosted: Thu Sep 10, 2020 4:06 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Jul 19, 2013 7:36 am
Posts: 233
Location: Novosibirsk
Thank you very much.
I'm trying to move to spiderbasic.

_________________
Dawn will come inevitably. ( Рассвет наступит неизбежно )


Top
 Profile  
Reply with quote  
 Post subject: Re: PBEdit - a Canvas-based Texteditor
PostPosted: Thu Sep 10, 2020 4:51 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Dec 23, 2009 10:14 pm
Posts: 3342
Location: Boston, MA
Great Job Mr.L :!:
The split view seems quirky, as infratec noted.

_________________
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 35 posts ]  Go to page 1, 2, 3  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye