ARB
Public Member Functions | List of all members
ScrollSynchronizer Class Reference

#include <ScrollSynchronizer.h>

Public Member Functions

 ScrollSynchronizer ()
 
GB_ERROR define_dependency (int slave_idx, int master_idx, bool auto_sync)
 
void announce_update (int canvas_idx)
 
GB_ERROR update_explicit (int slave_idx)
 
void update_implicit (int slave_idx)
 
void auto_update ()
 

Detailed Description

Definition at line 247 of file ScrollSynchronizer.h.

Constructor & Destructor Documentation

ScrollSynchronizer::ScrollSynchronizer ( )
inline

Definition at line 271 of file ScrollSynchronizer.h.

References CanvasRef::define_canvas_index(), and MAX_NT_WINDOWS.

Member Function Documentation

GB_ERROR ScrollSynchronizer::define_dependency ( int  slave_idx,
int  master_idx,
bool  auto_sync 
)
inline

defines master/slave dependency between TREE_canvas'es

Parameters
slave_idxindex of slave canvas [0..MAX_NT_WINDOWS-1]
master_idxindex of master canvas (or NO_SCROLL_SYNC)
auto_synctrue -> automatically synchronize scrolling
Returns
error (only if auto_sync is impossible because of sync-loop => auto_sync is ignored!)

Definition at line 278 of file ScrollSynchronizer.h.

References error(), NO_SCROLL_SYNC, nt_assert, NULp, and valid_canvas_index().

Referenced by sync_changed_cb().

void ScrollSynchronizer::announce_update ( int  canvas_idx)
inline

Definition at line 304 of file ScrollSynchronizer.h.

References MasterCanvas::announce_update(), nt_assert, and valid_canvas_index().

Referenced by canvas_updated_cb().

GB_ERROR ScrollSynchronizer::update_explicit ( int  slave_idx)
inline

perform an unconditional update (ie. refresh of slave is forced even if internal data was up-to-date)

Parameters
slave_idxindex of canvas to update
Returns
error (eg. if no master defined)

Definition at line 316 of file ScrollSynchronizer.h.

References error(), fputs(), NULp, SlaveCanvas::refresh_if_needed(), SlaveCanvas::request_Refresh(), and valid_canvas_index().

Referenced by explicit_scroll_sync_cb().

void ScrollSynchronizer::update_implicit ( int  slave_idx)
inline

perform an implicit update

Parameters
slave_idxindex of canvas to update
Returns
error (eg. if no master defined)

Definition at line 343 of file ScrollSynchronizer.h.

References fputs(), SlaveCanvas::refresh_if_needed(), SlaveCanvas::request_SetUpdate(), and valid_canvas_index().

Referenced by sync_changed_cb().

void ScrollSynchronizer::auto_update ( )
inline

update all auto-synchronized canvases

Definition at line 364 of file ScrollSynchronizer.h.

References fputs(), MAX_NT_WINDOWS, SlaveCanvas::refresh_if_needed(), and valid_canvas_index().

Referenced by auto_refresh_cb().


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