Command Button Layout Manager
Definition of a layout manager for command buttons.
Author
Kirill Grouchnikov
Types
Link copied to clipboard
data class CommandButtonLayoutInfo(fullSize: Size, actionClickArea: Rect, popupClickArea: Rect, separatorArea: Rect, iconRect: Rect, textLayoutInfoList: List<CommandButtonLayoutManager.TextLayoutInfo>, extraTextLayoutInfoList: List<CommandButtonLayoutManager.TextLayoutInfo>, popupActionRect: Rect)
Content copied to clipboard
Layout information on different visual parts of a single command button.
Link copied to clipboard
data class CommandButtonPreLayoutInfo(commandButtonKind: CommandButtonKind, showIcon: Boolean, texts: List<String>, extraTexts: List<String>, isTextInActionArea: Boolean, separatorOrientation: CommandButtonLayoutManager.CommandButtonSeparatorOrientation?, showPopupIcon: Boolean)
Content copied to clipboard
Pre-layout information on different visual parts of a single command button.
Link copied to clipboard
enum CommandButtonSeparatorOrientation : Enum<CommandButtonLayoutManager.CommandButtonSeparatorOrientation>
Content copied to clipboard
Enumerates the available values for separator orientations.
Link copied to clipboard
Layout information on a single line of text.
Functions
Link copied to clipboard
abstract fun getLayoutInfo(constraints: Constraints, command: Command, presentationModel: CommandButtonPresentationModel, preLayoutInfo: CommandButtonLayoutManager.CommandButtonPreLayoutInfo): CommandButtonLayoutManager.CommandButtonLayoutInfo
Content copied to clipboard
Returns the layout information for the specified parameters.
Link copied to clipboard
abstract fun getPreferredIconSize(command: Command, presentationModel: CommandButtonPresentationModel): Dp
Content copied to clipboard
Returns the preferred icon size under this layout manager. Note that some layout managers may use fixed icon size, while some may respect the icon size set in .presentationModel
Link copied to clipboard
abstract fun getPreferredSize(command: Command, presentationModel: CommandButtonPresentationModel, preLayoutInfo: CommandButtonLayoutManager.CommandButtonPreLayoutInfo): Size
Content copied to clipboard
Returns the preferred size of a projected button for the specified parameters.
Link copied to clipboard
abstract fun getPreLayoutInfo(command: Command, presentationModel: CommandButtonPresentationModel): CommandButtonLayoutManager.CommandButtonPreLayoutInfo
Content copied to clipboard
Returns the pre-layout information for the specified parameters.