'\" t
.\"     Title: DM
.\"    Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL-NS Stylesheets v1.76.1 <http://docbook.sf.net/>
.\"      Date: 08/28/2023
.\"    Manual: BRL-CAD User Commands
.\"    Source: BRL-CAD
.\"  Language: English
.\"
.TH "DM" "nged" "08/28/2023" "BRL\-CAD" "BRL\-CAD User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
dm \- Provides a means to interact with the display manager at a lower level\&.
.SH "SYNOPSIS"
.HP \w'\fBdm\fR\ 'u
\fBdm\fR {\fIsubcommand\fR} [\fIargs\fR]
.SH "DESCRIPTION"
.PP
Provides a means to interact with the display manager at a lower level\&. The
\fBdm\fR
command accepts the following subcommands:
.PP
\fBset\fR \fIvar\fR \fIval\fR
.RS 4
The "set" subcommand provides a means to set or query display manager\-specific variables\&. Invoked without any arguments, the
\fIset\fR
subcommand will return a list of all available internal display manager variables\&. If only the
\fIvar\fR
argument is specified, the value of that variable is returned\&. If both
\fIvar\fR
and
\fIval\fR
are given, then
\fIvar\fR
will be set to
\fIval\fR\&.
.RE
.PP
\fBsize\fR \fIwidth height\fR
.RS 4
The "size" subcommand provides a means to set or query the window size\&. If no arguments are given, the display manager\*(Aqs window size is returned\&. If
\fIwidth\fR
and
\fIheight\fR
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\&.
.RE
.PP
\fBm\fR \fIbutton\fR \fIx y\fR
.RS 4
The "m" subcommand is used to simulate an
\fBM\fR
command\&. The
\fIbutton\fR
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
\fIx\fR
and
\fIy\fR
arguments are in X screen coordinates, which are converted to MGED screen coordinates before being passed to the
\fBM\fR
command\&.
.RE
.PP
\fBam\fR [r] [t] [s] \fIxy\fR
.RS 4
The "am" subcommand effects
\fImged\*(Aqs\fR
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\&.,
\fIr\fR
for rotation,
\fIt\fR
for translation, and
\fIs\fR
for scale)\&. The
\fIx\fR
and
\fIy\fR
arguments are in X screen coordinates and are transformed appropriately before being passed to the knob command\&.
.RE
.PP
\fBadc\fR [1] [2] [t] [d] \fIxy\fR
.RS 4
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\&.,
\fI1\fR
for angle 1,
\fI2\fR
for angle 2,
\fIt\fR
for translate, and
\fId\fR
for tick distance)\&. The
\fIx\fR
and
\fIy\fR
arguments are in X screen coordinates and are transformed appropriately before being passed to the
\fBadc\fR
command (i\&.e\&., not "dm adc")\&.
.RE
.PP
\fBcon\fR [r] [t] [s] [x] [y] [z] \fIxpos ypos\fR
.RS 4
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\&.,
\fIr\fR
for rotation,
\fIt\fR
for translation, and
\fIs\fR
for scale)\&. The <\fIx\fR|\fIy\fR|\fIz\fR> argument is the axis of rotation, translation, or scale\&. The
\fIxpos\fR
and
\fIypos\fR
arguments are in X screen coordinates and are transformed appropriately before being passed to the knob command\&.
.RE
.PP
\fBcon\fR [a] [x] [y] [1] [2] [d] \fIxpos ypos\fR
.RS 4
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\&.,
\fIx\fR
for translate in the
\fIx\fR
direction,
\fIy\fR
for translate in the
\fIy\fR
direction,
\fI1\fR
for angle 1,
\fI2\fR
for angle 2, and
\fId\fRfor tick distance)\&. The
\fIxpos\fR
and
\fIypos\fR
arguments are in X screen coordinates and are transformed appropriately before being passed to the knob command\&.
.RE
.PP
\fBvalid\fR [ogl] [X] [wgl] [rtgl] [\&.\&.\&.]
.RS 4
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\&.
.RE
.SH "EXAMPLES"
.PP
The examples show the use of the
\fBdm\fR
command with its various subcommands as presented in the Description section\&.
.PP
\fBExample\ \&1.\ \&List the available display manager internal variables.\fR
.PP
mged>\fBdm set\fR
.PP
Lists the available display manager internal variables\&.
.PP
\fBExample\ \&2.\ \&Turn on perspective projection in the display using \fIvar\fR and \fIval\fR arguments.\fR
.PP

mged>\fBdm set perspective 1\fR
.PP
Turns on perspective projection in the display\&.
.PP
\fBExample\ \&3.\ \&Query the display manager's window size.\fR
.PP

mged>\fBdm size\fR
.PP
The display manager\*(Aqs window size is returned\&.
.PP
\fBExample\ \&4.\ \&Resize the display manager window.\fR
.PP

mged>\fBdm size 900 900\fR
.PP
The display manager window is resized to 900 x 900\&.
.PP
\fBExample\ \&5.\ \&Simulate a button2 press at specific screen coordinates.\fR
.PP

mged>\fBdm m 2 100 200\fR
.PP
Simulates a button2 press at (100, 200) in X screen coordinates\&.
.PP
\fBExample\ \&6.\ \&Use the alternate mouse mode to rotate an image.\fR
.PP

mged>\fBdm am r 400 100\fR
.PP
Starts an alternate mouse mode rotation at (400, 100)\&.
.PP
\fBExample\ \&7.\ \&Start a tick distance manipulation with the mouse.\fR
.PP

mged>\fBdm adc d 300 200\fR
.PP
Starts a tick distance manipulation at (300, 200)\&.
.PP
\fBExample\ \&8.\ \&Start a constrained translation down the Z axis using the mouse.\fR
.PP

mged>\fBdm con t z 200 200\fR
.PP
Starts a constrained translation down the Z axis\&.
.PP
\fBExample\ \&9.\ \&Start a constrained tick distance manipulation using the mouse.\fR
.PP

mged>\fBdm con a d 200 100\fR
.PP
Starts a constrained tick distance manipulation\&.
.PP
\fBExample\ \&10.\ \&End the mouse drag.\fR
.PP

mged>\fBdm idle\fR
.PP
Ends the drag\&.
.SH "AUTHOR"
.PP
BRL\-CAD Team
.SH "BUG REPORTS"
.PP
Reports of bugs or problems should be submitted via electronic mail to
devs@brlcad\&.org
