added very preliminary wxRenderer documentation

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-08-06 12:59:59 +00:00
parent c59e508935
commit 3e6c2880bf
4 changed files with 50 additions and 1 deletions

View File

@@ -196,6 +196,7 @@ These classes are related to drawing on device contexts and windows.
\twocolitem{\helpref{wxPenList}{wxpenlist}}{The list of previously-created pens}
\twocolitem{\helpref{wxPalette}{wxpalette}}{Represents a table of indices into RGB values}
\twocolitem{\helpref{wxRegion}{wxregion}}{Represents a simple or complex region on a window or device context}
\twocolitem{\helpref{wxRenderer}{wxrenderer}}{Abstracts high-level drawing primitives}
\end{twocollist}
{\large {\bf Events}}

View File

@@ -238,6 +238,7 @@
\input rect.tex
\input regex.tex
\input region.tex
\input renderer.tex
\input sashevt.tex
\input sashlayw.tex
\input sashwin.tex

View File

@@ -0,0 +1,39 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name: renderer.tex
%% Purpose: wxRenderer and wxRendererNative documentation
%% Author: Vadim Zeitlin
%% Modified by:
%% Created: 06.08.03
%% RCS-ID: $Id$
%% Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwindows.org>
%% License: wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\class{wxRenderer}}\label{wxrenderer}
First, a brief introduction into what is wxRenderer and why is it needed.
Usually wxWindows uses the underlying low level GUI system to draw all the
controls -- this is what we mean when we say that it is a ``native'' framework.
However not all controls exist under all (or even any) platforms and in this
case wxWindows provides a default, generic, implementation of them written in
wxWindows itself.
These controls however don't have the native appearance if only the standard
line drawing and other graphics primitives are used if only because the native
appearance is different under different platforms while the lines are always
drawn in the same way.
This is why we have renderers: wxRenderer is a class which virtualizes the
drawing, i.e. it abstracts the drawing operations and allows you to draw a,
say, button, without caring about how exactly this is done. Of course, as we
can draw the button differently in different renderers, this also allows us to
emulate the native look and feel.
So the renderers work by exposing a big set of high-level drawing functions
which are used by the generic controls. There is always a default global
renderer but it may be changed or extended by the user, see
\helpref{Render sample}{samplerender}.

View File

@@ -307,7 +307,15 @@ supported by the control (list, icons, small icons, report) may be chosen from
the menu.
The sample also provides some timings for adding/deleting/sorting a lot of
(several thousands) controls into the control.
(several thousands) items into the control.
\subsection{Render sample}\label{samplerender}
This sample shows how to replace the default wxWindows
\helpref{renderer}{wxrenderernative} and also how to write a shared library
(DLL) implementing a renderer and load and unload it during the run-time.
\subsection{Rotate sample}\label{samplerotate}