IUP_FB_EDITOR (simple development environment)

User projects written in or related to FreeBASIC.
Post Reply
VANYA
Posts: 1834
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: IUP_FB_EDITOR (simple development environment)

Post by VANYA »

Hi Kuan Xsu!
Why not override the Windows classic style in IUP?
No problem, I will add the manifest in the next release.
Kuan Hsu
Posts: 586
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: IUP_FB_EDITOR (simple development environment)

Post by Kuan Hsu »

Dear VANYA:
I've added the "search bar" and modified the source code( remove dynamic array class )
Image
https://www.mediafire.com/file/u6m29xzu ... in.7z/file
VANYA
Posts: 1834
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: IUP_FB_EDITOR (simple development environment)

Post by VANYA »

Hi Kuan Hsu!

Unfortunately, the search does not work on Linux. I've tried injecting any variables, but nothing works.
I haven't tried searching on Windows, but I'll try soon.
Kuan Hsu
Posts: 586
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: IUP_FB_EDITOR (simple development environment)

Post by Kuan Hsu »

VANYA wrote:Hi Kuan Hsu!

Unfortunately, the search does not work on Linux. I've tried injecting any variables, but nothing works.
I haven't tried searching on Windows, but I'll try soon.
The GTK and Windows events are different, I modified the code( about WIN/LINUX ), please test....
https://www.mediafire.com/file/u6m29xzu ... in.7z/file
VANYA
Posts: 1834
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: IUP_FB_EDITOR (simple development environment)

Post by VANYA »

The search works, but sometimes the search results menu appears at coordinates higher than the poseidonOutline dialog. Here's a video:

https://disk.yandex.ru/i/plgJYWp1e4hcXg
Kuan Hsu
Posts: 586
Joined: Sep 16, 2007 15:12
Location: Taiwan

Re: IUP_FB_EDITOR (simple development environment)

Post by Kuan Hsu »

VANYA wrote:The search works, but sometimes the search results menu appears at coordinates higher than the poseidonOutline dialog. Here's a video:

https://disk.yandex.ru/i/plgJYWp1e4hcXg
I think it's a GTK issue that I doo't know how to fix it now
poseidonOutline now in bitbucket, https://bitbucket.org/KuanHsu/poseidon- ... onOutline/,I modified some WIN code int it
VANYA
Posts: 1834
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: IUP_FB_EDITOR (simple development environment)

Post by VANYA »

Kuan Hsu wrote:poseidonOutline now in bitbucket, https://bitbucket.org/KuanHsu/poseidon- ... onOutline/,I modified some WIN code int it
Ok!
hungnguyengia
Posts: 65
Joined: Jul 01, 2021 7:53

Re: IUP_FB_EDITOR (simple development environment)

Post by hungnguyengia »

What do the files under keywords serve? Do they used for syntax highlighting? Could I edit the files to add more (pseudo) keywords I wanted to be highlighted by the editor? And which files should I edit? There are four of them each seems contains different type of keywords.
VANYA
Posts: 1834
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: IUP_FB_EDITOR (simple development environment)

Post by VANYA »

What do the files under keywords serve? Do they used for syntax highlighting? Could I edit the files to add more (pseudo) keywords I wanted to be highlighted by the editor? And which files should I edit? There are four of them each seems contains different type of keywords.
The files are functionally split:

keywords0: macros (#include , #libpath ....)
keywords1: types (integer , byte , string....)
keywords2: freebasic keywords (do , while , instr ....)
keywords3: any keywords at your discretion.

You can add to any file. All words must be in lower case.
hungnguyengia
Posts: 65
Joined: Jul 01, 2021 7:53

Re: IUP_FB_EDITOR (simple development environment)

Post by hungnguyengia »

VANYA wrote:
What do the files under keywords serve? Do they used for syntax highlighting? Could I edit the files to add more (pseudo) keywords I wanted to be highlighted by the editor? And which files should I edit? There are four of them each seems contains different type of keywords.
The files are functionally split:

keywords0: macros (#include , #libpath ....)
keywords1: types (integer , byte , string....)
keywords2: freebasic keywords (do , while , instr ....)
keywords3: any keywords at your discretion.

You can add to any file. All words must be in lower case.
Yeah. I found the editor treats keywords the same way. It used the same style for all of them so split up to category like this only helps management easier but it will work anyway if you put the keywords arbitrary into which ever files you want.
hungnguyengia
Posts: 65
Joined: Jul 01, 2021 7:53

Re: IUP_FB_EDITOR (simple development environment)

Post by hungnguyengia »

I have created my own keywords files for QB64. There are some caveats, though:

Keywords seem doesn't allowed to include space as space is used to separate the keywords themselves. QB64 has keywords like this: $END IF so IF has to be ignored, only $END in the keywords file but IF will be highlighted anyway since it's also a keyword.

Keywords beginning with the dollar sign seems not supported since I found there are not highlighted by the editor. Example for such keywords: $NOPREFIX, $INCLUDE, $DYNAMIC

BTW, how the editor deal with duplicated keywords? QB64 has too many keywords I can't make sure that they are not duplicated. There maybe keyword already defined in one keywords file but also defined in another keywords file, too.

keywords0: https://pastebin.com/dUz6x556
keywords1: https://pastebin.com/8hijMWFM
keywords2: https://pastebin.com/Zbu6uvR8
keywords3: https://pastebin.com/L4iwNDfL
hungnguyengia
Posts: 65
Joined: Jul 01, 2021 7:53

Re: IUP_FB_EDITOR (simple development environment)

Post by hungnguyengia »

It seems your IDE also has lexer for vb, too. Could you do a QB64 lexer? The keywords part should be fine, I have already done this. Here is how you could use the QB64 compiler without having to launch the text based IDE:

https://www.qb64.org/wiki/QB64_FAQ#Q:_I ... the_IDE.3F
hungnguyengia
Posts: 65
Joined: Jul 01, 2021 7:53

Re: IUP_FB_EDITOR (simple development environment)

Post by hungnguyengia »

Back to FreeBASIC. How could I configure the rest of the fields on this window? Thanks.

Image
hungnguyengia
Posts: 65
Joined: Jul 01, 2021 7:53

Re: IUP_FB_EDITOR (simple development environment)

Post by hungnguyengia »

A small caveat with your editor is it default to use Liberation Mono font which doesn't get installed by default on most Windows system. Could you change it to use a font already included as part of Windows, like Consolas? Thanks.
VANYA
Posts: 1834
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: IUP_FB_EDITOR (simple development environment)

Post by VANYA »

Qb64 - it is a separate language with its own characteristics. I do not know this language and I cannot say anything about it.
BTW, how the editor deal with duplicated keywords? QB64 has too many keywords I can't make sure that they are not duplicated. There maybe keyword already defined in one keywords file but also defined in another keywords file, too.
The keywords in scintilla are transferred directly from a large buffer, in which the words are separated by spaces. In this case, 4 buffers are transferred for keywords0, keywords1, keywords2, keywords3. I don’t know how scintilla handles duplicate words (perhaps the last word it encounters overwrites the previous one).
It seems your IDE also has lexer for vb, too. Could you do a QB64 lexer?
The VB lexer can also be used successfully with FreeBasic, which is why it is included in the editor. I didn't write lexers. Lexers are included in the scintilla library itself. People have the opportunity to create new lexers, but for this they need to know how to write lexers in C / C ++ and then build the scintilla library from source codes. At the moment scintilla has 3 built-in lexers for Basic: freebasic, purebasic, visual basic
Back to FreeBASIC. How could I configure the rest of the fields on this window?
1) for the debugger examples:
In windows D:\debug\gdb.exe or D:\debug\fbdebugger.exe
In Linux: gdb

2) for the help file:
In windows file used CHM , например D:\help\fbhelp.chm
In Linux files used html. Be sure to specify the path to the file 00index.html, for example: /home/htmlhelp/00index.html . Also in Linux you need to specify the browser (see point 3)

3) the browser is only listed on Linux. This browser will open html files like firefox or whatever you use on Linux. I use my browser for this purpose (nothing superfluous, it loads quickly and there is a search).

Image
A small caveat with your editor is it default to use Liberation Mono font which doesn't get installed by default on most Windows system. Could you change it to use a font already included as part of Windows, like Consolas? Thanks.
Fonts are selected in the settings and saved in the Options.cfg file. In any case, if the operating system will not find the required font then will select the default font. If you need the default editor (when downloading) to already have the desired font, just place your customized Options.cfg in the editor folder.
Post Reply