LINE

C#: CWinCtrlLine

This is the control to draw a line segment.

You can not receive a callback when this control is pressed as default. If you want to receive any callbacks, you need to set HIT flag to STYLE property.

LINE(Control name) {

Property 1;

Property 2;

:

:

Property n

};

Example

WINDOW(255_000_00001) {
  STYLE = NOTITLEBAR|NOFRAME|ANCHOR_CENTER;
  POSITION = 0,100;
  TEX_ID = 100_010_00000;
  SIZE = 512,256;
};
LINE(TEST) {
  ID = 000_000_00040;
  TEX_ID = "LINE0";
  POSITION = 24,24;
  POSITION2 = 256,128;
};
_images/LINE.png

Property

Default value

TEX_ID = "LINE";
COLOR = 1,1,1,1;
CAPTION_COLOR = 1,1,1,1;

ID = Control ID

Define the control ID.

ID = 001_000_00010;

Note

If you don’t set the ID, it generates automatically from the hash value.

POSITION = X, Y

Determines the start coordinate. The reference position changes according to the STYLE anchor specification.

POSITION = 32,{50} + 64;

The start coordinates can be specified as a percentage .

POSITION2 = X, Y

Determines the end coordinate. The reference position changes according to the STYLE anchor specification.

POSITION2 = 32,{50} + 64;

The end coordinates can be specified as a percentage .

TEX_ID = Texture ID,Part ID

TEX_ID = Part ID

You set the texture ID and the part ID.

SIZE = Line Length, Line Weight

Automatically the window system is substituted the length of the line segment into X.

Set the thickness of the line segment in the Y.

Line weight can be specified as a percentage .

SIZE = ,32;   //line width = 32

COLOR = R,G,B,A

Set the color.

Set R, G, B in the range of 0…2 .

If you set a value in excess of one , each color component can double the brightness.

Set A in the range of 0…1 .

** STYLE ** = style 0 | style 1 | .. | style n

You can set the display anchor of control.

Display position anchor flag

Description

ANCHOR_DEFAULT

Set the anchor position in the upper left

Same as ANCHOR_LEFTTOP

The default control center position is set to BASE_LEFT.

ANCHOR_LEFTTOP

Set the anchor position in the upper left

The default control center position is set to BASE_LEFT.

ANCHOR_LEFT

Set the anchor position to the left.

And vertical centering

The default control center position is set to BASE_LEFT.

ANCHOR_LEFTBOTTOM

Set the anchor position to the left.

Located along the lower edge

The default control center position is set to BASE_LEFTBOTTOM.

ANCHOR_TOP

Set the anchor position to the upper side

Centering at lateral.

The default control center position is set to BASE_TOP.

ANCHOR_CENTER

Set the anchor position in the center of the window

The default control center position is set to BASE_CENTER.

ANCHOR_BOTTOM

Set the anchor position at the bottom

Centering at lateral.

The default control center position is set to BASE_BOTTOM.

ANCHOR_RIGHTTOP

Set the anchor position in the upper right

The default control center position is set to BASE_RIGHTBOTTOM.

ANCHOR_RIGHT

Set the anchor position to the right

And vertical centering

The default control center position is set to BASE_RIGHT.

ANCHOR_RIGHTBOTTOM

Set the anchor position to the right

Located along the lower edge

The default control center position is set to BASE_RIGHTBOTTOM.

You can set the center position of the control.

Base position change flag

Description

BASE_DEFAULT

It varies depending on the anchor flag .

If you do not specifically set , this value is set .

See the description of each anchor flag

BASE_LEFTTOP

Set the center position to the upper left side.

BASE_LEFT

Set the center position to the left side.

and vertical centering.

BASE_LEFTBOTTOM

Set the center position to the bottom left side.

BASE_TOP

Set the center position to the upper side.

and horizontal centering

BASE_CENTER

Set the center position to the center.

BASE_BOTTOM

Set the center position to the bottom side.

And horizontal centering.

BASE_RIGHTTOP

Set the center position to the upper right side.

BASE_RIGHT

Set the center position to the right side.

and horizontal centering

BASE_RIGHTBOTTOM

Set the center position to the bottom right side.

Style that limits the function as follows .

Function limit style

Description

HIDE

Hide.

DRAG

Enable a dragging.

DISABLE

It is not able to pressing the control. And the control color darken.

HIT

It is able to pressing the control.