FLTK logo

Re: [fltk.coredev] Fl_Text_Display regression? Or API change?

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.coredev  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Fl_Text_Display regression? Or API change? Gonzalo Garramulo 09:53 Mar 20  
 

El 19/3/24 a las 12:20, 'Albrecht Schlosser' via fltk.coredev escribió:
On 3/19/24 15:46 Gonzalo Garramulo wrote:

El 19/3/24 a las 11:37, 'Albrecht Schlosser' via fltk.coredev escribió:

Can you reproduce the issue with test/editor?

No, and neither with my own python editor.  Fl_Text_Editor seems not
to suffer from this.  Only Fl_Text_Display.
Okay.  After digging, I found what it was.  I was subclassing Fl_Text_Display and initializing its Fl_Text_Buffer in the constructor like:

    mBuffer = new Fl_Text_Buffer();

instead of calling the textdisplay->buffer() function.  It turns out textdisplay->buffer() sets a callback that counts lines when wrap_mode() is not set to WRAP_AT_BOUNDS.  Changing my code to:

     Fl_Text_Buffer* buf = new Fl_Text_Buffer();
     buffer(buf);

Find attached a sample program for testing.

--
Gonzalo Garramuño
ggarra13@gmail.com

--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/894b7d77-6a2f-4004-8b7c-6e2526fc1cee%40gmail.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.