]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/gupdlock.tex
added wxDEPRECATED_INLINE, use it for wxPixelData<wxBitmap>::UseAlpha() to fix Sun...
[wxWidgets.git] / docs / latex / wx / gupdlock.tex
CommitLineData
b62f94ff
VZ
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2%% Name: gupdlock.tex
3%% Purpose: wxGridUpdateLocker documentation
4%% Author: Evgeniy Tarassov
5%% Created: 2007-03-15
6%% RCS-ID: $Id$
7%% Copyright: (c) 2007 TT-Solutions SARL
8%% License: wxWindows license
9%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10
11\section{\class{wxGridUpdateLocker}}\label{wxgridupdatelocker}
12
13This small class can be used to prevent \helpref{wxGrid}{wxgrid} from redrawing
14during its lifetime by calling \helpref{wxGrid::BeginBatch}{wxgridbeginbatch}
15in its constructor and \helpref{wxGrid::EndBatch}{wxgridendbatch} in its
16destructor. It is typically used in a function performing several operations
17with a grid which would otherwise result in flicker. For example:
18
19{\small
20\begin{verbatim}
21 void MyFrame::Foo()
22 {
23 m_grid = new wxGrid(this, ...);
24
25 wxGridUpdateLocker noUpdates(m_grid);
26 m_grid->AppendColumn();
27 ... many other operations with m_grid...
28 m_grid->AppendRow();
29
30 // destructor called, grid refreshed
31 }
32\end{verbatim}
33}
34
35Using this class is easier and safer than calling
36\helpref{BeginBatch}{wxgridbeginbatch} and \helpref{EndBatch}{wxgridendbatch}
37because you don't risk not to call the latter (due to an exception for example).
38
39\wxheading{Derived from}
40
41None.
42
43\wxheading{Include files}
44
45<wx/grid.h>
46
a7af285d
VZ
47\wxheading{Library}
48
49\helpref{wxAdv}{librarieslist}
50
b62f94ff
VZ
51
52\latexignore{\rtfignore{\wxheading{Members}}}
53
54
55\membersection{wxGridUpdateLocker::wxGridUpdateLocker}\label{wxgridupdatelockerctor}
56
57\func{}{wxGridUpdateLocker}{\param{wxGrid *}{grid = \NULL}}
58
59Creates an object preventing the updates of the specified \arg{grid}. The
60parameter could be \NULL in which case nothing is done. If \arg{grid} is
61non-\NULL then the grid must exist for longer than wxGridUpdateLocker object
62itself.
63
64The default constructor could be followed by a call to
65\helpref{wxGridUpdateLocker::Create}{wxgridupdatelockercreate} to set the
66grid object later.
67
68
69
70\membersection{wxGridUpdateLocker::\destruct{wxGridUpdateLocker}}\label{wxgridupdatelockerdtor}
71
72\func{}{\destruct{wxGridUpdateLocker}}{\void}
73
74Destructor reenables updates for the grid this object is associated with.
75
76
77
78\membersection{wxGridUpdateLocker::Create}\label{wxgridupdatelockercreate}
79
80\func{void}{Create}{\param{wxGrid* }{grid}}
81
82This method can be called if the object had been constructed using the default
83constructor. It must not be called more than once.
84
85