LM.GUI Constants

The following constants are defined in the LM.GUI namespace. To use one of these constants, be sure to prepend

LM.GUI.

to the constant's name. For example,

LM.GUI.KEY_RETURN
is valid, while

KEY_RETURN

is not complete.

Control Alignment

The following constants are used when setting up the layout of user interface controls.

ALIGN_LEFT

Align control on the left side of its container

ALIGN_TOP

Align control on the top side of its container

ALIGN_CENTER

Align control in the center of its container

ALIGN_RIGHT

Align control on the right side of its container

ALIGN_BOTTOM

Align control on the bottom side of its container

ALIGN_FILL

Resize control to fill its container

Layout Padding

The following constants are used when setting up the layout of user interface controls.

DEFAULT_PADDING

The default amount of padding

DEFAULT_INDENT

The default amount of indentation

Text Controls

The following constants are used to define the behavior of a text control.

FIELD_TEXT

A regular text control

FIELD_INT

A text control that only accepts integer input

FIELD_FLOAT

A text control that only accepts floating-point input

FIELD_UINT

A text control that only accepts non-negative integer input

FIELD_UFLOAT

A text control that only accepts non-negative floating-point input

FIELD_NODIGITS

A text control that does not accept any numerical input

Dialog Messages

The following constants are the message values that can be returned by a dialog box.

MSG_OK

The user clicked OK or pressed enter

MSG_CANCEL

The user clicked Cancel or pressed escape

Alert Boxes

The following constants are used to define the "flavor" of an alert box.

ALERT_INFO

This type of alert is used to give the user non-critical information.

ALERT_WARNING

This type of alert is used to warn the user (perhaps that they are about to perform some action that cannot be undone).

ALERT_QUESTION

This type of alert is used to as the user a question.

Key Codes

The following constants are used to specify special keys for keyboard events.

KEY_RETURN

The Return or Enter key

KEY_ESCAPE

The Escape key

KEY_TAB

The Tab key

KEY_BACKSPACE

The Backspace key

KEY_DELETE

The Delete key

KEY_HOME

The Home key

KEY_END

The End key

KEY_PAGEUP

The Page Up key

KEY_PAGEDOWN

The Page Down key

KEY_LEFT

The left arrow key

KEY_UP

The up arrow key

KEY_RIGHT

The right arrow key

KEY_DOWN

The down arrow key

KEY_F1

The F1 key

KEY_F2

The F2 key

KEY_F3

The F3 key

KEY_F4

The F4 key

KEY_F5

The F5 key

KEY_F6

The F6 key

KEY_F7

The F7 key

KEY_F8

The F8 key

KEY_F9

The F9 key

KEY_F10

The F10 key

KEY_F11

The F11 key

KEY_F12
- The F12 key

/*** Key Codes ***/
 
#define LM_KEY_RETURN @ KEY_RETURN
#define LM_KEY_ESCAPE @ KEY_ESCAPE
#define LM_KEY_TAB @ KEY_TAB
#define LM_KEY_BACKSPACE @ KEY_BACKSPACE
#define LM_KEY_DELETE @ KEY_DELETE
#define LM_KEY_HOME @ KEY_HOME
#define LM_KEY_END @ KEY_END
#define LM_KEY_PAGEUP @ KEY_PAGEUP
#define LM_KEY_PAGEDOWN @ KEY_PAGEDOWN
#define LM_KEY_LEFT @ KEY_LEFT
#define LM_KEY_UP @ KEY_UP
#define LM_KEY_RIGHT @ KEY_RIGHT
#define LM_KEY_DOWN @ KEY_DOWN
#define LM_KEY_F1 @ KEY_F1
#define LM_KEY_F2 @ KEY_F2
#define LM_KEY_F3 @ KEY_F3
#define LM_KEY_F4 @ KEY_F4
#define LM_KEY_F5 @ KEY_F5
#define LM_KEY_F6 @ KEY_F6
#define LM_KEY_F7 @ KEY_F7
#define LM_KEY_F8 @ KEY_F8
#define LM_KEY_F9 @ KEY_F9
#define LM_KEY_F10 @ KEY_F10
#define LM_KEY_F11 @ KEY_F11
#define LM_KEY_F12 @ KEY_F12
 
/*** Widgets ***/
 
#define LM_FOLLOW_LEFT @ FOLLOW_LEFT
#define LM_FOLLOW_TOP @ FOLLOW_TOP
#define LM_FOLLOW_RIGHT @ FOLLOW_RIGHT
#define LM_FOLLOW_BOTTOM @ FOLLOW_BOTTOM
 
#define LM_DEFAULT_PADDING @ DEFAULT_PADDING
#define LM_DEFAULT_INDENT @ DEFAULT_INDENT
 
#define LM_ALIGN_LEFT @ ALIGN_LEFT
#define LM_ALIGN_TOP @ ALIGN_TOP
#define LM_ALIGN_CENTER @ ALIGN_CENTER
#define LM_ALIGN_RIGHT @ ALIGN_RIGHT
#define LM_ALIGN_BOTTOM @ ALIGN_BOTTOM
#define LM_ALIGN_FILL @ ALIGN_FILL
 
/*** Text controls ***/
 
#define LM_FIELD_TEXT @ FIELD_TEXT
#define LM_FIELD_INT @ FIELD_INT
#define LM_FIELD_FLOAT @ FIELD_FLOAT
#define LM_FIELD_UINT @ FIELD_UINT
#define LM_FIELD_UFLOAT @ FIELD_UFLOAT
#define LM_FIELD_NODIGITS @ FIELD_NODIGITS
 
/*** Dialog ***/
 
#define MSG_OK
#define MSG_CANCEL
 
/*** Alert Box ***/
 
#define LM_ALERT_INFO @ ALERT_INFO
#define LM_ALERT_WARNING @ ALERT_WARNING
#define LM_ALERT_QUESTION @ ALERT_QUESTION