# Button Groups
by Brent Welch

Some message buttons are disabled when there is no current message. This is implemented by putting the Mops buttons and menu entries into groups. The group membership is defined via resources. The groups are current, range, and nodraft. The current group contains all the buttons and menu entries that are enabled when there is a current message. The range group contains buttons and menu entries that can be applied to multiple messages. The nodraft group is for those buttons and menu entries that ought to be disabled when you are in the drafts folder.

Each group has four corresponding resources. These list the buttons (both system and user) and menu entries (both system and user) in the group. The group-defining resources and (part of) their default values are:

        *Mops.g_current:    link move delete reply forward
        *Mops.gm_current:   Print {Unmark (Undo)} Clip Redistribute {Burst Digest}
        *Mops.ug_current:
        *Mops.ugm_current:

        *Mops.g_range:      link move delete forward
        *Mops.gm_range:     Print Unmark {Mark Unseen}
        *Mops.ug_range:
        *Mops.ugm_range:

        *Mops.g_nodraft:    reply forward
        *Mops.gm_nodraft:   Redistribute
        *Mops.ug_nodraft:
        *Mops.ugm_nodraft:

The naming conventions for buttons and for menu entries are different. The buttons are named the way they appear in the buttonlist resource specification. The menu entries are named by their textual labels. If a menu entry label includes spaces, then the label must be grouped. Curly braces `{ }` are used for compatibility with the Tcl grouping syntax.

> NOTE: If you move things between *Mops.buttonlist and *Mops.more.m.entrylist, you'll have to adjust your group settings. Buttons and menus have different naming conventions.