adjusted indentation with astyle; added Id keyword
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -9,17 +9,17 @@
|
||||
/**
|
||||
@class wxSplitterRenderParams
|
||||
@wxheader{renderer.h}
|
||||
|
||||
This is just a simple @c struct used as a return value of
|
||||
|
||||
This is just a simple @c struct used as a return value of
|
||||
wxRendererNative::GetSplitterParams.
|
||||
|
||||
|
||||
It doesn't have any methods and all of its fields are constant and so can be
|
||||
only examined but not modified.
|
||||
|
||||
|
||||
@library{wxbase}
|
||||
@category{FIXME}
|
||||
*/
|
||||
class wxSplitterRenderParams
|
||||
class wxSplitterRenderParams
|
||||
{
|
||||
public:
|
||||
/**
|
||||
@@ -48,12 +48,12 @@ public:
|
||||
/**
|
||||
@class wxDelegateRendererNative
|
||||
@wxheader{renderer.h}
|
||||
|
||||
wxDelegateRendererNative allows reuse of renderers code by forwarding all the
|
||||
|
||||
wxDelegateRendererNative allows reuse of renderers code by forwarding all the
|
||||
wxRendererNative methods to the given object and
|
||||
thus allowing you to only modify some of its methods -- without having to
|
||||
reimplement all of them.
|
||||
|
||||
|
||||
Note that the "normal'', inheritance-based approach, doesn't work with the
|
||||
renderers as it is impossible to derive from a class unknown at compile-time
|
||||
and the renderer is only chosen at run-time. So suppose that you want to only
|
||||
@@ -62,14 +62,14 @@ public:
|
||||
class which you want to customize might not even be written yet when you write
|
||||
your code (it could be written later and loaded from a DLL during run-time), is
|
||||
by using this class.
|
||||
|
||||
Except for the constructor, it has exactly the same methods as
|
||||
|
||||
Except for the constructor, it has exactly the same methods as
|
||||
wxRendererNative and their implementation is
|
||||
trivial: they are simply forwarded to the real renderer. Note that the "real''
|
||||
renderer may, in turn, be a wxDelegateRendererNative as well and that there may
|
||||
be arbitrarily many levels like this -- but at the end of the chain there must
|
||||
be a real renderer which does the drawing.
|
||||
|
||||
|
||||
@library{wxcore}
|
||||
@category{FIXME}
|
||||
*/
|
||||
@@ -89,50 +89,50 @@ public:
|
||||
@e rendererNative.
|
||||
*/
|
||||
wxDelegateRendererNative();
|
||||
wxDelegateRendererNative(wxRendererNative& rendererNative);
|
||||
wxDelegateRendererNative(wxRendererNative& rendererNative);
|
||||
//@}
|
||||
|
||||
/**
|
||||
This class also provides all the virtual methods of
|
||||
This class also provides all the virtual methods of
|
||||
wxRendererNative, please refer to that class
|
||||
documentation for the details.
|
||||
*/
|
||||
DrawXXX(...);
|
||||
DrawXXX(...);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@class wxRendererNative
|
||||
@wxheader{renderer.h}
|
||||
|
||||
|
||||
First, a brief introduction to wxRenderer and why it is needed.
|
||||
|
||||
|
||||
Usually wxWidgets 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 wxWidgets provides a default, generic, implementation of them written in
|
||||
wxWidgets itself.
|
||||
|
||||
|
||||
These controls don't have the native appearance if only the standard
|
||||
line drawing and other graphics primitives are used, 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 say, a
|
||||
button, without caring about exactly how 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 large 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
|
||||
renderer but it may be changed or extended by the user, see
|
||||
@ref overview_samplerender "Render sample".
|
||||
|
||||
|
||||
All drawing functions take some standard parameters:
|
||||
|
||||
|
||||
@e win is the window being drawn. It is normally not used and when
|
||||
it is it should only be used as a generic wxWindow
|
||||
it is it should only be used as a generic wxWindow
|
||||
(in order to get its low level handle, for example), but you should
|
||||
not assume that it is of some given type as the same renderer
|
||||
function may be reused for drawing different kinds of control.
|
||||
@@ -144,15 +144,15 @@ public:
|
||||
@e rect the bounding rectangle for the element to be drawn.
|
||||
@e flags the optional flags (none by default) which can be a
|
||||
combination of the @c wxCONTROL_XXX constants below.
|
||||
|
||||
|
||||
Note that each drawing function restores the wxDC attributes if
|
||||
it changes them, so it is safe to assume that the same pen, brush and colours
|
||||
that were active before the call to this function are still in effect after it.
|
||||
|
||||
|
||||
@library{wxcore}
|
||||
@category{gdi}
|
||||
*/
|
||||
class wxRendererNative
|
||||
class wxRendererNative
|
||||
{
|
||||
public:
|
||||
/**
|
||||
@@ -193,7 +193,7 @@ public:
|
||||
|
||||
/**
|
||||
Draw a focus rectangle using the specified rectangle.
|
||||
wxListCtrl. The only supported flags is
|
||||
wxListCtrl. The only supported flags is
|
||||
@c wxCONTROL_SELECTED for items which are selected.
|
||||
*/
|
||||
void DrawFocusRect(wxWindow* win, wxDC& dc, const wxRect& rect,
|
||||
@@ -217,7 +217,7 @@ public:
|
||||
wxHeaderButtonParams* params = @NULL);
|
||||
|
||||
/**
|
||||
Draw a selection rectangle underneath the text as used e.g. in a
|
||||
Draw a selection rectangle underneath the text as used e.g. in a
|
||||
wxListCtrl. The supported @e flags are
|
||||
@c wxCONTROL_SELECTED for items which are selected (e.g. often a blue
|
||||
rectangle) and @c wxCONTROL_CURRENT for the item that has the focus
|
||||
@@ -273,7 +273,7 @@ public:
|
||||
|
||||
/**
|
||||
Return the default (native) implementation for this platform -- this is also
|
||||
the one used by default but this may be changed by calling
|
||||
the one used by default but this may be changed by calling
|
||||
Set() in which case the return value of this
|
||||
method may be different from the return value of Get().
|
||||
*/
|
||||
@@ -288,24 +288,24 @@ public:
|
||||
|
||||
/**
|
||||
Returns the height of a header button, either a fixed platform height if
|
||||
available, or a
|
||||
available, or a
|
||||
generic height based on the window's font.
|
||||
*/
|
||||
int GetHeaderButtonHeight(const wxWindow* win);
|
||||
|
||||
/**
|
||||
Get the splitter parameters, see
|
||||
Get the splitter parameters, see
|
||||
wxSplitterRenderParams.
|
||||
*/
|
||||
wxSplitterRenderParams GetSplitterParams(const wxWindow* win);
|
||||
|
||||
/**
|
||||
This function is used for version checking: Load()
|
||||
This function is used for version checking: Load()
|
||||
refuses to load any shared libraries implementing an older or incompatible
|
||||
version.
|
||||
|
||||
The implementation of this method is always the same in all renderers (simply
|
||||
construct wxRendererVersion using the
|
||||
construct wxRendererVersion using the
|
||||
@c wxRendererVersion::Current_XXX values), but it has to be in the derived,
|
||||
not base, class, to detect mismatches between the renderers versions and so you
|
||||
have to implement it anew in all renderers.
|
||||
@@ -317,8 +317,8 @@ public:
|
||||
deleted by caller if not @NULL when it is not used any more.
|
||||
|
||||
The @e name should be just the base name of the renderer and not the full
|
||||
name of the DLL file which is constructed differently (using
|
||||
wxDynamicLibrary::CanonicalizePluginName)
|
||||
name of the DLL file which is constructed differently (using
|
||||
wxDynamicLibrary::CanonicalizePluginName)
|
||||
on different systems.
|
||||
*/
|
||||
wxRendererNative* Load(const wxString& name);
|
||||
@@ -336,11 +336,11 @@ public:
|
||||
/**
|
||||
@class wxRendererVersion
|
||||
@wxheader{renderer.h}
|
||||
|
||||
This simple struct represents the wxRendererNative
|
||||
interface version and is only used as the return value of
|
||||
|
||||
This simple struct represents the wxRendererNative
|
||||
interface version and is only used as the return value of
|
||||
wxRendererNative::GetVersion.
|
||||
|
||||
|
||||
The version has two components: the version itself and the age. If the main
|
||||
program and the renderer have different versions they are never compatible with
|
||||
each other because the version is only changed when an existing virtual
|
||||
@@ -349,18 +349,18 @@ public:
|
||||
using a common C++ object model, the calling program is compatible with any
|
||||
renderer which has the age greater or equal to its age. This verification is
|
||||
done by IsCompatible method.
|
||||
|
||||
|
||||
@library{wxbase}
|
||||
@category{FIXME}
|
||||
*/
|
||||
class wxRendererVersion
|
||||
class wxRendererVersion
|
||||
{
|
||||
public:
|
||||
/**
|
||||
Checks if the main program is compatible with the renderer having the version
|
||||
Checks if the main program is compatible with the renderer having the version
|
||||
@e ver, returns @true if it is and @false otherwise.
|
||||
|
||||
This method is used by
|
||||
This method is used by
|
||||
wxRendererNative::Load to determine whether a
|
||||
renderer can be used.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user