1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %% Purpose: wxGridUpdateLocker documentation
4 %% Author: Evgeniy Tarassov
7 %% Copyright: (c) 2007 TT-Solutions SARL
8 %% License: wxWindows license
9 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11 \section{\class{wxGridUpdateLocker
}}\label{wxgridupdatelocker
}
13 This small class can be used to prevent
\helpref{wxGrid
}{wxgrid
} from redrawing
14 during its lifetime by calling
\helpref{wxGrid::BeginBatch
}{wxgridbeginbatch
}
15 in its constructor and
\helpref{wxGrid::EndBatch
}{wxgridendbatch
} in its
16 destructor. It is typically used in a function performing several operations
17 with a grid which would otherwise result in flicker. For example:
23 m_grid = new wxGrid(this, ...);
25 wxGridUpdateLocker noUpdates(m_grid);
26 m_grid->AppendColumn();
27 ... many other operations with m_grid...
30 // destructor called, grid refreshed
35 Using this class is easier and safer than calling
36 \helpref{BeginBatch
}{wxgridbeginbatch
} and
\helpref{EndBatch
}{wxgridendbatch
}
37 because you don't risk not to call the latter (due to an exception for example).
39 \wxheading{Derived from
}
43 \wxheading{Include files
}
49 \helpref{wxAdv
}{librarieslist
}
52 \latexignore{\rtfignore{\wxheading{Members
}}}
55 \membersection{wxGridUpdateLocker::wxGridUpdateLocker
}\label{wxgridupdatelockerctor
}
57 \func{}{wxGridUpdateLocker
}{\param{wxGrid *
}{grid =
\NULL}}
59 Creates an object preventing the updates of the specified
\arg{grid
}. The
60 parameter could be
\NULL in which case nothing is done. If
\arg{grid
} is
61 non-
\NULL then the grid must exist for longer than wxGridUpdateLocker object
64 The default constructor could be followed by a call to
65 \helpref{wxGridUpdateLocker::Create
}{wxgridupdatelockercreate
} to set the
70 \membersection{wxGridUpdateLocker::
\destruct{wxGridUpdateLocker
}}\label{wxgridupdatelockerdtor
}
72 \func{}{\destruct{wxGridUpdateLocker
}}{\void}
74 Destructor reenables updates for the grid this object is associated with.
78 \membersection{wxGridUpdateLocker::Create
}\label{wxgridupdatelockercreate
}
80 \func{void
}{Create
}{\param{wxGrid*
}{grid
}}
82 This method can be called if the object had been constructed using the default
83 constructor. It must not be called more than once.