|
Scroom
0.14
|
#include <view.hh>

Public Types | |
| using | value_type = T |
| using | Me = Freezable< T > |
Public Member Functions | |
| Freezable ()=default | |
| Freezable (value_type v) | |
| const value_type & | get () const |
| bool | set (value_type v) |
| void | lock () |
| void | unlock () |
| bool | is_locked () const |
| operator const value_type & () const | |
| Me & | operator= (value_type v) |
| const value_type * | operator* () const |
| const value_type * | operator-> () const |
| Me & | operator+= (value_type v) |
| Me & | operator-= (value_type v) |
Private Attributes | |
| value_type | value |
| unsigned | locked {0} |
Protect a value from being assigned.
When the presentation position changes, scroll-bars and textboxes need updating, which in turn generate their own value-changed events, sometimes with different values. It is a mess.
By locking the current position, we keep those events from changing (and thereby corrupting) the updated value.
| using Freezable< T >::value_type = T |
|
inlineexplicit |
|
inline |
Referenced by View::on_scrollbar_value_changed(), and View::updateXY().

|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Referenced by Freezable< Scroom::Utils::Point< double > >::operator+=(), and Freezable< Scroom::Utils::Point< double > >::operator-=().

|
inline |
Referenced by Freezable< Scroom::Utils::Point< double > >::operator=().

|
inline |
|
private |
|
private |
Referenced by Freezable< Scroom::Utils::Point< double > >::get(), Freezable< Scroom::Utils::Point< double > >::operator const value_type &(), Freezable< Scroom::Utils::Point< double > >::operator*(), Freezable< Scroom::Utils::Point< double > >::operator+=(), Freezable< Scroom::Utils::Point< double > >::operator-=(), Freezable< Scroom::Utils::Point< double > >::operator->(), and Freezable< Scroom::Utils::Point< double > >::set().