LOG¶
C#: CWinCtrlLog
This is the control to display a chat log.
It has contents of the same number as the number of rows.
Unlike the list box , the maximum number of contents can be set. If it is added more than the maximum number , the contents is circulated and it is reused(The oldest log is overwritten).
LOGTEXT and other kind of controls can also be included as contents.
This control is scrollable control.
if you set SCROLL_LOCK to STYLE property, the window system calls onDrag when you drag these controls.And you can get a dragged direction of these controls.Even if you set DRAG to STYLE property, these controls do not affect anything.
Note
The LOG’s contents need to include only one LOGTEXT.
LOG(Control name) {
Property 1;
Property 2;
:
:
Property n
};
Example¶
LOG(Chat) { ID = 000_000_00030; STYLE = ANCHOR_LEFTBOTTOM; POSITION = 0,OFFSET_Y; SIZE = WINDOW_SIZE_FULL, 80-2; CONTENTS_SIZE = WINDOW_SIZE_FULL, 80-2; CONTENTS = { ICON(Chat) { : } TEXT(Name) { : } FRAME(Balloon) { : } LOGTEXT(Chat) { : } } COLOR = COLOR32(0,0,0,255); LINE_SPACE = 10; GROUP = SCROLLBAR(Chat); }; SCROLLBAR(Chat) { ID = 000_001_00001; STYLE = ANCHOR_RIGHTTOP; COLOR = 1,1,1,0.5; POSITION = -2,-5; SIZE = 0,-10; };
Property¶
Default value¶
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¶
Determine the display position. The base position changes according to the anchor in STYLE.
POSITION = 32,{50} + 64;Coordinates can be specified as a percentage .
SIZE = width,height¶
Define the display area of the list box.
Controls outside the display area are clipped.
SIZE = {100} - 32,400; //display size CONTENTS_SIZE = 800,80; //one content sizeSize can be specified as a percentage .
CONTENTS_SIZE = width, height¶
Determine the listbox size of the line. A listbox which arranged in the vertical direction, scrolls in the vertical direction.
However ,if the width of the content size is larger than the display area, the listbox scrolls to the left or right.
// only vertical direction to scroll SIZE = 400,400; //display size CONTENTS_SIZE = {100},40; //virtual screen size // Scroll to the left and right direction SIZE = 400,400; //display size CONTENTS_SIZE = {200},40; //virtual screen sizeContents size can be specified as a percentage .
CONTENTS = { control define … }¶
Enumerate the controls for defining a single line in the LOG.
Position of the controls place with a relative from the position of the LOG.
It is possible to include any type of control .
Note
The LOG’s contents need to include only one LOGTEXT.
CONTENTS = { ICON(Chat) { : } TEXT(Name) { : } FRAME(Balloon) { : } LOGTEXT(Chat) { : }How to access to a particular control of the content list from C#, please refer to here.
However, since the content list is in the circulation list , it is dangerous to access directly. It should be set when you :func:`add a log<ADD_LOG>` .
Note
The coordinates and the size percentage of the control in the content are calculated from the size of the list box.
Note that it is not a window size.
LINE_SPACE = line spacing pixel value¶
Set the line spacing.
You cannot specify a percentage.
LINE_SPACE = 8; //Put an 8-dot space.
GROUP = SCROLLBAR Control ID,…¶
If you set scroll controls to the GROUP property,it display scroll bars in conjunction with the log.
It should be careful not to set to CONTENTS.
It is also possible to assign multiple scrollbars.
GROUP = SCROLLBAR(Horizon),SCROLLBAR(Vertical);
COLOR = R,G,B,A¶
It is possible to set the color values . By changing color , it affects all of the controls that are included .
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 = Flag0|Flag1|..|Flagn¶
Configurable unique styles in the list box are like the following .
Listbox control flag |
Description |
---|---|
NOBOUNCES |
When you’ve stopped it to scroll ,it is stopped even if there are still the momentum. |
SCROLL_UNLOCK |
Allow scrolling in list boxes. |
SCROLL_LOCK |
Suppress that scroll the listbox. |
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. |
DISABLE |
It is not able to pressing the control. And the control color darken. |
NOHIT |
It is not able to pressing the control. |
NOBOUNCES |
When you’ve stopped it to scroll ,it is stopped even if there are still the momentum. |
SCROLL_UNLOCK |
Enable the scroll of contents. |
SCROLL_LOCK |
Disable the scroll of contents. |