#include "ltwrappr.h"
L_UINT LVectorWindow::GetToolType(L_VOID)
Gets the current tool type for the class object's window.
The current tool type. Possible values are:
Value |
Meaning |
TOOL_VECTOR_USERMODE |
user tool type (default). |
TOOL_VECTOR_SELECT |
select tool - allows 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 toolallows user to rotate the vector, or individual objects within a vector. |
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.
Using the vector rotate tool:
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 veritcally 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. |
Functions: |
Assumes pVectorWindow points to a valid LVectorWindow object.
L_INT LVectorWindow__GetToolTypeExample(LVectorWindow *pVectorWindow)
{
L_TCHAR* lpszMsg = NULL;
L_UINT uToolType = pVectorWindow->GetToolType();
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;
}
MessageBox(NULL, lpszMsg, TEXT(""), MB_OK);
return SUCCESS;
}