c4d.gui.EditorWindow
¶
c4d.gui.
EditorWindow
¶
EditorWindow.Screen2Local()
EditorWindow.Local2Screen()
EditorWindow.Global2Local()
EditorWindow.Local2Global()
EditorWindow.
DrawXORLine
(
x1
,
y1
,
x2
,
y2
)
¶
Draws an XOR line in the editor view.
Parameters: |
|
---|
EditorWindow.
MouseDragStart
(
button
,
mx
,
my
,
flags
)
¶
Initializes a mouse dragging loop.
For instance in a
ToolData.MouseInput()
:
mousex = msg[c4d.BFM_INPUT_X] mousey = msg[c4d.BFM_INPUT_Y] win.MouseDragStart(c4d.KEY_MLEFT, mousex, mousey, c4d.MOUSEDRAGFLAGS_DONTHIDEMOUSE|c4d.MOUSEDRAGFLAGS_NOMOVE) mx = mousex my = mousey while True: result, dx, dy, channels = win.MouseDrag() if result!=c4d.MOUSEDRAGRESULT_CONTINUE: break mx += dx my += dy print "Mouse Dragging at position [%f,%f]" % (mx, my) print "Mouse Dragging Ended: ", win.MouseDragEnd()
Parameters: |
|
---|
EditorWindow.
MouseDrag
(
)
¶
Checks for the mouse drag status:
result, dx, dy, channels = win.MouseDrag()
Return type: |
tuple(int, float, float,
|
||||||
---|---|---|---|---|---|---|---|
Returns: |
A tuple with: |
||||||
Parameters: |
|
EditorWindow.
MouseDragEnd
(
)
¶
Checks why the mouse drag ended. Allows to perform any undo operations needed if the user canceled the drag.
Return type: | int | ||||||
---|---|---|---|---|---|---|---|
Returns: |
The mouse drag result:
|
EditorWindow.
BfGetInputEvent
(
askdevice
,
res
)
¶
Gets the next input event for a certain device from the event queue. If the return value is True , the container stored in res is just like an input event message, otherwise no event was available.
See also
Parameters: |
|
||||
---|---|---|---|---|---|
Return type: |
bool |
||||
Returns: |
True if the event could be retrieved, otherwise False . |
EditorWindow.
BfGetInputState
(
askdevice
,
askchannel
,
res
)
¶
Polls a certain channel of a device for the current input state. If the return value is True , the container stored in res is just like an input event message, otherwise no state was available.
See also
Parameters: |
|
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: |
bool |
||||||||||||||||||
Returns: |
True if a state could be retrieved, otherwise False . |
EditorWindow.
Screen2Local
(
)
¶
Transforms screen coordinates (relative to the top left corner of the system screen) to local coordinates (relative to the top left corner of the user area):
x, y = win.Screen2Local()
Parameters: |
|
---|---|
Raises: |
RuntimeError – If the coordinates cannot be transformed. |
EditorWindow.
Local2Screen
(
)
¶
Transforms local coordinates (relative to the top left corner of the user area) to screen coordinates (relative to the top left corner of the system screen):
x, y = win.Local2Screen()
Parameters: |
|
---|---|
Raises: |
RuntimeError – If the coordinates cannot be transformed. |
EditorWindow.
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 the user area):
x, y = win.Global2Local()
Parameters: |
|
---|---|
Raises: |
RuntimeError – If the coordinates cannot be transformed. |
EditorWindow.
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):
x, y = win.Local2Global()
Parameters: |
|
---|---|
Raises: |
RuntimeError – If the coordinates cannot be transformed. |