Skip to content
Toretty edited this page Apr 29, 2014 · 33 revisions

DrawAssembly is used to generate and define positions for the frame of widgets and graphs. From there, it calls the appropriate functions and classes, so they can follow this pattern of positions.


Properties

Private

Coordinates

_coordinateNum (int) CoordinateNum is by default set to 2, since we need two values to define where an object is - X and Y.

_frameWidth (int) FrameWidth is set in the setup(), and describes how many positions you'd want from left to right.

_frameHeight (int) FrameHeight is set in the setup(), and describes how many positions you'd want from Top to Bottom.

[,,] _frameCoordinates (int) These previous four parameters is the foundation of the framework or grid. _coordinateNum, _frameWidth and _frameHeight is used to create the array of positions stored in _frameCoordinates.

GraphPosition (enum) A more descriptive setting for where the graph is put.

Adaption of Elements

These properties is set by SetGraphPosition().

RowStart (int) If the graph needs to be in top, RowStart is 1 to jump one row down.

RowJump (int) If the graph is in the middle, RowJump skips one row after taking the first one.

RowStop (int) If the graph is in the bottom, the row of widgets should stop at 2nd row.

PutGraph (int) PutGraph tells the subclasses what the graph position is.

CountWidgets (int) Defines the widget number that needs to be drawn.

Public

Swipe Properties

The swipe function, enables the possibility of jumping to another page of widgets, but basically the widgets are already placed, the surface is just pushed infront of the drawing area view.

SwipeLength (float) Contains the perspective position, therefore by default 0.

SwipeMargin (float) Contains the distance of the widgets being placed.

SwipeAmount (float) Defines how many times you need to be able to swipe to a new page.

Dimension Properties

GlobalRadius (int) Defines the radius of a widget.

ContentHeight (float) Is defined from allocation.width in the Main Window, and is the width of the drawing area.

ContentWidth (float) Is defined from allocation.height in the Main Window, and is the height of the drawing area.

Margin Properties

These properties is only created so that it is easier for other classes to get the direct measurement of the grid, widthout calculating or knowing the exact grid size.

FrameAreaMarginLEFT (int) Gives the margin from top side to frame.

FrameAreaMarginTOP (int) Gives the margin from left side to frame.

FrameAreaHeight (int) Gives a proportional measure of how much area each frame has.

FrameAreaWidth (int) Gives a proportional measure of how much area each frame has.

WidgetMarginTOP (int) Gives the margin from top side to frame, minus the radius of widgets.

WidgetMarginLEFT (int) Gives the margin from left side to frame, minus the radius of widgets.

Drawing Properties

MainDrawingArea (Gdk.Window) Includes the drawing area in the DrawAssembly to reference each surface to this one.

Setup()

The setup works like the DrawAssembly's constructor, and sets these default values.

SwipeLength = 0; SwipeAmount = SwipeAmountSend; _frameWidth = frameSize; _frameHeight = frameHeigh; GlobalRadius = 50; GraphPosition = (int)SECTIONS.BOT; _frameCoordinates = new int[_frameHeight,_frameWidth,_coordinatesNum];

Clone this wiki locally