jaPBe 3.13.4 [IDE for PB 4 and PB 5]
Moderator: gnozal
- NoahPhense
- Addict
- Posts: 1999
- Joined: Thu Oct 16, 2003 8:30 pm
- Location: North Florida
Hello Gnozal, thanx again for your effort.
Just an idea
Can it be possible to support hyperlinks (http:, mailto:, ...) directly in the source code
In the scintilla documentation, i find this function - it might do the trick :
Just an idea

Can it be possible to support hyperlinks (http:, mailto:, ...) directly in the source code

In the scintilla documentation, i find this function - it might do the trick :
SCI_STYLESETHOTSPOT(int styleNumber, bool hotspot)
This style is used to mark ranges of text that can detect mouse clicks. The cursor changes to a hand over hotspots, and the foreground, and background colours may change and an underline appear to indicate that these areas are sensitive to clicking. This may be used to allow hyperlinks to other documents.
SCI_STYLESETHOTSPOT(int styleNumber, bool hotspot)
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
I made a little experiment :Flype wrote:Hello Gnozal, thanx again for your effort.
Just an idea![]()
Can it be possible to support hyperlinks (http:, mailto:, ...) directly in the source code![]()
In the scintilla documentation, i find this function - it might do the trick :
SCI_STYLESETHOTSPOT(int styleNumber, bool hotspot)
This style is used to mark ranges of text that can detect mouse clicks. The cursor changes to a hand over hotspots, and the foreground, and background colours may change and an underline appear to indicate that these areas are sensitive to clicking. This may be used to allow hyperlinks to other documents.
SCI_STYLESETHOTSPOT(int styleNumber, bool hotspot)
I added SCI_STYLESETHOTSPOT(#Style_Constant, #True) in jaPBe, so that constants are hotspots. And yes, the constants are underlined when the mouse cursor is over and I get a SCN_HOTSPOTCLICK notification if I click on the constant BUT the mouse cursor disappears (no hand cursor, no cursor at all) on my NT4 ?
Could you make a test on your PC ?
Just add SCI_STYLESETHOTSPOT(#Style_Constant, #True) in jaPBe.pb in procedure SetSciEdiParameter() like
Code: Select all
... SetSCIStyle(#STYLE_BRACEBAD)
SetSCIStyle(#STYLE_LINENUMBER)
SetSCIStyle(#STYLE_INDENTGUIDE)
; //////////////////////
; HOTSPOT
SCI_STYLESETHOTSPOT(#Style_Constant, #True)
SendMessage_(GadgetID(#gadget_main_bookList),#LVM_SETBKCOLOR,0,style_Back(#Style_Procedure))
SendMessage_(GadgetID(#gadget_main_bookList),#LVM_SETTEXTCOLOR,0,style_Fore(#Style_Procedure))
...
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
-
- Enthusiast
- Posts: 372
- Joined: Sun Apr 03, 2005 2:14 am
- Location: England
-
- Enthusiast
- Posts: 372
- Joined: Sun Apr 03, 2005 2:14 am
- Location: England
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Thanks.Flype wrote:ok gnozal, i will try at home...
I tried Win98SE and it works : there is a 'hand' cursor when the mouse cursor is over the hotspot.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
here is chinese language file
here is chinese language file
http://www.purebasic.cn/files/Chinese.txt
http://www.purebasic.cn/files/Chinese.txt
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Re: here is chinese language file
Thanks, I will add it in the next release.PureBoy wrote:here is chinese language file
http://www.purebasic.cn/files/Chinese.txt
2Flype : the hotspot thing is starting to work quite well ; I will add optional hotspots for some styles like variables, structures and constants (so you only have to click on a variable to start the 'Find variable' tool or on a structure to launch the structure viewer).
If the user clicks on an URL, should jaPBe start the explorer like ShellExecute_(#NULL, "open", MyClickedURL.s , #NULL, #NULL, #SW_SHOWNORMAL) ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Re: here is chinese language file
yes, it would be perfectgnozal wrote:If the user clicks on an URL, should jaPBe start the explorer like ShellExecute_(#NULL, "open", MyClickedURL.s , #NULL, #NULL, #SW_SHOWNORMAL) ?

and also formatted (underlined) if possible.
and it should only work in 'commented' blocks i think (or optional).
ShellExecute() is ok for me :
Code: Select all
Macro OpenLink(link)
ShellExecute_(#Null, "open", link, #Null, #Null, #SW_SHOWNORMAL)
EndMacro
OpenLink("www.google.fr")
OpenLink("http://www.google.fr")
OpenLink("http://www.purebasic.com/beta/")
OpenLink("mailto:support@purebasic.com")
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Re: here is chinese language file
In the beta I am working on, the URL hotspot is activated in both comments [; blabla http://www.google.com blabla] and strings ["blabla http://www.google.com blabla"], and it has it's own style (wich can be set in preferences). To avoid multiple string checks (slowing syntax highlighting down), it only checks for 'http://'.Flype wrote:and also formatted (underlined) if possible.
and it should only work in 'commented' blocks i think (or optional).
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Re: here is chinese language file
a second check for 'mailto:' would be nicegnozal wrote:In the beta I am working on, the URL hotspot is activated in both comments [; blabla http://www.google.com blabla] and strings ["blabla http://www.google.com blabla"], and it has it's own style (wich can be set in preferences). To avoid multiple string checks (slowing syntax highlighting down), it only checks for 'http://'.Flype wrote:and also formatted (underlined) if possible.
and it should only work in 'commented' blocks i think (or optional).

Re: here is chinese language file
and can you also check for "www."?gnozal wrote:In the beta I am working on, the URL hotspot is activated in both comments [; blabla http://www.google.com blabla] and strings ["blabla http://www.google.com blabla"], and it has it's own style (wich can be set in preferences). To avoid multiple string checks (slowing syntax highlighting down), it only checks for 'http://'.Flype wrote:and also formatted (underlined) if possible.
and it should only work in 'commented' blocks i think (or optional).
So a lot of peoples writen only www.bla.com and not http://www.bla.com

Nico
my live space
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Re: here is chinese language file
Well, a correct http url has to begin with 'http://'. An advantage of this : if you don't want an url to be clickable in jaPBe, just omit the 'http://'.nicolaus wrote:and can you also check for "www."?
Hum, yes, will see.dummy wrote:a second check for 'mailto:' would be nice
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).