Hi Sanel. |
Is there a way to dynamically change the modes ? Or even the scheme from lite to dark ?
For example, one may decide to load the file via a string. When this happens - the loadfile() code is not used and the styletable is not loaded.
The ability to set the styletable (modes) and change schemes dynamically is useful.
On Thursday, February 7, 2019 at 12:57:01 AM UTC+5:30 Sanel Zukan wrote:
> Does it parse the entire textbuffer on each modified callback?
Only modified parts.
> Also, I am interested in how the styletable is handled, so I'll
> definitely look into it Thanks!
Styletable is loaded and set when file extension is detected, based on
mode rules .
Modes are similar to Emacs modes - script files with custom keywords and
colors/faces for those keywords (eg. for c++ files ).
Faces are abstracted from color values (face is actually color + font +
font size) so creating new themes is fairly trivial. Here is example how
dark theme is defined .
israel dahl <israe...@gmail.com> writes:
> On Sunday, February 3, 2019 at 10:53:51 AM UTC-6, Sanel Zukan wrote:
>> You can also try with https://github.com/sanel/Fl_Highlight_Editor
>> New languages can be added easily and built-in interpreter will compile
>> everything when object is loaded, so there will be minimal performance hit.
>> Hi Sanel,
> I will check this out! Does it parse the entire textbuffer on each
> modified callback?
> I may make a secondary version of my text editor that uses yours and
> compare the two outputs. Also, I am interested in how the styletable is
> handled, so I'll definitely look into it Thanks!
> You received this message because you are subscribed to the Google Groups "fltk.general" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to email@example.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/65ef8422-4b75-4b75-924f-5628c0b386a5n%40googlegroups.com.
[ Direct Link to Message ]