nux-1.14.0
TilesView Class Reference
Inheritance diagram for TilesView:
nux::View nux::InputArea nux::Area nux::InitiallyUnownedObject nux::Focusable nux::Object nux::Trackable nux::Introspectable

List of all members.

Public Member Functions

 TilesView (NUX_FILE_LINE_PROTO)
void AddTile (Tile *tile)

Protected Member Functions

nux::AreaFindAreaUnderMouse (const nux::Point &mouse_position, nux::NuxEventType event_type)
void OnMouseDown (int x, int y, unsigned long button_flags, unsigned long key_flags)
void ShowPopupMenu (int x, int y)
void Draw (nux::GraphicsEngine &graphics_engine, bool force_draw)
void DrawContent (nux::GraphicsEngine &graphics_engine, bool force_draw)

Detailed Description

Definition at line 65 of file tiles_view.cpp.


Member Function Documentation

nux::Area * TilesView::FindAreaUnderMouse ( const nux::Point mouse_position,
nux::NuxEventType  event_type 
) [protected, virtual]

Return the area under the mouse pointer.

Returns:
The Area under the mouse pointer.

Reimplemented from nux::View.

Definition at line 156 of file tiles_view.cpp.

References nux::Area::AcceptMouseWheelEvent(), nux::Layout::FindAreaUnderMouse(), and nux::Area::TestMousePointerInclusionFilterMouseWheel().

{
  bool mouse_inside = TestMousePointerInclusionFilterMouseWheel(mouse_position, event_type);

  if(mouse_inside == false)
    return NULL;

  if (event_type == nux::NUX_MOUSE_PRESSED)
  {
    focus_tile_ = static_cast<Tile*>(grid_layout_->FindAreaUnderMouse(mouse_position, event_type));
  }
  else
  {
    //focus_tile_ = NULL;
  }
  
  if((event_type == nux::NUX_MOUSE_WHEEL) && (!AcceptMouseWheelEvent()))
    return NULL;
  return this;
}

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends