#include <customgui_listview.h>
详细描述
Inherit this class to supply a data and view model for
TreeViewCustomGui
。见
ActiveObject.cpp
SDK example.
导航
|
virtual void *
|
GetFirst
(void *root, void *userdata)=0
|
virtual void *
|
GetDown
(void *root, void *userdata, void *obj)=0
|
virtual void *
|
GetNext
(void *root, void *userdata, void *obj)=0
|
virtual void *
|
GetPred
(void *root, void *userdata, void *obj)
|
Layout
|
virtual
Int32
|
GetColumnWidth
(void *root, void *userdata, void *obj,
Int32
col,
GeUserArea
*area)
|
virtual
Int32
|
GetHeaderColumnWidth
(void *root, void *userdata,
Int32
col,
GeUserArea
*area)
|
virtual
Int32
|
GetMinHeaderHeight
(void *root, void *userdata,
GeUserArea
*area)
|
virtual
Int32
|
GetLineHeight
(void *root, void *userdata, void *obj,
Int32
col,
GeUserArea
*area)
|
virtual void
|
GetColors
(void *root, void *userdata, void *obj,
GeData
*pNormal,
GeData
*pSelected)
|
virtual void
|
GetBackgroundColor
(void *root, void *userdata, void *obj,
Int32
line,
GeData
*col)
|
选择
|
virtual
Bool
|
IsSelected
(void *root, void *userdata, void *obj)=0
|
virtual void
|
选择
(void *root, void *userdata, void *obj,
Int32
mode)
|
Open
|
virtual
Bool
|
IsOpened
(void *root, void *userdata, void *obj)=0
|
virtual void
|
Open
(void *root, void *userdata, void *obj,
Bool
onoff)
|
ID
|
virtual
Int
|
GetId
(void *root, void *userdata, void *obj)=0
|
Drag
|
virtual
Int32
|
GetDragType
(void *root, void *userdata, void *obj)=0
|
virtual
Int32
|
DragStart
(void *root, void *userdata, void *obj)
|
virtual
Int32
|
AcceptDragObject
(void *root, void *userdata, void *obj,
Int32
dragtype, void *dragobject,
Bool
&bAllowCopy)
|
virtual void
|
SetDragObject
(void *root, void *userdata, void *obj)
|
virtual void
|
GenerateDragArray
(void *root, void *userdata, void *obj,
AtomArray
*ar)
|
virtual void
|
GenerateDragData
(void *root, void *userdata, void *obj, void **dragdata)
|
virtual void
|
FreeDragData
(void *root, void *userdata, void *dragdata)
|
Insert Object
|
virtual void
|
InsertObject
(void *root, void *userdata, void *obj,
Int32
dragtype, void *dragobject,
Int32
insertmode,
Bool
bCopy)
|
Input Events
|
virtual
Bool
|
InputEvent
(void *root, void *userdata,
GeUserArea
*pArea, const
BaseContainer
&msg)
|
virtual
Bool
|
MouseDown
(void *root, void *userdata, void *obj,
Int32
col,
MouseInfo
*mouseinfo,
Bool
rightButton)
|
virtual
Int32
|
DoubleClick
(void *root, void *userdata, void *obj,
Int32
col,
MouseInfo
*mouseinfo)
|
virtual void
|
DeletePressed
(void *root, void *userdata)
|
virtual
Bool
|
HeaderClick
(void *root, void *userdata,
Int32
lColID,
Int32
lChannel,
Bool
bDblClk,
Int32
mouseX,
Int32
mouseY,
GeUserArea
*ua)
|
Notifications
|
virtual void
|
Scrolled
(void *root, void *userdata,
Int32
h,
Int32
v,
Int32
x,
Int32
y)
|
virtual void
|
PaintFinished
(void *root, void *userdata)
|
virtual
Bool
|
ColumnMoved
(void *root, void *userdata,
Int32
lColID,
Int32
lInsertBeforeCol,
Int32
*plIndexMap, const
BaseContainer
*pbcLayout)
|
virtual void
|
SelectionChanged
(void *root, void *userdata)
|
Private
|
virtual void
|
InitCache
(void *root, void *userdata)
|
virtual
Bool
|
PythonCleanup
(void *root, void *userdata)
|
virtual void
|
GetDropDownMenu
(void *root, void *userdata, void *obj,
Int32
lColumn,
TreeViewDropDownMenuInfo
*menuInfo)
|
virtual void
|
SetDropDownMenu
(void *root, void *userdata, void *obj,
Int32
lColumn,
Int32
entry)
|
virtual void
|
GetFloatValue
(void *root, void *userdata, void *obj,
Int32
lColumn,
TreeViewFloatSliderInfo
*sliderInfo)
|
virtual void
|
SetFloatValueEx
(void *root, void *userdata, void *obj,
Int32
lColumn,
Float
value)
|
virtual
Bool
|
AddRow
(void *root, void *userdata)
|
virtual
String
|
EmptyText
(void *root, void *userdata)
|
virtual
Bool
|
IsSelectable
(void *root, void *userdata, void *obj)
|
Non-Overridable
|
Bool
|
VisitChildren
(void *root, void *obj,
VisitChildrenCallback
fn, void *userdata, void *data1, void *data2)
|
virtual void
|
SetFloatValue
(void *root, void *userdata, void *obj,
Int32
lColumn,
Float
value,
Bool
finalValue)
|
virtual
String
|
GetNameForEdit
(void *root, void *userdata, void *obj)
|
构造函数 & 析构函数文档编制
◆
~TreeViewFunctions()
Destructor.
成员函数文档编制
◆
GetFirst()
virtual void* GetFirst
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
|
|
)
|
|
|
|
pure virtual
|
Called to retrieve the first object of the tree.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
-
返回
-
The first object.
◆
GetDown()
virtual void* GetDown
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
|
|
)
|
|
|
|
pure virtual
|
Called to retrieve the first child of
obj
.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
An object in the tree.
|
-
返回
-
The first child of
obj
.
◆
GetNext()
virtual void* GetNext
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
|
|
)
|
|
|
|
pure virtual
|
Called to retrieve the object after
obj
.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
An object in the tree.
|
-
返回
-
The object after
obj
.
◆
GetPred()
virtual void* GetPred
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
|
|
)
|
|
|
|
virtual
|
Called to retrieve the object before
obj
.
-
注意
-
This is only used for drag and drop checks.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
An object in the tree.
|
-
返回
-
The object before
obj
.
◆
GetColumnWidth()
virtual
Int32
GetColumnWidth
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
,
|
|
|
Int32
|
col
,
|
|
|
GeUserArea
*
|
area
|
|
)
|
|
|
|
virtual
|
Called to retrieve the column width of object
obj
in column
col
.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
An object in the tree.
|
[in]
|
col
|
The column index.
|
[in]
|
area
|
The user area used to determine the text width with
area
->
DrawGetTextWidth()
. The caller owns the pointed user area.
|
-
返回
-
The column width.
◆
GetHeaderColumnWidth()
virtual
Int32
GetHeaderColumnWidth
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
Int32
|
col
,
|
|
|
GeUserArea
*
|
area
|
|
)
|
|
|
|
virtual
|
Called to retrieve the width of the header for column
col
.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
col
|
The column index.
|
[in]
|
area
|
The user area used to determine the text width with
area
->
DrawGetTextWidth()
. The caller owns the pointed user area.
|
-
返回
-
The header column width, or a negative number for auto header width.
◆
GetMinHeaderHeight()
virtual
Int32
GetMinHeaderHeight
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
GeUserArea
*
|
area
|
|
)
|
|
|
|
virtual
|
Called to retrieve the minimum header height.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
area
|
The user area used to determine the text width with
area
->
DrawGetTextWidth()
. The caller owns the pointed user area.
|
-
返回
-
The minimum header height, or a negative value for auto header height.
◆
GetLineHeight()
virtual
Int32
GetLineHeight
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
,
|
|
|
Int32
|
col
,
|
|
|
GeUserArea
*
|
area
|
|
)
|
|
|
|
virtual
|
Called to retrieve the line height of object
obj
in column
col
. Always return a positive value.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
An object in the tree.
|
[in]
|
col
|
The column index.
|
[in]
|
area
|
The user area used to determine the text width with
area
->
DrawGetTextWidth()
. The caller owns the pointed user area.
|
-
返回
-
The line height.
◆
GetColors()
virtual void GetColors
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
,
|
|
|
GeData
*
|
pNormal
,
|
|
|
GeData
*
|
pSelected
|
|
)
|
|
|
|
virtual
|
Called to specify the text colors of object
obj
.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
An object in the tree.
|
[out]
|
pNormal
|
Set this to the normal text color for
obj
. Can be a vector or a color ID. The caller owns the pointed data.
|
[out]
|
pSelected
|
Set this to the selected text color for
obj
. Can be a vector or a color ID. The caller owns the pointed data.
|
◆
GetBackgroundColor()
virtual void GetBackgroundColor
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
,
|
|
|
Int32
|
line
,
|
|
|
GeData
*
|
col
|
|
)
|
|
|
|
virtual
|
Called to specify the background color of
line
.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
An object in the tree.
|
[in]
|
line
|
The line index.
|
[out]
|
col
|
Set this to the background color for
line
. Can be a vector or a color ID. The caller owns the pointed data.
|
◆
DrawCell()
virtual void DrawCell
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
,
|
|
|
Int32
|
col
,
|
|
|
DrawInfo
*
|
drawinfo
,
|
|
|
const
GeData
&
|
bgColor
|
|
)
|
|
|
|
virtual
|
Called to draw the cell for object
obj
in column
col
into the user area in
drawinfo
->
frame
.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
An object in the tree.
|
[in]
|
col
|
The column index.
|
[in]
|
drawinfo
|
The draw information. The caller owns the pointed draw information.
|
[in]
|
bgColor
|
The background color. Can be a vector or a color ID.
|
◆
DrawHeaderCell()
virtual
Bool
DrawHeaderCell
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
Int32
|
col
,
|
|
|
DrawInfo
*
|
drawinfo
|
|
)
|
|
|
|
virtual
|
Called to draw the header for column
col
into the user area in
drawinfo
->
frame
.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
col
|
The column index.
|
[in]
|
drawinfo
|
The draw information. The caller owns the pointed draw information.
|
-
返回
-
true
if you have drawn the header or
false
if the header should be drawn by the tree view.
◆
IsSelected()
virtual
Bool
IsSelected
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
|
|
)
|
|
|
|
pure virtual
|
Called to retrieve the selection status of object
obj
.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
An object in the tree.
|
-
返回
-
true
if the object is selected, otherwise
false
.
◆
Select()
virtual void Select
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
,
|
|
|
Int32
|
mode
|
|
)
|
|
|
|
virtual
|
Called to select object
obj
.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
An object in the tree.
|
[in]
|
mode
|
The selection mode:
SELECTION
|
◆
IsOpened()
virtual
Bool
IsOpened
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
|
|
)
|
|
|
|
pure virtual
|
Called to retrieve the folding status of object
obj
.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
An object in the tree.
|
-
返回
-
true
if the object is opened, otherwise
false
.
◆
Open()
virtual void Open
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
,
|
|
|
Bool
|
onoff
|
|
)
|
|
|
|
virtual
|
Called to open or close object
obj
.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
An object in the tree.
|
[in]
|
onoff
|
true
if
obj
should be opened, otherwise
false
.
|
◆
GetName()
virtual
String
GetName
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
|
|
)
|
|
|
|
pure virtual
|
Called to retrieve the name of object
obj
.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
An object in the tree.
|
-
返回
-
The object name.
◆
SetName()
virtual void SetName
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
,
|
|
|
const
maxon::String
&
|
str
|
|
)
|
|
|
|
virtual
|
Called to set the name of object
obj
.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
An object in the tree.
|
[in]
|
str
|
The new object name.
|
◆
GetBubbleHelp()
virtual
String
GetBubbleHelp
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
,
|
|
|
Int32
|
col
,
|
|
|
CellInfo
*
|
info
|
|
)
|
|
|
|
virtual
|
Called to retrieve the bubble help of object
obj
.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
An object in the tree.
|
[in]
|
col
|
The column index.
|
[in]
|
info
|
The cell information.
|
-
返回
-
The bubble help of the object.
◆
GetId()
virtual
Int
GetId
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
|
|
)
|
|
|
|
pure virtual
|
Called to retrieve the ID of object
obj
.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
An object in the tree.
|
-
返回
-
The object ID.
◆
IsChecked()
virtual
Int32
IsChecked
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
,
|
|
|
Int32
|
lColumn
|
|
)
|
|
|
|
virtual
|
Called to retrieve the checkbox status of object
obj
for column
lColumn
.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
An object in the tree.
|
[in]
|
lColumn
|
The column index.
|
-
返回
-
A combination of the following flags or
NOTOK
to show no checkbox:
LV_CHECKBOX
◆
SetCheck()
virtual void SetCheck
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
,
|
|
|
Int32
|
lColumn
,
|
|
|
Bool
|
bCheck
,
|
|
|
const
BaseContainer
&
|
bcMsg
|
|
)
|
|
|
|
virtual
|
Called to set the checkbox status of object
obj
.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
An object in the tree.
|
[in]
|
lColumn
|
The column index.
|
[in]
|
bCheck
|
true
if the checkbox should be checked, otherwise
false
.
|
[in]
|
bcMsg
|
The container originally sent to the
InputEvent()
of the tree view's user area.
|
◆
IsTristate()
virtual
Bool
IsTristate
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
|
|
)
|
|
|
|
virtual
|
Called to retrieve the tristate flag of the tree.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
-
返回
-
true
if the tristate flag is set, otherwise
false
.
◆
GetDragType()
virtual
Int32
GetDragType
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
|
|
)
|
|
|
|
pure virtual
|
Called to retrieve the drag type of object
obj
, i.e. the type that the user would get if he started a drag in that cell.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
An object in the tree.
|
-
返回
-
The object drag type, or
NOTOK
to disable drag-and-drop:
DRAGTYPE
◆
DragStart()
virtual
Int32
DragStart
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
|
|
)
|
|
|
|
virtual
|
Called to determine if object
obj
can be dragged or not and if dragged objects will be selected or not.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
An object in the tree.
|
-
返回
-
A combination of the following flags:
TREEVIEW_DRAGSTART
◆
AcceptDragObject()
virtual
Int32
AcceptDragObject
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
,
|
|
|
Int32
|
dragtype
,
|
|
|
void *
|
dragobject
,
|
|
|
Bool
&
|
bAllowCopy
|
|
)
|
|
|
|
virtual
|
Called to check if object
obj
can accept the specified drag-and-drop action, and in that case what the result would be.
-
注意
-
if
obj
is
nullptr
dragobject
should be inserted as a child of the root.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
An object in the tree.
|
[in]
|
dragtype
|
The drag type:
DRAGTYPE
|
[in]
|
dragobject
|
The drag object. The caller owns the pointed object.
|
[in]
|
bAllowCopy
|
true
if copying is allowed to this position., otherwise
false
.
|
-
返回
-
The result: INSERT
The
ACCEPT_DRAG_OBJECT_FORCE_COPY
bit flag can be used together with the
INSERT
constants.
◆
SetDragObject()
virtual void SetDragObject
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
|
|
)
|
|
|
|
virtual
|
Called to set the drag object to
obj
.
-
注意
-
Useful to determine if dragging happens internally (rearrange items) or externally (dragged items from another tree for instance). To check this, store the drag object data and compare it with
dragobject
in
InsertObject()
.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
The drag object on drag start.
|
◆
GenerateDragArray()
virtual void GenerateDragArray
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
,
|
|
|
AtomArray
*
|
ar
|
|
)
|
|
|
|
virtual
|
Called to generate a drag array for object
obj
in
ar
.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
The drag object.
|
[out]
|
ar
|
Fill this array with the drag objects for
obj
. The caller owns the pointed array.
|
◆
GenerateDragData()
virtual void GenerateDragData
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
,
|
|
|
void **
|
dragdata
|
|
)
|
|
|
|
virtual
|
Called to generate drag data and return a pointer to it in
dragdata
, to be freed with
FreeDragData()
.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
The drag object.
|
[out]
|
dragdata
|
Points to a pointer that should be set to the generated drag data.
|
◆
FreeDragData()
virtual void FreeDragData
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
dragdata
|
|
)
|
|
|
|
virtual
|
Called to free the drag data generated by
GenerateDragData()
.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in,out]
|
dragdata
|
The drag data to free.
|
◆
InsertObject()
virtual void InsertObject
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
,
|
|
|
Int32
|
dragtype
,
|
|
|
void *
|
dragobject
,
|
|
|
Int32
|
insertmode
,
|
|
|
Bool
|
bCopy
|
|
)
|
|
|
|
virtual
|
Called to insert
dragobject
as specified.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
An object in the tree.
|
[in]
|
dragtype
|
The drag type:
DRAGTYPE
|
[in]
|
dragobject
|
The drag object on drag receive. The caller owns the pointed object.
|
[in]
|
insertmode
|
The insert mode:
INSERT
|
[in]
|
bCopy
|
true
if the object should be copied, otherwise
false
.
|
◆
CreateContextMenu()
virtual void CreateContextMenu
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
,
|
|
|
Int32
|
lColumn
,
|
|
|
BaseContainer
*
|
bc
|
|
)
|
|
|
|
virtual
|
Called to build a context menu for object
obj
and column
lColumn
。见
ShowPopupMenu()
for the format.
-
注意
-
bc
container already contains 2 default items:
ID_TREEVIEW_CONTEXT_REMOVE
and
ID_TREEVIEW_CONTEXT_RESET
. These may be removed.
The added menu entry IDs must be larger than
ID_TREEVIEW_FIRST_NEW_ID
.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
An object in the tree.
|
[in]
|
lColumn
|
The column index.
|
[in,out]
|
bc
|
Add context menu entries to this container. The caller owns the pointed container.
|
◆
ContextMenuCall()
virtual
Bool
ContextMenuCall
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
,
|
|
|
Int32
|
lColumn
,
|
|
|
Int32
|
lCommand
|
|
)
|
|
|
|
virtual
|
Called by a command in the context menu setup in
CreateContextMenu()
.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
An object in the tree.
|
[in]
|
lColumn
|
The column index.
|
[in]
|
lCommand
|
The menu command ID.
|
-
返回
-
true
if the command has been processed and the data needs to be updated, otherwise
false
.
◆
GetHeaderSortArrow()
virtual
Int32
GetHeaderSortArrow
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
Int32
|
lColID
|
|
)
|
|
|
|
virtual
|
Called to retrieve the sort mode of column
lColID
.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
lColID
|
The column index.
|
-
返回
-
The sort direction.
◆
IsResizeColAllowed()
virtual
Bool
IsResizeColAllowed
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
Int32
|
lColID
|
|
)
|
|
|
|
virtual
|
Called to check if column
lColID
can be resized or not.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
lColID
|
The column index.
|
-
返回
-
true
if the column can be resized, otherwise
false
.
◆
IsMoveColAllowed()
virtual
Bool
IsMoveColAllowed
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
Int32
|
lColID
|
|
)
|
|
|
|
virtual
|
Called to check if column
lColID
can be moved or not.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
lColID
|
The column index.
|
-
返回
-
true
if the column can be moved, otherwise
false
.
◆
InputEvent()
Called when an input event is received. All information about the input event is stored in the
msg
container.
见
Input Events
for more information. See also
MOUSEMOVE_DELTA
.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
pArea
|
The user area of the tree view. The caller owns the pointed user area.
|
[in]
|
msg
|
The event container.
|
-
返回
-
true
if the event was handled, otherwise
false
.
◆
MouseDown()
virtual
Bool
MouseDown
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
,
|
|
|
Int32
|
col
,
|
|
|
MouseInfo
*
|
mouseinfo
,
|
|
|
Bool
|
rightButton
|
|
)
|
|
|
|
virtual
|
Called when a mouse down event is received.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
An object in the tree.
|
[in]
|
col
|
The column index.
|
[in]
|
mouseinfo
|
The mouse information. The caller owns the pointed mouse information.
|
[in]
|
rightButton
|
true
if the right mouse button was used, otherwise
false
.
|
-
返回
-
true
if the event was handled, otherwise
false
.
◆
DoubleClick()
virtual
Int32
DoubleClick
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
,
|
|
|
Int32
|
col
,
|
|
|
MouseInfo
*
|
mouseinfo
|
|
)
|
|
|
|
virtual
|
Called when a mouse double click event is received.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
An object in the tree.
|
[in]
|
col
|
The column index.
|
[in]
|
mouseinfo
|
The mouse information. The caller owns the pointed mouse information.
|
-
返回
-
!=0 if the event was handled.
◆
DeletePressed()
virtual void DeletePressed
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
|
|
)
|
|
|
|
virtual
|
Called when a delete event is received.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
◆
HeaderClick()
Called when a header has been clicked.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
lColID
|
The column index.
|
[in]
|
lChannel
|
The mouse channel:
BFM_INPUT_CHANNEL
|
[in]
|
bDblClk
|
true
for double-click event, otherwise
false
.
|
[in]
|
mouseX
|
The mouse horizontal position local to the left hand edge of the column or NOTOK if dragging a column
|
[in]
|
mouseY
|
The mouse vertical position local to the header top or NOTOK if dragging a column
|
[in]
|
ua
|
The header's userarea or nullptr if TREEVIEW_MOVE_COLUMN is set to true.
|
-
返回
-
true
if the tree view needs to be updated, otherwise
false
.
◆
Scrolled()
Called when the tree view has been scrolled.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
h
|
The horizontal scroll steps.
|
[in]
|
v
|
The vertical scroll steps.
|
[in]
|
x
|
The X offset.
|
[in]
|
y
|
The Y offset.
|
◆
PaintFinished()
virtual void PaintFinished
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
|
|
)
|
|
|
|
virtual
|
Called when a paint selection has been performed in the tree view.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
◆
ColumnMoved()
Called when a column has been moved.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
lColID
|
The column index.
|
[in]
|
lInsertBeforeCol
|
The column to insert
lColID
before.
|
[in]
|
plIndexMap
|
The column index map array. The caller owns the pointed array.
|
[in]
|
pbcLayout
|
The new layout container. Basically the same as the container passed in
TreeViewCustomGui::SetLayout()
but reflecting the changed column order.
|
-
返回
-
true
if the move is acceptable, otherwise
false
.
若
false
is returned the layout change is canceled.
◆
SelectionChanged()
virtual void SelectionChanged
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
|
|
)
|
|
|
|
virtual
|
Called when selection has changed.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
◆
InitCache()
virtual void InitCache
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
|
|
)
|
|
|
|
virtual
|
Private
.
◆
PythonCleanup()
virtual
Bool
PythonCleanup
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
|
|
)
|
|
|
|
virtual
|
Private
.
◆
GetDropDownMenu()
Gets a drop down menu and it's current selected entry.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The userdata.
|
[in]
|
obj
|
An object in the tree.
|
[in]
|
lColumn
|
The column.
|
[out]
|
menuInfo
|
The MenuInfo that the user must fill out.
|
◆
SetDropDownMenu()
virtual void SetDropDownMenu
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
,
|
|
|
Int32
|
lColumn
,
|
|
|
Int32
|
entry
|
|
)
|
|
|
|
virtual
|
Called to set the current menu entry by e.g. user interaction.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The userdata.
|
[in]
|
obj
|
An object in the tree.
|
[in]
|
lColumn
|
The column.
|
[in]
|
entry
|
The entry that the user has picked.
|
◆
GetFloatValue()
Gets the value and ranges for a float slider.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The userdata.
|
[in]
|
obj
|
An object in the tree.
|
[in]
|
lColumn
|
The column.
|
[out]
|
sliderInfo
|
The information that the user must fill out about the slider, it's range and values.
|
◆
SetFloatValueEx()
virtual void SetFloatValueEx
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
,
|
|
|
Int32
|
lColumn
,
|
|
|
Float
|
value
|
|
)
|
|
|
|
virtual
|
Sets the float value from the slider by e.g. user interaction.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The userdata.
|
[in]
|
obj
|
An object in the tree.
|
[in]
|
lColumn
|
The column.
|
[in]
|
value
|
The value to set.
|
◆
AddRow()
virtual
Bool
AddRow
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
|
|
)
|
|
|
|
virtual
|
Requests to add a row to the treeview
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The userdata.
|
-
返回
-
true if it succeeds, false if it fails.
◆
EmptyText()
virtual
String
EmptyText
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
|
|
)
|
|
|
|
virtual
|
Requests the text to display when the treeview area is completely empty such as "Drag falloff object's here"
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The userdata.
|
-
返回
-
the text to display in the empty treeview area.
◆
IsSelectable()
virtual
Bool
IsSelectable
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
|
|
)
|
|
|
|
virtual
|
Checks if the object is selectable, used to determine if the object should be skipped (not selectable) or not (selectable) when changing selection with keyboard (Up/Down/Home/End keys).
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The userdata.
|
[in]
|
obj
|
An object in the tree.
|
-
返回
-
true
if The object is selectable, otherwise
false
.
◆
VisitChildren()
Visits object
obj
and all its children, calling
fn(root, obj, userdata, data1, data2, result)
for each object.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
obj
|
An object in the tree.
|
[in]
|
fn
|
Callback to evaluate for each child.
|
[in]
|
userdata
|
The user data.
|
[in]
|
data1
|
The first data.
|
[in]
|
data2
|
The second data.
|
-
返回
-
true
if all evaluations were successful, otherwise
false
.
◆
SetFloatValue()
virtual void SetFloatValue
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
,
|
|
|
Int32
|
lColumn
,
|
|
|
Float
|
value
,
|
|
|
Bool
|
finalValue
|
|
)
|
|
|
|
virtual
|
Sets the float value from the slider by e.g. user interaction.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The userdata.
|
[in]
|
obj
|
An object in the tree.
|
[in]
|
lColumn
|
The column.
|
[in]
|
value
|
The value to set.
|
[in]
|
finalValue
|
True if this is the final value that will be set for this interaction.
|
◆
GetNameForEdit()
virtual
String
GetNameForEdit
|
(
|
void *
|
root
,
|
|
|
void *
|
userdata
,
|
|
|
void *
|
obj
|
|
)
|
|
|
|
virtual
|
Called to retrieve the name of object
obj
for display in the edit text box.
-
参数
-
[in]
|
root
|
The tree root.
|
[in]
|
userdata
|
The user data.
|
[in]
|
obj
|
An object in the tree.
|
-
返回
-
The object name.