Page 34 of 104

Posted: Sat Sep 30, 2006 12:52 pm
by NoahPhense
Yeah, it's great.

Thanks Gon.

- np

Posted: Thu Oct 05, 2006 7:17 pm
by Flype
Hello Gnozal, thanx again for your effort.

Just an idea :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)

Posted: Fri Oct 06, 2006 8:31 am
by gnozal
Flype wrote:Hello Gnozal, thanx again for your effort.

Just an idea :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 made a little experiment :
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))
...

Posted: Fri Oct 06, 2006 4:11 pm
by Flype
ok gnozal, i will try at home...

Posted: Fri Oct 06, 2006 5:47 pm
by SoulReaper
Thanks to Gnozal for the great work your putting in on jaPBe :)

Silly Question if I wanted to do Multi Line Rems can this be done with jaPBe...

Regards :wink:
Kevin

Posted: Fri Oct 06, 2006 5:50 pm
by Flype
Select the lines you wants and then Ctrl+B. Is that you need ?

Posted: Fri Oct 06, 2006 5:57 pm
by SoulReaper
Select the lines you wants and then Ctrl+B. Is that you need ?
Yes thats all, I am easy to please :roll: :lol: :wink:

Posted: Sat Oct 07, 2006 7:27 am
by gnozal
Flype wrote:ok gnozal, i will try at home...
Thanks.
I tried Win98SE and it works : there is a 'hand' cursor when the mouse cursor is over the hotspot.

here is chinese language file

Posted: Sat Oct 07, 2006 9:31 pm
by PureBoy
here is chinese language file
http://www.purebasic.cn/files/Chinese.txt

Re: here is chinese language file

Posted: Sun Oct 08, 2006 5:50 pm
by gnozal
PureBoy wrote:here is chinese language file
http://www.purebasic.cn/files/Chinese.txt
Thanks, I will add it in the next release.

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) ?

Re: here is chinese language file

Posted: Sun Oct 08, 2006 6:45 pm
by Flype
gnozal wrote:If the user clicks on an URL, should jaPBe start the explorer like ShellExecute_(#NULL, "open", MyClickedURL.s , #NULL, #NULL, #SW_SHOWNORMAL) ?
yes, it would be perfect :)
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")

Re: here is chinese language file

Posted: Mon Oct 09, 2006 9:04 am
by gnozal
Flype wrote:and also formatted (underlined) if possible.
and it should only work in 'commented' blocks i think (or optional).
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://'.

Re: here is chinese language file

Posted: Mon Oct 09, 2006 1:28 pm
by Dummy
gnozal wrote:
Flype wrote:and also formatted (underlined) if possible.
and it should only work in 'commented' blocks i think (or optional).
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://'.
a second check for 'mailto:' would be nice ;)

Re: here is chinese language file

Posted: Tue Oct 10, 2006 9:11 am
by nicolaus
gnozal wrote:
Flype wrote:and also formatted (underlined) if possible.
and it should only work in 'commented' blocks i think (or optional).
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://'.
and can you also check for "www."?
So a lot of peoples writen only www.bla.com and not http://www.bla.com :wink:

Nico

Re: here is chinese language file

Posted: Tue Oct 10, 2006 2:05 pm
by gnozal
nicolaus wrote:and can you also check for "www."?
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://'.
dummy wrote:a second check for 'mailto:' would be nice
Hum, yes, will see.