It is currently Thu May 23, 2013 11:58 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 273 posts ]  Go to page Previous  1 ... 13, 14, 15, 16, 17, 18, 19  Next
Author Message
 Post subject: Re: GoScintilla - 2.2 (Purebasic 4.5 only)
PostPosted: Mon Apr 09, 2012 3:44 pm 
Offline
Enthusiast
Enthusiast

Joined: Tue Nov 09, 2010 10:15 pm
Posts: 794
I made this slight change to AddKeywords to speed it up when changing styling. It could probably be applied to all procs that call RestyleLines. It is backwards compatible.
(See the argument restyle.i = #True and the test for it when calling RestyleLinesXXX).

Code:
;/////////////////////////////////////////////////////////////////////////////////
;The following function records a list of keywords to use the style specified. The list of words are to be separated by space characters.
;Note that only Ascii characters must be used within each keyword.
;Duplicates are simply replaced.
;Set keywordFlags to one (or more) of the keyword flags #GOSCI_OPENFOLDKEYWORD, #GOSCI_CLOSEFOLDKEYWORD or GOSCI_ADDTOCODECOMPLETION ... etc.
Procedure GOSCI_AddKeywords(id, keyWords$, styleIndex=#STYLE_DEFAULT, keywordflags=0, blnSortKeywords=#False, restyle.i = #True)
  Protected *this._GoScintilla, t1
  If GOSCI_AddKeywordsXXX(id, keyWords$, styleIndex, keywordFlags)
    *this = GetGadgetData(id)
    If *this
      If blnSortKeywords
        If *this\flags & #GOSCI_KEYWORDSCASESENSITIVE = 0
          t1 = #PB_Sort_NoCase
        EndIf
        SortStructuredList(*this\Keywords(), #PB_Sort_Ascending|t1, OffsetOf(GoScintillaKeyword\keyWord$), #PB_Sort_String)
      EndIf
    EndIf
     If restyle = #True
        GOSCI_RestyleLinesXXX(ID, 0, -1)
     EndIf
  EndIf
EndProcedure
;/////////////////////////////////////////////////////////////////////////////////


Top
 Profile  
 
 Post subject: Re: GoScintilla - 2.2 (Purebasic 4.5 only)
PostPosted: Mon Apr 09, 2012 5:59 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Oct 31, 2004 10:54 am
Posts: 511
Thanks :)

Turbo for my EPB editor :D

_________________
Image
************************************
site : http://michel.dobro.free.fr/
Videos : http://www.youtube.com/user/DobroMG
************************************


Top
 Profile  
 
 Post subject: Re: GoScintilla - 2.2 (Purebasic 4.5 only)
PostPosted: Fri Apr 20, 2012 2:41 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Nov 25, 2011 10:40 pm
Posts: 165
Location: Germany, Ulm
How to add a comment style like in jaPBe to style as comment and the hole background of the line?

;-
or
;/

_________________
Important Appeal
Mevedia Control Framework
Cross-platform Solution with full Theme-Support for Workspace,
Grid\Tree\List, Menu & Node, Scroll Bar&Area, Button, Swift, Aerotic,
PropertyBox and more. Especially designed for PureBasic.

Image
Image


Top
 Profile  
 
 Post subject: Re: GoScintilla - 2.2 (Purebasic 4.5 only)
PostPosted: Fri Apr 20, 2012 6:33 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 9870
Location: Beyond the pale...
User-defined line styling function! :wink:

One of the advanced demos should get you started.

Afraid I've no time to hack up some code for you right now.

_________________
I may look like a mule, but I'm not a complete ass.

eScript
Arctic Reports
nxSoftware


Top
 Profile  
 
 Post subject: Re: GoScintilla - 2.2 (Purebasic 4.5 only)
PostPosted: Fri Apr 20, 2012 7:17 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Nov 25, 2011 10:40 pm
Posts: 165
Location: Germany, Ulm
Okay, thanks :D but i dont know how to style full line like caret. it only styles to the end of line.
(tried with your example "REM")

_________________
Important Appeal
Mevedia Control Framework
Cross-platform Solution with full Theme-Support for Workspace,
Grid\Tree\List, Menu & Node, Scroll Bar&Area, Button, Swift, Aerotic,
PropertyBox and more. Especially designed for PureBasic.

Image
Image


Top
 Profile  
 
 Post subject: Re: GoScintilla - 2.2 (Purebasic 4.5 only)
PostPosted: Fri Apr 20, 2012 8:23 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 9870
Location: Beyond the pale...
Ah, I would guess that JaPBe uses a marker for this (you can use markers to change the back color of individual lines). It is quite easy to do, but you will need to dip into the Scintilla API to define the marker and then add the marker to and remove the marker from lines as and when required.

_________________
I may look like a mule, but I'm not a complete ass.

eScript
Arctic Reports
nxSoftware


Top
 Profile  
 
 Post subject: Re: GoScintilla - 2.4 (Purebasic 4.5 onwards)
PostPosted: Thu May 03, 2012 7:05 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 9870
Location: Beyond the pale...
GoScintilla 2.4 - 3rd May 2012

GoScintilla 2.4 fixes a massive bug with code folding.

Please see the nxSoftware site for the download.

_________________
I may look like a mule, but I'm not a complete ass.

eScript
Arctic Reports
nxSoftware


Top
 Profile  
 
 Post subject: Re: GoScintilla - 2.4 (Purebasic 4.5 onwards)
PostPosted: Sat May 05, 2012 9:48 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Dec 03, 2011 5:54 pm
Posts: 252
Hi,

i just tried out this library and it works fine, except of that i am not able to change the style font. When i do this
Code:
GOSCI_SetFont(1, "Monospace", 11)
all text is italic, but the font face has not changed. I am on Fedora 16 64-bit. Any ideas?

Uwe

_________________
Purebasic 5.11 | Fedora 18 (32-bit)


Top
 Profile  
 
 Post subject: Re: GoScintilla - 2.4 (Purebasic 4.5 onwards)
PostPosted: Sat May 05, 2012 10:11 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 9870
Location: Beyond the pale...
Nope.

:)

Works fine here on Windows.

_________________
I may look like a mule, but I'm not a complete ass.

eScript
Arctic Reports
nxSoftware


Top
 Profile  
 
 Post subject: Re: GoScintilla - 2.5 (Purebasic 4.5 onwards)
PostPosted: Sat May 05, 2012 10:50 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 9870
Location: Beyond the pale...
GoScintilla 2.5 - 5th May 2012

GoScintilla 2.5 adds an optional parameter (restyle = #True) to certain functions which can be used to stop GoScintilla redrawing a control's contents whilst we set/reset individual style parameters. Useful if you are altering styles after loading text into a control, otherwise every single alteration will result in the entire document being restyled which can result in some serious delays if there is a lot of text loaded into the control.

You can of course use the GOSCI_SetState() function to restyle the entire document when you are done making alterations.

No existing code will be broken by these changes.

The help manual has been updated.

Thanks to Tenaja.

Please see the nxSoftware site for the download.

_________________
I may look like a mule, but I'm not a complete ass.

eScript
Arctic Reports
nxSoftware


Top
 Profile  
 
 Post subject: Re: GoScintilla - 2.5 (Purebasic 4.5 onwards)
PostPosted: Sun May 06, 2012 7:22 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Dec 03, 2011 5:54 pm
Posts: 252
Hi,

in your example codes you use the line
Code:
IncludePath "..\..\"

which is not compatible with Linux. If you use the normal slash, the code works with Linux and Windows as well!
Code:
IncludePath "../../"


Best regards
Uwe

_________________
Purebasic 5.11 | Fedora 18 (32-bit)


Top
 Profile  
 
 Post subject: Re: GoScintilla - 2.5 (Purebasic 4.5 onwards)
PostPosted: Sun May 06, 2012 7:26 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 9870
Location: Beyond the pale...
Yes good point. I have been endeavoring to do just that with my latest work; have overlooked GoScintilla it would seem. :)

Thanks. I will change that.

_________________
I may look like a mule, but I'm not a complete ass.

eScript
Arctic Reports
nxSoftware


Top
 Profile  
 
 Post subject: Re: GoScintilla - 2.5 (Purebasic 4.5 onwards)
PostPosted: Wed May 09, 2012 9:18 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Dec 03, 2011 5:54 pm
Posts: 252
Hi,
is there a way to auto-correct capitalisation of registered keywords,. e.g. if they were typed in lower case only?
Best regards
Uwe

_________________
Purebasic 5.11 | Fedora 18 (32-bit)


Top
 Profile  
 
 Post subject: Re: GoScintilla - 2.5 (Purebasic 4.5 onwards)
PostPosted: Wed May 09, 2012 9:25 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Dec 03, 2011 5:54 pm
Posts: 252
Hi again, just forgot to say: Your example codes are better for Linux users if you do something like this:
Code:
CompilerIf #PB_Compiler_OS = #PB_OS_Windows
  GOSCI_SetFont(1, "Courier New", 10)
CompilerElse
  GOSCI_SetFont(1, "!Monospace", 10)
CompilerEndIf
Otherwise all fonts are styled italic. This is the behavior if a fontname is not known :-|

_________________
Purebasic 5.11 | Fedora 18 (32-bit)


Top
 Profile  
 
 Post subject: Re: GoScintilla - 2.5 (Purebasic 4.5 onwards)
PostPosted: Wed May 09, 2012 10:10 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 9870
Location: Beyond the pale...
uwekel wrote:
Hi,
is there a way to auto-correct capitalisation of registered keywords,. e.g. if they were typed in lower case only?
Best regards
Uwe


Not easily no. It would need a bit of work before GoScintilla could be made to support that feature.

It might well be something I could use myself however and so may well get around to adding that.

_________________
I may look like a mule, but I'm not a complete ass.

eScript
Arctic Reports
nxSoftware


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 273 posts ]  Go to page Previous  1 ... 13, 14, 15, 16, 17, 18, 19  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye