[fltk.development] fltk1.3 namespace in fluid

2013-03-20 Thread Gonzalo Garramuno
I am trying to port my viewer from fltk2 to fltk1.3.  However the later lacks 
namespaces.  Any plan on adding namespaces to fluid 1.3?
___
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev


Re: [fltk.general] R: Re: Smooth blinking

2013-03-20 Thread Albrecht Schlosser
On 19.03.2013 16:31, memoryl...@tin.it wrote:

 The problem was that, under particular conditions (many redraw of images), my 
 blinking could become irregular,
 as timers, if I understand well, are all at the same priority level.

Hint Fl::repeat_timeout() is designed to compensate for small timer
delays, so that the next timer interval will be shorted if the
actual timer callback is serviced later than it should. However,
this does obviously work only if the overall CPU usage is small
enough so that there is room to *wait* for the next timer. If the
CPU is utilized so heavily that there is no time left, then ...

Also note that this timer delay compensation works well (i.e. as
designed) on Linux, but probably not on Windows :-( I did some
tests a while back, but lost track of it. I can't say anything
about Mac OS WRT this.

 The technique you and Greg told me is clear ; will clean up something in my 
 (growing!) app and try
 to avoid unnecessary redraws.

That's always a good idea.

Albrecht

___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


[fltk.general] Fltk Preferences are noisy...

2013-03-20 Thread Roman Kantor
Widget handle() method upon first use calls Fl::visible_focus() which through 
Fl::option() reads fltk standard preferences (that is (Fl_Preferences::SYSTEM,
fltk.org, fltk) and (Fl_Preferences::USER, fltk.org, fltk)).
Fl::option() function (Fl.cxx, line around 1944) just constructs these 
preferences, uses only get() methods and then destructs these preferences. 
However upon
destruction the preferences are flushed/re-written on the disk.
Is that necessary if only get() methods are used and preferences are not 
changed?

R.

___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


[fltk.general] R: Re: R: Re: Smooth blinking

2013-03-20 Thread memoryl...@tin.it
Hi Albrecht,


 Also note that this timer delay compensation works well (i.e. as
 designed) on Linux, but probably not on Windows :-( I did some
 tests a while back, but lost track of it. I can't say anything
 about Mac OS WRT this.

No Windows here, m8 :
just pure Linux amp; microwindows on a 400 MHz PowerPC embedded platform ;-)

Thanks,
regards

Lucio


 
___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


[fltk.general] maximize, minimize to taskbar and open again

2013-03-20 Thread Gonzalo Garramuno
Maximizing a window, then minimizing it to an icon in the taskbar, and then 
opening that same icon creates a window that covers up to the taskbar, but it 
is behind it.  The problem shows in all demos of fltk2.0.  Fltk1.2 seems fine.
Can somebody help?
___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] R: Re: R: Re: Smooth blinking

2013-03-20 Thread MacArthur, Ian (Selex ES, UK)

 just pure Linux amp; microwindows on a 400 MHz PowerPC embedded
 platform ;-)

If you have a 400 MHz PPC, is microwindows the best choice? That
should be easily able to run a real X11 server, (I'm thinking
of the TinxX / K-drive stuff, for example.)

I only ask because (admittedly a *long* time ago now) I had a
project using microwindows and it was just a world of hurt -
it was really awful.
So we switched to a real X-server and then things Just Worked.

That said, I am led to believe the microwidows got a lot better
since then, but I was too badly burned to consider going back...





Selex ES Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England  Wales.  Company no. 02426132

This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.


___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


[fltk.general] R: RE: R: Re: R: Re: Smooth blinking

2013-03-20 Thread memoryl...@tin.it
Hi Ian,
microwindows is a piece coming from the past.
I have already realized several machines running with AMD Alchemy (MIPS), more 
or less same horsepower as the actual one.
It was the usual work of putting together pieces (microwindows + nano-X, 
truetype fonts and so on),
but it works.
Microwindows + nano-X actually is not a project with as much as activity as 
fltk, but it's working.

Maybe another solution could be better now, but I already had to switch 
hardware platform as Alchemy is end of life product :
new schematics, new bios, new kernel (Alchemy=2.4.x, PPC=2.6.x), new kernel 
drivers... and note that MIPS=little endian, PPC = big endian.
I just had sufficient new things, to think of throwing away microwindows + 
nanox.

I was surely tempted of trying X11 server, but now I cannot do this for time 
constraints.
Don't know kdrive, but I'm curious and sooner or later will try it.


Regards
Lucio


 
___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] maximize, minimize to taskbar and open again

2013-03-20 Thread Gonzalo Garramuno

  Maximizing a window, then minimizing it to an icon in the taskbar, and
  then opening that same icon creates a window that covers up to the
  taskbar, but it is behind it.  The problem shows in all demos of
  fltk2.0.  Fltk1.2 seems fine.
  Can somebody help?

 Gonzalo,

 Do you *really* mean fltk2.0 and fltk1.2?


Sorry.  I meant fltk2.0 and fltk1.3.
___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] maximize, minimize to taskbar and open again

2013-03-20 Thread MacArthur, Ian (Selex ES, UK)

   Maximizing a window, then minimizing it to an icon in the taskbar,
 and
   then opening that same icon creates a window that covers up to the
   taskbar, but it is behind it.  The problem shows in all demos of
   fltk2.0.  Fltk1.2 seems fine.
   Can somebody help?
 
  Gonzalo,
 
  Do you *really* mean fltk2.0 and fltk1.2?
 
 
 Sorry.  I meant fltk2.0 and fltk1.3.


Ah, right: OK, then note that the fltk-1.x was buggy in this area too, but a 
lot of work was done to try and resolve that.

In particular you need to look at the changes that went into fltk-1.3 in the 
Fl::screen_xywh(); and Fl::screen_work_area(); methods.

These were adjusted to take better account of the position of taskbars and so 
forth, and to do more sensible things in that regard.

Note that the changes were not limited to these functions - they propagated 
into many other places in the library where these functions were used (e.g. 
when computing the placement of menus and dialog boxes and so forth) so ended 
up being pretty involved.
I don't know what svn rev numbers are pertinent, but there were some relevant 
STR's that covered this work, so it may be possible to find those and see what 
was done.

I don't know fltk-2 well enough to say for sure, but I doubt that importing 
the fixes into fltk-2 would be trivial...!

Though, fltk3 may have the equivalent functionality now? Not sure.


Selex ES Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England  Wales.  Company no. 02426132

This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.


___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


[fltk.general] fltk1.3 namespace in fluid

2013-03-20 Thread Gonzalo Garramuno
I am trying to port my software from flkt2 to fltk1.3.  However fluid1.3 
complains due to lacking namespaces.  Any chance of adding namespaces to 
fluid1.3 or a work-around?

___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] fltk1.3 namespace in fluid

2013-03-20 Thread Greg Ercolano
On 03/20/13 11:25, Gonzalo Garramuno wrote:
 I am trying to port my software from flkt2 to fltk1.3.
 However fluid1.3 complains due to lacking namespaces.
 Any chance of adding namespaces to fluid1.3 or a work-around?

To use a namespace, I'd think New-Code-Declaration, and set it to:

using namespace whatever;

..and to define a namespace, I guess you might have to do
something like put:

#include foo-namespace-start.h
...
#include foo-namespace-end.h

..where foo-namespace-start.h contains: namespace foo {
..and foo-namespace-end.h contains: };

Sorry I can't think of anything better; looks like fluid needs to
be modified, because New-Code-Declaration complains about the unclosed 
brace.
Probably an easy fix to have the Declaration input check be ignored if 
there's
a 'namespace' command..




___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] fltk1.3 namespace in fluid

2013-03-20 Thread Greg Ercolano
On 03/20/13 13:51, Greg Ercolano wrote:
 Sorry I can't think of anything better; looks like fluid needs to
 be modified, because New-Code-Declaration complains about the unclosed 
 brace.

I don't know fluid's code well at all, but it looks like the 'code check'
is due to the Fl_Decl_Type::open() method calling c_check() in 
fluid/Fl_Function_Type.cxx.

Perhaps an easy hack is to modify this line in Fl_Decl_Type::open():

message = c_check(cc[0]=='#' ? c+1 : c);

..to instead read something like:

if ( !strncmp(c,namespace,9) 
 !strcmp(c,};) ) message = c_check(cc[0]=='#' ? c+1 : c);

Then you can probably use New-Code-Declaration to start a namespace:

namespace foo {

..and a separate one to end it with:

};

I'm not sure if there are checks for this elsewhere in the code.
I think Matt and Bill are our resident fluid experts.





___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] fltk1.3 namespace in fluid

2013-03-20 Thread Greg Ercolano
On 03/20/13 14:26, Greg Ercolano wrote:
Perhaps an easy hack is to modify this line in Fl_Decl_Type::open():
 message = c_check(cc[0]=='#' ? c+1 : c);
..to instead read something like:
 if ( !strncmp(c,namespace,9) 
  !strcmp(c,};) ) message = c_check(cc[0]=='#' ? c+1 : c);
 

Hmm, this should actually work; replace the message = .. line with:

if (strncmp(c,namespace,9)==0 || strncmp(c,};,2)==0) { message = 0; }
else { message = c_check(cc[0]=='#' ? c+1 : c); }

I actually tested it this time; my original post wasn't checked,
and wasn't right.

This mod allows you to include a comment after the }; so you can
do something like:

namespace foo {

..and:

};// end namespace foo

..without getting errors.

The above change is still a hack, it would take some work probably
to 'do it right', though I'm not sure what 'right' should be.
___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk