GtkScale behaviours



Hi all,
    I'm porting a custom GtkV/HScale implementation from gtk+-1.3.5 to
gtk+-2.4.x (which is entirely different, and now alot nicer).

The default behaviour is to advance the slider by the value of one "page_size";
I need two other behaviours:

  - "jumpy" where the slider "jumps" to the current mouse position in the trough
    (and moves with the mouse upon drags ofcourse).
  - "catch" where the slider does nothing at all untill the mouse is "dragged"
    into the slider's area at which point the GtkScale behaves as if the mouse
    click was initialy in the slider area.

From looking at GtkRange's implementation of
    'motion_notify'/'enter_notify'/'leave_notify'
I notice that most of the relavent information I'll need to
implement this is stored in an opaque structure `GtkRangeLayout'
which kinda bites since I can't access that when deriving from GtkScale.

Does anyone have an idea of how I can accomplish this without:
    a.) Brutaly defining the opaque GtkRangeLayout structure in my code
    b.) Writing an entire duplicate GtkScale implementation


Many thanks in advance,
                                                 -Tristan





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