DM(nged)

NAME

dm - Provides a means to interact with the display manager at a lower level.

SYNOPSIS

dm {subcommand} [args]

DESCRIPTION

Provides a means to interact with the display manager at a lower level. The dm command accepts the following subcommands:

set var val

The "set" subcommand provides a means to set or query display manager-specific variables. Invoked without any arguments, the set subcommand will return a list of all available internal display manager variables. If only the var argument is specified, the value of that variable is returned. If both var and val are given, then var will be set to val.

size width height

The "size" subcommand provides a means to set or query the window size. If no arguments are given, the display manager’s window size is returned. If width and height are specified, the display manager makes a request to have its window resized. Note that a size request is just that, a request, so it may be ignored, especially if the user has resized the window using the mouse.

m button x y

The "m" subcommand is used to simulate an M command. The button argument determines which mouse button is being used to trigger a call to this command. This value is used in the event handler to effect dragging the faceplate scrollbars. The x and y arguments are in X screen coordinates, which are converted to MGED screen coordinates before being passed to the M command.

am [r] [t] [s] xy

The "am" subcommand effects mged's alternate mouse mode. The alternate mouse mode gives the user a different way of manipulating the view or an object. For example, the user can drag an object or perhaps rotate the view while using the mouse. The first argument indicates the type of operation to perform (i.e., r for rotation, t for translation, and s for scale). The x and y arguments are in X screen coordinates and are transformed appropriately before being passed to the knob command.

adc [1] [2] [t] [d] xy

The "adc" subcommand provides a way of manipulating the angle distance cursor while using the mouse. The first argument indicates the type of operation to perform (i.e., 1 for angle 1, 2 for angle 2, t for translate, and d for tick distance). The x and y arguments are in X screen coordinates and are transformed appropriately before being passed to the adc command (i.e., not "dm adc").

con [r] [t] [s] [x] [y] [z] xpos ypos

This form of the "con" subcommand provides a way to effect constrained manipulation of the view or an object while using the mouse. This simulates the behavior of sliders without taking up screen real estate. The first argument indicates the type of operation to perform (i.e., r for rotation, t for translation, and s for scale). The <x|y|z> argument is the axis of rotation, translation, or scale. The xpos and ypos arguments are in X screen coordinates and are transformed appropriately before being passed to the knob command.

con [a] [x] [y] [1] [2] [d] xpos ypos

This form of the "con" subcommand provides a way to effect constrained manipulation of the angle distance cursor while using the mouse. This simulates the behavior of sliders without taking up screen real estate. The first argument indicates that this is to be applied to the angle distance cursor. The next argument indicates the type of operation to perform (i.e., x for translate in the x direction, y for translate in the y direction, 1 for angle 1, 2 for angle 2, and d_for tick distance). The _xpos and ypos arguments are in X screen coordinates and are transformed appropriately before being passed to the knob command.

valid [ogl] [X] [wgl] [rtgl] […​]

The "valid" subcommand provides a way to determine if a particular type of display manager (X Windows, OpenGL, etc.) is available - if the display manager type is supported the string denoting that type (X, ogl, etc.) is returned back, otherwise nothing is returned.

EXAMPLES

The examples show the use of the dm command with its various subcommands as presented in the Description section.

Example 1. List the available display manager internal variables.

mged> dm set

Lists the available display manager internal variables.

Example 2. Turn on perspective projection in the display using var and val arguments.

mged> dm set perspective 1

Turns on perspective projection in the display.

Example 3. Query the display manager’s window size.

mged> dm size

The display manager’s window size is returned.

Example 4. Resize the display manager window.

mged> dm size 900 900

The display manager window is resized to 900 x 900.

Example 5. Simulate a button2 press at specific screen coordinates.

mged> dm m 2 100 200

Simulates a button2 press at (100, 200) in X screen coordinates.

Example 6. Use the alternate mouse mode to rotate an image.

mged> dm am r 400 100

Starts an alternate mouse mode rotation at (400, 100).

Example 7. Start a tick distance manipulation with the mouse.

mged> dm adc d 300 200

Starts a tick distance manipulation at (300, 200).

Example 8. Start a constrained translation down the Z axis using the mouse.

mged> dm con t z 200 200

Starts a constrained translation down the Z axis.

Example 9. Start a constrained tick distance manipulation using the mouse.

mged> dm con a d 200 100

Starts a constrained tick distance manipulation.

Example 10. End the mouse drag.

mged> dm idle

Ends the drag.

AUTHOR

BRL-CAD Team

This software is Copyright (c) 1989-2021 by the United States Government as represented by U.S. Army Research Laboratory.

BUG REPORTS

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org