LVectorWindow::SetToolType
#include "ltwrappr.h"
L_VOID LVectorWindow::SetToolType(uToolType)
L_UINT uToolType; |
/* the tool type */ |
Sets the tool type for the class object's window.
This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.
Parameter |
Description |
|
uToolType |
The tool type to be used by the vector window. Possible values are: |
|
|
Value |
Meaning |
|
TOOL_VECTOR_USERMODE |
user tool type (default). |
|
TOOL_VECTOR_SELECT |
select tool - allows the user to select individual objects in the vector. |
|
TOOL_VECTOR_PANIMAGE |
pan image tool - allows the user to pan the vector image by clicking a mouse button and dragging the mouse. The "pan cursor" will not appear if the image cannot be panned (i.e. - there are no scroll bars). If there are not scroll bars, press the PLUS key on the numeric key pad a few times to zoom until scroll bars appear. |
|
TOOL_VECTOR_ROTATE |
3d rotate tool - allows user to rotate the vector, or individual objects within a vector. |
Returns
None.
Comments
The vector window can automatically perform some functions. These include panning the vector, selecting individual components of a vector, and rotating the vector in 3 dimensions. The default setting for an LVectorWindow object is TOOL_VECTOR_USERMODE.
If the tool type is TOOL_VECTOR_SELECT, you can do the following:
Left-click and drag the mouse to
define a rectangle. All objects in the defined rectangle are selected.
Right-click and drag the mouse to
define a rectangle. All objects in the defined rectangle are un-selected.
Double clicking the left mouse button
automatically selects all objects in the vector. NOTE: If creating the
LVectorWindow as a window, the window style must include the CS_DBLCLKS
style to receive double click messages.
Double clicking the right mouse button
automatically un-selects all objects in the vector. NOTE: If creating
the LVectorWindow as a window, the window style must include the CS_DBLCLKS
style to receive double click messages.
When using the vector dialogs, only the currently selected objects are affected. If the SelectedOnly state is set to TRUE (LVectorWindow::GetSelectedOnly, LVectorWindow::SetSelectedOnly), then only selected objects will be scaled. If the SelectedOnly state is set to FALSE, then ALL objects are scaled.
If the tool type is TOOL_VECTOR_ROTATE, you can do the following:
Left-click and drag the mouse. If
you move the mouse vertically (up and down), the vector image rotates
up and down along an imaginary X-axis which passes horizontally through
the vector. If you move the mouse horizontally (left and right), the vector
image rotates left and right along an imaginary Y-axis which passes vertically
through the vector. Dragging the mouse at an angle results in a combination
of these rotations.
Right-click and drag the mouse. The
"rotate-Z" cursor appears. Dragging the mouse causes the vector
to rotate in the XY plane (the plane that corresponds to the screen) along
an imaginary Z-axis which passes through the center of the window.
Required DLLs and Libraries
LVKRN For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
See Also
Functions: |
Example
Assumes pVectorWindow points to a valid LVectorWindow object.
L_INT LVectorWindow__SetToolTypeExample(HWND hWndParent, LVectorWindow *pVectorWindow, L_UINT uToolType) { L_TCHAR* lpszMsg = NULL; pVectorWindow->SetToolType(uToolType); switch (uToolType) { case TOOL_VECTOR_USERMODE: lpszMsg = TEXT("Current tool: TOOL_VECTOR_USERMODE"); break; case TOOL_VECTOR_SELECT: lpszMsg = TEXT("Current tool: TOOL_VECTOR_SELECT"); break; case TOOL_VECTOR_PANIMAGE: lpszMsg = TEXT("Current tool: TOOL_VECTOR_PANIMAGE"); break; case TOOL_VECTOR_ROTATE: lpszMsg = TEXT("Current tool: TOOL_VECTOR_ROTATE"); break; } ::SetWindowText(hWndParent, lpszMsg); return SUCCESS; }