IT lexicon › Programming › XmMainWindow

XmMainWindow

Programming På svenska → Updated: 2026-10-10

Motif's frame for an application's main window: menu bar on top, work area in the middle, optional command and message lines, scrollbars when needed, exactly as the OSF/Motif Style Guide said a program should look.

The Style Guide described a typical application as a menu bar above a work area with a status line beneath, and XmMainWindow is that description cast in code. The widget is a subclass of XmScrolledWindow with five named regions: menu bar, command window, work window, message window and the two scrollbars. The program creates the children and then says which is which with XmMainWindowSetAreas, or sets the XmNmenuBar, XmNcommandWindow, XmNworkWindow and XmNmessageWindow resources directly. XmNshowSeparator adds the thin Motif lines between regions, and XmNcommandWindowLocation decides whether the command line sits above or below the work area.

It was a way to give every Motif application the same basic shape without every developer writing the same layout code. The menu bar was almost always an XmRowColumn in XmMENU_BAR mode, the work area an XmDrawingArea, an XmText or an XmForm holding the rest of the interface. CDE's applications followed the pattern, as did most commercial Unix software of the 1990s, which is why they all look related: it is the same widget underneath.

← Back to the lexicon