RaEditGadget Userlib

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Scintilla is a great lib, but is not so easy. If you use finished lexer, like the
lexer from PB, you can not change the folding word, so you can not really
support PB 4.xx. Lexer not flexible. You can create your own lexer, but this
is hard stoff :wink:
RaEdit is more easy but have not all features of scintilla.
For your own scripting language or so, raedit is the better alternate.

I think, is a very usefull lib and we working to make it easier :wink:

greetings
Thomas
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Yes, this could be a very very useful addition to Purebasic. The only thing that bothers me at the moment about using Tailbitten libraries is the outstanding problem which exists between PB 4.2 and Tailbite regarding string functions etc.

Other than that, this is great work. Thanks a lot. :)
I may look like a mule, but I'm not a complete ass.
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Agreed, I use Scintilla in Elementary Reports (not a code editor!) and it works great because its so flexible, but I would probabily use this as the editor for the DracScript section of the program.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

SRod: Hopefully this will have been figured out and fixed by PB 4.2b5 .
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

srod wrote: The only thing that bothers me at the moment about using Tailbitten libraries is the outstanding problem which exists between PB 4.2 and Tailbite regarding string functions etc.
This lib is not Tailbiten. The userlib is written in C but we will change this in
the feature, pb-coding is much easier as C for us :)
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Ah, so you created the DESC file by hand etc. Very nice. That's one way of getting around the Tailbite problem! :)
I may look like a mule, but I'm not a complete ass.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

srod wrote:Ah, so you created the DESC file by hand etc. Very nice.
So easy is it not :wink:
See here a easy example of the source:

Code: Select all

#include <windows.h>

#include "..\include\PureLibrary.h"
#include "..\include\PureObject.h"
#include "..\include\PureGadget.h"
#include "..\include\RAEdit.h"


M_PBFUNCTION int PB_RaEditAddDefBlock2(int gadget,char *start,char *end,int flags)
{
	RABLOCKDEF bd;

	bd.lpszStart = start;
	bd.lpszEnd 	 = end;
	bd.lpszNot1  = "";
	bd.lpszNot2  = "";
	bd.flag		 = flags;

	return PB_RaEditSendMessage3(gadget,REM_ADDBLOCKDEF,0,&bd);
}

M_PBFUNCTION int PB_RaEditAddDefBlock(int gadget,char *start,char *end)
{
	return PB_RaEditAddDefBlock2(gadget,start,end,0);
}
This is the ansi-version of one function. Is one of the smallest :wink:
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Rather you than me Thomas! :)

Did you not have access to the original ASM source? If so, could you not have used the ASM directly to create the user lib?
I may look like a mule, but I'm not a complete ass.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

> could you not have used the ASM directly to create the user lib?
i see no advantage in this. creating of gadgets is easier in c or pb than asm.
Supporting asm code is a fulltimejob :D
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Have you converted the entire ASM library to C then or is the C code just a wrapper in order to create the user library? I notice the static .lib in the download package.
I may look like a mule, but I'm not a complete ass.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

The C Code is only to wrappe the static ASM lib from Ketilo.
This make a Gadget and some Gadgetfunction to easy work with it.

We can also faster update, if a new version of the lib on svn.
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

That's what I figured. :)

I can see a use for this already.
I may look like a mule, but I'm not a complete ass.
User avatar
hallodri
Enthusiast
Enthusiast
Posts: 208
Joined: Tue Nov 08, 2005 7:59 am
Location: Germany
Contact:

Post by hallodri »

new version. no more a userlib, only as include.

Download under the same link
http://www.realsource.de/downloads/doc_ ... editgadget
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Thanks for that; quite some work there! 8)

With the example though I am unable to affect the #STYLE_NOHSCROLL style either when creating the gadget or through SetGadgetAttribute() etc.

Also, I cannot collapse the Procedure block.
I may look like a mule, but I'm not a complete ass.
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Post by rsts »

Wow, Mr Soft :)

This going to make me re-think my rich text editing.

Thank you for ALL of your wonderful contributions.

cheers
Post Reply