Foi só um teste de curiosidade.
Sabem aquele recurso de editor de textos de auto-completar, mostrar lista de funções, code folding, colorir sintaxe, etc. etc. etc.
É tudo o Scintilla.
Então.... fiz um teste ultra-básico com ele.
Um controle básico em GTWVG, só pra testar....
Lógico... daí pra poder usar como editor de texto... nem sei se compensa... vai ser muita programação.
Foi só pra curiosidade mesmo.
WVG e editor Scintilla
Moderador: Moderadores
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
WVG e editor Scintilla
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
WVG e editor Scintilla
E se olhar os fontes do programmers notepad, tem muitos diálogos em resource.
Dá até pra utilizar esses diálogos prontos direto num aplicativo.
É por isso que tem tanto editor de texto por aí....
O diferencial acaba sendo o quanto eles usam do Scintilla, o modo de configurar, cores escolhidas.
No final, é o Scintilla que faz o trabalho que interessa.
Isso faz pensar uma outra coisa....
Se toda tela do editor de textos é o Scintilla que faz... não seria só ter controles nesse estilo ao invés de LIBs gráficas?
Dá até pra utilizar esses diálogos prontos direto num aplicativo.
É por isso que tem tanto editor de texto por aí....
O diferencial acaba sendo o quanto eles usam do Scintilla, o modo de configurar, cores escolhidas.
No final, é o Scintilla que faz o trabalho que interessa.
Isso faz pensar uma outra coisa....
Se toda tela do editor de textos é o Scintilla que faz... não seria só ter controles nesse estilo ao invés de LIBs gráficas?
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- sygecom
- Administrador

- Mensagens: 7131
- Registrado em: 21 Jul 2006 10:12
- Localização: Alvorada-RS
- Contato:
WVG e editor Scintilla
Parabéns Zé. Essa dll é de fato muito boa.
Leonardo Machado
xHarbour.org + Hwgui + PostgreSql
xHarbour.org + Hwgui + PostgreSql
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
WVG e editor Scintilla
Pesquisei mais um pouco sobre a DLL.
Realmente, é a DLL que faz tudo, mas haja opções pra colocar na possível IDE....
É só uma pequena parte das "funções"
Realmente, é a DLL que faz tudo, mas haja opções pra colocar na possível IDE....
É só uma pequena parte das "funções"
Código: Selecionar todos
#include "hbclass.ch"
CREATE CLASS SCIClass
VAR hWnd INIT NIL
METHOD SendEditor( nMsg, nParam, xValue ) INLINE ;
iif( ValType( xValue ) == "C", ;
wapi_SendMessageString( hWnd, nMsg, hb_Default( nParam, 0 ), xValue ), ;
wapi_SendMessage( hWnd, nMsg, hb_Default( nParam, 0 ), hb_Default( nParam, 0 ), xValue ) )
METHOD SendEditor( nMsg, nParam, xValue )
IF ValType( xValue) == "C"
xReturn := wapi_SendMessageString( ::hWnd, nMsg, nParam, xValue )
ELSE
xReturn := wapi_SendMesage( ::hWnd, nMsg, nParam, xValue )
ENDIF
RETURN xReturn
METHOD AddText( nLen, cText ) INLINE ::SendEditor 2001, nLen, cText )
METHOD GetCurPos() INLINE ::SendEditor SCI_GETCURRENTPOS )
METHOD CharAtPos( nPos ) INLINE ::SendEditor SCI_GET_CHARAT, nPos )
//METHOD SetSelText( cText ) INLINE ReplaceSel( ::cText )
METHOD AddStyledText( nLen ) INLINE ::SendEditor 2002, nLen )
METHOD InsertText( nPos, cText ) INLINE ::SendEditor 2003, nPos, cText )
METHOD ClearAll() INLINE ::SendEditor 2004 )
METHOD ClearDocumentStyle() INLINE ::SendEditor 2005 )
METHOD GetLength() INLINE ::SendEditor 2006 )
METHOD GetCharAt( nPos ) INLINE ::SendEditor 2007, nPos )
METHOD GetStyleAt( nPos ) INLINE ::SendEditor 2010, nPos )
METHOD Redo() INLINE ::SendEditor 2011 )
METHOD SetUndoCollection( lCollectUndo ) INLINE ::SendEditor 2012, lCollectUndo )
METHOD SelectAll() INLINE ::SendEditor 2013 )
METHOD SetSaveProint() INLINE ::SendEditor 2014 )
METHOD GetStyledText() INLINE ::SendEditor 2015 )
METHOD CanRedo() INLINE ::SendEditor 2016 )
METHOD MarkerLineFromHandle( nHandle ) INLINE ::SendEditor 2017, nHandle )
METHOD MarkerDeleteHandle( nHandle ) INLINE ::SendEditor 2018 )
METHOD GetUndoCollection() INLINE ::SendEditor 2019 )
METHOD GetViewWs() INLINE ::SendEditor 2020 )
//METHOD SetViewWs( nViewWs ) INLINE SetViewWs( 2021 )
METHOD GotoLine( nValue ) INLINE ::SendEditor 2024, nValue )
METHOD GotoPos( nValue ) INLINE ::SendEditor 2025, nValue )
METHOD SetAnchor( nPos ) INLINE ::SendEditor 2026, nValue )
METHOD GetCurLine( nLen, cText ) INLINE ::SendEditor 2027, nLen, cText )
METHOD ConvertEOLs( lEOLMode ) INLINE ::SendEditor 2029, lEOLMode )
METHOD StartStyling( nPos, nMask ) INLINE ::SendEditor 2032, nPos, nMask )
METHOD SetStyling( nLen, nStyle ) INLINE ::SendEditor 2033, nLen, nStyle )
METHOD GetBufferedDraw() INLINE ::SendEditor 2034 )
METHOD SetBufferedDraw( lBuffered ) INLINE ::SendEditor 2035, lBuffered )
METHOD SetTabWidth( nTabWidth ) INLINE ::SendEditor 2036, nTabWidth )
METHOD GetTabWidth() INLINE ::SendEditor 2121 )
METHOD SetCodepage( nCodepage ) INLINE ::SendEditor 2037, nCodePage )
METHOD SetUsePalette( lUsePalette ) INLINE ::SendEditor 2039, lUsePalette )
END CLASS
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
WVG e editor Scintilla
Corrigido, porque faltava parêntesis e adicionados mais.
Tem uma parte muito interessante nisso:
Usa as mensagens do Windows, mas não os códigos do Windows.
Talvez esse tipo de coisa tivesse alguma utilidade para as LIBs: um controle não preso a códigos do Windows.
Código: Selecionar todos
#include "hbclass.ch"
CREATE CLASS SCIClass
VAR hWnd INIT NIL
METHOD SendEditor( nMsg, nParam, xValue ) INLINE ;
iif( ValType( xValue ) == "C", ;
wapi_SendMessageString( hWnd, nMsg, hb_Default( nParam, 0 ), xValue ), ;
wapi_SendMessage( hWnd, nMsg, hb_Default( nParam, 0 ), hb_Default( nParam, 0 ), xValue ) )
METHOD SendEditor( nMsg, nParam, xValue )
IF ValType( xValue) == "C"
xReturn := wapi_SendMessageString( ::hWnd, nMsg, nParam, xValue )
ELSE
xReturn := wapi_SendMesage( ::hWnd, nMsg, nParam, xValue )
ENDIF
RETURN xReturn
METHOD AddText( nLen, cText ) INLINE ::SendEditor( 2001, nLen, cText )
METHOD GetCurPos() INLINE ::SendEditor( SCI_GETCURRENTPOS )
METHOD CharAtPos( nPos ) INLINE ::SendEditor( SCI_GET_CHARAT, nPos )
//METHOD SetSelText( cText ) INLINE ReplaceSel( ::cText )
METHOD AddStyledText( nLen ) INLINE ::SendEditor( 2002, nLen )
METHOD InsertText( nPos, cText ) INLINE ::SendEditor( 2003, nPos, cText )
METHOD ClearAll() INLINE ::SendEditor( 2004 )
METHOD ClearDocumentStyle() INLINE ::SendEditor( 2005 )
METHOD GetLength() INLINE ::SendEditor( 2006 )
METHOD GetCharAt( nPos ) INLINE ::SendEditor( 2007, nPos )
METHOD GetStyleAt( nPos ) INLINE ::SendEditor( 2010, nPos )
METHOD Redo() INLINE ::SendEditor( 2011 )
METHOD SetUndoCollection( lCollectUndo ) INLINE ::SendEditor( 2012, lCollectUndo )
METHOD SelectAll() INLINE ::SendEditor( 2013 )
METHOD SetSaveProint() INLINE ::SendEditor( 2014 )
METHOD GetStyledText() INLINE ::SendEditor( 2015 )
METHOD CanRedo() INLINE ::SendEditor( 2016 )
METHOD MarkerLineFromHandle( nHandle ) INLINE ::SendEditor( 2017, nHandle )
METHOD MarkerDeleteHandle( nHandle ) INLINE ::SendEditor( 2018 )
METHOD GetUndoCollection() INLINE ::SendEditor( 2019 )
METHOD GetViewWs() INLINE ::SendEditor( 2020 )
//METHOD SetViewWs( nViewWs ) INLINE SetViewWs( 2021 )
METHOD GotoLine( nValue ) INLINE ::SendEditor( 2024, nValue )
METHOD GotoPos( nValue ) INLINE ::SendEditor( 2025, nValue )
METHOD SetAnchor( nPos ) INLINE ::SendEditor( 2026, nValue )
METHOD GetCurLine( nLen, cText ) INLINE ::SendEditor( 2027, nLen, cText )
METHOD ConvertEOLs( lEOLMode ) INLINE ::SendEditor( 2029, lEOLMode )
METHOD StartStyling( nPos, nMask ) INLINE ::SendEditor( 2032, nPos, nMask )
METHOD SetStyling( nLen, nStyle ) INLINE ::SendEditor( 2033, nLen, nStyle )
METHOD GetBufferedDraw() INLINE ::SendEditor( 2034 )
METHOD SetBufferedDraw( lBuffered ) INLINE ::SendEditor( 2035, lBuffered )
METHOD SetTabWidth( nTabWidth ) INLINE ::SendEditor( 2036, nTabWidth )
METHOD GetTabWidth() INLINE ::SendEditor( 2121 )
METHOD SetCodepage( nCodepage ) INLINE ::SendEditor( 2037, nCodePage )
METHOD SetUsePalette( lUsePalette ) INLINE ::SendEditor( 2039, lUsePalette )
METHOD MarkerDefine( nMarkerNumber, nSymbol ) INLINE ::SendEditor( 2040, nMarkerNumber, nSymbol )
METHOD MarkerSetFore( nMarkerNumber, nFore ) INLINE ::SendEditor( 2041, nMarkerNumber, nFore )
METHOD MarkerSetBack( nMarkerNumber, nBack ) INLINE ::SendEditor( 2042, nMarkerNumber, nBack )
METHOD MarkerAdd( nLine, nMarkerNumber ) INLINE ::SendEditor( 2043, nLine, nMarkerNumber )
METHOD MarkerDelete( nLine, nMarkerNumber ) INLINE ::SendEditor( 2044, nMarkerNumber )
METHOD MarkerDeleteAll( nMarkerNumber ) INLINE ::SendEditor( 2045, nMarkerNumber )
METHOD MarkerGet( nLine ) INLINE ::SendEditor( 2046, nLine )
METHOD MarkerNext( nLineStart, nMarkerMask ) INLINE ::SendEditor( 2047, nLineStart, nMarkerMask )
METHOD MarkerPrevious( nLineStart, nMarkerMask ) INLINE ::SendEditor( 2048, nLineStart, nMarkerMask )
METHOD MarkerDefinePixMap( nMarkerNumber, cPixMap ) INLINE ::SendEditor( 2049, nMarkerNumber, cPixMap )
METHOD MarkerAddSet( nLine, nSets ) INLINE ::SendEditor( 2466, nLine, nSets )
METHOD SetMarginTypeN( nMargin, nMarginType ) INLINE ::SendEditor( 2240, nMargin, nMarginType )
METHOD GetMarginTypeN( nMargin ) INLINE ::SendEditor( 2241, nMargin )
METHOD SetMarginWidthN( nMargin, nPixelWidth) INLINE ::SendEditor( 2242, nMargin, nPixelWidth )
END CLASS
Usa as mensagens do Windows, mas não os códigos do Windows.
Talvez esse tipo de coisa tivesse alguma utilidade para as LIBs: um controle não preso a códigos do Windows.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
WVG e editor Scintilla
E pra quem quiser o editor completo, tá neste fonte de VB.
http://www.planet-source-code.com/vb/sc ... 7&lngWId=1
Só não deu pra fazer funcionar aqui, porque depende de mais coisas, e não procurei.
http://www.planet-source-code.com/vb/sc ... 7&lngWId=1
Só não deu pra fazer funcionar aqui, porque depende de mais coisas, e não procurei.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/