Hello,
I have to do a text editor that make syntaxical colouring,
and after that, I'll add a cryptographic function to the editor.
I know that scintilla can do the colouring, but how use the lexer, I really do not understand how to use it and set it up, and will it be set by saving the document (eg: save example.cpp will colour with the cpp lexer) or "by hand" (select in a menu the cpp lexer).
(I'm under Linux Ubuntu Dapper-Drake 6.06 dev version)
Thanks you for your help.
WxScintilla Help Topic is solved
You should have a look at wxStEdit (in wxCode). It uses Scintilla and does syntax colouring.
http://wxcode.sourceforge.net/showcomp. ... e=wxStEdit
http://wxcode.sourceforge.net/showcomp. ... e=wxStEdit
yes I know, and also wxscintilla, but I can't find any how to or doc/help
about anything.
if some one have a tutorial or something or a sample code?
I don't know what is possible to do in fact, syntax colouring at save, or by user selection or something else.
do you know a gui designer for wxwidgets under linux?
about anything.
if some one have a tutorial or something or a sample code?
I don't know what is possible to do in fact, syntax colouring at save, or by user selection or something else.
do you know a gui designer for wxwidgets under linux?
-
- Super wx Problem Solver
- Posts: 396
- Joined: Wed Oct 05, 2005 1:19 am
Function reference here.LK wrote:yes I know, and also wxscintilla, but I can't find any how to or doc/help
about anything.
if some one have a tutorial or something or a sample code?
I don't know what is possible to do in fact, syntax colouring at save, or by user selection or something else.
do you know a gui designer for wxwidgets under linux?
http://wxcode.sourceforge.net/component ... rence.html
You can set the lexer at saving time, you can also make a menu for the user to choose the lexer to apply.LK wrote:yes I know, and also wxscintilla, but I can't find any how to or doc/help
about anything.
if some one have a tutorial or something or a sample code?
I don't know what is possible to do in fact, syntax colouring at save, or by user selection or something else.
You just need to look into wxStEdit code.
wxDesigner.LK wrote:do you know a gui designer for wxwidgets under linux?
yeah, but wxDesigner is not free of charge and I don't think it's opensource...benedicte wrote:You can set the lexer at saving time, you can also make a menu for the user to choose the lexer to apply.LK wrote:yes I know, and also wxscintilla, but I can't find any how to or doc/help
about anything.
if some one have a tutorial or something or a sample code?
I don't know what is possible to do in fact, syntax colouring at save, or by user selection or something else.
You just need to look into wxStEdit code.
wxDesigner.LK wrote:do you know a gui designer for wxwidgets under linux?
I tried wxGlade and it's not fine, Glade for GTK+ is better.
anybody knows a gui designer for wxWidget free and easy to use?
https://sourceforge.net/projects/wxformbuilder/LK wrote: do you know a gui designer for wxwidgets under linux?
Thanks youbuildere wrote:https://sourceforge.net/projects/wxformbuilder/LK wrote: do you know a gui designer for wxwidgets under linux?
I'll try it
-----------------------------
I want to set the syntaxic colouring at save, easiest I thing, but how?
(WxStEdit)
You could try the following to apply syntax colouring (the example is for XML, but you could use any lexer here):
Code: Select all
SetLexer(wxSTC_LEX_XML);
StyleSetForeground(wxSTC_STYLE_DEFAULT, *wxBLACK);
StyleSetBackground(wxSTC_STYLE_DEFAULT, *wxWHITE);
StyleClearAll();
StyleSetForeground(wxSTC_H_TAG, *wxBLUE);
StyleSetForeground(wxSTC_H_TAGUNKNOWN, *wxBLUE);
StyleSetForeground(wxSTC_H_ATTRIBUTE, *wxRED);
StyleSetForeground(wxSTC_H_ATTRIBUTEUNKNOWN, *wxRED);
StyleSetForeground(wxSTC_H_NUMBER, *wxBLACK);
StyleSetForeground(wxSTC_H_OTHER, *wxBLUE);
StyleSetForeground(wxSTC_H_COMMENT,
wxTheColourDatabase->Find(_T("GREY")));
StyleSetForeground(wxSTC_H_ENTITY, *wxRED);
StyleSetForeground(wxSTC_H_TAGEND, *wxBLUE);
StyleSetForeground(wxSTC_H_XMLSTART, *wxBLUE);
StyleSetForeground(wxSTC_H_XMLEND, *wxBLUE);
StyleSetForeground(wxSTC_H_CDATA, *wxRED);
Colourise(0, -1);