Dgs-dxmemo: Difference between revisions
Line 8: | Line 8: | ||
==Properties== | ==Properties== | ||
=== | ===allowCopy=== | ||
This | This property determines whether the content of memo can be copy(ctrl+c)/cut(ctrl+x) | ||
<syntaxhighlight lang="lua">dgsSetProperty(memo," | <syntaxhighlight lang="lua">dgsSetProperty(memo,"allowCopy",allowCopy)</syntaxhighlight> | ||
*''' | *'''allowCopy:''' A boolean value of the state of whether this memo allows users to copy something from it. | ||
=== | ===bgColor=== | ||
This | This property determines the background color of the memo. | ||
<syntaxhighlight lang="lua">dgsSetProperty(memo," | <syntaxhighlight lang="lua">dgsSetProperty(memo,"bgColor",bgColor)</syntaxhighlight> | ||
*''' | *'''bgColor:''' An integer of the color that can be converted by [[tocolor]]. | ||
=== | ===bgImage=== | ||
This property determines the background image of the memo. | |||
<syntaxhighlight lang="lua">dgsSetProperty(memo," | <syntaxhighlight lang="lua">dgsSetProperty(memo,"bgImage",bgImage)</syntaxhighlight> | ||
*''' | *'''bgImage:''' A material element that serves as the background image of the memo (texture/shader/screen source/renderTarget). | ||
===caretColor=== | ===caretColor=== | ||
This property determines the color of the caret | This property determines the color of the caret | ||
<syntaxhighlight lang="lua">dgsSetProperty(memo,"caretColor",caretColor)</syntaxhighlight> | <syntaxhighlight lang="lua">dgsSetProperty(memo,"caretColor",caretColor)</syntaxhighlight> | ||
*'''caretColor''' | *'''caretColor:''' An integer of the color that can be converted by [[tocolor]]. | ||
=== | ===caretHeight=== | ||
The | The height of the caret of the memo (multiple of the font height). | ||
<syntaxhighlight lang="lua">dgsSetProperty(memo," | <syntaxhighlight lang="lua">dgsSetProperty(memo,"caretHeight",caretHeight)</syntaxhighlight> | ||
*''' | *'''caretHeight:''' A float of the caret height. | ||
=== | ===caretOffset=== | ||
The offset of the caret of the memo. | |||
<syntaxhighlight lang="lua">dgsSetProperty(memo," | <syntaxhighlight lang="lua">dgsSetProperty(memo,"caretOffset",{offsetX,offsetY})</syntaxhighlight> | ||
*''' | *'''offsetX:''' A float of the 2D X position offset of the caret of the memo. | ||
*'''offsetY:''' A float of the 2D Y position offset of the caret of the memo. | |||
=== | ===caretPos=== | ||
The | The position in which the caret stays. | ||
<syntaxhighlight lang="lua">dgsSetProperty(memo," | <syntaxhighlight lang="lua">dgsSetProperty(memo,"caretPos",{index,line})</syntaxhighlight> | ||
*''' | *'''index:''' An integer of the index of the text in current line of the memo. | ||
*'''line:''' An integer of the line of the memo. | |||
*'''line''' | |||
===caretStyle=== | ===caretStyle=== | ||
Line 74: | Line 58: | ||
This is Text_ | This is Text_ | ||
<syntaxhighlight lang="lua">dgsSetProperty(memo,"caretStyle",caretStyle)</syntaxhighlight> | <syntaxhighlight lang="lua">dgsSetProperty(memo,"caretStyle",caretStyle)</syntaxhighlight> | ||
*'''caretStyle''' | *'''caretStyle:''' An integer of the caret style of the memo. | ||
===caretThick=== | ===caretThick=== | ||
This property allows us to change the thickness of caret of the memo. | This property allows us to change the thickness of caret of the memo. | ||
<syntaxhighlight lang="lua">dgsSetProperty(memo,"caretThick",caretThick)</syntaxhighlight> | <syntaxhighlight lang="lua">dgsSetProperty(memo,"caretThick",caretThick)</syntaxhighlight> | ||
*'''caretThick''' | *'''caretThick:''' An integer of the thickness of the caret of the memo. | ||
=== | ===font=== | ||
This | This is equivalent to [[dgsSetFont]]/[[dgsGetFont]]. ''Learn More [[dxDrawText]]'' | ||
<syntaxhighlight lang="lua">dgsSetProperty(memo," | <syntaxhighlight lang="lua">dgsSetProperty(memo,"font",font)</syntaxhighlight> | ||
*''' | *'''font:''' A [[Element/DX_font|dx font element]] of the text font of the memo. | ||
=== | ===memo=== | ||
This property stores a gui-memo which is used to input characters. | |||
<syntaxhighlight lang="lua">dgsSetProperty(memo," | <syntaxhighlight lang="lua">dgsSetProperty(memo,"memo",gmemo)</syntaxhighlight> | ||
*''' | *'''gmemo:''' A gui-memo. | ||
===readOnly=== | ===readOnly=== | ||
This is equivalent to [[dgsMemoSetReadOnly]]/[[dgsMemoGetReadOnly]]. | This is equivalent to [[dgsMemoSetReadOnly]]/[[dgsMemoGetReadOnly]]. | ||
<syntaxhighlight lang="lua">dgsSetProperty(memo,"readOnly",readOnly)</syntaxhighlight> | <syntaxhighlight lang="lua">dgsSetProperty(memo,"readOnly",readOnly)</syntaxhighlight> | ||
*'''readOnly''' | *'''readOnly:''' A bool indicates whether the memo is only readable. | ||
===readOnlyCaretShow=== | ===readOnlyCaretShow=== | ||
Whether the caret of memo will show/hide under read-only mode. | Whether the caret of memo will show/hide under read-only mode. | ||
<syntaxhighlight lang="lua">dgsSetProperty(memo,"readOnlyCaretShow",readOnlyCaretShow)</syntaxhighlight> | <syntaxhighlight lang="lua">dgsSetProperty(memo,"readOnlyCaretShow",readOnlyCaretShow)</syntaxhighlight> | ||
*'''readOnlyCaretShow''' | *'''readOnlyCaretShow:''' A bool indicates whether the caret is shown or hidden when the memo is read-only. | ||
===renderTarget=== | ===renderTarget=== | ||
This property stores a render target of the memo. | This property stores a render target of the memo. | ||
<syntaxhighlight lang="lua">dgsSetProperty(memo,"renderTarget",renderTarget)</syntaxhighlight> | <syntaxhighlight lang="lua">dgsSetProperty(memo,"renderTarget",renderTarget)</syntaxhighlight> | ||
*'''renderTarget''' | *'''renderTarget:''' A render target that is used to render the text. | ||
===scrollbars=== | ===scrollbars=== | ||
This property stores two scroll bars which can be got by [[dgsMemoGetScrollBar]] of the memo. | This property stores two scroll bars which can be got by [[dgsMemoGetScrollBar]] of the memo. | ||
<syntaxhighlight lang="lua">dgsSetProperty(memo,"scrollbars",{Vertical,Horizontal})</syntaxhighlight> | <syntaxhighlight lang="lua">dgsSetProperty(memo,"scrollbars",{Vertical,Horizontal})</syntaxhighlight> | ||
*'''Vertical''' | *'''Vertical:''' A vertical scroll bar of the memo. | ||
*'''Horizontal''' | *'''Horizontal:''' A horizontal scroll bar of the memo. | ||
===scrollBarThick=== | |||
This property allows us to change the thickness of scroll bars of the memo. | |||
<syntaxhighlight lang="lua">dgsSetProperty(memo,"scrollBarThick",scrollBarThick)</syntaxhighlight> | |||
*'''scrollBarThick:''' An integer of the thickness of scroll bars of the memo. | |||
===scrollSize=== | ===scrollSize=== | ||
This property determines how many lines will get scrolled out of the rendering area once when you are scrolling your mouse wheel. | This property determines how many lines will get scrolled out of the rendering area once when you are scrolling your mouse wheel. | ||
<syntaxhighlight lang="lua">dgsSetProperty(memo,"scrollSize",scrollSize)</syntaxhighlight> | <syntaxhighlight lang="lua">dgsSetProperty(memo,"scrollSize",scrollSize)</syntaxhighlight> | ||
*'''scrollSize''' | *'''scrollSize:''' Lines to be scrolled. | ||
===selectColor=== | |||
The color which can be translated by [[tocolor]] of the rectangle of test selection of the memo. | |||
<syntaxhighlight lang="lua">dgsSetProperty(memo,"selectColor",selectColor)</syntaxhighlight> | |||
*'''selectColor:''' An integer of the color of the rectangle of test selection of the memo. | |||
===selectFrom=== | |||
The position from which the text is selected. | |||
<syntaxhighlight lang="lua">dgsSetProperty(memo,"selectFrom",{index,line})</syntaxhighlight> | |||
*'''index:''' An integer of the index of the text in the line where the text is selected from of the memo. | |||
*'''line:''' An integer of the line where the text is selected from of the memo. | |||
===showLine=== | |||
The min value of the line of the text of the memo starts to show in the render target. ( I don't know how to explain it also. XD ) | |||
<syntaxhighlight lang="lua">dgsSetProperty(memo,"showLine",line)</syntaxhighlight> | |||
*'''line:''' An integer indicates how many lines are moved to top. | |||
===showPos=== | |||
The min value of the x position of the text of the memo starts to show in the render target. ( I don't know how to explain it. XD ) | |||
<syntaxhighlight lang="lua">dgsSetProperty(memo,"showPos",posX)</syntaxhighlight> | |||
*'''posX:''' An integer indicates how many the pixels of the text are moved to left. | |||
===text=== | |||
This is equivalent to [[dgsSetText]]/[[dgsGetText]]. | |||
<syntaxhighlight lang="lua">dgsSetProperty(memo,"text",text)</syntaxhighlight> | |||
*'''text:''' A ''table'' of the text of the memo.( Because of multi lines, I use table instead of string ) | |||
===textColor=== | |||
The color which can be translated by [[tocolor]] of the text of the memo. | |||
<syntaxhighlight lang="lua">dgsSetProperty(memo,"textColor",textColor)</syntaxhighlight> | |||
*'''textColor:''' An integer of the color of the text of the memo. | |||
===textLength=== | |||
This is for scroll bar detection. You had better not touch it. | |||
<syntaxhighlight lang="lua">dgsSetProperty(memo,"textLength",textlen)</syntaxhighlight> | |||
*'''textlen:''' A table stores the length of text in every line. | |||
===textSize=== | |||
The scale of the text of the memo. ''Learn More [[dxDrawText]]'' | |||
<syntaxhighlight lang="lua">dgsSetProperty(memo,"textSize",{scaleX,scaleY})</syntaxhighlight> | |||
*'''scaleX:''' A float of the 2D X scale of the text of the memo. | |||
*'''scaleY:''' A float of the 2D Y scale of the text of the memo. | |||
==See Also== | ==See Also== | ||
{{DGSPROPERTIES}} | {{DGSPROPERTIES}} |
Revision as of 15:26, 1 February 2019
DGS Properties is always used to change the gui style and make it more fantastic.
This page shows the properties of dgs-dxmemo that you could use.
Main Functions
Properties
allowCopy
This property determines whether the content of memo can be copy(ctrl+c)/cut(ctrl+x)
dgsSetProperty(memo,"allowCopy",allowCopy)
- allowCopy: A boolean value of the state of whether this memo allows users to copy something from it.
bgColor
This property determines the background color of the memo.
dgsSetProperty(memo,"bgColor",bgColor)
- bgColor: An integer of the color that can be converted by tocolor.
bgImage
This property determines the background image of the memo.
dgsSetProperty(memo,"bgImage",bgImage)
- bgImage: A material element that serves as the background image of the memo (texture/shader/screen source/renderTarget).
caretColor
This property determines the color of the caret
dgsSetProperty(memo,"caretColor",caretColor)
- caretColor: An integer of the color that can be converted by tocolor.
caretHeight
The height of the caret of the memo (multiple of the font height).
dgsSetProperty(memo,"caretHeight",caretHeight)
- caretHeight: A float of the caret height.
caretOffset
The offset of the caret of the memo.
dgsSetProperty(memo,"caretOffset",{offsetX,offsetY})
- offsetX: A float of the 2D X position offset of the caret of the memo.
- offsetY: A float of the 2D Y position offset of the caret of the memo.
caretPos
The position in which the caret stays.
dgsSetProperty(memo,"caretPos",{index,line})
- index: An integer of the index of the text in current line of the memo.
- line: An integer of the line of the memo.
caretStyle
This is equivalent to dgsMemoSetCaretStyle/dgsMemoGetCaretStyle.
This property allows us to change the style of caret of the memo. ( 0 is "|"; 1 is "_" )
Example(0):
This is Text|
Example(1):
This is Text_
dgsSetProperty(memo,"caretStyle",caretStyle)
- caretStyle: An integer of the caret style of the memo.
caretThick
This property allows us to change the thickness of caret of the memo.
dgsSetProperty(memo,"caretThick",caretThick)
- caretThick: An integer of the thickness of the caret of the memo.
font
This is equivalent to dgsSetFont/dgsGetFont. Learn More dxDrawText
dgsSetProperty(memo,"font",font)
- font: A dx font element of the text font of the memo.
memo
This property stores a gui-memo which is used to input characters.
dgsSetProperty(memo,"memo",gmemo)
- gmemo: A gui-memo.
readOnly
This is equivalent to dgsMemoSetReadOnly/dgsMemoGetReadOnly.
dgsSetProperty(memo,"readOnly",readOnly)
- readOnly: A bool indicates whether the memo is only readable.
readOnlyCaretShow
Whether the caret of memo will show/hide under read-only mode.
dgsSetProperty(memo,"readOnlyCaretShow",readOnlyCaretShow)
- readOnlyCaretShow: A bool indicates whether the caret is shown or hidden when the memo is read-only.
renderTarget
This property stores a render target of the memo.
dgsSetProperty(memo,"renderTarget",renderTarget)
- renderTarget: A render target that is used to render the text.
scrollbars
This property stores two scroll bars which can be got by dgsMemoGetScrollBar of the memo.
dgsSetProperty(memo,"scrollbars",{Vertical,Horizontal})
- Vertical: A vertical scroll bar of the memo.
- Horizontal: A horizontal scroll bar of the memo.
scrollBarThick
This property allows us to change the thickness of scroll bars of the memo.
dgsSetProperty(memo,"scrollBarThick",scrollBarThick)
- scrollBarThick: An integer of the thickness of scroll bars of the memo.
scrollSize
This property determines how many lines will get scrolled out of the rendering area once when you are scrolling your mouse wheel.
dgsSetProperty(memo,"scrollSize",scrollSize)
- scrollSize: Lines to be scrolled.
selectColor
The color which can be translated by tocolor of the rectangle of test selection of the memo.
dgsSetProperty(memo,"selectColor",selectColor)
- selectColor: An integer of the color of the rectangle of test selection of the memo.
selectFrom
The position from which the text is selected.
dgsSetProperty(memo,"selectFrom",{index,line})
- index: An integer of the index of the text in the line where the text is selected from of the memo.
- line: An integer of the line where the text is selected from of the memo.
showLine
The min value of the line of the text of the memo starts to show in the render target. ( I don't know how to explain it also. XD )
dgsSetProperty(memo,"showLine",line)
- line: An integer indicates how many lines are moved to top.
showPos
The min value of the x position of the text of the memo starts to show in the render target. ( I don't know how to explain it. XD )
dgsSetProperty(memo,"showPos",posX)
- posX: An integer indicates how many the pixels of the text are moved to left.
text
This is equivalent to dgsSetText/dgsGetText.
dgsSetProperty(memo,"text",text)
- text: A table of the text of the memo.( Because of multi lines, I use table instead of string )
textColor
The color which can be translated by tocolor of the text of the memo.
dgsSetProperty(memo,"textColor",textColor)
- textColor: An integer of the color of the text of the memo.
textLength
This is for scroll bar detection. You had better not touch it.
dgsSetProperty(memo,"textLength",textlen)
- textlen: A table stores the length of text in every line.
textSize
The scale of the text of the memo. Learn More dxDrawText
dgsSetProperty(memo,"textSize",{scaleX,scaleY})
- scaleX: A float of the 2D X scale of the text of the memo.
- scaleY: A float of the 2D Y scale of the text of the memo.
See Also
General Properties
Unique Properties For DGS Core Elements
- dgs-dx3dinterface
- dgs-dx3dimage
- dgs-dx3dtext
- dgs-dx3dline
- dgs-dxbutton
- dgs-dxcheckbox
- dgs-dxcombobox
- dgs-dxdetectarea
- dgs-dxedit
- dgs-dxgridlist
- dgs-dximage
- dgs-dxlabel
- dgs-dxline
- dgs-dxmemo
- dgs-dxprogressbar
- dgs-dxradiobutton
- dgs-dxscrollbar
- dgs-dxscrollpane
- dgs-dxselector
- dgs-dxswitchbutton
- dgs-dxtabpanel
- dgs-dxtab
- dgs-dxwindow