Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #55716 > unrolled thread

Squeak squeak (handle those mice)

Started byMalcolm McLean <malcolm.mclean5@btinternet.com>
First post2015-01-03 04:04 -0800
Last post2015-01-05 13:36 -0800
Articles 6 on this page of 26 — 11 participants

Back to article view | Back to comp.lang.c


Contents

  Squeak squeak (handle those mice) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-01-03 04:04 -0800
    Re: Squeak squeak (handle those mice) Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-01-03 12:54 +0000
      Re: Squeak squeak (handle those mice) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-01-03 06:46 -0800
    Re: Squeak squeak (handle those mice) [Off Topic] Morris Dovey <mrdovey@iedu.com> - 2015-01-03 11:11 -0600
      Re: Squeak squeak (handle those mice) [Off Topic] Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-01-03 15:29 -0800
        Re: Squeak squeak (handle those mice) [Off Topic] raltbos@xs4all.nl (Richard Bos) - 2015-01-05 12:53 +0000
      Re: Squeak squeak (handle those mice) [Off Topic] fir <profesor.fir@gmail.com> - 2015-01-04 13:21 -0800
      Re: Squeak squeak (handle those mice) [Off Topic] Richard Heathfield <invalid@see.sig.invalid> - 2015-01-04 22:50 +0000
        Re: Squeak squeak (handle those mice) [Off Topic] Morris Dovey <mrdovey@iedu.com> - 2015-01-04 21:35 -0600
        Re: Squeak squeak (handle those mice) [Off Topic] fir <profesor.fir@gmail.com> - 2015-01-05 01:14 -0800
      Re: Squeak squeak (handle those mice) [Off Topic] jacob navia <jacob@spamsink.net> - 2015-01-05 11:24 +0100
        Re: Squeak squeak (handle those mice) [Off Topic] fir <profesor.fir@gmail.com> - 2015-01-05 02:48 -0800
    Re: Squeak squeak (handle those mice) Greg Martin <greg.at.softsprocket@dot.com> - 2015-01-03 17:22 +0000
      Re: Squeak squeak (handle those mice) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-01-03 16:01 -0800
        Re: Squeak squeak (handle those mice) Greg Martin <greg.at.softsprocket@dot.com> - 2015-01-04 15:57 +0000
          Re: Squeak squeak (handle those mice) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-01-04 08:25 -0800
            Re: Squeak squeak (handle those mice) Greg Martin <greg.at.softsprocket@dot.com> - 2015-01-04 16:37 +0000
    Re: Squeak squeak (handle those mice) jacob navia <jacob@spamsink.net> - 2015-01-05 00:04 +0100
      Re: Squeak squeak (handle those mice) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-01-05 01:04 -0800
        Re: Squeak squeak (handle those mice) jacob navia <jacob@spamsink.net> - 2015-01-05 11:21 +0100
          Re: Squeak squeak (handle those mice) fir <profesor.fir@gmail.com> - 2015-01-05 02:41 -0800
          Re: Squeak squeak (handle those mice) BartC <bc@freeuk.com> - 2015-01-05 11:21 +0000
            Re: Squeak squeak (handle those mice) jacob navia <jacob@spamsink.net> - 2015-01-05 14:22 +0100
            Re: Squeak squeak (handle those mice) Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-01-05 06:01 -0800
            Re: Squeak squeak (handle those mice) Ian Collins <ian-news@hotmail.com> - 2015-01-06 08:39 +1300
    Re: Squeak squeak (handle those mice) "Chris M. Thomasson" <no@spam.invalid> - 2015-01-05 13:36 -0800

Page 2 of 2 — ← Prev page 1 [2]


#55883

Fromfir <profesor.fir@gmail.com>
Date2015-01-05 02:41 -0800
Message-ID<c6f94922-cd80-46b1-96b4-0a642df799d1@googlegroups.com>
In reply to#55881
W dniu poniedziałek, 5 stycznia 2015 11:21:21 UTC+1 użytkownik jacob navia napisał:
> Le 05/01/2015 10:04, Malcolm McLean a écrit :
> > On Sunday, January 4, 2015 11:04:35 PM UTC, jacob navia wrote:
> >> Hi Malcolm
> >>
> >> Do you have a graphics compiler that will allow Baby X users to
> >> graphically edit a dialog box,putting buttons, list boxes, etc in heir
> >> places and adjust their sizes?
> >>
> >> Then it generates a binary resource file that you can load at run time.
> >>
> > No, that's obviously a Baby X program to write.
> >
> Well, I have written one.
> 
> We could work together with that.
> 
> > The resource compiler packages images and fonts, and I'm just adding
> > cursors.
> 
> That's not very difficult to do. The REAL problems starts when you want 
> to design a dialog box with several buttons, group boxes, listboxes, 
> tree widgets, whatever
> 
> Then you have to write:
> 
> Createwindow(10,10,200,200);
> 
> No! it is far to the left. Let's try
> 
> CreateWindow(15,10,200,200);
> 
> Still a bit to the left. Let's try
> 
> CreateWindow(20,10,200,200);
> 
> GOSH! Too far to the right!
> 

hehe, i understand this trouble, 

anyway i could stand that when doing my carefull crafted application and probably would prefer this over resources (different story
is massive line production (im not doing massive so i opt for that code lines)


> ... and so on. Nobody will use Baby X if they have to go through that at 
> each modification of a dialog box...
> 

> > I'm not sure how a resource file giving widget types and names would
> > work, it's easy enough to spit out a skeleton dialog C source for the
> > user to fill, but when he edits it, it's going to be a lot harder to
> > merge the edits.
> >
> 
> Yes. You create a RESOURCE FILE (*.res). Microsoft solved that problem 
> 20 years ago. Let's not reinvent the wheel. You use the resource files 
> of Microsoft. That way you will be able to reuse all resource files 
> already in use under windows...
> 
> The resource files are done by the resource compiler, that takes a text 
> file with the .DLG extension, or RC extension.
> 
> You can use mine too. If interested I can send you the source files both 
> of the resource editor and the resource compiler.
> 
> All this works under windows. Unix is another domain, and probably it 
> has to be completely rewritten for Unix...

[toc] | [prev] | [next] | [standalone]


#55886

FromBartC <bc@freeuk.com>
Date2015-01-05 11:21 +0000
Message-ID<btuqw.368686$G23.276265@fx44.am4>
In reply to#55881
On 05/01/2015 10:21, jacob navia wrote:
> Le 05/01/2015 10:04, Malcolm McLean a écrit :

>> No, that's obviously a Baby X program to write.
>>
> Well, I have written one.
>
> We could work together with that.
>
>> The resource compiler packages images and fonts, and I'm just adding
>> cursors.
>
> That's not very difficult to do. The REAL problems starts when you want
> to design a dialog box with several buttons, group boxes, listboxes,
> tree widgets, whatever
>
> Then you have to write:
>
> Createwindow(10,10,200,200);
>
> No! it is far to the left. Let's try
>
> CreateWindow(15,10,200,200);
>
> Still a bit to the left. Let's try
>
> CreateWindow(20,10,200,200);
>
> GOSH! Too far to the right!
>
> ... and so on. Nobody will use Baby X if they have to go through that at
> each modification of a dialog box...

Positioning of a window like that is rarely a problem. You either create 
it using a default position (somewhere in the centre), or anchored near 
some existing element. And if it needs to be somewhere else, the user 
can drag it there!

(For creating fixed elements of a dialog box, that's needs a slightly 
different approach.)

>> I'm not sure how a resource file giving widget types and names would
>> work, it's easy enough to spit out a skeleton dialog C source for the
>> user to fill, but when he edits it, it's going to be a lot harder to
>> merge the edits.
>>
>
> Yes. You create a RESOURCE FILE (*.res). Microsoft solved that problem
> 20 years ago. Let's not reinvent the wheel. You use the resource files
> of Microsoft. That way you will be able to reuse all resource files
> already in use under windows...
>
> The resource files are done by the resource compiler, that takes a text
> file with the .DLG extension, or RC extension.

I also looked at resource files 20 years ago. And immediately rejected 
them. They're a horrible way to work; why not do the same thing by 
coding in a real language rather than use some restrictive file format 
of MS where everything has to be worked out exactly at compile-time? And 
you have the same problem as above, except you're now working in 1/4 and 
1/8 character units.

(I used a scheme programmed from a scripting language where I could 
rapidly put together menu buttons without hardly ever having to specify 
exact pixel dimensions. And that could change depending on current 
context which you can't do with resource files, which have to be 
'compiled' and linked in to an executable. With my method, I could do 
everything I need from within the application while it was still running!)

Besides I thought the point was to to have something that works under X 
Windows too. And anyway, a GUI-like method of creating dialogs can be 
added /on top/ of such a library.

-- 
Bartc

[toc] | [prev] | [next] | [standalone]


#55895

Fromjacob navia <jacob@spamsink.net>
Date2015-01-05 14:22 +0100
Message-ID<m8e36e$j51$1@speranza.aioe.org>
In reply to#55886
Le 05/01/2015 12:21, BartC a écrit :
> Positioning of a window like that is rarely a problem. You either create
> it using a default position (somewhere in the centre), or anchored near
> some existing element. And if it needs to be somewhere else, the user
> can drag it there!
>
> (For creating fixed elements of a dialog box, that's needs a slightly
> different approach.)

Well, I was speaking about dialog boxes of course... Just opening a 
window needs no special coordinates and you can leave it to the system!

The editor I am speaking about is for designing dialog boxes.

[toc] | [prev] | [next] | [standalone]


#55896

FromMalcolm McLean <malcolm.mclean5@btinternet.com>
Date2015-01-05 06:01 -0800
Message-ID<53a3c76e-cfd9-4699-af95-b7f0da0a0931@googlegroups.com>
In reply to#55886
On Monday, January 5, 2015 11:21:53 AM UTC, Bart wrote:
>
> > Yes. You create a RESOURCE FILE (*.res). Microsoft solved that problem
> > 20 years ago. Let's not reinvent the wheel. You use the resource files
> > of Microsoft. That way you will be able to reuse all resource files
> > already in use under windows...
> >
> > The resource files are done by the resource compiler, that takes a text
> > file with the .DLG extension, or RC extension.
> 
> I also looked at resource files 20 years ago. And immediately rejected 
> them. They're a horrible way to work; why not do the same thing by 
> coding in a real language rather than use some restrictive file format 
> of MS where everything has to be worked out exactly at compile-time? And 
> you have the same problem as above, except you're now working in 1/4 and 
> 1/8 character units.
>
That was my feeling too.
The dialogs become dependent on the resource editor. It was good thing I didn't use
them, because I had a paid for personal copy of Visual Studio 6.0, which cost about
80 pounds. I've forgotten exactly, significant but a typical shrink-wrapped app price.

I bought a Vista machine on the very fist day Vista came out. And my compiler
was broken. I complained, and I got an email back (to be fair they did actually reply) 
saying that MS Visual Studio 6.0 was so old. 
They had an express version which was free, but no resource editor, and the paid
for Visual Studio was several hundred pounds - nothing to a company, but rather
expensive for hobby programming. I struggled along with the express version,
hating it and resenting the fact that my £80 compiler had been deliberately broken.
Meanwhile I was doing my PhD, and using Linux for serious software development
in the lab. Fortunately, most of my dialogs were hand coded. So they ported to
the crippled Express compiler quite easily.
>
> (I used a scheme programmed from a scripting language where I could 
> rapidly put together menu buttons without hardly ever having to specify 
> exact pixel dimensions. And that could change depending on current 
> context which you can't do with resource files, which have to be 
> 'compiled' and linked in to an executable. With my method, I could do 
> everything I need from within the application while it was still running!)
>
Baby X calls a layout() callback every time the mother panel changes size,
including on first map. It's to encourage widgets to scale intelligently. Qt
has a awful system of stretch boxes which I didn't want to reproduce.
However it maps everything in device pixels. That still seems to be necessary,
drawing would be a lot slower if the canvas had to scale.
> 
> Besides I thought the point was to to have something that works under X 
> Windows too. And anyway, a GUI-like method of creating dialogs can be 
> added /on top/ of such a library.
> 
Portability is the idea. There would have to be an internal Baby X "dialog" in 
some easy and fast parseable format, because I want to keep understanding 
and modifying Baby X a reasonable job to give a single programmer for a short 
project.  However I could write a windows RC to Baby X converter. 

[toc] | [prev] | [next] | [standalone]


#55937

FromIan Collins <ian-news@hotmail.com>
Date2015-01-06 08:39 +1300
Message-ID<ch07k8FpgmlU1@mid.individual.net>
In reply to#55886
BartC wrote:
> On 05/01/2015 10:21, jacob navia wrote:
>>
>> Yes. You create a RESOURCE FILE (*.res). Microsoft solved that problem
>> 20 years ago. Let's not reinvent the wheel. You use the resource files
>> of Microsoft. That way you will be able to reuse all resource files
>> already in use under windows...
>>
>> The resource files are done by the resource compiler, that takes a text
>> file with the .DLG extension, or RC extension.
>
> I also looked at resource files 20 years ago. And immediately rejected
> them. They're a horrible way to work; why not do the same thing by
> coding in a real language rather than use some restrictive file format
> of MS where everything has to be worked out exactly at compile-time? And
> you have the same problem as above, except you're now working in 1/4 and
> 1/8 character units.

CSS maybe?

-- 
Ian Collins

[toc] | [prev] | [next] | [standalone]


#55954

From"Chris M. Thomasson" <no@spam.invalid>
Date2015-01-05 13:36 -0800
Message-ID<m8f07l$a9d$1@speranza.aioe.org>
In reply to#55716
> "Malcolm McLean"  wrote in message 
> news:0bf04542-02d3-477c-b05a-b6c7999729cc@googlegroups.com...

> I'm trying to improve mouse handling in Baby X.

[...]

One little point... AFAICT, there is no "mouseover" event in a
touchscreen environment...

Just thinking out loud.

Yikes!

;^( 

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.lang.c


csiph-web