[Y-devel] Slider widget done

Jerome Laheurte jerome at gandalf.fraca7.homeunix.net
Mon Mar 8 21:16:37 GMT 2004


On Mon, 8 Mar 2004, Mark Thomas wrote:

> On Mon, 8 Mar 2004, Jerome Laheurte wrote:
>
> > Here is an Arch changeset to include a Slider (horizontal or vertical,
> > depending on the 'orientation' property) widget.
>
> I would call that a "splitter". :)

Argh, not having English as first language is a PITA... So, what would
be a slider ? I picked the name from the Wiki tasklist, and it seemed
natural to me :)

> I'm holding off on widget patches
> until I've merged asuffield's protocol and api changes and we've got a
> clearer idea what widgets we want.  I'll probably have a merge-fest later
> in the week.

Okay, I thought so but didn't have the confirmation. Maybe I should
read *all* the posts on the ML...

If the protocol & API have to change so much, I think you shouldn't
try to incorporate this patch. I'll make a new one against the new API
as soon as it's merged.

BTW, I also have a patch against patch-32 to ease the syntax of
property access in libYc++, ie instead of writing

  obj->setProperty("foobar", "spam");

you just write

  obj->foobar = "spam";

To do so, you just have to add in the class declaration, as public:

  StringProperty foobar;

and add to the initialisation list of the class constructor:

  foobar(this, "foobar")

The obvious advantages are:

* Properties must be declared in the .h. That's more work for libYc++
  maintainers, but it is useful for clients, as documentation (I
  didn't notice the "background" property of the Window class until
  today!).

* Half typos are detected at compile time (there's no protection
  against typing 'foobar(this, "foobra")'). This could be made to 'all
  typos are detected' through preprocessor macros.

There's also a 'IntegerProperty' class, of course. What do you think ?

> It's crunch-time at work so I am a little burned out at the
> moment.

Well, at least you've got a job. If I had one, I couldn't spend so
much time on FOSS :)

> > It took me almost longer to find out how to generate a changeset than
> > to implement the widget :)
>
> oh dear.  if you want to help others, you might want to put instructions
> for what you did on the wiki, documenting any problems you had and how you
> solved them.  I'm so used to arch now it's almost second nature to me.

I already thought about this. As soon as I'll find a *proper* way to
do it (the way I did it this time was kind of a hack), I'll create a
new section in the Wiki Arch-Howto, for sure.

Cheers
-- 
Jérôme Laheurte <fraca7 at free.fr>
Health nuts are going to feel stupid someday, lying in hospitals dying
of nothing.
                -- Redd Foxx



More information about the Y-devel mailing list









2026 © www.Y-Windows.Org - All Rights Reserved