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

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Post by GeoTrail »

I tried opening the config file in qedit but it says it is read only.
Maybe I need to login is root with the shell thing and open the file from there? Not sure....
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Post by Inner »

For PureBasic v3.92

* Linux

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

- What is included ?
. Compiled library/resource ready to be installed into PureBasic
. The source code for the library itself, documented actually
more documentation that source Smile
. This read me file
. a make file
. The compiled library is based on the lastest sources of scintilla v1.62
. Quick and easy include to access some (but not all) of scintilla's features.
. a lot of sleepless nights, and blood sweet and tears!

0.2 - Fixed: *_DEBUG from compiler complain that they didn't exist when -d
option was invoked.

Fixed: flags, they are now mandatory, pass 0 to ScintillaGadget for no
flags, the flags are to do with setting the #SCI_SETMODEVENTMASK see
scintilla docs about those.

Patched: LexBasic to fix the #CONSTANT being fully coloured, currently
colors as an identifier, (to be fixed also).

Fixed: SCNotification, had incorrect datatypes for values.

Fixed: Documentation to refelect the correct functions, and added results

Fixed: my spelling Smile

Added: GetScintillaNotifyStruct()

Added: notification id's to EventType()

Added: ScintillaGadget(GadgetID,x,y,Width,Height,flags) we're now using the
flags argument, see documentation.

Added: scintilla.pb include to the distribution archive for quick and
easy access to some of the features to scintilla.
found in /examples/

Download it here : http://home.clear.net.nz/pages/tjrought ... lav0.2.tgz
olejr
Enthusiast
Enthusiast
Posts: 152
Joined: Sun Jul 11, 2004 7:48 pm
Location: Lillehammer, No(r)way
Contact:

Post by olejr »

Good work!!
(I know how many hours that's gone into it..:shock: )
btw: you should update/remove the download link at the start of the thread..:wink:
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Post by Inner »

Fixed ;)
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Post by Inner »

0.3 - Fixed: My internal version number PUREBASIC_SCINTILLA_VER

Patched: Scintilla LexBasic.cxx with new rules for folding, which fixed a bug.

http://home.clear.net.nz/pages/tjrought ... lav0.3.tgz
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Post by Inner »

0.4 - Fixed: License, was the incorrect one.

Fixed: src_scintilla.pb missing argument with flags that appeared in 0.2

Fixed: huge bug since 0.1 with the install command for make.

Added: support for GTK1, default is still GTK2, read docs for more info.


http://athecks.com/~inner/pbscintillav0.4.tgz (1.7mb)
olejr
Enthusiast
Enthusiast
Posts: 152
Joined: Sun Jul 11, 2004 7:48 pm
Location: Lillehammer, No(r)way
Contact:

Post by olejr »

Well done!!

Found one thing in the read me..
!- gtk1

cp pbscintilla/bin/gtk1/scintilla /usr/share/purebasic/purelibraries
cp pbscintilla/bin/scintilla.res /usr/share/purebasic/residents

!- gtk2

cp pbscintilla/bin/gtk2/scintilla /usr/share/purebasic/purelibraries
cp pbscintilla/bin/scintilla.res /usr/share/purebasic/residents
Shouldn't the gtk2 one be:
!- gtk2

cp pbscintilla/bin/gtk2/scintilla /usr/share/purebasic/subsystems/gtk2/purelibraries
cp pbscintilla/bin/scintilla.res /usr/share/purebasic/residents
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Post by Inner »

yes it should be, docs fixed.. will be in 0.5 :)
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Post by Inner »

0.5 - Fixed: copy location instructions, forgot we've got a subsystem now Smile

Fixed: Notification Bug, was HUGE! and has required some major changes to
the library, please accept my appologies for this over sight, and
read the docs for the updates.

- 0.5> commands alterations

. From v0.5 GetScintillaNotifyStruct() is no longer a command it has been replaced
with a callback function which you provide in PureBasic, see end of document for
how to write a callback.

-------------------------------------------------------------------------------
NAME
ScintillaCallBack -- Obtains messages from a scintilla gadget

SYNOPSIS
ScintillaCallBack(hwnd.l,gid.l,*scinotify.SCNotification,lParam.l)

FUNCTION
You can call this function anything you like but for the purpose of
description, we'll define it like it already is one.

This 'user created callback function' is passed to the scintillagadget
at creation time;

ScintillaGadget(editorid,0,0,200,200,flags,@ScintillaCallBack())

INPUTS
gadget address - address of the gadget that coured the event
gid - gadget id that coursed the event
*SCNotification - a pointer to the notification structure see example:
LParam - argument 2, is unkown so define it anyway!

EXAMPLE

Procedure ScintillaCallBack(hwnd.l,gid.l,*scinotify.SCNotification,lParam.l)
Select *scinotify\nmhdr\code
Case #SCN_CHARADDED
Case #SCN_MARGINCLICK
EndSelect
EndProcedure

http://graygriffen.net/~inner/pbscintillav0.5.tgz
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

Inner -> I'm working with 0.4 of your lib (don't have time to update, i'll do it in the week end ;)), and what i can say is wow ! Everything is working great !
Do you have the intention of doing the same for windows ? I mean, not wrapping the dll Scilexer.dll, but doing an userlib with the lib included in it like in the linux version, so we'll have everything in the .exe in windows and in linux ? If you can do that, your lib will become even better for me, i'll be able to code seamless in windows and linux with scintilla ;)
Thx again for your great job !!
Gaetan
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Post by Inner »

Polo wrote:Inner -> I'm working with 0.4 of your lib (don't have time to update, i'll do it in the week end ;)), and what i can say is wow ! Everything is working great !
Do you have the intention of doing the same for windows ? I mean, not wrapping the dll Scilexer.dll, but doing an userlib with the lib included in it like in the linux version, so we'll have everything in the .exe in windows and in linux ? If you can do that, your lib will become even better for me, i'll be able to code seamless in windows and linux with scintilla ;)
Thx again for your great job !!
Gaetan
Aproximately a month or so ago, I attempted that very thing.. I/we successfully got the scintilla onto the window, of a windows application, but that is as far as we got, while this was a great attachivement it has very large draw backs, those being at anytime during scintillas version upgrade path, I would have to manually hack scintilla to conform to be even compilable, this presents itself with a large bahemoth of work everytime scintillas upgraded, not something I relish doing, the second problem was that the lexers mysteriously disappeared and couldn't be used it is still to this day unknown why this is the case, the 3rd and final problem was getting notifications working, however with the appearance of the new 'callback' process on 0.5 this may not be an issuse as much as it was anymore.

You see on linux it's all very simple, all I need to do is recompile scintilla and recompile my lib, that's it for an update.. for windows it is mountain of things to remember to do before you compile or even attempt to, and the fact that I detest windows I guess doesn't give me enough motorvation to do it, that said I'm still looking for ideas.

The last idea that I had was, make the user lib as normal, but have it use the DLL's, this I believe personally isn't how I wanted it.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

So it's not possible to have a real userlibrary of scintilla for windows, which would not use the dll ? So sad, it's so good to have this possibility on linux :( What i like in your library is that we use it like an usual gadget and we can use normal command on it like ResizeGadget ;)
So i'll follow using the dll for windows and your lib for linux ;)
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Post by Inner »

Don't dispare completely. :) Windows won a battle not the war :) very rarely do allow defeet, just matter of time and presure, e.g a hammer :D
User avatar
Inner
PureBasic Expert
PureBasic Expert
Posts: 714
Joined: Fri Apr 25, 2003 4:47 pm
Location: New Zealand

Post by Inner »

0.6 - Fixed: Double Connect Signal
Updated: Scintilla 1.62 to 1.63

http://graygriffen.net/~inner/pbscintillav0.6.tgz
Post Reply