Back to index

unity  6.0.0
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
unity::MT::GrabHandle Class Reference

#include <unity-mt-grab-handle.h>

Inheritance diagram for unity::MT::GrabHandle:
Inheritance graph
[legend]
Collaboration diagram for unity::MT::GrabHandle:
Collaboration graph
[legend]

List of all members.

Classes

class  Impl
class  ImplFactory

Public Types

typedef boost::shared_ptr
< GrabHandle
Ptr

Public Member Functions

 ~GrabHandle ()
bool operator== (const GrabHandle &other) const
bool operator!= (const GrabHandle &other) const
void buttonPress (int x, int y, unsigned int button) const
void requestMovement (int x, int y, unsigned int button) const
void reposition (int x, int y, unsigned int flags)
void reposition (int x, int y, unsigned int flags) const
void show ()
void hide ()
void raise () const
TextureLayout layout ()
unsigned int id () const
unsigned int width () const
unsigned int height () const
int x () const
int y () const
void damage (const nux::Geometry &g) const

Static Public Member Functions

static GrabHandle::Ptr create (Texture::Ptr texture, unsigned int width, unsigned int height, const boost::shared_ptr< GrabHandleGroup > &owner, unsigned int id)

Private Member Functions

 GrabHandle (Texture::Ptr texture, unsigned int width, unsigned int height, const boost::shared_ptr< GrabHandleGroup > &owner, unsigned int id)

Private Attributes

boost::weak_ptr< GrabHandleGroupmOwner
Texture::Ptr mTexture
unsigned int mId
nux::Geometry mRect
ImplmImpl

Detailed Description

Definition at line 81 of file unity-mt-grab-handle.h.


Member Typedef Documentation

typedef boost::shared_ptr<GrabHandle> unity::MT::GrabHandle::Ptr

Definition at line 87 of file unity-mt-grab-handle.h.


Constructor & Destructor Documentation

Definition at line 122 of file unity-mt-grab-handle.cpp.

{
  delete mImpl;
}
unity::MT::GrabHandle::GrabHandle ( Texture::Ptr  texture,
unsigned int  width,
unsigned int  height,
const boost::shared_ptr< GrabHandleGroup > &  owner,
unsigned int  id 
) [private]

Definition at line 98 of file unity-mt-grab-handle.cpp.

                                                  :
  mOwner(owner),
  mTexture (texture),
  mId(id),
  mRect (0, 0, width, height),
  mImpl (NULL)
{
}

Member Function Documentation

void unity::MT::GrabHandle::buttonPress ( int  x,
int  y,
unsigned int  button 
) const

Definition at line 26 of file unity-mt-grab-handle.cpp.

{
  mImpl->buttonPress (x, y, button);
}

Here is the call graph for this function:

unity::MT::GrabHandle::Ptr unity::MT::GrabHandle::create ( Texture::Ptr  texture,
unsigned int  width,
unsigned int  height,
const boost::shared_ptr< GrabHandleGroup > &  owner,
unsigned int  id 
) [static]

Definition at line 112 of file unity-mt-grab-handle.cpp.

{
  unity::MT::GrabHandle::Ptr p (new unity::MT::GrabHandle (texture, width, height, owner, id));
  p->mImpl = unity::MT::GrabHandle::ImplFactory::Default ()->create (p);

  return p;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void unity::MT::GrabHandle::damage ( const nux::Geometry &  g) const [inline]

Definition at line 131 of file unity-mt-grab-handle.h.

{ mImpl->damage (g); }

Here is the call graph for this function:

unsigned int unity::MT::GrabHandle::height ( ) const [inline]

Definition at line 127 of file unity-mt-grab-handle.h.

{ return mRect.height; }

Here is the caller graph for this function:

Definition at line 49 of file unity-mt-grab-handle.cpp.

{
  mImpl->hide ();
}
unsigned int unity::MT::GrabHandle::id ( ) const [inline]

Definition at line 125 of file unity-mt-grab-handle.h.

{ return mId; }

Definition at line 93 of file unity-mt-grab-handle.cpp.

bool unity::MT::GrabHandle::operator!= ( const GrabHandle other) const [inline]

Definition at line 101 of file unity-mt-grab-handle.h.

  {
    return !(*this == other);
  }
bool unity::MT::GrabHandle::operator== ( const GrabHandle other) const [inline]

Definition at line 96 of file unity-mt-grab-handle.h.

  {
    return mId == other.mId;
  }

Definition at line 55 of file unity-mt-grab-handle.cpp.

{
  unity::MT::GrabHandleGroup::Ptr ghg = mOwner.lock ();
  boost::shared_ptr <const unity::MT::GrabHandle> gh = shared_from_this ();
  ghg->raiseHandle (gh);
}
void unity::MT::GrabHandle::reposition ( int  x,
int  y,
unsigned int  flags 
)

Definition at line 63 of file unity-mt-grab-handle.cpp.

{
  damage (mRect);

  if (flags & PositionSet)
  {
    mRect.x = x;
    mRect.y = y;
  }

  if (flags & PositionLock)
  {
    mImpl->lockPosition (x, y, flags);
  }

  damage (mRect);
}
void unity::MT::GrabHandle::reposition ( int  x,
int  y,
unsigned int  flags 
) const

Definition at line 84 of file unity-mt-grab-handle.cpp.

{
  if (flags & PositionLock)
  {
    mImpl->lockPosition (x, y, flags);
  }
}
void unity::MT::GrabHandle::requestMovement ( int  x,
int  y,
unsigned int  button 
) const

Definition at line 34 of file unity-mt-grab-handle.cpp.

{
  unity::MT::GrabHandleGroup::Ptr ghg = mOwner.lock ();
  ghg->requestMovement (x, y, (maskHandles.find (mId))->second, button);
}

Definition at line 43 of file unity-mt-grab-handle.cpp.

{
  mImpl->show ();
}
unsigned int unity::MT::GrabHandle::width ( ) const [inline]

Definition at line 126 of file unity-mt-grab-handle.h.

{ return mRect.width; }

Here is the caller graph for this function:

int unity::MT::GrabHandle::x ( ) const [inline]

Definition at line 128 of file unity-mt-grab-handle.h.

{ return mRect.x; }

Here is the caller graph for this function:

int unity::MT::GrabHandle::y ( ) const [inline]

Definition at line 129 of file unity-mt-grab-handle.h.

{ return mRect.y; }

Here is the caller graph for this function:


Member Data Documentation

unsigned int unity::MT::GrabHandle::mId [private]

Definition at line 168 of file unity-mt-grab-handle.h.

Definition at line 170 of file unity-mt-grab-handle.h.

boost::weak_ptr<GrabHandleGroup> unity::MT::GrabHandle::mOwner [private]

Definition at line 166 of file unity-mt-grab-handle.h.

nux::Geometry unity::MT::GrabHandle::mRect [private]

Definition at line 169 of file unity-mt-grab-handle.h.

Definition at line 167 of file unity-mt-grab-handle.h.


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