[Gambas-devel] gb.ncurses and CDK

Benoît Minisini gambas at ...1...
Wed Jun 13 13:29:02 CEST 2012


Le 12/06/2012 22:02, tobi a écrit :
> Hi,
>
> tomorrow, the most important test will be written, consequently, tomorrow evening I will have
> committed your suggestions. It is (almost) completely written but I will have to test it a bit.
>
> Another thing: I had a really quick look at the sources an documentation of CDK (curses development
> kit or so) which offers ncurses widgets. I was, however, not very convinced of the whole thing but I
> may be wrong. Anyways, it would be another dependency so - if I remember correctly, you are using
> Ubuntu which counts as a popular distribution - could you please check if there exists a package in
> Ubuntu's package management for cdk? Arch Linux has none, compilation is really simple and fast but,
> additional to my worries about the code in general, it would be a reason against using it.

Ubuntu has a libcdk5 package. Are you sure that Arch does not have it? 
Because there is perl and java bindings too.

> With a reasonable Control class, it will be not much work to implement some controls like in the GUI
> components, I have in mind:
> - ScrollView (insert a lot of text and show only parts) (using ncurses pads)
> - TextBox (using ncurses form extension)
> - TextArea (form extension)
> - Editor (highlighting) (coloured TextArea, s.b.)
> - Button (forms)
> - ListView (ncurses menu extension)
> (and related)
>
> Even a menu could be possible...
>
> As for the Editor, I once offered to do a vim-like syntax highlighting (have text files that would
> specify syntax in a powerful manner so that you don't need to write modules or whatever for certain
> syntaxes supported by gambas) - if I am so far: where to start researching? I have only a little
> clue of what is going on with the Highlight class (it seemed first to me that it is higher level
> (gb.qt4.ext) but there was, if I remember correctly, something in the main/ directory somewhere
> which implements highlighting...?)
>

The Highlight class is in the gb.eval component. It is extended into the 
gb.qt4.ext editor so that you can add custom highlighting to the Editor 
through a "Highlight" event that is called for each editor line that 
must be highlighted.

This feature is used by the gb.eval.highlight component that implements 
highlighting for some text formats (html, C, javascript, css...).

Regards,

-- 
Benoît Minisini




More information about the Devel mailing list