Back to index

unity  6.0.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes
unity::dash::LensScrollView Class Reference

List of all members.

Public Member Functions

void ScrollToPosition (nux::Geometry const &position)
void SetRightArea (nux::Area *area)
void SetUpArea (nux::Area *area)

Static Public Member Functions

 LensScrollView (nux::VScrollBar *scroll_bar, NUX_FILE_LINE_DECL)

Protected Member Functions

nux::Area * KeyNavIteration (nux::KeyNavDirection direction)

Private Attributes

nux::Area * right_area_
nux::Area * up_area_

Detailed Description

Definition at line 49 of file LensView.cpp.


Constructor & Destructor Documentation

unity::dash::LensScrollView::LensScrollView ( nux::VScrollBar *  scroll_bar,
NUX_FILE_LINE_DECL   
) [inline, static]

Definition at line 52 of file LensView.cpp.

    : nux::ScrollView(NUX_FILE_LINE_PARAM)
    , right_area_(nullptr)
    , up_area_(nullptr)
  {
    SetVScrollBar(scroll_bar);
  }

Member Function Documentation

nux::Area* unity::dash::LensScrollView::KeyNavIteration ( nux::KeyNavDirection  direction) [inline, protected]

Definition at line 101 of file LensView.cpp.

  {
    nux::Area* focus_area = nux::GetWindowCompositor().GetKeyFocusArea();

    if (direction == nux::KEY_NAV_RIGHT && focus_area && focus_area->IsChildOf(this))
      return right_area_;
    else if (direction == nux::KEY_NAV_UP && focus_area && focus_area->IsChildOf(this))
      return up_area_;
    else
      return nux::ScrollView::KeyNavIteration(direction);
  }
void unity::dash::LensScrollView::ScrollToPosition ( nux::Geometry const &  position) [inline]

Definition at line 60 of file LensView.cpp.

  {
    // much of this code is copied from Nux/ScrollView.cpp
    nux::Geometry const& geo = GetGeometry();

    int child_y = position.y - geo.y;
    int child_y_diff = child_y - abs (_delta_y);

    if (child_y_diff + position.height < geo.height && child_y_diff >= 0)
    {
      return;
    }

    if (child_y_diff < 0)
    {
      ScrollUp (1, abs (child_y_diff));
    }
    else
    {
      int size = child_y_diff - geo.height;

      // always keeps the top of a view on the screen
      size += position.height;

      ScrollDown (1, size);
    }
  }

Here is the caller graph for this function:

void unity::dash::LensScrollView::SetRightArea ( nux::Area *  area) [inline]

Definition at line 88 of file LensView.cpp.

  {
    right_area_ = area;
  }

Here is the caller graph for this function:

void unity::dash::LensScrollView::SetUpArea ( nux::Area *  area) [inline]

Definition at line 93 of file LensView.cpp.

  {
    up_area_ = area;
  }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 114 of file LensView.cpp.

Definition at line 115 of file LensView.cpp.


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