blob: 3d106a1eabc4162aa39bf55cf2a8771b4ec57165 [file] [log] [blame]
// Copyright 2016 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.ui.viewsv1;
using fuchsia.math;
// Parameters and contextual information for a view provided by its container.
//
// When a container sets properties for its children, any properties which
// are set to null are inherited from the container's own ancestors.
struct ViewProperties {
ViewLayout? view_layout;
CustomFocusBehavior? custom_focus_behavior;
};
struct CustomFocusBehavior {
bool allow_focus = true;
};
// Provides layout constraints for a view.
//
// TODO(jeffbrown): Decide how measurement should be performed. Perhaps
// bring back |BoxConstraints| or introduce some other protocol just for
// measurement.
struct ViewLayout {
// The size of the view in logical pixels.
// Must be non-negative.
fuchsia.math.SizeF size;
// The inset of the view in logical pixels.
// Must be non-negative.
fuchsia.math.InsetF inset;
};