You.i Engine
CYIScrollingView::Magnets Struct Reference

Detailed Description

A container class for a magnet configuration.

#include <view/YiScrollingView.h>

Static Public Member Functions

static Magnets CreateNone ()
 
static Magnets CreateCenter (float centerOffset)
 
static Magnets CreateBegin (float beginningOffset)
 
static Magnets CreateEnd (float endOffset)
 
static Magnets CreateEdges (float beginningOffset, float endOffset)
 

Public Attributes

const MagnetsType type
 The magnets type. More...
 
const float beginningOffset
 The beginning offset. Applicable only when type is CYIScrollingView::MagnetsType::Edges or CYIScrollingView::MagnetsType::Begin. More...
 
const float centerOffset
 The center offset. Applicable only when type is CYIScrollingView::MagnetsType::Center. More...
 
const float endOffset
 The end offset. Applicable only when type is CYIScrollingView::MagnetsType::Edges or CYIScrollingView::MagnetsType::End. More...
 

Member Function Documentation

◆ CreateBegin()

static Magnets CYIScrollingView::Magnets::CreateBegin ( float  beginningOffset)
static

Creates a magnet object represeting CYIScrollingView::MagnetsType::Begin.

beginningOffset is an offset, in pixels, from the beginning of the view (i.e. the top or left edge). A positive value moves the magnet towards the center of the view, and a negative value moves the magnet away from the center of the view.

◆ CreateCenter()

static Magnets CYIScrollingView::Magnets::CreateCenter ( float  centerOffset)
static

Creates a magnet object representing CYIScrollingView::MagnetsType::Center.

centerOffset is an offset from the center of the view, in pixels. A positive value moves the magnet towards the end of the view (i.e. bottom or right edge), and a negative value moves the magnet towards the beginning of the view (i.e. top or left edge).

◆ CreateEdges()

static Magnets CYIScrollingView::Magnets::CreateEdges ( float  beginningOffset,
float  endOffset 
)
static

Creates a magnet object represeting CYIScrollingView::MagnetsType::Edges.

beginningOffset is an offset, in pixels, from the beginning of the view (i.e. the top or left edge). A positive value moves the magnet towards the center of the view, and a negative value moves the magnet away from the center of the view.

endOffset is an offset, in pixels, from the end of the view (i.e. the bottom or right edge). A positive value moves the magnet towards the center of the view, and a negative value moves the magnet away from the center of the view.

◆ CreateEnd()

static Magnets CYIScrollingView::Magnets::CreateEnd ( float  endOffset)
static

Creates a magnet object represeting CYIScrollingView::MagnetsType::End.

endOffset is an offset, in pixels, from the end of the view (i.e. the bottom or right edge). A positive value moves the magnet towards the center of the view, and a negative value moves the magnet away from the center of the view.

◆ CreateNone()

static Magnets CYIScrollingView::Magnets::CreateNone ( )
static

Creates a magnet object representing CYIScrollingView::MagnetsType::None.

Member Data Documentation

◆ beginningOffset

const float CYIScrollingView::Magnets::beginningOffset

The beginning offset. Applicable only when type is CYIScrollingView::MagnetsType::Edges or CYIScrollingView::MagnetsType::Begin.

◆ centerOffset

const float CYIScrollingView::Magnets::centerOffset

The center offset. Applicable only when type is CYIScrollingView::MagnetsType::Center.

◆ endOffset

const float CYIScrollingView::Magnets::endOffset

The end offset. Applicable only when type is CYIScrollingView::MagnetsType::Edges or CYIScrollingView::MagnetsType::End.

◆ type

const MagnetsType CYIScrollingView::Magnets::type

The magnets type.


The documentation for this struct was generated from the following file: