Posted: Sat Sep 30, 2006 12:52 pm
Yeah, it's great.
Thanks Gon.
- np
Thanks Gon.
- np
http://www.purebasic.com
https://www.purebasic.fr/english/
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 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)
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))
...
Yes thats all, I am easy to please :roll:Select the lines you wants and then Ctrl+B. Is that you need ?
Thanks.Flype wrote:ok gnozal, i will try at home...
Thanks, I will add it in the next release.PureBoy wrote:here is chinese language file
http://www.purebasic.cn/files/Chinese.txt
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) ?
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")
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).
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).
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).
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