The oxy_buttonGroup built-in form control is used for a graphical user
interface group of buttons that invokes one of several custom Author actions (defined in the
associated Document Type) referencing it by its ID, or directly in the CSS.
The
oxy_buttonGroup form control supports the following properties:
- actionIDs - The IDs of the actions that will be presented in the group
of buttons.
- actionID - The ID of the action, specified in
the associated document type framework, that is
invoked when you click the button.
Note: The element that contains the form control
represents the context where the action is invoked.
- action_list - Defines a list of actions
directly, rather than using the actionID parameter to reference actions
from the associated document type framework.
This property is defined using the oxy_action_list function.
oxy_buttonGroup(
label, 'A group of actions',
icon, url('http://www.oxygenxml.com/img/icn_oxy20.png'),
actions,
oxy_action_list(
oxy_action(
name, 'Insert',
description, 'Insert an element after the current one',
operation, 'ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation',
arg-fragment, '<element></element>',
arg-insertLocation, '.',
arg-insertPosition, 'After'
),
oxy_action(
name, 'Delete',
description, 'Deletes the current element',
operation, 'ro.sync.ecss.extensions.commons.operations.DeleteElementOperation'
)
)
)
Tip: A code template is available to make it easy to add the
oxy_action_list function.
- label - Specifies the label to be displayed on the button.
- icon - The path to the icon to be displayed on the button.
- actionContext - Specifies the context
in which the action associated with the form control is executed. Its possible values
are element and caret. If you select the
element value, the context is the element that holds the form
control. If you select the caret value, the action is invoked at the
caret location. If the caret is not inside the element that holds the form control, the
element value is selected automatically.
- visible - Specifies whether or not the form
control is visible. The possible values of this property are true (the
form control is visible) and false (the form control is not
visible).
- actionStyle - Specifies what to
display for an action in the form control. The values of this property can be text,
icon, or both.
- tooltip - Specifies a tooltip to be displayed
when you hover over the form control.
- transparent - Makes the button transparent without any borders or
background colors. The values of this property can be true or
false.
- fontInherit - This value specifies
whether the form control inherits its font from its parent element. The values of this
property can be true or false.
Note: To make the form control inherit its font from its parent element, set the
fontInherit property to true.
- enableInReadOnlyContext - To
enable button form
controls or groups of
buttons form controls this property needs to be set to true.
This property can be used to specify areas as read-only (by setting the
-oxy-editable property to false). This is useful
when you want to execute an action that does not modify the context.
- hoverPseudoclassName - Allows you to change the
way an element is rendered when you hover over a form control. The value is the name of a
CSS pseudo class. When you hover over the form control, the specified pseudo class will be
set on the element that contains the form
control.
p:before {
content: oxy_button(hoverPseudoclassName, 'showBorder')
}
p:showBorder {
border: 1px solid red;
}
The Button Group Form Control
buttongroup:before {
content:
oxy_label(text, "Button Group:", width, 150px, text-align, left)
oxy_buttonGroup(
label, 'A group of actions',
actionIDs, "insert.popupWithMultipleSelection,insert.popupWithSingleSelection",
actionStyle, "both");
}
Note: You can use the
Content Completion
Assistant in the CSS or LESS editor to easily insert a sample of the form
control by selecting the corresponding code template. The form control code templates are
displayed with a

symbol in
the content complete list.
Tip: To insert a sample of the
oxy_buttonGroup form control, invoke
the
Content Completion Assistant by pressing
Ctrl Space (Command Space on OS
X) and select
the
oxy_buttonGroup code template. Also, an
oxy_buttonGroup_in_place_action code template is available that inserts
an
oxy_buttonGroup function that includes an
oxy_action_list
function.