Re: [fltk.general] Mingw with gcc-4.6.1, fltk-1.3.x and the STL

2012-01-20 Thread MacArthur, Ian (SELEX GALILEO, UK)

> On 01/19/12 02:00, MacArthur, Ian (SELEX GALILEO, UK) wrote:
> > So, Brian and I had a look at what happened here, and the 
> outcome is, I
> > think, interesting.
> 
>   Check the config.log from the failed run.

Yup - we would have done, but by the time we got a handle on what had
happened, we'd already blown that build away for a re-build...



SELEX Galileo 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


Re: [fltk.general] Clickable URLs in text

2012-01-20 Thread Johan R
Thanks all for replying.
I saw your replies now since i did expect a mail telling me i got replys ... 
seems this is a very primitive forum :).

I am using a Fl_Text_Display to display a game lobby chat log, often http URLs 
are written by the "host" in this chat log and i want to make it easy for the 
user to go to these web pages.

Sounds like i will have to specialize Fl_Text_display or perhaps make my own 
widget.
I have considered making my own widget since i feel Fl_Text_Display is a bit of 
a cpu hog.
Any ideas are very welcome.


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


Re: [fltk.general] Clickable URLs in text

2012-01-20 Thread Edzard Egberts
Johan R schrieb:
> seems this is a very primitive forum
> :).

This is not a forum, but a newsgroup. A forum is the very primitive 
successor of a newsgroup, designed to be usable by every ordinary 
person, who can click around with a browser.

> I have considered making my own widget since i feel
> Fl_Text_Display is a bit of a cpu hog. Any ideas are very welcome.

Maybe you should start realising it?
___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] Clickable URLs in text

2012-01-20 Thread MacArthur, Ian (SELEX GALILEO, UK)

> Thanks all for replying.
> I saw your replies now since i did expect a mail telling me i 
> got replys ... seems this is a very primitive forum :).

It's not a forum at all - it's a web view of a mailing list.
If you want email notifications of messages, subscribe to the mailing
list.


> I am using a Fl_Text_Display to display a game lobby chat 
> log, often http URLs are written by the "host" in this chat 
> log and i want to make it easy for the user to go to these web pages.
> 
> Sounds like i will have to specialize Fl_Text_display or 
> perhaps make my own widget.
> I have considered making my own widget since i feel 
> Fl_Text_Display is a bit of a cpu hog.
> Any ideas are very welcome.

I don't think I'd use a text display for that at all, I think I'd use a
Fl_Browser, and derive from that to get the desired behaviour.
Though if you need anything more than very basic text handling, maybe
Fl_Text_* is the way to go.

That said, IIRC Greg had an example of a simple chat widget on his
cheat-sheet, maybe that might be useful to you?

I'm surprised you think it's a CPU hog - it's derived form the old nedit
codebase, and is generally OK.
Do you have metrics showing the loading and utilisation. That might
indentify where the CPU is going?


SELEX Galileo 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


Re: [fltk.general] XRequest.137: BadWindow

2012-01-20 Thread Barry Branham
> Edzard Egberts schrieb:
> >You should try a linux group.
>
> There must be a group related to X.

Thanks Edzard,

I found the answer by comparing my xorg.conf with one an a working twinview 
system.  My xorg.conf was omitting the lines
ModulePath  "/usr/lib/xorg/modules/extensions/nvidia"
ModulePath  "/usr/lib/xorg/modules"
in Section "Files"

It works after I added them.  Apparently libglx.so wasn't getting used.

Barry

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


Re: [fltk.general] Clickable URLs in text

2012-01-20 Thread Greg Ercolano
On 01/20/12 05:04, MacArthur, Ian (SELEX GALILEO, UK) wrote:
>> I have considered making my own widget since i feel 
>> Fl_Text_Display is a bit of a cpu hog.
>> Any ideas are very welcome.
> 
> I don't think I'd use a text display for that at all, I think I'd use a
> Fl_Browser, and derive from that to get the desired behaviour.
> Though if you need anything more than very basic text handling, maybe
> Fl_Text_* is the way to go.


> That said, IIRC Greg had an example of a simple chat widget on his
> cheat-sheet, maybe that might be useful to you?

Hmm, don't think I made a chatter in FLTK.

I did make a telnet based chat: 
http://seriss.com/people/erco/unixtools/talkerco
and a browser based web chat: 
http://seriss.com/people/erco/unixtools/chatter

Perhaps you're thinking of a dumb terminal emulator
that lets one type commands that run in a shell and
see the stdout/err of the commands in an FLTK window:
http://seriss.com/people/erco/fltk/#SimpleTerminal

In that case I did use Fl_Text_Editor.
I haven't really seen cpu issues with it, but I suppose
it depends how you make use of it.

I see the subject of this thread being URLs in text,
which might mean the FLTK html widget is involved.
That may have speed issues, as I think it has to re-parse
everything when changes are made.

If I needed a chat program that allowed URLs to be
automatically clickable, hmm, yeah, might have to customize
Fl_Text_* to do that.

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


[fltk.general] Context Highlighter?

2012-01-20 Thread Paul R
Hi all,

I think there is a good project for an FLTK application in my work,
The account managers have to analyse reams of output from the client's
particular 'calculation code' and config which is written in an in-house
interpreted language.

The thing is there is nothing to support this analysis other than using
the 'find' function in whatever viewer they open the reports in.

So my idea is to write a custom viewer with FLTK to provide at least
context highlighting as an initial aid.

The reports contain a range of datatype labels such as ' int ' and also
'blocks' of relevant procedures, comments etc.

I would welcome any suggestions regarding a starting point in FLTK
for this 'viewer'.

The text editor perhaps? bearing in mind i only want read functionality.
Identifying 'start /end' to statement blocks etc,
Colouring text if it is a certain dataype, etc.
background highlighting of text when the context is of a certain statement 
type, all of that kind of thing.

Can the text editor be tweaked in this way?

Thanjks for any info.
___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


[fltk.general] Context Highlighter?

2012-01-20 Thread Paul R
Hi all,

I think there is a good project for an FLTK application in my work,
The account managers have to analyse reams of output from the client's
particular 'calculation code' and config which is written in an in-house
interpreted language.

The thing is there is nothing to support this analysis other than using
the 'find' function in whatever viewer they open the reports in.

So my idea is to write a custom viewer with FLTK to provide at least
context highlighting as an initial aid.

The reports contain a range of datatype labels such as ' int ' and also
'blocks' of relevant procedures, comments etc.

I would welcome any suggestions regarding a starting point in FLTK
for this 'viewer'.

The text editor perhaps? bearing in mind i only want read functionality.
Identifying 'start /end' to statement blocks etc,
Colouring text if it is a certain dataype, etc.
background highlighting of text when the context is of a certain statement 
type, all of that kind of thing.

Can the text editor be tweaked in this way?

Thanjks for any info.
___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] Context Highlighter?

2012-01-20 Thread Greg Ercolano
On 01/20/12 14:08, Paul R wrote:
> The text editor perhaps? bearing in mind i only want read functionality.
> Identifying 'start /end' to statement blocks etc,
> Colouring text if it is a certain dataype, etc.
> background highlighting of text when the context is of a certain statement 
> type, all of that kind of thing.
> 
> Can the text editor be tweaked in this way?

The text editor already supports colors very easily.
See this simple example:
http://seriss.com/people/erco/fltk/#Fl_Text_DisplayStyle

You can specify an optional 'style buffer' to the Fl_Text_*
widget which parallels the 'text buffer'.

Each byte in the 'style buffer' is an index into a 'style array'
that defines the color, font face, and font size of each corresponding
character in the 'text buffer'.

FLTK's own code editor (within fluid) makes use of this feature
to enable syntax highlighting of the C++ code, so that code is
syntax-colored as you type.
___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] Context Highlighter?

2012-01-20 Thread Paul R
> > Can the text editor be tweaked in this way?
>
>   The text editor already supports colors very easily.
>   See this simple example:
>   http://seriss.com/people/erco/fltk/#Fl_Text_DisplayStyle
>
>   You can specify an optional 'style buffer' to the Fl_Text_*
>   widget which parallels the 'text buffer'.
>
>   FLTK's own code editor (within fluid) makes use of this feature
>   to enable syntax highlighting of the C++ code, so that code is
>   syntax-colored as you type.

Thats great, thanks a lot, I knew i was being a bit lazy asking
directly without checking first there, but carpe diem... and all that..

One thing though is i think a background highlighting effect would
be nice, like if it was in notepad++ and you wrote some bash stuff:

a statement like: var=${#fNames[*]} would have a light colour to the
text background in the curly braces.

Like i say, i am not directly checking up on this right now, apologies!
I just assume FLTK will easily support this type of thing also.

The only other thing i would say is my initial idea, and certainly for
simplicity is to not allow writing. Would i be better to start code
with a widget other than text editor in this case?


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


Re: [fltk.general] Context Highlighter?

2012-01-20 Thread Paul R
Greg, thanks, I checked your page link, also in relation to the
fluid code view i see exactly what you mean, and also there is no
write enabled! That would be a real improvement on the current
view the consultants have.

One thing though is what are the limits on the buffer. I know from a
meeting earlier that there may be 3000 pages, but that would be a real
exception rather than the rule.

Also If i wanted a 'find' box then its going to be my custom work all
the way i suppose...
___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] Context Highlighter?

2012-01-20 Thread Greg Ercolano
On 01/20/12 14:42, Paul R wrote:
>>> Can the text editor be tweaked in this way?
>>
>>  The text editor already supports colors very easily.
>>  See this simple example:
>>  http://seriss.com/people/erco/fltk/#Fl_Text_DisplayStyle
>>
>>  You can specify an optional 'style buffer' to the Fl_Text_*
>>  widget which parallels the 'text buffer'.
>>
>>  FLTK's own code editor (within fluid) makes use of this feature
>>  to enable syntax highlighting of the C++ code, so that code is
>>  syntax-colored as you type.
> 
> Thats great, thanks a lot, I knew i was being a bit lazy asking
> directly without checking first there, but carpe diem... and all that..
> 
> One thing though is i think a background highlighting effect would
> be nice, like if it was in notepad++ and you wrote some bash stuff:
> 
> a statement like: var=${#fNames[*]} would have a light colour to the
> text background in the curly braces.
> 
> Like i say, i am not directly checking up on this right now, apologies!
> I just assume FLTK will easily support this type of thing also.
> 
> The only other thing i would say is my initial idea, and certainly for
> simplicity is to not allow writing. Would i be better to start code
> with a widget other than text editor in this case?

Adding background colors to Fl_Text_* might be easy, not sure.

You'd basically add a new background color field to the style class,
and if it's anything other than the widget's bgcolor, you'd first
draw a filled rectangle in the new color before drawing the text
over it.

Fl_Browser has some color abilities, but the built in stuff
is limited to color and font for the entire line, IIRC.

Some time ago I posted a small patch for Fl_Browser that
enables ANSI sequences (similar to Xterm terminal color codes)
so that one can change the color and font on a per-character basis.
See: http://fltk.org/newsgroups.php?gfltk.development+v:5540

A screenshot from the patch's test program:
http://seriss.com/people/erco/fltk/tmp/Fl_Browser-ansi-test.png

However, Fl_Browser is not really optimal for general text presentation;
you can only highlight entire lines, not individual characters.
Therefore, it's probably best to tweak Fl_Text_* to your liking.

Just take a copy of FLTK's code for that widget, change the name
of the classes, then customize to taste and use in your own app.
Post the code when you have something working, as we might want
to merge it into the existing widget.
___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] Context Highlighter?

2012-01-20 Thread Greg Ercolano
On 01/20/12 14:59, Paul R wrote:
> Greg, thanks, I checked your page link, also in relation to the
> fluid code view i see exactly what you mean, and also there is no
> write enabled! That would be a real improvement on the current
> view the consultants have.

Right; the example there uses "Fl_Text_Display",
which is read-only. (ie. you can't type into it)

Not that you sound like you need it, but if you wanted it
to be more like an 'editor' where user's can type, you can
just change "Fl_Text_Display" to "Fl_Text_Editor", and you
can then also type into it.

> One thing though is what are the limits on the buffer. I know from a
> meeting earlier that there may be 3000 pages, but that would be a real
> exception rather than the rule.

I don't know there's any limit. I believe it will basically
load whatever you tell it to, the practical limit being the
machine's ability to allocate memory.

I'm not sure if there are performance limits at very high
values, but I know I've used Fl_Text_Display on very large
several hundred megabytes, and not seen a problem with speed.

And like your app, my program was showing programs' realtime
stdout, which can sometimes be quite voluminous.

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


Re: [fltk.general] Context Highlighter?

2012-01-20 Thread Paul R
Oh no i see the fluid code view is not read only, i will check up on
docs for options there.
___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] Context Highlighter?

2012-01-20 Thread Paul R
>
> > One thing though is what are the limits on the buffer. I know from a
> > meeting earlier that there may be 3000 pages, but that would be a real
> > exception rather than the rule.
>
>   I don't know there's any limit. I believe it will basically
>   load whatever you tell it to, the practical limit being the
>   machine's ability to allocate memory.
>
>   I'm not sure if there are performance limits at very high
>   values, but I know I've used Fl_Text_Display on very large
>   several hundred megabytes, and not seen a problem with speed.
>
>   And like your app, my program was showing programs' realtime
>   stdout, which can sometimes be quite voluminous.
>

Yes, I was *hoping* it would be more machine limitaions than anything
else. Thanks for your help, this is certainly a good vehicle for
exploration and if anything useful in the wider context comes out of it
I will be sure to post. Cheers.
___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] Context Highlighter?

2012-01-20 Thread Albrecht Schlosser
On 20.01.2012 23:59, Paul R wrote:

> One thing though is what are the limits on the buffer. I know from a
> meeting earlier that there may be 3000 pages, but that would be a real
> exception rather than the rule.

The only limit is memory...

> Also If i wanted a 'find' box then its going to be my custom work all
> the way i suppose...

Yep, but there is the complete editor example in test/editor.cxx.
Isn't there even an easy example in the docs?

I did such a thing in my commercial app. by subclassing Fl_Text_Display.
The nice thing is that you can add another text buffer, fill it with
anything you like, and then switch buffers (show the alternate buffer
in the widget) with the text you want to show. This could be a list
of all lines matching a search (that's one of the features I used).

Together with the (syntax) highlighting features described by Greg
(see also test/editor.cxx), this is very powerful for self-written
analysis.

Hint: run "test/editor test/editor.cxx" to see the editor working
with syntax highlighting. It's a real editor, you can use it for
editing source files ;-) and it has search and replace functions.

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


Re: [fltk.general] Context Highlighter?

2012-01-20 Thread Paul R
> Yep, but there is the complete editor example in test/editor.cxx.
> Isn't there even an easy example in the docs?
>
> I did such a thing in my commercial app. by subclassing Fl_Text_Display.
> The nice thing is that you can add another text buffer, fill it with
> anything you like, and then switch buffers (show the alternate buffer
> in the widget) with the text you want to show. This could be a list
> of all lines matching a search (that's one of the features I used).

Thanks for the info there, I am wondering though in the extended case of
this idea would I be getting into regular expressions as an ideal
text handling method? I mean on the high level, specific to the company
needs, something could be quite quickly implemented, but catering for
other use cases would/should include more sophistication ...?
___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk


Re: [fltk.general] Context Highlighter?

2012-01-20 Thread Paul R
I just mean the possibilty of additional dependencies if regular
expressions were required, but I probably just need to read the docs
in more detail as I am sure I saw something about support for them there
already.
___
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk