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
}
48 \latexignore{\rtfignore{\wxheading{Members
}}}
51 \membersection{wxGridUpdateLocker::wxGridUpdateLocker
}\label{wxgridupdatelockerctor
}
53 \func{}{wxGridUpdateLocker
}{\param{wxGrid *
}{grid =
\NULL}}
55 Creates an object preventing the updates of the specified
\arg{grid
}. The
56 parameter could be
\NULL in which case nothing is done. If
\arg{grid
} is
57 non-
\NULL then the grid must exist for longer than wxGridUpdateLocker object
60 The default constructor could be followed by a call to
61 \helpref{wxGridUpdateLocker::Create
}{wxgridupdatelockercreate
} to set the
66 \membersection{wxGridUpdateLocker::
\destruct{wxGridUpdateLocker
}}\label{wxgridupdatelockerdtor
}
68 \func{}{\destruct{wxGridUpdateLocker
}}{\void}
70 Destructor reenables updates for the grid this object is associated with.
74 \membersection{wxGridUpdateLocker::Create
}\label{wxgridupdatelockercreate
}
76 \func{void
}{Create
}{\param{wxGrid*
}{grid
}}
78 This method can be called if the object had been constructed using the default
79 constructor. It must not be called more than once.