Re: [gtk-list] Spin button question



Havoc Pennington wrote:
> On Tue, 1 Jun 1999, Steve Hosgood wrote:
> > Is there a sensible way for me to do what I want to do?
> > 
> 
> Just write a new widget that does what you want. It should be easy based
> on the spinbutton sources.
>

Hmm - I was afraid someone was going to say that!

> The arrows aren't separate widgets for efficiency reasons, I'm sure. It's
> not a complicated widget; just drawing the arrows saves both time and
> memory.
> 

Regardless of whether it's a complicated widget or not, I'm a bit upset to find
that anyone should have to resort to such lengths just in order to build what is (on
the surface at least) a simple composite of two instances of a standard widget with
their arrow-buttons repositioned.

OK, so that's the beauty of open-source. At least I *can* do such a thing. But should
I have to? There was talk on this list the other day of someone wanting to do a
rewrite of the spinbutton to allow display of user-formatted items in the panel. If
I go my own way and make my own 2D spin button from current sources, it doesn't get
the ability to inherit that other person's work on user-formatted spinbutton panels
when (or if) it becomes part of standard GTK+

If the current spinbutton does its own arrow-drawing and handling for "efficiency
reasons" as Havoc suggests, should that really be allowable in the allegedly-O-O
environment of GTK+?

If the "efficiency reasons" really are that important, does it indicate that there's
something wrong in the O-O implementation somewhere that makes it so inefficient?

I don't know, but I'd guess that if indeed spinbutton does its own arrow handling, then
won't those arrows fail to change in appearance if a custom theme changes the appearance
of the other arrows in the widget set?

--

Steve                                       | Steve's law of House Rewiring:
S.Hosgood@swansea.ac.uk                     | "No matter how many power sockets
Phone: +44 1792 297292 + ask for Steve      |  you fit in a room, you will run
Fax:   +44 1792 295811                      |  out within the first week of use
--------------------------------------------+  even if you took Steve's law of
http://iiit.swan.ac.uk/~iisteve/steve.html  |  House Rewiring into account"




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]