Loading @GUIBase/GUIBase.m +4 −2 Original line number Diff line number Diff line Loading @@ -23,9 +23,11 @@ classdef GUIBase < handle end end methods(Abstract) methods(Abstract, Access = protected) draw_onto(object, parent_handle); end methods(Abstract) [x, y] = get_bounding_box( object ); end Loading @GridLayout/GridLayout.m +4 −0 Original line number Diff line number Diff line Loading @@ -27,5 +27,9 @@ classdef GridLayout < GUIBase end end methods(Access = protected) draw_onto(object, phandle) end end @HorizontalLineGridDraw/HorizontalLineGridDraw.m +4 −0 Original line number Diff line number Diff line Loading @@ -30,5 +30,9 @@ classdef HorizontalLineGridDraw < GUIBase end end methods(Access = protected) grid_controls = draw_onto( object, parent_handle, grid, grid_controls) end end @LetStatmentsDraw/LetStatmentsDraw.m +8 −6 Original line number Diff line number Diff line Loading @@ -25,6 +25,14 @@ classdef LetStatmentsDraw < GUIBase data.addlistener('StructureChanged', @(src, event)redraw_and_update_bb(object, src, event)); end function [x, y] = get_bounding_box(object) x = object.gui_params.edit_width+20+object.gui_params.edit_width*2; y = object.gui_params.edit_height*object.my_data.size() + 20; end end methods(Access = protected) function draw_onto(object, parent_handle) [~, y] = object.get_bounding_box(); Loading Loading @@ -75,12 +83,6 @@ classdef LetStatmentsDraw < GUIBase set(pb_delete, 'Position', [80, 0, 80, 20]); set(pb_new, 'Position', [0, 0, 80, 20]); end function [x, y] = get_bounding_box(object) x = object.gui_params.edit_width+20+object.gui_params.edit_width*2; y = object.gui_params.edit_height*object.my_data.size() + 20; end end end @LinearLayoutBase/LinearLayoutBase.m +3 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,9 @@ classdef LinearLayoutBase < LayoutBase object.children{end+1} = child; child.addlistener('BoundingBoxChanged', @(src, event)object.relayout()); end end methods(Access = protected) %NOTE REMOVAL IS NOT SUPPORTED!!!! function draw_onto(object, phandle) assert(size(object.children, 2) >= size(object.children_controls, 2), 'DONT DO THAT!'); Loading Loading
@GUIBase/GUIBase.m +4 −2 Original line number Diff line number Diff line Loading @@ -23,9 +23,11 @@ classdef GUIBase < handle end end methods(Abstract) methods(Abstract, Access = protected) draw_onto(object, parent_handle); end methods(Abstract) [x, y] = get_bounding_box( object ); end Loading
@GridLayout/GridLayout.m +4 −0 Original line number Diff line number Diff line Loading @@ -27,5 +27,9 @@ classdef GridLayout < GUIBase end end methods(Access = protected) draw_onto(object, phandle) end end
@HorizontalLineGridDraw/HorizontalLineGridDraw.m +4 −0 Original line number Diff line number Diff line Loading @@ -30,5 +30,9 @@ classdef HorizontalLineGridDraw < GUIBase end end methods(Access = protected) grid_controls = draw_onto( object, parent_handle, grid, grid_controls) end end
@LetStatmentsDraw/LetStatmentsDraw.m +8 −6 Original line number Diff line number Diff line Loading @@ -25,6 +25,14 @@ classdef LetStatmentsDraw < GUIBase data.addlistener('StructureChanged', @(src, event)redraw_and_update_bb(object, src, event)); end function [x, y] = get_bounding_box(object) x = object.gui_params.edit_width+20+object.gui_params.edit_width*2; y = object.gui_params.edit_height*object.my_data.size() + 20; end end methods(Access = protected) function draw_onto(object, parent_handle) [~, y] = object.get_bounding_box(); Loading Loading @@ -75,12 +83,6 @@ classdef LetStatmentsDraw < GUIBase set(pb_delete, 'Position', [80, 0, 80, 20]); set(pb_new, 'Position', [0, 0, 80, 20]); end function [x, y] = get_bounding_box(object) x = object.gui_params.edit_width+20+object.gui_params.edit_width*2; y = object.gui_params.edit_height*object.my_data.size() + 20; end end end
@LinearLayoutBase/LinearLayoutBase.m +3 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,9 @@ classdef LinearLayoutBase < LayoutBase object.children{end+1} = child; child.addlistener('BoundingBoxChanged', @(src, event)object.relayout()); end end methods(Access = protected) %NOTE REMOVAL IS NOT SUPPORTED!!!! function draw_onto(object, phandle) assert(size(object.children, 2) >= size(object.children_controls, 2), 'DONT DO THAT!'); Loading