On Monday 02 December 2002 6:27 pm, John Levon wrote: > On Mon, Dec 02, 2002 at 06:26:17PM +0000, Angus Leeming wrote: > > I've had a look at the code and it would appear that > > * left mouse button: increment size = "1 page" > > * right mouse button: increment size = "1 line" > > > > I'm no GUI expert, but the principle of least surprise suggests to me > > that we should have small increments with the left mouse button and big > > increments with the right button? What's the convention followed by other > > editor apps? > > The RMB behaviour is surreal (that is, there's no good reason for it to > exist at all). > > The LMB is correct: click on the uncovered region of a scrollbar always > means "scroll a page", in every application in the world, ever ;)
Ok, I'll leave things as they are then. > We should just delay the page scroll a little. And that's currently not possible. See below for the mail I've just sent to the xforms list about this. > Far more important is fixing the selection behaviour though - it's totally > unusable. This is definitely a separate problem. Moreover, it's entirely our fault since we control the behaviour of the workarea. > Note the user can still drag the scrollbar handle to target a > particular position Sure. > > regards > john ---------- Forwarded Message from Angus Leeming ---------- Subject: interrogating a scrollbar Date: Mon, 2 Dec 2002 18:38:10 +0000 From: Angus Leeming <[EMAIL PROTECTED]> To: XFORMS list <[EMAIL PROTECTED]> Dear all (especially Steve ;-), I think that I've got to the bottom of this problem but would like to probe your thoughts about the best way forward. What are your feelings about my "Possible solutions" and can you see another way? Regards, Angus ==================== The problem ===================== an xforms scrollbar object contains the following separate widgets: FL_OBJECT * slider; FL_OBJECT * up; FL_OBJECT * down; being the slider itself and the trough on either side of this slider. Is there any way of interrogating a scrollbar to ascertain which widget has generated the callback/event? ======================= Why ========================== I'm using the scrollbar to control which part of a document is visible. I'd like to encode the following behaviour: * For the slider, a mouse event is to be processed immediately by going to that line in the document. * For the trough, I'd like to "increment 1 page" per mouse event together with a "reasonable delay" between increments (so that I can control position, not just whizz to the end of the document). I can see that to do this, I'll need to call a prehandler that starts a timer (a bit like the tooltip code) if the mouse button press originates in the trough. Subsequent FL_PRESS events from the trough would be handled only if the timer had stopped running. First, however, I have to find a way to discover whether I'm dealing with an event from the slider or the trough. ================== Possible solutions ====================== 1. Make the private struct FL_SCROLLBAR_SPEC visible to the outside world. Is there a reason why these private structs aren't visible already (so that we can define prehandler/callback functions for them)? I guess that one short term solution is to cheat and replicate that struct in my own code, but that's nasty and hardly robust. It will work for now though if I insist on the use of xforms 1.0. 2. Keep the private structs hidden but provide the ability to define client-side prehandler and callback routines for the hidden FL_OBJECTS. 3. I've had some tentative ideas about using the mouse position, together with the (known) size and position of the slider to extract this information. However, this is clearly not going to work very well (because I can only guess the outer bounds of the up, down buttons). 4. Is there an easy way I don't know about? Angus -------------------------------------------------------