Search found 39 matches

by TobiasA
Wed Sep 27, 2017 10:44 am
Forum: C++ Development
Topic: Custom folding in a custom lexer with LEX_CONTAINER
Replies: 31
Views: 4171

Custom folding in a custom lexer with LEX_CONTAINER

Hi, has anyone here working with custom folding in a custom lexer? I have a wxstyledtextctrl which is highlighted by a custom lexer to highlight and parse NC cycles. There's a bit more than actually highlighting the code, now I'm trying hard to integrate custom folding. When I switch to a CPP lexer,...
by TobiasA
Thu Sep 07, 2017 6:29 pm
Forum: C++ Development
Topic: Custom syntax highlighting in STC w/ background thread
Replies: 17
Views: 2263

Re: Custom syntax highlighting in STC w/ background thread

Thanks for all the help, I was able to solve my problem :D
by TobiasA
Wed Sep 06, 2017 7:06 pm
Forum: C++ Development
Topic: Custom syntax highlighting in STC w/ background thread
Replies: 17
Views: 2263

Re: Custom syntax highlighting in STC w/ background thread

Handling styling messages is a little complicated, but it shouldn't be necessary to do it in a secondary thread. I'm not sure you're doing it right though. In particular, you shouldn't parse the entire document every time. Scintilla is pretty good at guessing what needs to be styled when a change t...
by TobiasA
Wed Sep 06, 2017 6:28 pm
Forum: C++ Development
Topic: Custom syntax highlighting in STC w/ background thread
Replies: 17
Views: 2263

Re: Custom syntax highlighting in STC w/ background thread

Why? You should check last time it was colorized and only colorize that part. Unless I don't understand your question something like: int lastStyled = GetEndStyled(); if(lastStyled < pos) //pos can be your current position { Colourise(lastStyled, pos); Now that's one big step towards the solution.....
by TobiasA
Wed Sep 06, 2017 10:49 am
Forum: C++ Development
Topic: Custom syntax highlighting in STC w/ background thread
Replies: 17
Views: 2263

Re: Custom syntax highlighting in STC w/ background thread

I found out the following code was the cause for the segmentation fault: GUIFrame::m_EditorSTC->StyleSetForeground(21,m_Ncolor); If this is called in a thread, it will crash the application. At least a small step forward. But I couldn't get the style's event position, it is always 0. Looking into th...
by TobiasA
Wed Sep 06, 2017 7:03 am
Forum: C++ Development
Topic: Custom syntax highlighting in STC w/ background thread
Replies: 17
Views: 2263

Custom syntax highlighting in STC w/ background thread

Good morning everybody, after some small difficulties, I finally managed to write a custom syntax highlighting for CNC G-Code (Syntax roughly similar to basic, including positions in coordinates and stuff). I did ask a few questions here: https://forums.wxwidgets.org/viewtopic.php?f=1&t=43800 which ...
by TobiasA
Mon Aug 28, 2017 8:34 pm
Forum: C++ Development
Topic: problems of a newbie with SetStyle() and compiling with MinGW
Replies: 5
Views: 1200

Re: problems of a newbie with SetStyle() and compiling with MinGW

Which version is that, assuming the information on Qt wiki is correct, they do not have their own MinGW distribution (recent version of Qt using regular MinGW64)? Edit: I just checked and the newest GCC version the current Qt installer offers is MinGW 5.3.0. With the latest installer, they ship a M...
by TobiasA
Mon Aug 28, 2017 3:34 pm
Forum: C++ Development
Topic: problems of a newbie with SetStyle() and compiling with MinGW
Replies: 5
Views: 1200

Re: problems of a newbie with SetStyle() and compiling with MinGW

Well, guess I'm back to MinGW 5.1 which still features C++11 or I'll just stick with VS2017 then until MinGW features another update. Just wondering if anybody asked over there whether they know the problem or not. Does anyone know if it is possible to use wxWidgets with the Qt Creator? Their MinGW ...
by TobiasA
Mon Aug 28, 2017 9:23 am
Forum: C++ Development
Topic: problems of a newbie with SetStyle() and compiling with MinGW
Replies: 5
Views: 1200

problems of a newbie with SetStyle() and compiling with MinGW

Hi all, I'm rather new to C++ (self-study since '16) and have worked with Qt before giving wxwidgets a try. I ran into some serious trouble with it and can't solve it by myself or google :( First problem: I have tried to compile wxwidgets with minGW following the guide here: https://wiki.wxwidgets.o...