LumaScroller.hpp
Go to the documentation of this file.
1 #pragma once
2 
4 
5 namespace iv
6 {
7 
15 class LumaScroller : public ProtectedSlot, protected PrivValAttr_Owner
16 {
17 public:
20 
22 
23 // initialization parameters
25 
26 // utility methods
27  template< class T, class ... CArgs >
28  T * createChild( CArgs const & ... cargs );
29 
30 protected:
31  // ProtectedSlot
32  virtual void first_pass_impl( ElementRenderer * ) override;
33 
34  // PrivValAttr_Owner
35  virtual void PrivValAttr_Modified( Attribute * ) override;
36 
37 private:
38  Heap heap;
39  AnimHeap aheap;
40  Scroller * scroller;
41 };
42 
45 template< class T, class ... CArgs >
46 T * LumaScroller::createChild( CArgs const & ... cargs )
47 {
48  static_assert( std::is_base_of< SlotChild, T >::value, "Child must inherit SlotChild." );
49  auto t = this->heap.createClient< T >( cargs ... );
50  this->child.Modify( &this->cm, t );
51  return t;
52 }
53 
54 }