Class CheckBoxGroup

Summary

#
  This class is simply a container for several objects
  which then act together as ``radio buttons''.  The objects
  should be subclasses of {Toggle}, but are normally checkboxes.

  The set/unset status of objects in a {CheckBoxGroup} should be set
  with the {set_which_one} method, not by setting the individual items
  directly with their own methods; that would result in confusion.

  NB - the objects in the group must be added to both the {CheckBoxGroup}
  and the dialog box too; a {CheckBoxGroup} is not a {Container}.

Package:
(main)
File:
checkboxgroup.icn
Methods:
add, get_by_flag, get_which_one, set_by_flag, set_which_one

Fields:
checkboxes, which_one

Source code.

Details
Constructor

CheckBoxGroup(argv)

Methods:

add(c)

#
  Add the object to the CheckBoxGroup.
  @param c   The object to add, which must be a subclass of {Toggle}.


get_by_flag()

#
  Returns an integer in the range 1, 2, 4, 8 ... depending
  upon whether the first, second, third etc object is down.


get_which_one()

#
  Returns the object is currently down.


set_by_flag(i)

#
  Set the object which is down according to the integer i.
  If i = 1 then the first object is down, if i = 2 the
  second is down, etc for i = 4, 8, 16.


set_which_one(x)

#
  Set which CheckBox which is down.
  @param x   The object which is down.


Fields:
checkboxes

which_one


This page produced by UniDoc on 2021/04/15 @ 23:59:53.