make right-click in the space between the definitions and
interactions window pop up a menu to let you change from vertical to horizontal orientation original commit: 9b3f2427d7adb6fcfb7e737fdec36b313c8f5b69
This commit is contained in:
parent
60c5ad33e3
commit
5bf4271e3e
|
@ -171,7 +171,9 @@
|
|||
set-percentages
|
||||
get-percentages
|
||||
get-vertical?
|
||||
get-default-percentages))
|
||||
get-default-percentages
|
||||
right-click-in-gap
|
||||
set-orientation))
|
||||
|
||||
(define vertical-dragable<%>
|
||||
(interface (dragable<%>)))
|
||||
|
@ -184,7 +186,6 @@
|
|||
(init parent)
|
||||
|
||||
(init-field vertical?)
|
||||
|
||||
(define/public-final (get-vertical?) vertical?)
|
||||
(define/public-final (set-orientation h?)
|
||||
(define v? (not h?))
|
||||
|
@ -205,6 +206,8 @@
|
|||
(icon:get-up/down-cursor)
|
||||
(icon:get-left/right-cursor)))
|
||||
|
||||
(define/public (right-click-in-gap evt before after) (void))
|
||||
|
||||
(inherit get-client-size container-flow-modified)
|
||||
|
||||
(init-field [bar-thickness 5])
|
||||
|
@ -285,6 +288,8 @@
|
|||
(and (send c ok?)
|
||||
c))))
|
||||
(cond
|
||||
[(and gap (send evt button-down? 'right))
|
||||
(right-click-in-gap evt (gap-before gap) (gap-after gap))]
|
||||
[(and gap (send evt button-down? 'left))
|
||||
(set! resizing-dim (event-get-dim evt))
|
||||
(set! resizing-gap gap)]
|
||||
|
|
|
@ -81,6 +81,16 @@
|
|||
The numbers in the result list must sum to @racket[1].
|
||||
}
|
||||
|
||||
@defmethod[(right-click-in-gap [evt (is-a?/c mouse-event%)]
|
||||
[before (is-a?/c subarea<%>)]
|
||||
[after (is-a?/c subarea<%>)])
|
||||
void?]{
|
||||
This method is called when the user right-clicks in the space
|
||||
between two children. It receives the mouse event and the
|
||||
child before and after the gap where the user clicked.
|
||||
}
|
||||
|
||||
|
||||
@defmethod*[(((set-percentages (new-percentages (listof number?))) void?))]{
|
||||
Call this method to set the percentages that each window takes up of the
|
||||
panel.
|
||||
|
|
Loading…
Reference in New Issue
Block a user