-
首页
-
C4D R23.110 C++ SDK
EditorWindow Class Reference
#include <c4d_tooldata.h>
详细描述
Helper class for the editor's window.
公共成员函数
|
void
|
DrawXORLine
(
Int32
x1,
Int32
y1,
Int32
x2,
Int32
y2)
|
void
|
MouseDragStart
(
Int32
button,
Float
mx,
Float
my,
MOUSEDRAGFLAGS
flag)
|
MOUSEDRAGRESULT
|
MouseDrag
(
Float
*mx,
Float
*my,
BaseContainer
*channels)
|
MOUSEDRAGRESULT
|
MouseDragEnd
(void)
|
Bool
|
BfGetInputState
(
Int32
askdevice,
Int32
askchannel,
BaseContainer
*res)
|
Bool
|
BfGetInputEvent
(
Int32
askdevice,
BaseContainer
*res)
|
HOTKEYFLAGS
|
IsHotkeyDown
(
Int32
id)
|
void
|
StatusSetText
(const
maxon::String
&str)
|
Bool
|
Screen2Local
(
Int32
*x,
Int32
*y)
|
Bool
|
Local2Screen
(
Int32
*x,
Int32
*y)
|
Bool
|
Global2Local
(
Int32
*x,
Int32
*y)
|
Bool
|
Local2Global
(
Int32
*x,
Int32
*y)
|
构造函数 & 析构函数文档编制
◆
EditorWindow()
◆
~EditorWindow()
成员函数文档编制
◆
DrawXORLine()
Deprecated
. Draws an XOR line in the editor view.
-
参数
-
[in]
|
x1
|
Start X coordinate of the line.
|
[in]
|
y1
|
Start Y coordinate of the line.
|
[in]
|
x2
|
End X coordinate of the line.
|
[in]
|
y2
|
End Y coordinate of the line.
|
◆
MouseDragStart()
Initializes a mouse dragging loop.
例如:
BaseContainer
bc;
BaseContainer
device;
win->
MouseDragStart
(button, mx, my,
MOUSEDRAGFLAGS::NOMOVE
);
while
(win->
MouseDrag
(&dx, &dy, &device)==
MOUSEDRAGRESULT::CONTINUE
)
{
}
-
参数
-
◆
MouseDrag()
Checks for the mouse drag status.
-
注意
-
To check for qualifiers, see the channels container:
while
(win->
MouseDrag
(&dx, &dy, &channels)==
MOUSEDRAGRESULT::CONTINUE
)
{
if
(channels.
GetInt32
(
BFM_INPUT_QUALIFIER
) &
QSHIFT
) shift =
true
;
if
(channels.
GetInt32
(
BFM_INPUT_QUALIFIER
) &
QCTRL
) ctrl =
true
;
...
}
-
参数
-
[in]
|
mx
|
Mouse X coordinate.
|
[in]
|
my
|
Mouse Y coordinate.
|
[in]
|
channels
|
A container to take the state of the mouse:
PEN
|
-
返回
-
The mouse drag result:
MOUSEDRAGRESULT
◆
MouseDragEnd()
Checks why the mouse drag ended. Allows to perform any undo operations needed if the user canceled the drag.
-
返回
-
The mouse drag result:
MOUSEDRAGRESULT
◆
BfGetInputState()
Gets the status of an input device.
-
参数
-
-
返回
-
true
if successful, otherwise
false
.
◆
BfGetInputEvent()
Gets the status of an input device from the event queue if present.
-
参数
-
-
返回
-
true
if successful, otherwise
false
.
◆
IsHotkeyDown()
Checks the standard navigation hotkeys.
-
参数
-
[in]
|
id
|
The hotkey to check:
HOTKEY
|
-
返回
-
A value != 0 if the hotkey is pressed.
◆
StatusSetText()
Sets the text in the status bar.
-
参数
-
[in]
|
str
|
The text for the status bar.
|
◆
Screen2Local()
Transforms screen coordinates (relative to the top left corner of the system screen) to local coordinates (relative to the top left corner of a user area). Stores the result in *
x
and *
y
.
-
参数
-
[in,out]
|
x
|
The screen X coordinate. Assigned the converted local coordinate.
|
[in,out]
|
y
|
The screen Y coordinate. Assigned the converted local coordinate.
|
-
返回
-
true
if the coordinates were converted, otherwise
false
.
◆
Local2Screen()
Transforms local coordinates (relative to the top left corner of a user area) to screen coordinates (relative to the top left corner of the system screen). Stores the result in *
x
and *
y
.
-
参数
-
[in,out]
|
x
|
The local X coordinate. Assigned the screen coordinate.
|
[in,out]
|
y
|
The local Y coordinate. Assigned the screen coordinate.
|
-
返回
-
true
if the coordinates were converted, otherwise
false
.
◆
Global2Local()
Transforms global window coordinates (relative to the top left corner of the application window) to local coordinates (relative to the top left corner of a user area). Stores the result in *
x
and *
y
.
-
参数
-
[in,out]
|
x
|
The global window X coordinate. Assigned the local coordinate.
|
[in,out]
|
y
|
The global window Y coordinate. Assigned the local coordinate.
|
-
返回
-
true
if the coordinates were converted, otherwise
false
.
◆
Local2Global()
Transforms local coordinates (relative to the top left corner of the user area) to global window coordinates (relative to the top left corner of the application window). Stores the result in *
x
and *
y
.
-
参数
-
[in,out]
|
x
|
The local X coordinate. Assigned the global window coordinate.
|
[in,out]
|
y
|
The local Y coordinate. Assigned the global window coordinate.
|
-
返回
-
true
if the coordinates were converted, otherwise
false
.
@ NOMOVE
MouseDrag() returns MOUSEDRAGRESULT::CONTINUE even if mouse is not moved. Otherwise MouseDrag() only ...
@ BFM_INPUT_QUALIFIER
Int32 A bit mask with the qualifiers at the time when the event occurred: QUALIFIER
定义:
gui.h:684
MOUSEDRAGRESULT MouseDrag(Float *mx, Float *my, BaseContainer *channels)
@ QSHIFT
Shift.
定义:
gui.h:38
void MouseDragStart(Int32 button, Float mx, Float my, MOUSEDRAGFLAGS flag)
@ CONTINUE
Drag still in progress.
Int32 GetInt32(Int32 id, Int32 preset=0) const
定义:
c4d_basecontainer.h:303
定义:
c4d_basecontainer.h:46