From 3e6c2880bf92390006a09d4324d3ecae81f02b7b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 6 Aug 2003 12:59:59 +0000 Subject: [PATCH] added very preliminary wxRenderer documentation git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/category.tex | 1 + docs/latex/wx/classes.tex | 1 + docs/latex/wx/renderer.tex | 39 ++++++++++++++++++++++++++++++++++++++ docs/latex/wx/tsamples.tex | 10 +++++++++- 4 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 docs/latex/wx/renderer.tex diff --git a/docs/latex/wx/category.tex b/docs/latex/wx/category.tex index d12b557da0..c156003ab2 100644 --- a/docs/latex/wx/category.tex +++ b/docs/latex/wx/category.tex @@ -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}} diff --git a/docs/latex/wx/classes.tex b/docs/latex/wx/classes.tex index b9e667663c..7d90341fe7 100644 --- a/docs/latex/wx/classes.tex +++ b/docs/latex/wx/classes.tex @@ -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 diff --git a/docs/latex/wx/renderer.tex b/docs/latex/wx/renderer.tex new file mode 100644 index 0000000000..3e6d8fb5ac --- /dev/null +++ b/docs/latex/wx/renderer.tex @@ -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 +%% 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}. + + diff --git a/docs/latex/wx/tsamples.tex b/docs/latex/wx/tsamples.tex index 588932885d..cd5ebdc3e6 100644 --- a/docs/latex/wx/tsamples.tex +++ b/docs/latex/wx/tsamples.tex @@ -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} -- 2.45.2