📄 delgrend.tex
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Name: delgrend.tex%% Purpose: wxDelegateRendererNative documentation%% Author: Vadim Zeitlin%% Modified by:%% Created: 11.08.03%% RCS-ID: $Id: delgrend.tex,v 1.4 2005/02/22 15:09:48 ABX Exp $%% Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwindows.org>%% License: wxWindows license%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\section{\class{wxDelegateRendererNative}}\label{wxdelegaterenderernative}wxDelegateRendererNative allows reuse of renderers code by forwarding all the \helpref{wxRendererNative}{wxrenderernative} methods to the given object andthus allowing you to only modify some of its methods -- without having toreimplement all of them.Note that the ``normal'', inheritance-based approach, doesn't work with therenderers as it is impossible to derive from a class unknown at compile-timeand the renderer is only chosen at run-time. So suppose that you want to onlyadd something to the drawing of the tree control buttons but leave all theother methods unchanged -- the only way to do it, considering that the rendererclass which you want to customize might not even be written yet when you writeyour code (it could be written later and loaded from a DLL during run-time), isby using this class.Except for the constructor, it has exactly the same methods as \helpref{wxRendererNative}{wxrenderernative} and their implementation istrivial: they are simply forwarded to the real renderer. Note that the ``real''renderer may, in turn, be a wxDelegateRendererNative as well and that there maybe arbitrarily many levels like this -- but at the end of the chain there mustbe a real renderer which does the drawing.\wxheading{Derived from}\helpref{wxRendererNative}{wxrenderernative}\wxheading{Include files}<wx/renderer.h>\latexignore{\rtfignore{\wxheading{Members}}}\membersection{wxDelegateRendererNative::wxDelegateRendererNative}\label{wxdelegaterenderernativector}\func{}{wxDelegateRendererNative}{\void}\func{}{wxDelegateRendererNative}{\param{wxRendererNative\& }{rendererNative}}The default constructor does the same thing as the other one except that ituses the \helpref{generic renderer}{wxrenderernativegetgeneric} instead of theuser-specified \arg{rendererNative}.In any case, this sets up the delegate renderer object to follow all calls tothe specified real renderer.Note that this object does \emph{not} take ownership of (i.e. won't delete)\arg{rendererNative}.\membersection{wxDelegateRendererNative::DrawXXX}\label{wxdelegaterenderernativedrawxxx}\func{}{DrawXXX}{\param{}{$\ldots$}}This class also provides all the virtual methods of \helpref{wxRendererNative}{wxrenderernative}, please refer to that classdocumentation for the details.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -