[Linux] SctinillaGadget() v1.63 for scintilla. v0.6

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

[Linux] SctinillaGadget() v1.63 for scintilla. v0.6

Post by Inner »

For Linux version of purebasic v3.92

Read the readme :D

- What's not included in this archive ?
. Scintilla
. Pure Basic Include from the SDK

- What is included ?
. Precompiled library/resource ready to be installed into PureBasic
. The source code for the library itself, documented actually
more documentation that source :)
. This readme file
. a make file
. The compiled library is based on the lastest sources of scintilla v1.62

. a lot of sleepless nights, and blood sweet and tears!

notes:
ResizeGadget() - now works.
Last edited by Inner on Mon Apr 04, 2005 10:07 pm, edited 8 times in total.
Fred
Administrator
Administrator
Posts: 18237
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Good job Inner, it's working well :)
Fred - AlphaSND
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Post by Inner »

Thanks Fred, at lease someone replied :)

Just thought I'd release some of the helpper functions that I'm building to test the verious features of the editor.

have noted one bug so far, if the EditorID in ScintillaSendMessage() doesn't exist it will core dump.

Code: Select all

Declare Set_SciCaret(editorid.l,color.l,width.l,blinkrate.l)
Declare Set_SciCaretLine(editorid.l,color.l,visable.l)
Declare Set_SciDefaultBGrdFGrd(editorid,stylecolorbg,stylecolorfg)
Declare Set_SciFont(editorid.l,fontname.s,fontsize.l,fontantialias.l)

Procedure Set_SciCaret(editorid.l,color.l,width.l,blinkrate.l)
	ScintillaSendMessage(editorid,#SCI_SETCARETFORE,color,0)
	ScintillaSendMessage(editorid,#SCI_SETCARETWIDTH,width,0)
	ScintillaSendMessage(editorid,#SCI_SETCARETPERIOD,blinkrate,0)
EndProcedure

Procedure Set_SciCaretLine(editorid.l,color.l,visable.l)
	ScintillaSendMessage(editorid,#SCI_SETCARETLINEBACK,color,0)
	ScintillaSendMessage(editorid,#SCI_SETCARETLINEVISIBLE,visable,0)
EndProcedure

Procedure Set_SciDefaultBGrdFGrd(editorid,stylecolorbg,stylecolorfg)
	ScintillaSendMessage(editorid,#SCI_STYLESETBACK,#STYLE_DEFAULT,stylecolorbg)
	ScintillaSendMessage(editorid,#SCI_STYLESETFORE,#STYLE_DEFAULT,stylecolorfg)
	ScintillaSendMessage(editorid,#SCI_STYLECLEARALL,0,0)
EndProcedure

Procedure Set_SciFont(editorid.l,fontname.s,fontsize.l,fontantialias.l)
	antialias.s=""
	If(fontantialias=1) : antialias="!" : EndIf
	ScintillaSendMessage(editorid,#SCI_STYLESETFONT,0,fontname+antialias)
	ScintillaSendMessage(editorid,#SCI_STYLESETSIZE,0,fontsize)	
EndProcedure

Procedure Set_SciZoom(editorid,zoominout.l)
	If zoominout=#True
		ScintillaSendMessage(editorid,#SCI_ZOOMIN,0,0)
	Else
		ScintillaSendMessage(editorid,#SCI_ZOOMOUT,0,0)
	EndIf
EndProcedure
olejr
Enthusiast
Enthusiast
Posts: 152
Joined: Sun Jul 11, 2004 7:48 pm
Location: Lillehammer, No(r)way
Contact:

Post by olejr »

To busy trying it out to reply you know(!) :wink:

Good job.. Well Great(!) job.. :D
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Post by Inner »

olejr: wasn't refering to you good'o chap :) more the many people that posted in threads about it wanting it, then when it does come out 'silents', I'm putting this down to "It's not the windows version so who cares" thoery.

In that theme of windows, the windows one will come when I am happy with the linux version, I am not fully happy with it right at this moment, work wonderfully but, it needs my aprovel of satisfaction on it before I start on the windows one, which "suprise suprise" I have to relearn alot of the stuff I did for linux, on windows.

I know one thing about the windows version (to come) scintilla needs to be retargeted to output a .lib not a .dll :) which is about the only progress I've made on the subject.
Beach
Enthusiast
Enthusiast
Posts: 677
Joined: Mon Feb 02, 2004 3:16 am
Location: Beyond the sun...

Post by Beach »

I think this work you have done is wonderful, I see it as the first steps to a real Linux based PureBasic code editor. I also believe there are many like me who get excited about any work done on the Linux side of PureBasic, but who also do not speak up.

Any way, I intend to have a PureBasic/Linux free-for-all this weekend and I will mess around with this lib (if I can finish recovering my server).
-Beach
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Post by GeoTrail »

Fred, alittle off topic here.
Think you could make an install package for Linux?
Everytime I install a distro I always get problems with missing asm and other files. Would be great to have a complete install package. or atleast gz package with all nesessary files :)
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
olejr
Enthusiast
Enthusiast
Posts: 152
Joined: Sun Jul 11, 2004 7:48 pm
Location: Lillehammer, No(r)way
Contact:

Post by olejr »

@GeoTrail: Everything you need when it comes to asm and stuff is included..
When it comes to SDL/GTK stuff it all come down to what kind of distro you use.. (apt, rpm or tar.gz)..
And itis already included in your distro.. Should be anyway..
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Post by GeoTrail »

OK, remember I'm no big-time Linux buff. Just experiement with it occationally ;)

Anyways, I've seen some programs that comes with install scripts/packages. I know so since I've downloaded a few things for Mandrake and some of them can install and setup icons and such byitself. That is what I mean. I'm not too good with Linux and I'm also pretty lazy :lol:
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
Beach
Enthusiast
Enthusiast
Posts: 677
Joined: Mon Feb 02, 2004 3:16 am
Location: Beyond the sun...

Post by Beach »

What would probably help people, not familiar with Linux, is a step by step installation guide for a particular distro - from the GTK+ lib/SDL package installation all the way down to the best editor.

Would this be of interest?
-Beach
olejr
Enthusiast
Enthusiast
Posts: 152
Joined: Sun Jul 11, 2004 7:48 pm
Location: Lillehammer, No(r)way
Contact:

Post by olejr »

Well it's very easy to get pb working on linux really..
As long as you read the INSTALL file...

.. and stay away from the new WebGadget() function in v3.92.. :wink:

BTW: I'm on Mandrake myself so just ask if there's something you don't understand..

@beach: that would be a good idea...
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Post by Inner »

I once made a bash script to install it, lost it when I was messing around with parition locations, -- ahh what a nightmare that was --, had to gather my file back with a hex editor, and re-write the partition table start - ends back _by HAND!_ <shivers> I don't see any reason why I couldn't rewrite it again.

PureBasic IDE.. uhmm (working on that now, well I had to test the library with something didn't I) :D
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Post by GeoTrail »

@Beach: Yeah that would be great. My favorite distros are Mandrake, Gentoo and Xandros.

@olejr: I did a clean install of Mandrake 10.1 earlier this week and followed the install file line by line. When I typed pbcompiler I got the message which is stated in the install file. But got lots of errors when I tried to compile a simple hello program about missing files.
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
olejr
Enthusiast
Enthusiast
Posts: 152
Joined: Sun Jul 11, 2004 7:48 pm
Location: Lillehammer, No(r)way
Contact:

Post by olejr »

and the errors was??
(something gtk'ish i think..:wink:)

make sure these rpm's are installed:

libgtk+1.2-1.2.10-40
libgtk+1.2-devel-1.2.10-40
libgtk+2.0_0-2.4.9-4
libgtk+2.0_0-devel-2.4.9-4

libSDL1.2-1.2.7-7
libSDL1.2-devel-1.2.7-7

And those that these deppend on..
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Post by GeoTrail »

I'm gonna install Gentoo later tonight. Lets see how that goes :)
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
Post Reply