Libs : scintilla gadget (beta 4) for PB3.94

Windows specific forum
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Libs : scintilla gadget (beta 4) for PB3.94

Post by eddy »

Download library : ScintillaGadget.zip ( Extract to your PB folder and restart your PB compiler. )

Features:
- init DLL library & export scintilla internal variable
- use gadget
- load source ( loading file + AppendMode )
- save source ( saving file )
- copy source ( clone gadget text )
- set popupmenu
- set tabstop mode
- set lexer
- mouse pan (intellimouse bug fix)
- new specific EventTypes ( SCI_EventType_Focus, SCI_EventType_LeftClick,... )
- ADDED : doc
- ADDED : example

Image
Last edited by eddy on Fri Mar 17, 2006 5:11 pm, edited 11 times in total.
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
mag
Enthusiast
Enthusiast
Posts: 104
Joined: Mon Mar 29, 2004 1:46 pm

Post by mag »

Hi, why tab didn't work on all default Scintilla text. I try a few program that show how to load Scintilla text using pb and all cannot use tab by default. I study tab command on Scintilla message and try all of them, nothing change.

How actually to control tab and indent? What command to use.

Thanks in advance..
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

mag wrote:Hi, why tab didn't work on all default Scintilla text. I try a few program that show how to load Scintilla text using pb and all cannot use tab by default. I study tab command on Scintilla message and try all of them, nothing change.

How actually to control tab and indent? What command to use.

Thanks in advance..

Code: Select all

  Width = 4
  Flag = 1
  CallFunctionFast(MessagePointer,hWnd.l,#SCI_SETTABWIDTH,Width,0)
  CallFunctionFast(MessagePointer,hWnd.l,#SCI_SETUSETABS,Flag,0)
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
mag
Enthusiast
Enthusiast
Posts: 104
Joined: Mon Mar 29, 2004 1:46 pm

Post by mag »

Still not working. Could you see my code. where bug..

Code: Select all

#SCI_SETTABWIDTH        = 2036
#SCI_SETUSETABS         = 2124
#SCI_GETDIRECTPOINTER   = 2185
#SCI_GETDIRECTFUNCTION  = 2184
#SCI_SETTEXT            = 2181

#STYLE_DEFAULT = 32 
#SCLEX_PUREBASIC = 67 

global scilexer.l
scilexer = OpenLibrary(#PB_Any, "SciLexer.dll") 
If scilexer = 0 
    MessageRequester("Error", "Couldn't open SciLexer.dll") 
    End 
EndIf 

OpenWindow(0, 0, 0, 600, 400, #PB_Window_SystemMenu, "Scintilla test") 
GetClientRect_(WindowID(0), rect.RECT) 
scihWnd = CreateWindowEx_(#WS_EX_CLIENTEDGE, "Scintilla", "", #WS_CHILD | #WS_VISIBLE | #WS_TABSTOP, 0, 0, rect\right, rect\bottom, WindowID(0), 0, GetModuleHandle_(0), 0) 

SciEdi_WndData    = SendMessage_(scihWnd,#SCI_GETDIRECTPOINTER,0,0)
SciEdi_PtrData    = SendMessage_(scihWnd,#SCI_GETDIRECTFUNCTION,0,0)

  CallFunctionFast(SciEdi_PtrData,SciEdi_WndData,#SCI_SETTEXT,0,"Try use tab on me. Not working. why? Help me..") 

  Width = 4 
  Flag = 1 
  CallFunctionFast(SciEdi_PtrData,SciEdi_WndData,#SCI_SETTABWIDTH,Width,0) 
  CallFunctionFast(SciEdi_PtrData,SciEdi_WndData,#SCI_SETUSETABS,Flag,0)

Repeat 
    event.l = WaitWindowEvent() 
Until event = #PB_Event_CloseWindow 

DestroyWindow_(scihWnd) 
CloseLibrary(scilexer)
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

I have the same problem - the solutiuon didn't work for me either...
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Delete the Tab-Stop of the PB-Window. PB generates automatic-shortcut for tab to the window.

Code: Select all

RemoveKeyboardShortcut(#Window_frmMain, #PB_Shortcut_All)
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Thanks :)
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

strange ?

But the editorGadget has not this problem.
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

Beta 2 [ RELEASED ]
- fixed : big focus problem (flickering)
- fixed : tab emulation
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

beta3 ( work in progress )

- TabStop bug : FIXED
- 'IntelliMouse pan' bug : FIXED
- SciSaveSource : FIXED
Last edited by eddy on Sat Dec 17, 2005 4:16 am, edited 1 time in total.
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
porfirio
Enthusiast
Enthusiast
Posts: 111
Joined: Mon Nov 15, 2004 11:00 pm
Location: portugal

Post by porfirio »

Cool, very good :)

Could you add basic syntax highlighter??

I can find any good sample :(
Forgive-me for my english, i'm portuguese!
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

eddy wrote:strange ?

But the editorGadget has not this problem.
Because the person who made Scintilla (or ported it to Windows) can't code or knows nothing about keyboard focus on Windows.
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

Could you add basic syntax highlighter??
For the moment, there's no interface to code a lexer.
I can find any good sample
Japbe is a good sample.
Last edited by eddy on Sat Dec 17, 2005 4:38 am, edited 3 times in total.
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

Beta 3 [ RELEASED ]

- Some PB EventTypes : SCI_EventType_Focus,SCI_EventType_LeftClick,..
- New parameter for SciLoadSource command : AppendMode
- New command: SciMousePan()
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

Beta 4 [ RELEASED ]

- support: SetGadgetText and GetGadgetText (<65000 characters)
- New command: SciSetLexer()

You can code your own lexer... :)
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
Post Reply