Class Method

gridPositionsForWidgetFrame:

Get the grid positions that specified widget frame would occupy.


Declaration


+(NSMutableArray *)gridPositionsForWidgetFrame:(HSWidgetFrame)frame;

Parameters

Return Value

A mutable array of grid positions (HSWidgetPositionObjects) that specified frame occupies.

Example

For example if a frame with the origin of (2, 1) and size of (3, 2) was supplied then we would get all the positions that would be part of the frame. This means we would have (2, 1), (2, 2), (3, 2), etc.

(1, 1)
(1, 2)
(1, 3)
(1, 4)
Widget Frame
Origin (2, 1)
Size (3, 2)
(2, 3)
(2, 4)
(3, 3)
(3, 4)
(4, 3)
(4, 4)
(2, 1)
(2, 2)
(3, 1)
(3, 2)
(4, 1)
(4, 2)

Positions can be assumed to be sorted from top left to bottom right order.

Related Links


Positions


Structure

  • HSWidgetFrame

    A structure that contains location and dimensions of widget in grid positions.