Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DrawPanel Feature: Grouping Shapes #653

Open
wants to merge 55 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 63 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
395f878
adding key release callback
ganimtron-10 Jul 15, 2022
d527745
adding interface to identity key status
ganimtron-10 Jul 15, 2022
c4fd598
adding DrawShapeGroup
ganimtron-10 Jul 15, 2022
f054c14
adding bb border
ganimtron-10 Jul 15, 2022
a02f5c5
adding borders to the shape
ganimtron-10 Jul 19, 2022
53e9f15
adding borders to the shape
ganimtron-10 Jul 19, 2022
0d5c8d6
Merge branch 'new_bb_border' of https://github.com/ganimtron-10/fury …
ganimtron-10 Jul 19, 2022
b884525
Merge branch 'new_bb_border' into new-gshape-border
ganimtron-10 Jul 27, 2022
23e07f2
updating method name
ganimtron-10 Jul 27, 2022
2221388
updating selection of shape
ganimtron-10 Aug 1, 2022
88efc7a
Merge branch 'rotation' into new-gshape-border
ganimtron-10 Aug 1, 2022
2e324cf
removing position property and bring_to_top
ganimtron-10 Aug 1, 2022
b7a4d74
updating position of all grouped shapes
ganimtron-10 Aug 1, 2022
4123985
adding group rotation
ganimtron-10 Aug 2, 2022
6ba3587
remove print statement
ganimtron-10 Aug 3, 2022
214e801
Merge branch 'fury-gl:master' into new-gshape-border
ganimtron-10 Aug 6, 2022
babb57c
adding support for shortcut keys
ganimtron-10 Aug 6, 2022
5c4af4d
Merge branch 'new-gshape-border' of https://github.com/ganimtron-10/f…
ganimtron-10 Aug 6, 2022
b41164b
fixing pep
ganimtron-10 Aug 6, 2022
e14e573
fixing selection issue
ganimtron-10 Aug 7, 2022
b3266e6
updating clear method
ganimtron-10 Aug 7, 2022
b11045d
updating individual selection
ganimtron-10 Aug 7, 2022
1abada7
deleting extra remove function
ganimtron-10 Aug 7, 2022
4b43a97
keeping rotation slider on the top
ganimtron-10 Aug 7, 2022
d0ac73c
adding docs
ganimtron-10 Aug 10, 2022
8771333
removing print stmts
ganimtron-10 Aug 10, 2022
e4c6a6b
removing grouped shapes on mode change
ganimtron-10 Aug 13, 2022
ad59616
Merge branch 'master' into new-gshape-border
ganimtron-10 Aug 19, 2022
b0f0668
removing extra comments
ganimtron-10 Aug 19, 2022
c5960ba
maintaining consistency in callback names
ganimtron-10 Aug 19, 2022
3a0ae3d
Merge branch 'rotation' into new-gshape-border
ganimtron-10 Aug 19, 2022
66cf810
removing prints
ganimtron-10 Aug 20, 2022
1ae116c
initializing `DrawShapeGroup`'s scene
ganimtron-10 Aug 20, 2022
5f6000a
Merge branch 'rotation' into new-gshape-border
ganimtron-10 Aug 23, 2022
e57ac1c
removing redundant position param
ganimtron-10 Aug 23, 2022
36adf82
fix overlapping of the shapes when translated near the borders
ganimtron-10 Aug 28, 2022
8371bea
Merge branch 'rotation' into new-gshape-border
ganimtron-10 Aug 29, 2022
2cd3683
Merge branch 'master' into new-gshape-border
ganimtron-10 Aug 30, 2022
32abd65
Merge branch 'master' into new-gshape-border
ganimtron-10 Sep 7, 2022
f746f10
Merge branch 'master' into new-gshape-border
ganimtron-10 Sep 9, 2022
4fe5d3b
using cal_bounding_box from helper
ganimtron-10 Sep 9, 2022
0fde858
Merge branch 'master' into new-gshape-border
ganimtron-10 Sep 12, 2022
bace0bb
fixing integrating issues
ganimtron-10 Sep 12, 2022
674c529
adding debug param
ganimtron-10 Sep 12, 2022
924c730
updating tests
ganimtron-10 Sep 14, 2022
5e0fa69
updating rotation test
ganimtron-10 Sep 16, 2022
b75d667
adding highlight_color param
ganimtron-10 Sep 16, 2022
cc6d974
adding test for grouping feature
ganimtron-10 Sep 16, 2022
d0f6ac8
re-recording tests
ganimtron-10 Sep 30, 2022
f19eb0b
adding group delete
ganimtron-10 Oct 6, 2022
4e74b0d
recording new events for tests
ganimtron-10 Oct 6, 2022
ed7975f
updating grouping test
ganimtron-10 Oct 8, 2022
4489c6e
Merge branch 'fury-gl:master' into new-gshape-border
ganimtron-10 Nov 18, 2022
ab3186c
Merge branch 'master' into new-gshape-border
ganimtron-10 Feb 11, 2023
874e813
Merge branch 'master' into new-gshape-border
ganimtron-10 Feb 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fury/data/files/test_ui_draw_panel.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"CharEvent": 0, "MouseMoveEvent": 822, "KeyPressEvent": 0, "KeyReleaseEvent": 0, "LeftButtonPressEvent": 17, "LeftButtonReleaseEvent": 17, "RightButtonPressEvent": 0, "RightButtonReleaseEvent": 0, "MiddleButtonPressEvent": 0, "MiddleButtonReleaseEvent": 0}
{"CharEvent": 0, "MouseMoveEvent": 659, "KeyPressEvent": 0, "KeyReleaseEvent": 0, "LeftButtonPressEvent": 27, "LeftButtonReleaseEvent": 27, "RightButtonPressEvent": 0, "RightButtonReleaseEvent": 0, "MiddleButtonPressEvent": 0, "MiddleButtonReleaseEvent": 0}
Binary file modified fury/data/files/test_ui_draw_panel.log.gz
Binary file not shown.
10 changes: 8 additions & 2 deletions fury/ui/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ def __init__(self, position=(0, 0)):
self.on_middle_mouse_double_clicked = lambda i_ren, obj, element: None
self.on_middle_mouse_button_dragged = lambda i_ren, obj, element: None
self.on_key_press = lambda i_ren, obj, element: None
self.on_key_release = lambda i_ren, obj, element: None

@abc.abstractmethod
def _setup(self):
Expand Down Expand Up @@ -261,7 +262,8 @@ def handle_events(self, actor):
self.add_callback(actor, "MiddleButtonReleaseEvent",
self.middle_button_release_callback)
self.add_callback(actor, "MouseMoveEvent", self.mouse_move_callback)
self.add_callback(actor, "KeyPressEvent", self.key_press_callback)
self.add_callback(actor, "KeyPressEvent", self.on_key_press_callback)
self.add_callback(actor, "KeyReleaseEvent", self.on_key_release_callback)

@staticmethod
def left_button_click_callback(i_ren, obj, self):
Expand Down Expand Up @@ -325,9 +327,13 @@ def mouse_move_callback(i_ren, obj, self):
self.on_middle_mouse_button_dragged(i_ren, obj, self)

@staticmethod
def key_press_callback(i_ren, obj, self):
def on_key_press_callback(i_ren, obj, self):
ganimtron-10 marked this conversation as resolved.
Show resolved Hide resolved
self.on_key_press(i_ren, obj, self)

@staticmethod
def on_key_release_callback(i_ren, obj, self):
self.on_key_release(i_ren, obj, self)


class Rectangle2D(UI):
"""A 2D rectangle sub-classed from UI."""
Expand Down
Loading