Struct sktablelayout::CellProperties [−][src]
pub struct CellProperties { pub size: SizeGrouping, pub flags: CellFlags, pub colspan: u8, pub padding: Rectangle, pub callback: Option<Box<PositioningFn>>, }
Encapsulates all properties for a cell; contributes to eventual layout decisions.
Fields
size: SizeGrouping
Controls the desired sizes for this cell.
flags: CellFlags
Controls various binary flags for the cell.
colspan: u8
Controls how many columns this cell will occupy.
padding: Rectangle
Controls how many pixels are intentionally wasted around this cell.
callback: Option<Box<PositioningFn>>
Applies positioning updates for this cell. Note that this
value always becomes None
when cloned, so you cannot set
default callbacks for cell policies.
Methods
impl CellProperties
[src]
impl CellProperties
pub fn new() -> Self
[src]
pub fn new() -> Self
pub fn with_defaults(layout: &TableLayout) -> Self
[src]
pub fn with_defaults(layout: &TableLayout) -> Self
Inherits the default settings as determined by a
TableLayout
. Will first try to match the defaults for the
column this would be added to, then the row, then the fallback
defaults. Note that these defaults apply only if the cell
was added next and if the defaults have not been changed
since. The correct use of with_defaults
is to initialize
CellProperties
for immediate insertion to a layout.
pub fn minimum_size(self, minimum: Size) -> Self
[src]
pub fn minimum_size(self, minimum: Size) -> Self
pub fn maximum_size(self, maximum: Size) -> Self
[src]
pub fn maximum_size(self, maximum: Size) -> Self
pub fn preferred_size(self, preferred: Size) -> Self
[src]
pub fn preferred_size(self, preferred: Size) -> Self
pub fn expand(self) -> Self
[src]
pub fn expand(self) -> Self
pub fn expand_horizontal(self) -> Self
[src]
pub fn expand_horizontal(self) -> Self
pub fn expand_vertical(self) -> Self
[src]
pub fn expand_vertical(self) -> Self
pub fn fill(self) -> Self
[src]
pub fn fill(self) -> Self
pub fn fill_horizontal(self) -> Self
[src]
pub fn fill_horizontal(self) -> Self
pub fn fill_vertical(self) -> Self
[src]
pub fn fill_vertical(self) -> Self
pub fn anchor_top(self) -> Self
[src]
pub fn anchor_top(self) -> Self
pub fn anchor_bottom(self) -> Self
[src]
pub fn anchor_bottom(self) -> Self
pub fn anchor_left(self) -> Self
[src]
pub fn anchor_left(self) -> Self
pub fn anchor_right(self) -> Self
[src]
pub fn anchor_right(self) -> Self
pub fn anchor_center(self) -> Self
[src]
pub fn anchor_center(self) -> Self
pub fn anchor_horizontal_center(self) -> Self
[src]
pub fn anchor_horizontal_center(self) -> Self
pub fn anchor_vertical_center(self) -> Self
[src]
pub fn anchor_vertical_center(self) -> Self
pub fn uniform(self) -> Self
[src]
pub fn uniform(self) -> Self
pub fn colspan(self, span: u8) -> Self
[src]
pub fn colspan(self, span: u8) -> Self
pub fn callback(self, fun: Box<PositioningFn>) -> Self
[src]
pub fn callback(self, fun: Box<PositioningFn>) -> Self
pub fn padding(self, pad: &Rectangle) -> Self
[src]
pub fn padding(self, pad: &Rectangle) -> Self
Sets the padding around this cell to the supplied top, left, right and bottom values as specified by a rectangle struct.
pub fn padding_all(self, pad: f32) -> Self
[src]
pub fn padding_all(self, pad: f32) -> Self
pub fn padding_top(self, pad: f32) -> Self
[src]
pub fn padding_top(self, pad: f32) -> Self
Sets the padding on the top side of this cell.
pub fn padding_left(self, pad: f32) -> Self
[src]
pub fn padding_left(self, pad: f32) -> Self
Sets the padding on the left side of this cell.
pub fn padding_bottom(self, pad: f32) -> Self
[src]
pub fn padding_bottom(self, pad: f32) -> Self
Sets the padding on the bottom side of this cell.
pub fn padding_right(self, pad: f32) -> Self
[src]
pub fn padding_right(self, pad: f32) -> Self
Sets the padding on the right side of this cell.
Trait Implementations
impl Default for CellProperties
[src]
impl Default for CellProperties
impl Clone for CellProperties
[src]
impl Clone for CellProperties
Auto Trait Implementations
impl !Send for CellProperties
impl !Send for CellProperties
impl !Sync for CellProperties
impl !Sync for CellProperties