![]() |
Gorgon Game Engine
|
Input layer allows mouse events to be handled. More...
Protected Member Functions | |
virtual bool | propagate_mouseevent (Input::Mouse::EventType event, Geometry::Point location, Input::Mouse::Button button, float amount, MouseHandler &handlers) override |
Propagates a mouse event. Some events will be called directly. More... | |
![]() | |
virtual void | added (Layer &layer) |
Will be called when a layer is added. More... | |
void | dotransformandclip (bool inverse=false) |
Performs transformation and clipping. Use inverse for reverse mapping for mouse events. More... | |
virtual void | located (Layer *parent) |
Will be called when this layer is added to another. More... | |
virtual void | removed (Layer &layer) |
Will be called when a layer is removed. More... | |
void | reverttransformandclip () |
Reverts previously done transformation. More... | |
Protected Attributes | |
std::function< void(Layer &, Geometry::Point, Input::Mouse::Button)> | click |
std::function< void(Layer &, Geometry::Point, Input::Mouse::Button)> | down |
std::function< bool(Layer &, Geometry::Point)> | hitcheck |
std::function< bool(Layer &, Geometry::Point, float amount)> | hscroll |
std::function< void(Layer &, Geometry::Point)> | move |
Geometry::Transform3D | mytransform |
std::function< void(Layer &)> | out |
std::function< void(Layer &)> | over |
std::function< bool(Layer &, Geometry::Point, float amount)> | rotate |
std::function< void(Layer &, Geometry::Point, Input::Mouse::Button)> | up |
std::function< bool(Layer &, Geometry::Point, float amount)> | vscroll |
std::function< bool(Layer &, Geometry::Point, float amount)> | zoom |
![]() | |
Geometry::Bounds | bounds |
Bounds of this layer. More... | |
Containers::Collection< Layer > | children |
Child layers that this layer holds, all child layers are considered to be above current layer. More... | |
bool | isvisible |
Whether this layer is visible, invisible layers will not be drawn or receive any events. More... | |
std::string | name |
For debugging. More... | |
Layer * | parent |
Parent layer, could be nullptr. More... | |
Mouse event handling | |
void | SetHitCheck (std::function< bool(Layer &, Geometry::Point)> fn) |
Sets hit check function. More... | |
void | SetHitCheck (std::function< bool(Geometry::Point)> fn) |
Sets hit check function. More... | |
template<class C_ > | |
void | SetHitCheck (C_ &c, bool(C_::*fn)(Layer &, Geometry::Point)) |
Sets hit check function. More... | |
template<class C_ > | |
void | SetHitCheck (C_ &c, bool(C_::*fn)(Geometry::Point)) |
Sets hit check function. More... | |
template<class C_ > | |
void | SetHitCheck (C_ *my, bool(C_::*fn)(Layer &, Geometry::Point)) |
Sets hit check function. More... | |
template<class C_ > | |
void | SetHitCheck (C_ *my, bool(C_::*fn)(Geometry::Point)) |
Sets hit check function. More... | |
void | ResetHitCheck () |
Removes hit check handler, default action for hit check is to return true. More... | |
void | SetClick (std::function< void(Layer &, Geometry::Point, Input::Mouse::Button)> fn) |
Sets click handler. More... | |
void | SetClick (std::function< void(Geometry::Point, Input::Mouse::Button)> fn) |
Sets click handler. More... | |
template<class C_ > | |
void | SetClick (C_ &c, void(C_::*fn)(Layer &, Geometry::Point, Input::Mouse::Button)) |
Sets click handler. More... | |
template<class C_ > | |
void | SetClick (C_ &c, void(C_::*fn)(Geometry::Point, Input::Mouse::Button)) |
Sets click handler. More... | |
template<class C_ > | |
void | SetClick (C_ *my, void(C_::*fn)(Layer &, Geometry::Point, Input::Mouse::Button)) |
Sets click handler. More... | |
template<class C_ > | |
void | SetClick (C_ *my, void(C_::*fn)(Geometry::Point, Input::Mouse::Button)) |
Sets click handler. More... | |
void | SetClick (std::function< void(Layer &, Input::Mouse::Button)> fn) |
Sets click handler. More... | |
void | SetClick (std::function< void(Input::Mouse::Button)> fn) |
Sets click handler. More... | |
template<class C_ > | |
void | SetClick (C_ &c, void(C_::*fn)(Layer &, Input::Mouse::Button)) |
Sets click handler. More... | |
template<class C_ > | |
void | SetClick (C_ &c, void(C_::*fn)(Input::Mouse::Button)) |
Sets click handler. More... | |
template<class C_ > | |
void | SetClick (C_ *my, void(C_::*fn)(Layer &, Input::Mouse::Button)) |
Sets click handler. More... | |
template<class C_ > | |
void | SetClick (C_ *my, void(C_::*fn)(Input::Mouse::Button)) |
Sets click handler. More... | |
void | SetClick (std::function< void(Layer &, Geometry::Point)> fn, Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets click handler. More... | |
void | SetClick (std::function< void(Geometry::Point)> fn, Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets click handler. More... | |
template<class C_ > | |
void | SetClick (C_ &c, void(C_::*fn)(Layer &, Geometry::Point), Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets click handler. More... | |
template<class C_ > | |
void | SetClick (C_ &c, void(C_::*fn)(Geometry::Point), Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets click handler. More... | |
template<class C_ > | |
void | SetClick (C_ *my, void(C_::*fn)(Layer &, Geometry::Point), Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets click handler. More... | |
template<class C_ > | |
void | SetClick (C_ *my, void(C_::*fn)(Geometry::Point), Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets click handler. More... | |
void | SetClick (std::function< void(Layer &)> fn, Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets click handler. More... | |
void | SetClick (std::function< void()> fn, Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets click handler. More... | |
template<class C_ > | |
void | SetClick (C_ &c, void(C_::*fn)(Layer &), Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets click handler. More... | |
template<class C_ > | |
void | SetClick (C_ &c, std::function< void(C_ &)> fn, Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets click handler. More... | |
template<class C_ > | |
void | SetClick (C_ *my, void(C_::*fn)(Layer &), Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets click handler. More... | |
template<class C_ > | |
void | SetClick (C_ *my, std::function< void(C_ &)> fn, Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets click handler. More... | |
void | ResetClick () |
Removes click handler. More... | |
void | SetDown (std::function< void(Layer &, Geometry::Point, Input::Mouse::Button)> fn) |
Sets mouse down handler. More... | |
void | SetDown (std::function< void(Geometry::Point, Input::Mouse::Button)> fn) |
Sets mouse down handler. More... | |
template<class C_ > | |
void | SetDown (C_ &c, void(C_::*fn)(Layer &, Geometry::Point, Input::Mouse::Button)) |
Sets mouse down handler. More... | |
template<class C_ > | |
void | SetDown (C_ &c, void(C_::*fn)(Geometry::Point, Input::Mouse::Button)) |
Sets mouse down handler. More... | |
template<class C_ > | |
void | SetDown (C_ *my, void(C_::*fn)(Layer &, Geometry::Point, Input::Mouse::Button)) |
Sets mouse down handler. More... | |
template<class C_ > | |
void | SetDown (C_ *my, void(C_::*fn)(Geometry::Point, Input::Mouse::Button)) |
Sets mouse down handler. More... | |
void | SetDown (std::function< void(Layer &, Input::Mouse::Button)> fn) |
Sets mouse down handler. More... | |
void | SetDown (std::function< void(Input::Mouse::Button)> fn) |
Sets mouse down handler. More... | |
template<class C_ > | |
void | SetDown (C_ &c, void(C_::*fn)(Layer &, Input::Mouse::Button)) |
Sets mouse down handler. More... | |
template<class C_ > | |
void | SetDown (C_ &c, void(C_::*fn)(Input::Mouse::Button)) |
Sets mouse down handler. More... | |
template<class C_ > | |
void | SetDown (C_ *my, void(C_::*fn)(Layer &, Input::Mouse::Button)) |
Sets mouse down handler. More... | |
template<class C_ > | |
void | SetDown (C_ *my, void(C_::*fn)(Input::Mouse::Button)) |
Sets mouse down handler. More... | |
void | SetDown (std::function< void(Layer &, Geometry::Point)> fn, Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets mouse down handler. More... | |
void | SetDown (std::function< void(Geometry::Point)> fn, Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets mouse down handler. More... | |
template<class C_ > | |
void | SetDown (C_ &c, void(C_::*fn)(Layer &, Geometry::Point), Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets mouse down handler. More... | |
template<class C_ > | |
void | SetDown (C_ &c, void(C_::*fn)(Geometry::Point), Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets mouse down handler. More... | |
template<class C_ > | |
void | SetDown (C_ *my, void(C_::*fn)(Layer &, Geometry::Point), Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets mouse down handler. More... | |
template<class C_ > | |
void | SetDown (C_ *my, void(C_::*fn)(Geometry::Point), Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets mouse down handler. More... | |
void | SetDown (std::function< void(Layer &)> fn, Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets mouse down handler. More... | |
void | SetDown (std::function< void()> fn, Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets mouse down handler. More... | |
template<class C_ > | |
void | SetDown (C_ &c, void(C_::*fn)(Layer &), Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets mouse down handler. More... | |
template<class C_ > | |
void | SetDown (C_ &c, std::function< void(C_ &)> fn, Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets mouse down handler. More... | |
template<class C_ > | |
void | SetDown (C_ *my, void(C_::*fn)(Layer &), Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets mouse down handler. More... | |
template<class C_ > | |
void | SetDown (C_ *my, std::function< void(C_ &)> fn, Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets mouse down handler. More... | |
void | ResetDown () |
Removes mouse down handler. More... | |
void | SetUp (std::function< void(Layer &, Geometry::Point, Input::Mouse::Button)> fn) |
Sets mouse up handler. More... | |
void | SetUp (std::function< void(Geometry::Point, Input::Mouse::Button)> fn) |
Sets mouse up handler. More... | |
template<class C_ > | |
void | SetUp (C_ &c, void(C_::*fn)(Layer &, Geometry::Point, Input::Mouse::Button)) |
Sets mouse up handler. More... | |
template<class C_ > | |
void | SetUp (C_ &c, void(C_::*fn)(Geometry::Point, Input::Mouse::Button)) |
Sets mouse up handler. More... | |
template<class C_ > | |
void | SetUp (C_ *my, void(C_::*fn)(Layer &, Geometry::Point, Input::Mouse::Button)) |
Sets mouse up handler. More... | |
template<class C_ > | |
void | SetUp (C_ *my, void(C_::*fn)(Geometry::Point, Input::Mouse::Button)) |
Sets mouse up handler. More... | |
void | SetUp (std::function< void(Layer &, Input::Mouse::Button)> fn) |
Sets mouse up handler. More... | |
void | SetUp (std::function< void(Input::Mouse::Button)> fn) |
Sets mouse up handler. More... | |
template<class C_ > | |
void | SetUp (C_ &c, void(C_::*fn)(Layer &, Input::Mouse::Button)) |
Sets mouse up handler. More... | |
template<class C_ > | |
void | SetUp (C_ &c, void(C_::*fn)(Input::Mouse::Button)) |
Sets mouse up handler. More... | |
template<class C_ > | |
void | SetUp (C_ *my, void(C_::*fn)(Layer &, Input::Mouse::Button)) |
Sets mouse up handler. More... | |
template<class C_ > | |
void | SetUp (C_ *my, void(C_::*fn)(Input::Mouse::Button)) |
Sets mouse up handler. More... | |
void | SetUp (std::function< void(Layer &, Geometry::Point)> fn, Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets mouse up handler. More... | |
void | SetUp (std::function< void(Geometry::Point)> fn, Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets mouse up handler. More... | |
template<class C_ > | |
void | SetUp (C_ &c, void(C_::*fn)(Layer &, Geometry::Point), Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets mouse up handler. More... | |
template<class C_ > | |
void | SetUp (C_ &c, void(C_::*fn)(Geometry::Point), Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets mouse up handler. More... | |
template<class C_ > | |
void | SetUp (C_ *my, void(C_::*fn)(Layer &, Geometry::Point), Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets mouse up handler. More... | |
template<class C_ > | |
void | SetUp (C_ *my, void(C_::*fn)(Geometry::Point), Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets mouse up handler. More... | |
void | SetUp (std::function< void(Layer &)> fn, Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets mouse up handler. More... | |
void | SetUp (std::function< void()> fn, Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets mouse up handler. More... | |
template<class C_ > | |
void | SetUp (C_ &c, void(C_::*fn)(Layer &), Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets mouse up handler. More... | |
template<class C_ > | |
void | SetUp (C_ &c, std::function< void(C_ &)> fn, Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets mouse up handler. More... | |
template<class C_ > | |
void | SetUp (C_ *my, void(C_::*fn)(Layer &), Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets mouse up handler. More... | |
template<class C_ > | |
void | SetUp (C_ *my, std::function< void(C_ &)> fn, Input::Mouse::Button btn=Input::Mouse::Button::Left) |
Sets mouse up handler. More... | |
void | ResetUp () |
Removes mouse up handler. More... | |
void | SetMove (std::function< void(Layer &, Geometry::Point)> fn) |
Sets mouse move handler. More... | |
void | SetMove (std::function< void(Geometry::Point)> fn) |
Sets mouse move handler. More... | |
template<class C_ > | |
void | SetMove (C_ &c, void(C_::*fn)(Layer &, Geometry::Point)) |
Sets mouse move handler. More... | |
template<class C_ > | |
void | SetMove (C_ &c, void(C_::*fn)(Geometry::Point)) |
Sets mouse move handler. More... | |
template<class C_ > | |
void | SetMove (C_ *my, void(C_::*fn)(Layer &, Geometry::Point)) |
Sets mouse move handler. More... | |
template<class C_ > | |
void | SetMove (C_ *my, void(C_::*fn)(Geometry::Point)) |
Sets mouse move handler. More... | |
void | ResetMove () |
Removes mouse move handler. More... | |
void | SetScroll (std::function< bool(Layer &, Geometry::Point, float)> fn) |
Sets scroll handler. More... | |
void | SetScroll (std::function< bool(Geometry::Point, float)> fn) |
Sets scroll handler. More... | |
template<class C_ > | |
void | SetScroll (C_ &c, bool(C_::*fn)(Layer &, Geometry::Point, float)) |
Sets scroll handler. More... | |
template<class C_ > | |
void | SetScroll (C_ &c, bool(C_::*fn)(Geometry::Point, float)) |
Sets scroll handler. More... | |
template<class C_ > | |
void | SetScroll (C_ *my, bool(C_::*fn)(Layer &, Geometry::Point, float)) |
Sets scroll handler. More... | |
template<class C_ > | |
void | SetScroll (C_ *my, bool(C_::*fn)(Geometry::Point, float)) |
Sets scroll handler. More... | |
void | SetScroll (std::function< bool(Layer &, float)> fn) |
Sets scroll handler. More... | |
void | SetScroll (std::function< bool(float)> fn) |
Sets scroll handler. More... | |
template<class C_ > | |
void | SetScroll (C_ &c, bool(C_::*fn)(Layer &, float)) |
Sets scroll handler. More... | |
template<class C_ > | |
void | SetScroll (C_ &c, bool(C_::*fn)(float)) |
Sets scroll handler. More... | |
template<class C_ > | |
void | SetScroll (C_ *my, bool(C_::*fn)(Layer &, float)) |
Sets scroll handler. More... | |
template<class C_ > | |
void | SetScroll (C_ *my, bool(C_::*fn)(float)) |
Sets scroll handler. More... | |
void | ResetScroll () |
Removes scroll handler. More... | |
void | SetHScroll (std::function< bool(Layer &, Geometry::Point, float)> fn) |
Sets horizontal scroll handler. More... | |
void | SetHScroll (std::function< bool(Geometry::Point, float)> fn) |
Sets horizontal scroll handler. More... | |
template<class C_ > | |
void | SetHScroll (C_ &c, bool(C_::*fn)(Layer &, Geometry::Point, float)) |
Sets horizontal scroll handler. More... | |
template<class C_ > | |
void | SetHScroll (C_ &c, bool(C_::*fn)(Geometry::Point, float)) |
Sets horizontal scroll handler. More... | |
template<class C_ > | |
void | SetHScroll (C_ *my, bool(C_::*fn)(Layer &, Geometry::Point, float)) |
Sets horizontal scroll handler. More... | |
template<class C_ > | |
void | SetHScroll (C_ *my, bool(C_::*fn)(Geometry::Point, float)) |
Sets horizontal scroll handler. More... | |
void | SetHScroll (std::function< bool(Layer &, float)> fn) |
Sets horizontal scroll handler. More... | |
void | SetHScroll (std::function< bool(float)> fn) |
Sets horizontal scroll handler. More... | |
template<class C_ > | |
void | SetHScroll (C_ &c, bool(C_::*fn)(Layer &, float)) |
Sets horizontal scroll handler. More... | |
template<class C_ > | |
void | SetHScroll (C_ &c, bool(C_::*fn)(float)) |
Sets horizontal scroll handler. More... | |
template<class C_ > | |
void | SetHScroll (C_ *my, bool(C_::*fn)(Layer &, float)) |
Sets horizontal scroll handler. More... | |
template<class C_ > | |
void | SetHScroll (C_ *my, bool(C_::*fn)(float)) |
Sets horizontal scroll handler. More... | |
void | ResetHScroll () |
Removes horizontal scroll handler. More... | |
void | SetZoom (std::function< bool(Layer &, Geometry::Point, float)> fn) |
Sets zoom handler. More... | |
void | SetZoom (std::function< bool(Geometry::Point, float)> fn) |
Sets zoom handler. More... | |
template<class C_ > | |
void | SetZoom (C_ &c, bool(C_::*fn)(Layer &, Geometry::Point, float)) |
Sets zoom handler. More... | |
template<class C_ > | |
void | SetZoom (C_ &c, bool(C_::*fn)(Geometry::Point, float)) |
Sets zoom handler. More... | |
template<class C_ > | |
void | SetZoom (C_ *my, bool(C_::*fn)(Layer &, Geometry::Point, float)) |
Sets zoom handler. More... | |
template<class C_ > | |
void | SetZoom (C_ *my, bool(C_::*fn)(Geometry::Point, float)) |
Sets zoom handler. More... | |
void | SetZoom (std::function< bool(Layer &, float)> fn) |
Sets zoom handler. More... | |
void | SetZoom (std::function< bool(float)> fn) |
Sets zoom handler. More... | |
template<class C_ > | |
void | SetZoom (C_ &c, bool(C_::*fn)(Layer &, float)) |
Sets zoom handler. More... | |
template<class C_ > | |
void | SetZoom (C_ &c, bool(C_::*fn)(float)) |
Sets zoom handler. More... | |
template<class C_ > | |
void | SetZoom (C_ *my, bool(C_::*fn)(Layer &, float)) |
Sets zoom handler. More... | |
template<class C_ > | |
void | SetZoom (C_ *my, bool(C_::*fn)(float)) |
Sets zoom handler. More... | |
void | ResetZoom () |
Removes zoom handler. More... | |
void | SetRotate (std::function< bool(Layer &, Geometry::Point, float)> fn) |
Sets rotate handler. More... | |
void | SetRotate (std::function< bool(Geometry::Point, float)> fn) |
Sets rotate handler. More... | |
template<class C_ > | |
void | SetRotate (C_ &c, bool(C_::*fn)(Layer &, Geometry::Point, float)) |
Sets rotate handler. More... | |
template<class C_ > | |
void | SetRotate (C_ &c, bool(C_::*fn)(Geometry::Point, float)) |
Sets rotate handler. More... | |
template<class C_ > | |
void | SetRotate (C_ *my, bool(C_::*fn)(Layer &, Geometry::Point, float)) |
Sets rotate handler. More... | |
template<class C_ > | |
void | SetRotate (C_ *my, bool(C_::*fn)(Geometry::Point, float)) |
Sets rotate handler. More... | |
void | SetRotate (std::function< bool(Layer &, float)> fn) |
Sets rotate handler. More... | |
void | SetRotate (std::function< bool(float)> fn) |
Sets rotate handler. More... | |
template<class C_ > | |
void | SetRotate (C_ &c, bool(C_::*fn)(Layer &, float)) |
Sets rotate handler. More... | |
template<class C_ > | |
void | SetRotate (C_ &c, bool(C_::*fn)(float)) |
Sets rotate handler. More... | |
template<class C_ > | |
void | SetRotate (C_ *my, bool(C_::*fn)(Layer &, float)) |
Sets rotate handler. More... | |
template<class C_ > | |
void | SetRotate (C_ *my, bool(C_::*fn)(float)) |
Sets rotate handler. More... | |
void | ResetRotate () |
Removes rotate handler. More... | |
void | SetOver (std::function< void(Layer &)> fn) |
Sets mouse over handler. More... | |
void | SetOver (std::function< void()> fn) |
Sets mouse over handler. More... | |
template<class C_ > | |
void | SetOver (C_ &c, void(C_::*fn)(Layer &)) |
Sets mouse over handler. More... | |
template<class C_ > | |
void | SetOver (C_ &c, std::function< void(C_ &)> fn) |
Sets mouse over handler. More... | |
template<class C_ > | |
void | SetOver (C_ *my, void(C_::*fn)(Layer &)) |
Sets mouse over handler. More... | |
template<class C_ > | |
void | SetOver (C_ *my, std::function< void(C_ &)> fn) |
Sets mouse over handler. More... | |
void | ResetOver () |
Removes mouse over handler. More... | |
void | SetOut (std::function< void(Layer &)> fn) |
Sets mouse out handler. More... | |
void | SetOut (std::function< void()> fn) |
Sets mouse out handler. More... | |
template<class C_ > | |
void | SetOut (C_ &c, void(C_::*fn)(Layer &)) |
Sets mouse out handler. More... | |
template<class C_ > | |
void | SetOut (C_ &c, std::function< void(C_ &)> fn) |
Sets mouse out handler. More... | |
template<class C_ > | |
void | SetOut (C_ *my, void(C_::*fn)(Layer &)) |
Sets mouse out handler. More... | |
template<class C_ > | |
void | SetOut (C_ *my, std::function< void(C_ &)> fn) |
Sets mouse out handler. More... | |
void | ResetOut () |
Removes mouse out handler. More... | |
void | FireClick (Geometry::Point location, Input::Mouse::Button button) |
Fires the click event manually, allowing both mouse up and click events to happen at the same time. More... | |
Additional Inherited Members | |
![]() | |
Layer () | |
Constructor that sets the layer to cover entire parent, no matter how big it is. More... | |
Layer (const Geometry::Bounds &bounds) | |
Initializing constructor. More... | |
Layer (const Geometry::Point &location) | |
Constructor that places the layer to the given location. More... | |
Layer (const Layer &)=delete | |
Copy constructor is disabled. More... | |
Layer (Layer &&other) | |
Move constructor. More... | |
virtual | ~Layer () |
Destructor. More... | |
virtual void | Hide () |
Hides this layer. More... | |
virtual bool | IsVisible () const |
Returns whether this layer is effectively visible. More... | |
Layer & | operator= (const Layer &)=delete |
Copy assignment is deleted. More... | |
Layer & | operator= (Layer &&other) |
Move assignment. More... | |
virtual void | Render () |
Renders the current layer, default handling is to pass the request to the sub-layers. Rendering is not thread safe. More... | |
virtual void | Show () |
Displays this layer. More... | |
void | Swap (Layer &other) |
Swaps two layers, mostly used for move semantics. More... | |
void | Add (Layer &layer) |
Adds the given layer as a child. More... | |
void | Add (Layer *layer) |
Adds the given layer as a child. More... | |
void | setname (std::string value) |
For debugging. More... | |
void | Insert (Layer &layer, long under) |
Inserts the given layer before the given index. More... | |
void | Insert (Layer *layer, long under) |
Inserts the given layer before the given index. More... | |
void | Remove (Layer &layer) |
Removes the given layer. More... | |
void | Remove (Layer *layer) |
Removes the given layer. More... | |
bool | HasParent () const |
Returns whether this layer has a parent. More... | |
virtual Layer & | GetParent () const |
Returns the parent of this layer. More... | |
Layer & | GetTopLevel () const |
Returns the top level layer that contains this layer. More... | |
virtual Geometry::Point | TranslateToTopLevel (Geometry::Point location={0, 0}) const |
Translates the given location to the top level. More... | |
Layer & | GetTopLevel () |
Containers::Collection< Layer >::ConstIterator | begin () const |
An iterator pointing to the start of the children. More... | |
Containers::Collection< Layer >::ConstIterator | end () const |
An iterator pointing to the end of the children. More... | |
Containers::Collection< Layer >::ConstIterator | First () const |
An iterator pointing to the start of the children. More... | |
Containers::Collection< Layer >::ConstIterator | Last () const |
An iterator pointing to the last item of the children. More... | |
void | PlaceBefore (int before) |
Places this layer before the given index. More... | |
void | PlaceToTop () |
Places this layer to the top of the layer stack its in. More... | |
void | PlaceToBottom () |
Places this layer to the bottom of the layer stack. More... | |
int | GetOrder () const |
Gets the current order of the stack. More... | |
virtual void | Move (const Geometry::Point &location) |
Moves this layer to the given location. More... | |
virtual void | Move (int x, int y) |
Moves this layer to the given location. More... | |
virtual void | Resize (const Geometry::Size &size) |
Resizes the layer to the given size. More... | |
virtual void | Resize (int width, int height) |
Resizes the layer to the given size. More... | |
void | SetWidth (int width) |
Resizes the layer to the given size. More... | |
void | SetHeight (int height) |
Resizes the layer to the given size. More... | |
void | SetBounds (const Geometry::Bounds &bounds) |
Sets the boundaries of this layer. More... | |
Geometry::Size | GetSize () const |
Returns the size of the layer. More... | |
Geometry::Size | GetCalculatedSize () const |
Returns the size of the layer. More... | |
int | GetWidth () const |
Returns the width of the layer. More... | |
int | GetHeight () const |
Returns the height of the layer. More... | |
Geometry::Point | GetLocation () const |
Returns the current location of the layer. More... | |
int | GetLeft () const |
Returns the current location of the layer. More... | |
int | GetTop () const |
Returns the current location of the layer. More... | |
Geometry::Bounds | GetBounds () const |
Returns the boundaries of the layer. More... | |
Geometry::Bounds | GetEffectiveBounds () const |
Returns the effective boundaries of the layer. More... | |
![]() | |
const Containers::Collection< Layer > & | Children |
Sub-layers that this layer holds, all the sub-layers are considered to be above current layer. More... | |
![]() | |
static const Geometry::Bounds | EntireRegion |
When used as layer bounds, represents the entire region its placed in. More... | |
Input layer allows mouse events to be handled.
Location of mouse events are normalized to the layer. If hit check is not set, entire region of the layer is set to receive events. This means, if click is handled, any layer beneath this layer will not receive mouse down event prior to click event. All event functions may contain original layer, or that parameter can also be skipped. Handlers accept many different function signatures. For instance, if you want to handle left click event with member function of class Button you can register handler using the following line:
The order of handlers is: out, over, move then others. When the mouse button is pressed over a layer, mouse move is always sent to that layer. During this operation, mouse over and out events are triggered.
void FireClick | ( | Geometry::Point | location, |
Input::Mouse::Button | button | ||
) |
Fires the click event manually, allowing both mouse up and click events to happen at the same time.
References Layer::click.
|
overrideprotectedvirtual |
Propagates a mouse event. Some events will be called directly.
Reimplemented from Layer.
References MouseHandler::Add(), Layer::click, Gorgon::Input::Mouse::Click, Layer::dotransformandclip(), Gorgon::Input::Keyboard::Keycodes::Down, Layer::down, Gorgon::Input::Mouse::DownPressed, Layer::GetCalculatedSize(), Layer::hitcheck, Gorgon::Input::Mouse::HitCheck, Layer::hscroll, Layer::move, Gorgon::Input::Mouse::Move, Gorgon::Input::Mouse::MovePressed, Layer::mytransform, Gorgon::Input::needsclip(), Layer::out, Gorgon::Input::Mouse::Out, Layer::over, Gorgon::Input::Mouse::Over, Layer::propagate_mouseevent(), Layer::reverttransformandclip(), Layer::rotate, Gorgon::Input::Mouse::Rotate, Gorgon::Input::Mouse::Scroll_Hor, Gorgon::Input::Mouse::Scroll_Vert, Gorgon::Transform, Gorgon::Input::Keyboard::Keycodes::Up, Layer::up, Layer::vscroll, Layer::zoom, and Gorgon::Input::Mouse::Zoom.
void ResetClick | ( | ) |
Removes click handler.
References Layer::click.
void ResetDown | ( | ) |
Removes mouse down handler.
References Layer::down.
void ResetHitCheck | ( | ) |
Removes hit check handler, default action for hit check is to return true.
References Layer::hitcheck.
void ResetHScroll | ( | ) |
Removes horizontal scroll handler.
References Layer::hscroll.
void ResetMove | ( | ) |
Removes mouse move handler.
References Layer::move.
void ResetOut | ( | ) |
Removes mouse out handler.
References Layer::out.
void ResetOver | ( | ) |
Removes mouse over handler.
References Layer::over.
void ResetRotate | ( | ) |
Removes rotate handler.
References Layer::rotate.
void ResetScroll | ( | ) |
Removes scroll handler.
References Layer::vscroll.
void ResetUp | ( | ) |
Removes mouse up handler.
References Layer::up.
void ResetZoom | ( | ) |
Removes zoom handler.
References Layer::zoom.
void SetClick | ( | C_ & | c, |
std::function< void(C_ &)> | fn, | ||
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets click handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::click.
void SetClick | ( | C_ & | c, |
void(C_::*)(Geometry::Point) | fn, | ||
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets click handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::click.
void SetClick | ( | C_ & | c, |
void(C_::*)(Geometry::Point, Input::Mouse::Button) | fn | ||
) |
Sets click handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::click.
void SetClick | ( | C_ & | c, |
void(C_::*)(Input::Mouse::Button) | fn | ||
) |
Sets click handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::click.
void SetClick | ( | C_ & | c, |
void(C_::*)(Layer &) | fn, | ||
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets click handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::click.
void SetClick | ( | C_ & | c, |
void(C_::*)(Layer &, Geometry::Point) | fn, | ||
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets click handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::click.
void SetClick | ( | C_ & | c, |
void(C_::*)(Layer &, Geometry::Point, Input::Mouse::Button) | fn | ||
) |
Sets click handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::click.
void SetClick | ( | C_ & | c, |
void(C_::*)(Layer &, Input::Mouse::Button) | fn | ||
) |
Sets click handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::click.
void SetClick | ( | C_ * | my, |
std::function< void(C_ &)> | fn, | ||
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets click handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::click.
void SetClick | ( | C_ * | my, |
void(C_::*)(Geometry::Point) | fn, | ||
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets click handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::click.
void SetClick | ( | C_ * | my, |
void(C_::*)(Geometry::Point, Input::Mouse::Button) | fn | ||
) |
Sets click handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::click.
void SetClick | ( | C_ * | my, |
void(C_::*)(Input::Mouse::Button) | fn | ||
) |
Sets click handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::click.
void SetClick | ( | C_ * | my, |
void(C_::*)(Layer &) | fn, | ||
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets click handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::click.
void SetClick | ( | C_ * | my, |
void(C_::*)(Layer &, Geometry::Point) | fn, | ||
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets click handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::click.
void SetClick | ( | C_ * | my, |
void(C_::*)(Layer &, Geometry::Point, Input::Mouse::Button) | fn | ||
) |
Sets click handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::click.
void SetClick | ( | C_ * | my, |
void(C_::*)(Layer &, Input::Mouse::Button) | fn | ||
) |
Sets click handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::click.
void SetClick | ( | std::function< void()> | fn, |
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets click handler.
If hit check function is set, this event is only called if hit check returns true.
References Layer::click.
void SetClick | ( | std::function< void(Geometry::Point)> | fn, |
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets click handler.
If hit check function is set, this event is only called if hit check returns true.
References Layer::click.
void SetClick | ( | std::function< void(Geometry::Point, Input::Mouse::Button)> | fn | ) |
Sets click handler.
If hit check function is set, this event is only called if hit check returns true.
References Layer::click.
void SetClick | ( | std::function< void(Input::Mouse::Button)> | fn | ) |
Sets click handler.
If hit check function is set, this event is only called if hit check returns true.
References Layer::click.
void SetClick | ( | std::function< void(Layer &)> | fn, |
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets click handler.
If hit check function is set, this event is only called if hit check returns true.
References Layer::click.
void SetClick | ( | std::function< void(Layer &, Geometry::Point)> | fn, |
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets click handler.
If hit check function is set, this event is only called if hit check returns true.
References Layer::click.
void SetClick | ( | std::function< void(Layer &, Geometry::Point, Input::Mouse::Button)> | fn | ) |
Sets click handler.
If hit check function is set, this event is only called if hit check returns true.
References Layer::click.
void SetClick | ( | std::function< void(Layer &, Input::Mouse::Button)> | fn | ) |
Sets click handler.
If hit check function is set, this event is only called if hit check returns true.
References Layer::click.
void SetDown | ( | C_ & | c, |
std::function< void(C_ &)> | fn, | ||
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets mouse down handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::down.
void SetDown | ( | C_ & | c, |
void(C_::*)(Geometry::Point) | fn, | ||
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets mouse down handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::down.
void SetDown | ( | C_ & | c, |
void(C_::*)(Geometry::Point, Input::Mouse::Button) | fn | ||
) |
Sets mouse down handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::down.
void SetDown | ( | C_ & | c, |
void(C_::*)(Input::Mouse::Button) | fn | ||
) |
Sets mouse down handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::down.
void SetDown | ( | C_ & | c, |
void(C_::*)(Layer &) | fn, | ||
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets mouse down handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::down.
void SetDown | ( | C_ & | c, |
void(C_::*)(Layer &, Geometry::Point) | fn, | ||
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets mouse down handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::down.
void SetDown | ( | C_ & | c, |
void(C_::*)(Layer &, Geometry::Point, Input::Mouse::Button) | fn | ||
) |
Sets mouse down handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::down.
void SetDown | ( | C_ & | c, |
void(C_::*)(Layer &, Input::Mouse::Button) | fn | ||
) |
Sets mouse down handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::down.
void SetDown | ( | C_ * | my, |
std::function< void(C_ &)> | fn, | ||
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets mouse down handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::down.
void SetDown | ( | C_ * | my, |
void(C_::*)(Geometry::Point) | fn, | ||
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets mouse down handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::down.
void SetDown | ( | C_ * | my, |
void(C_::*)(Geometry::Point, Input::Mouse::Button) | fn | ||
) |
Sets mouse down handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::down.
void SetDown | ( | C_ * | my, |
void(C_::*)(Input::Mouse::Button) | fn | ||
) |
Sets mouse down handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::down.
void SetDown | ( | C_ * | my, |
void(C_::*)(Layer &) | fn, | ||
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets mouse down handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::down.
void SetDown | ( | C_ * | my, |
void(C_::*)(Layer &, Geometry::Point) | fn, | ||
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets mouse down handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::down.
void SetDown | ( | C_ * | my, |
void(C_::*)(Layer &, Geometry::Point, Input::Mouse::Button) | fn | ||
) |
Sets mouse down handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::down.
void SetDown | ( | C_ * | my, |
void(C_::*)(Layer &, Input::Mouse::Button) | fn | ||
) |
Sets mouse down handler.
If hit check function is set, this event is only called if hit check returns true. This variant accepts class member function.
References Layer::down.
void SetDown | ( | std::function< void()> | fn, |
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets mouse down handler.
If hit check function is set, this event is only called if hit check returns true.
References Layer::down.
void SetDown | ( | std::function< void(Geometry::Point)> | fn, |
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets mouse down handler.
If hit check function is set, this event is only called if hit check returns true.
References Layer::down.
void SetDown | ( | std::function< void(Geometry::Point, Input::Mouse::Button)> | fn | ) |
Sets mouse down handler.
If hit check function is set, this event is only called if hit check returns true.
References Layer::down.
void SetDown | ( | std::function< void(Input::Mouse::Button)> | fn | ) |
Sets mouse down handler.
If hit check function is set, this event is only called if hit check returns true.
References Layer::down.
void SetDown | ( | std::function< void(Layer &)> | fn, |
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets mouse down handler.
If hit check function is set, this event is only called if hit check returns true.
References Layer::down.
void SetDown | ( | std::function< void(Layer &, Geometry::Point)> | fn, |
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets mouse down handler.
If hit check function is set, this event is only called if hit check returns true.
References Layer::down.
void SetDown | ( | std::function< void(Layer &, Geometry::Point, Input::Mouse::Button)> | fn | ) |
Sets mouse down handler.
If hit check function is set, this event is only called if hit check returns true.
References Layer::down.
void SetDown | ( | std::function< void(Layer &, Input::Mouse::Button)> | fn | ) |
Sets mouse down handler.
If hit check function is set, this event is only called if hit check returns true.
References Layer::down.
void SetHitCheck | ( | C_ & | c, |
bool(C_::*)(Geometry::Point) | fn | ||
) |
Sets hit check function.
When set, events only occur if hit check returns true. Events follow hit check in a sequential manner, thus, if a handler is called, this means hit check has already succeeded in the current layout. This variant accepts class member function.
References Layer::hitcheck.
void SetHitCheck | ( | C_ & | c, |
bool(C_::*)(Layer &, Geometry::Point) | fn | ||
) |
Sets hit check function.
When set, events only occur if hit check returns true. Events follow hit check in a sequential manner, thus, if a handler is called, this means hit check has already succeeded in the current layout. This variant accepts class member function.
References Layer::hitcheck.
void SetHitCheck | ( | C_ * | my, |
bool(C_::*)(Geometry::Point) | fn | ||
) |
Sets hit check function.
When set, events only occur if hit check returns true. Events follow hit check in a sequential manner, thus, if a handler is called, this means hit check has already succeeded in the current layout. This variant accepts class member function.
References Layer::hitcheck.
void SetHitCheck | ( | C_ * | my, |
bool(C_::*)(Layer &, Geometry::Point) | fn | ||
) |
Sets hit check function.
When set, events only occur if hit check returns true. Events follow hit check in a sequential manner, thus, if a handler is called, this means hit check has already succeeded in the current layout. This variant accepts class member function.
References Layer::hitcheck.
void SetHitCheck | ( | std::function< bool(Geometry::Point)> | fn | ) |
Sets hit check function.
When set, events only occur if hit check returns true. Events follow hit check in a sequential manner, thus, if a handler is called, this means hit check has already succeeded in the current layout.
References Layer::hitcheck.
void SetHitCheck | ( | std::function< bool(Layer &, Geometry::Point)> | fn | ) |
Sets hit check function.
When set, events only occur if hit check returns true. Events follow hit check in a sequential manner, thus, if a handler is called, this means hit check has already succeeded in the current layout.
References Layer::hitcheck.
void SetHScroll | ( | C_ & | c, |
bool(C_::*)(float) | fn | ||
) |
Sets horizontal scroll handler.
Scrolling right will give negative number while scrolling left will give a positive number. 1 means one full scroll. If the device supports smooth scrolling, partial values can be obtained. Not all devices support horizontal scrolling.
References Layer::hscroll.
void SetHScroll | ( | C_ & | c, |
bool(C_::*)(Geometry::Point, float) | fn | ||
) |
Sets horizontal scroll handler.
Scrolling right will give negative number while scrolling left will give a positive number. 1 means one full scroll. If the device supports smooth scrolling, partial values can be obtained. Not all devices support horizontal scrolling.
References Layer::hscroll.
void SetHScroll | ( | C_ & | c, |
bool(C_::*)(Layer &, float) | fn | ||
) |
Sets horizontal scroll handler.
Scrolling right will give negative number while scrolling left will give a positive number. 1 means one full scroll. If the device supports smooth scrolling, partial values can be obtained. Not all devices support horizontal scrolling.
References Layer::hscroll.
void SetHScroll | ( | C_ & | c, |
bool(C_::*)(Layer &, Geometry::Point, float) | fn | ||
) |
Sets horizontal scroll handler.
Scrolling right will give negative number while scrolling left will give a positive number. 1 means one full scroll. If the device supports smooth scrolling, partial values can be obtained. Not all devices support horizontal scrolling.
References Layer::hscroll.
void SetHScroll | ( | C_ * | my, |
bool(C_::*)(float) | fn | ||
) |
Sets horizontal scroll handler.
Scrolling right will give negative number while scrolling left will give a positive number. 1 means one full scroll. If the device supports smooth scrolling, partial values can be obtained. Not all devices support horizontal scrolling.
References Layer::hscroll.
void SetHScroll | ( | C_ * | my, |
bool(C_::*)(Geometry::Point, float) | fn | ||
) |
Sets horizontal scroll handler.
Scrolling right will give negative number while scrolling left will give a positive number. 1 means one full scroll. If the device supports smooth scrolling, partial values can be obtained. Not all devices support horizontal scrolling.
References Layer::hscroll.
void SetHScroll | ( | C_ * | my, |
bool(C_::*)(Layer &, float) | fn | ||
) |
Sets horizontal scroll handler.
Scrolling right will give negative number while scrolling left will give a positive number. 1 means one full scroll. If the device supports smooth scrolling, partial values can be obtained. Not all devices support horizontal scrolling.
References Layer::hscroll.
void SetHScroll | ( | C_ * | my, |
bool(C_::*)(Layer &, Geometry::Point, float) | fn | ||
) |
Sets horizontal scroll handler.
Scrolling right will give negative number while scrolling left will give a positive number. 1 means one full scroll. If the device supports smooth scrolling, partial values can be obtained. Not all devices support horizontal scrolling.
References Layer::hscroll.
void SetHScroll | ( | std::function< bool(float)> | fn | ) |
Sets horizontal scroll handler.
Scrolling right will give negative number while scrolling left will give a positive number. 1 means one full scroll. If the device supports smooth scrolling, partial values can be obtained. Not all devices support horizontal scrolling.
References Layer::hscroll.
void SetHScroll | ( | std::function< bool(Geometry::Point, float)> | fn | ) |
Sets horizontal scroll handler.
Scrolling right will give negative number while scrolling left will give a positive number. 1 means one full scroll. If the device supports smooth scrolling, partial values can be obtained. Not all devices support horizontal scrolling.
References Layer::hscroll.
void SetHScroll | ( | std::function< bool(Layer &, float)> | fn | ) |
Sets horizontal scroll handler.
Scrolling right will give negative number while scrolling left will give a positive number. 1 means one full scroll. If the device supports smooth scrolling, partial values can be obtained. Not all devices support horizontal scrolling.
References Layer::hscroll.
void SetHScroll | ( | std::function< bool(Layer &, Geometry::Point, float)> | fn | ) |
Sets horizontal scroll handler.
Scrolling right will give negative number while scrolling left will give a positive number. 1 means one full scroll. If the device supports smooth scrolling, partial values can be obtained. Not all devices support horizontal scrolling.
References Layer::hscroll.
void SetMove | ( | C_ & | c, |
void(C_::*)(Geometry::Point) | fn | ||
) |
Sets mouse move handler.
This function will be called every frame when the mouse is over the layer, even if the mouse does not move.
References Layer::move.
void SetMove | ( | C_ & | c, |
void(C_::*)(Layer &, Geometry::Point) | fn | ||
) |
Sets mouse move handler.
This function will be called every frame when the mouse is over the layer, even if the mouse does not move.
References Layer::move.
void SetMove | ( | C_ * | my, |
void(C_::*)(Geometry::Point) | fn | ||
) |
Sets mouse move handler.
This function will be called every frame when the mouse is over the layer, even if the mouse does not move.
References Layer::move.
void SetMove | ( | C_ * | my, |
void(C_::*)(Layer &, Geometry::Point) | fn | ||
) |
Sets mouse move handler.
This function will be called every frame when the mouse is over the layer, even if the mouse does not move.
References Layer::move.
void SetMove | ( | std::function< void(Geometry::Point)> | fn | ) |
Sets mouse move handler.
This function will be called every frame when the mouse is over the layer, even if the mouse does not move.
References Layer::move.
void SetMove | ( | std::function< void(Layer &, Geometry::Point)> | fn | ) |
Sets mouse move handler.
This function will be called every frame when the mouse is over the layer, even if the mouse does not move.
References Layer::move.
void SetOut | ( | C_ & | c, |
std::function< void(C_ &)> | fn | ||
) |
Sets mouse out handler.
References Layer::out.
void SetOut | ( | C_ & | c, |
void(C_::*)(Layer &) | fn | ||
) |
Sets mouse out handler.
References Layer::out.
void SetOut | ( | C_ * | my, |
std::function< void(C_ &)> | fn | ||
) |
Sets mouse out handler.
References Layer::out.
void SetOut | ( | C_ * | my, |
void(C_::*)(Layer &) | fn | ||
) |
Sets mouse out handler.
References Layer::out.
void SetOut | ( | std::function< void()> | fn | ) |
Sets mouse out handler.
References Layer::out.
void SetOut | ( | std::function< void(Layer &)> | fn | ) |
Sets mouse out handler.
References Layer::out.
void SetOver | ( | C_ & | c, |
std::function< void(C_ &)> | fn | ||
) |
Sets mouse over handler.
Mouse over occurs for parent layers of a layer as well. However, If two siblings overlap, only one will receive it.
References Layer::over.
void SetOver | ( | C_ & | c, |
void(C_::*)(Layer &) | fn | ||
) |
Sets mouse over handler.
Mouse over occurs for parent layers of a layer as well. However, If two siblings overlap, only one will receive it.
References Layer::over.
void SetOver | ( | C_ * | my, |
std::function< void(C_ &)> | fn | ||
) |
Sets mouse over handler.
Mouse over occurs for parent layers of a layer as well. However, If two siblings overlap, only one will receive it.
References Layer::over.
void SetOver | ( | C_ * | my, |
void(C_::*)(Layer &) | fn | ||
) |
Sets mouse over handler.
Mouse over occurs for parent layers of a layer as well. However, If two siblings overlap, only one will receive it.
References Layer::over.
void SetOver | ( | std::function< void()> | fn | ) |
Sets mouse over handler.
Mouse over occurs for parent layers of a layer as well. However, If two siblings overlap, only one will receive it.
References Layer::over.
void SetOver | ( | std::function< void(Layer &)> | fn | ) |
Sets mouse over handler.
Mouse over occurs for parent layers of a layer as well. However, If two siblings overlap, only one will receive it.
References Layer::over.
void SetRotate | ( | C_ & | c, |
bool(C_::*)(float) | fn | ||
) |
Sets rotate handler.
Rotate amount is given in radians. Positive values should rotate counter clockwise. Not all devices support rotation gesture.
References Layer::rotate.
void SetRotate | ( | C_ & | c, |
bool(C_::*)(Geometry::Point, float) | fn | ||
) |
Sets rotate handler.
Rotate amount is given in radians. Positive values should rotate counter clockwise. Not all devices support rotation gesture.
References Layer::rotate.
void SetRotate | ( | C_ & | c, |
bool(C_::*)(Layer &, float) | fn | ||
) |
Sets rotate handler.
Rotate amount is given in radians. Positive values should rotate counter clockwise. Not all devices support rotation gesture.
References Layer::rotate.
void SetRotate | ( | C_ & | c, |
bool(C_::*)(Layer &, Geometry::Point, float) | fn | ||
) |
Sets rotate handler.
Rotate amount is given in radians. Positive values should rotate counter clockwise. Not all devices support rotation gesture.
References Layer::rotate.
void SetRotate | ( | C_ * | my, |
bool(C_::*)(float) | fn | ||
) |
Sets rotate handler.
Rotate amount is given in radians. Positive values should rotate counter clockwise. Not all devices support rotation gesture.
References Layer::rotate.
void SetRotate | ( | C_ * | my, |
bool(C_::*)(Geometry::Point, float) | fn | ||
) |
Sets rotate handler.
Rotate amount is given in radians. Positive values should rotate counter clockwise. Not all devices support rotation gesture.
References Layer::rotate.
void SetRotate | ( | C_ * | my, |
bool(C_::*)(Layer &, float) | fn | ||
) |
Sets rotate handler.
Rotate amount is given in radians. Positive values should rotate counter clockwise. Not all devices support rotation gesture.
References Layer::rotate.
void SetRotate | ( | C_ * | my, |
bool(C_::*)(Layer &, Geometry::Point, float) | fn | ||
) |
Sets rotate handler.
Rotate amount is given in radians. Positive values should rotate counter clockwise. Not all devices support rotation gesture.
References Layer::rotate.
void SetRotate | ( | std::function< bool(float)> | fn | ) |
Sets rotate handler.
Rotate amount is given in radians. Positive values should rotate counter clockwise. Not all devices support rotation gesture.
References Layer::rotate.
void SetRotate | ( | std::function< bool(Geometry::Point, float)> | fn | ) |
Sets rotate handler.
Rotate amount is given in radians. Positive values should rotate counter clockwise. Not all devices support rotation gesture.
References Layer::rotate.
void SetRotate | ( | std::function< bool(Layer &, float)> | fn | ) |
Sets rotate handler.
Rotate amount is given in radians. Positive values should rotate counter clockwise. Not all devices support rotation gesture.
References Layer::rotate.
void SetRotate | ( | std::function< bool(Layer &, Geometry::Point, float)> | fn | ) |
Sets rotate handler.
Rotate amount is given in radians. Positive values should rotate counter clockwise. Not all devices support rotation gesture.
References Layer::rotate.
void SetScroll | ( | C_ & | c, |
bool(C_::*)(float) | fn | ||
) |
Sets scroll handler.
Scrolling down will give negative number while scrolling up will give a positive number. 1 means one full scroll. If the device supports smooth scrolling, partial values can be obtained.
References Layer::vscroll.
void SetScroll | ( | C_ & | c, |
bool(C_::*)(Geometry::Point, float) | fn | ||
) |
Sets scroll handler.
Scrolling down will give negative number while scrolling up will give a positive number. 1 means one full scroll. If the device supports smooth scrolling, partial values can be obtained.
References Layer::vscroll.
void SetScroll | ( | C_ & | c, |
bool(C_::*)(Layer &, float) | fn | ||
) |
Sets scroll handler.
Scrolling down will give negative number while scrolling up will give a positive number. 1 means one full scroll. If the device supports smooth scrolling, partial values can be obtained.
References Layer::vscroll.
void SetScroll | ( | C_ & | c, |
bool(C_::*)(Layer &, Geometry::Point, float) | fn | ||
) |
Sets scroll handler.
Scrolling down will give negative number while scrolling up will give a positive number. 1 means one full scroll. If the device supports smooth scrolling, partial values can be obtained.
References Layer::vscroll.
void SetScroll | ( | C_ * | my, |
bool(C_::*)(float) | fn | ||
) |
Sets scroll handler.
Scrolling down will give negative number while scrolling up will give a positive number. 1 means one full scroll. If the device supports smooth scrolling, partial values can be obtained.
References Layer::vscroll.
void SetScroll | ( | C_ * | my, |
bool(C_::*)(Geometry::Point, float) | fn | ||
) |
Sets scroll handler.
Scrolling down will give negative number while scrolling up will give a positive number. 1 means one full scroll. If the device supports smooth scrolling, partial values can be obtained.
References Layer::vscroll.
void SetScroll | ( | C_ * | my, |
bool(C_::*)(Layer &, float) | fn | ||
) |
Sets scroll handler.
Scrolling down will give negative number while scrolling up will give a positive number. 1 means one full scroll. If the device supports smooth scrolling, partial values can be obtained.
References Layer::vscroll.
void SetScroll | ( | C_ * | my, |
bool(C_::*)(Layer &, Geometry::Point, float) | fn | ||
) |
Sets scroll handler.
Scrolling down will give negative number while scrolling up will give a positive number. 1 means one full scroll. If the device supports smooth scrolling, partial values can be obtained.
References Layer::vscroll.
void SetScroll | ( | std::function< bool(float)> | fn | ) |
Sets scroll handler.
Scrolling down will give negative number while scrolling up will give a positive number. 1 means one full scroll. If the device supports smooth scrolling, partial values can be obtained.
References Layer::vscroll.
void SetScroll | ( | std::function< bool(Geometry::Point, float)> | fn | ) |
Sets scroll handler.
Scrolling down will give negative number while scrolling up will give a positive number. 1 means one full scroll. If the device supports smooth scrolling, partial values can be obtained.
References Layer::vscroll.
void SetScroll | ( | std::function< bool(Layer &, float)> | fn | ) |
Sets scroll handler.
Scrolling down will give negative number while scrolling up will give a positive number. 1 means one full scroll. If the device supports smooth scrolling, partial values can be obtained.
References Layer::vscroll.
void SetScroll | ( | std::function< bool(Layer &, Geometry::Point, float)> | fn | ) |
Sets scroll handler.
Scrolling down will give negative number while scrolling up will give a positive number. 1 means one full scroll. If the device supports smooth scrolling, partial values can be obtained.
References Layer::vscroll.
void SetUp | ( | C_ & | c, |
std::function< void(C_ &)> | fn, | ||
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets mouse up handler.
If hit check function is set, this event is only called if hit check returns true and mouse down is also handled. This variant accepts class member function.
References Layer::up.
void SetUp | ( | C_ & | c, |
void(C_::*)(Geometry::Point) | fn, | ||
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets mouse up handler.
If hit check function is set, this event is only called if hit check returns true and mouse down is also handled. This variant accepts class member function.
References Layer::up.
void SetUp | ( | C_ & | c, |
void(C_::*)(Geometry::Point, Input::Mouse::Button) | fn | ||
) |
Sets mouse up handler.
If hit check function is set, this event is only called if hit check returns true and mouse down is also handled. This variant accepts class member function.
References Layer::up.
void SetUp | ( | C_ & | c, |
void(C_::*)(Input::Mouse::Button) | fn | ||
) |
Sets mouse up handler.
If hit check function is set, this event is only called if hit check returns true and mouse down is also handled. This variant accepts class member function.
References Layer::up.
void SetUp | ( | C_ & | c, |
void(C_::*)(Layer &) | fn, | ||
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets mouse up handler.
If hit check function is set, this event is only called if hit check returns true and mouse down is also handled. This variant accepts class member function.
References Layer::up.
void SetUp | ( | C_ & | c, |
void(C_::*)(Layer &, Geometry::Point) | fn, | ||
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets mouse up handler.
If hit check function is set, this event is only called if hit check returns true and mouse down is also handled. This variant accepts class member function.
References Layer::up.
void SetUp | ( | C_ & | c, |
void(C_::*)(Layer &, Geometry::Point, Input::Mouse::Button) | fn | ||
) |
Sets mouse up handler.
If hit check function is set, this event is only called if hit check returns true and mouse down is also handled. This variant accepts class member function.
References Layer::up.
void SetUp | ( | C_ & | c, |
void(C_::*)(Layer &, Input::Mouse::Button) | fn | ||
) |
Sets mouse up handler.
If hit check function is set, this event is only called if hit check returns true and mouse down is also handled. This variant accepts class member function.
References Layer::up.
void SetUp | ( | C_ * | my, |
std::function< void(C_ &)> | fn, | ||
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets mouse up handler.
If hit check function is set, this event is only called if hit check returns true and mouse down is also handled. This variant accepts class member function.
References Layer::up.
void SetUp | ( | C_ * | my, |
void(C_::*)(Geometry::Point) | fn, | ||
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets mouse up handler.
If hit check function is set, this event is only called if hit check returns true and mouse down is also handled. This variant accepts class member function.
References Layer::up.
void SetUp | ( | C_ * | my, |
void(C_::*)(Geometry::Point, Input::Mouse::Button) | fn | ||
) |
Sets mouse up handler.
If hit check function is set, this event is only called if hit check returns true and mouse down is also handled. This variant accepts class member function.
References Layer::up.
void SetUp | ( | C_ * | my, |
void(C_::*)(Input::Mouse::Button) | fn | ||
) |
Sets mouse up handler.
If hit check function is set, this event is only called if hit check returns true and mouse down is also handled. This variant accepts class member function.
References Layer::up.
void SetUp | ( | C_ * | my, |
void(C_::*)(Layer &) | fn, | ||
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets mouse up handler.
If hit check function is set, this event is only called if hit check returns true and mouse down is also handled. This variant accepts class member function.
References Layer::up.
void SetUp | ( | C_ * | my, |
void(C_::*)(Layer &, Geometry::Point) | fn, | ||
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets mouse up handler.
If hit check function is set, this event is only called if hit check returns true and mouse down is also handled. This variant accepts class member function.
References Layer::up.
void SetUp | ( | C_ * | my, |
void(C_::*)(Layer &, Geometry::Point, Input::Mouse::Button) | fn | ||
) |
Sets mouse up handler.
If hit check function is set, this event is only called if hit check returns true and mouse down is also handled. This variant accepts class member function.
References Layer::up.
void SetUp | ( | C_ * | my, |
void(C_::*)(Layer &, Input::Mouse::Button) | fn | ||
) |
Sets mouse up handler.
If hit check function is set, this event is only called if hit check returns true and mouse down is also handled. This variant accepts class member function.
References Layer::up.
void SetUp | ( | std::function< void()> | fn, |
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets mouse up handler.
If hit check function is set, this event is only called if hit check returns true and mouse down is also handled.
References Layer::up.
void SetUp | ( | std::function< void(Geometry::Point)> | fn, |
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets mouse up handler.
If hit check function is set, this event is only called if hit check returns true and mouse down is also handled.
References Layer::up.
void SetUp | ( | std::function< void(Geometry::Point, Input::Mouse::Button)> | fn | ) |
Sets mouse up handler.
If hit check function is set, this event is only called if hit check returns true and mouse down is also handled.
References Layer::up.
void SetUp | ( | std::function< void(Input::Mouse::Button)> | fn | ) |
Sets mouse up handler.
If hit check function is set, this event is only called if hit check returns true and mouse down is also handled.
References Layer::up.
void SetUp | ( | std::function< void(Layer &)> | fn, |
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets mouse up handler.
If hit check function is set, this event is only called if hit check returns true and mouse down is also handled.
References Layer::up.
void SetUp | ( | std::function< void(Layer &, Geometry::Point)> | fn, |
Input::Mouse::Button | btn = Input::Mouse::Button::Left |
||
) |
Sets mouse up handler.
If hit check function is set, this event is only called if hit check returns true and mouse down is also handled.
References Layer::up.
void SetUp | ( | std::function< void(Layer &, Geometry::Point, Input::Mouse::Button)> | fn | ) |
Sets mouse up handler.
If hit check function is set, this event is only called if hit check returns true and mouse down is also handled.
References Layer::up.
void SetUp | ( | std::function< void(Layer &, Input::Mouse::Button)> | fn | ) |
Sets mouse up handler.
If hit check function is set, this event is only called if hit check returns true and mouse down is also handled.
References Layer::up.
void SetZoom | ( | C_ & | c, |
bool(C_::*)(float) | fn | ||
) |
Sets zoom handler.
Zoom amount is calculated as a ratio. 2 means, 2x zoom should be performed. Not all devices support zoom gesture.
References Layer::zoom.
void SetZoom | ( | C_ & | c, |
bool(C_::*)(Geometry::Point, float) | fn | ||
) |
Sets zoom handler.
Zoom amount is calculated as a ratio. 2 means, 2x zoom should be performed. Not all devices support zoom gesture.
References Layer::zoom.
void SetZoom | ( | C_ & | c, |
bool(C_::*)(Layer &, float) | fn | ||
) |
Sets zoom handler.
Zoom amount is calculated as a ratio. 2 means, 2x zoom should be performed. Not all devices support zoom gesture.
References Layer::zoom.
void SetZoom | ( | C_ & | c, |
bool(C_::*)(Layer &, Geometry::Point, float) | fn | ||
) |
Sets zoom handler.
Zoom amount is calculated as a ratio. 2 means, 2x zoom should be performed. Not all devices support zoom gesture.
References Layer::zoom.
void SetZoom | ( | C_ * | my, |
bool(C_::*)(float) | fn | ||
) |
Sets zoom handler.
Zoom amount is calculated as a ratio. 2 means, 2x zoom should be performed. Not all devices support zoom gesture.
References Layer::zoom.
void SetZoom | ( | C_ * | my, |
bool(C_::*)(Geometry::Point, float) | fn | ||
) |
Sets zoom handler.
Zoom amount is calculated as a ratio. 2 means, 2x zoom should be performed. Not all devices support zoom gesture.
References Layer::zoom.
void SetZoom | ( | C_ * | my, |
bool(C_::*)(Layer &, float) | fn | ||
) |
Sets zoom handler.
Zoom amount is calculated as a ratio. 2 means, 2x zoom should be performed. Not all devices support zoom gesture.
References Layer::zoom.
void SetZoom | ( | C_ * | my, |
bool(C_::*)(Layer &, Geometry::Point, float) | fn | ||
) |
Sets zoom handler.
Zoom amount is calculated as a ratio. 2 means, 2x zoom should be performed. Not all devices support zoom gesture.
References Layer::zoom.
void SetZoom | ( | std::function< bool(float)> | fn | ) |
Sets zoom handler.
Zoom amount is calculated as a ratio. 2 means, 2x zoom should be performed. Not all devices support zoom gesture.
References Layer::zoom.
void SetZoom | ( | std::function< bool(Geometry::Point, float)> | fn | ) |
Sets zoom handler.
Zoom amount is calculated as a ratio. 2 means, 2x zoom should be performed. Not all devices support zoom gesture.
References Layer::zoom.
void SetZoom | ( | std::function< bool(Layer &, float)> | fn | ) |
Sets zoom handler.
Zoom amount is calculated as a ratio. 2 means, 2x zoom should be performed. Not all devices support zoom gesture.
References Layer::zoom.
void SetZoom | ( | std::function< bool(Layer &, Geometry::Point, float)> | fn | ) |
Sets zoom handler.
Zoom amount is calculated as a ratio. 2 means, 2x zoom should be performed. Not all devices support zoom gesture.
References Layer::zoom.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |