wiki:Documentation/API/MUI_Cycle

Cycle.mui

Super class

Group.mui

Background

Cycle class generates the well known cycle gadgets. However, MUI cycle gadgets feature a (configurable) popup menu to avoid clicking through many entries.

Attributes

Attribute Version ISG Type
MUIA_Cycle_Active V4ISGLONG
MUIA_Cycle_Entries V4IS.STRPTR *


MUIA_Cycle_Active

NAME

MUIA_Cycle_Active — V4 [ISG], LONG, 0x80421788

SPECIAL INPUTS

  • MUIV_Cycle_Active_Next
  • MUIV_Cycle_Active_Prev

FUNCTION

This attributes defines the number of the active entry in the cycle gadget. Valid range is from 0 for the first entry to NumEntries-1 for the last.

Setting MUIA_Cycle_Active causes the gadget to be updated. On the other hand, when the user plays around with the gadget, MUIA_Cycle_Active will always reflect the current state.

Using MUIV_Cycle_Active_Next and MUIV_Cycle_Active_Prev as attribute value during set causes the gadget to cycle through its entries in the given direction.

EXAMPLE

set(cycleobj, MUIA_Cycle_Active, 3);

SEE ALSO

MUIA_Cycle_Entries

MUIA_Cycle_Entries

NAME

MUIA_Cycle_Entries — V4 [IS.], STRPTR *, 0x80420629

FUNCTION

Here you can define what entries shall be displayed in your cycle gadget. You must supply a pointer to a string array, containing one entry for each item and terminated with a NULL.

Remember that cycle gadget entries may contain any text formatting code such as bold, italic or underlined characters.

Cycle gadgets set the preparse string for all entries to "\33c", this means that they will automatically appear centered. Of course you can override this by simply preceding your entries with own formatting code.

EXAMPLE

static const char *CYA_GroupTitleColor[] =
{
  "normal",
  "highlight",
  "3-dimensional",
  NULL
};

CY_Title = CycleObject,
  MUIA_Cycle_Entries, CYA_GroupTitleColor,
  End;

SEE ALSO

MUIA_Cycle_Active, MUIA_Text_Contents


Copyright © 1992-2006 by Stefan Stuntz
Copyright © 2006-2017 by Thore Böckelmann, Jens Maus

MUI for AmigaOS - MUI-Autodocs

Updated: 13-Jul-2017

Last modified 5 months ago Last modified on Mar 27, 2017, 4:00:13 PM