Commit 119491cf authored by Matthew Dawson's avatar Matthew Dawson
Browse files

Delete old directory to make way for the new.


git-svn-id: https://groke.mcmaster.ca/svn/grad/colin/branches/TableTool_refactor@8718 57e6efec-57d4-0310-aeb1-a6c144bb1a8b
parent e000013c
Loading
Loading
Loading
Loading

@Cell/Cell.m

deleted100644 → 0
+0 −43
Original line number Diff line number Diff line
classdef Cell < handle
    
    
    properties
        subgrid = [];
        cond = [];
        cond_text = [];
        cell_index = 0;
        parent_grid = [];
        width = 0;
        height = 0;
        grid_pb = [];
        pb_flag = 0;
        color = [];
        
        condition_text_width = 200;
        condition_text_height = 60;
        condition_text_x = 10;
        condition_text_y = 10;
        condition_text_offset = 20;
        
        grid_push_width = 30;
    end
    
    methods
        %% Cell
        %    
        % inputs:
        %   index:integer - cells index
        %   p_grid:Grid - Parent grid of cell
        % outputs;
        %   object:Cell - created cell
        function object = Cell(index, p_grid)
            object.cell_index = index;
            object.parent_grid = p_grid;
            object.pb_flag = 1;
            
        end
        
    end   
    
end

@Cell/cal_height.m

deleted100644 → 0
+0 −27
Original line number Diff line number Diff line
%% cal_height
%    calculates the height in number of cells of the current cell.
%    if the cell does not have a subgrid the height will be 1, else
%    it will be the height of the subgrid.
% inputs:
%   object:Cell - Current Cell Object
%   edit:boolean - 0 when not in edit mode, 1 in edit mode
% outputs;
%   h:double - height in number of cells
% Author: Colin Eles elesc@mcmaster.ca
% Organization: McMaster Centre for Software Certification
function h = cal_height(object,edit)
h = 0;
if (isempty(object.subgrid))
    h = 1;
else
    for i=1:size(object.subgrid.cells,2)
        h = h + cal_height(object.subgrid.cells(i),edit);
    end
    % edit button is half a cell high, if in edit mode increase
    % by 0.5
    if (edit == 1)
        h = h + 0.5;
    end
    
end
end

@Cell/delete_Cell.m

deleted100644 → 0
+0 −29
Original line number Diff line number Diff line
%% delete_Cell
%    deletes the current cell, will recursively delete any subgrids
%    if they exist.
% inputs:
%   object:Cell - Current Cell Object
% outputs;
%   none
% Author: Colin Eles elesc@mcmaster.ca
% Organization: McMaster Centre for Software Certification
function [] = delete_Cell(object)
if(isempty(object.subgrid))
    delete(object.grid_pb);
    delete(object.cond);
    object.cond = [];
    object.grid_pb = [];
    %delete(object);
else
    % delete the subgrid
    object.subgrid.deep_delete;
    if(ishghandle(object.grid_pb))
        delete(object.grid_pb);
    end
    delete(object.cond);
    object.cond = [];
    object.grid_pb = [];
    %delete(object);
end
end

@Cell/flag_cell.m

deleted100644 → 0
+0 −22
Original line number Diff line number Diff line
%% flag_cell
% mode
%   0 - normal
%   1 - red (error/false)
%   2 - green (ok/true)
% Author: Colin Eles elesc@mcmaster.ca
% Organization: McMaster Centre for Software Certification
function [] = flag_cell(object,mode)

if (isempty(object.color))
    object.color = get(object.cond,'BackgroundColor');
end

if (mode == 0)
    set(object.cond,'BackgroundColor',object.color);
elseif (mode == 1)
    set(object.cond,'BackgroundColor',[0.92 0.65 0.65]);
elseif (mode == 2)
    set(object.cond,'BackgroundColor',[0.03 1.0 0.32]);
end

end

@Cell/get_pos.m

deleted100644 → 0
+0 −15
Original line number Diff line number Diff line

%% get_pos
%    Returns the position of the edit box for the cell
% inputs:
%   object:Cell - Current Cell Object
% outputs;
%   pos:[double double double double] - position of the cell
% Author: Colin Eles elesc@mcmaster.ca
% Organization: McMaster Centre for Software Certification
function pos = get_pos(object)
if (~isempty(object.cond))
    pos = get(object.cond,'position');
end
end
Loading