From a055a11641760f252f1fb3063436de5bf3d6c21b Mon Sep 17 00:00:00 2001 From: Bryan Petty Date: Thu, 20 Mar 2008 06:00:05 +0000 Subject: [PATCH] Finished review/fixes of GDI category of functions and macros. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/doxygen/groups/funcmacro_gdi.h | 2 - interface/dnd.h | 22 ++++++-- interface/gdicmn.h | 87 ++++++++++++++++++++--------- interface/metafile.h | 28 ++++++---- 4 files changed, 92 insertions(+), 47 deletions(-) diff --git a/docs/doxygen/groups/funcmacro_gdi.h b/docs/doxygen/groups/funcmacro_gdi.h index d7cda147b5..8f98c93e36 100644 --- a/docs/doxygen/groups/funcmacro_gdi.h +++ b/docs/doxygen/groups/funcmacro_gdi.h @@ -16,7 +16,5 @@ Interface) access. Related Overviews: @ref overview_dc -@header{wx/gdicmn.h} - */ diff --git a/interface/dnd.h b/interface/dnd.h index 6122d1ac25..f84b9bc4c5 100644 --- a/interface/dnd.h +++ b/interface/dnd.h @@ -326,12 +326,22 @@ public: // Global functions/macros // ============================================================================ +/** @ingroup group_funcmacro_gdi */ +//@{ + /** - This macro creates either a cursor (MSW) or an icon (elsewhere) with the given - name. Under MSW, the cursor is loaded from the resource file and the icon is - loaded from XPM file under other platforms. - This macro should be used with - @ref wxDropSource::wxdropsource "wxDropSource constructor". + This macro creates either a cursor (MSW) or an icon (elsewhere) with the + given @a name (of type const char*). Under MSW, the cursor is + loaded from the resource file and the icon is loaded from XPM file under + other platforms. + + This macro should be used with wxDropSource::wxDropSource(). + + @returns wxCursor on MSW, otherwise returns a wxIcon + + @header{wx/dnd.h} */ -#define wxIconOrCursor wxDROP_ICON(const char* name) /* implementation is private */ +#define wxDROP_ICON(name) + +//@} diff --git a/interface/gdicmn.h b/interface/gdicmn.h index ca488c38f7..74f15a61c7 100644 --- a/interface/gdicmn.h +++ b/interface/gdicmn.h @@ -727,54 +727,87 @@ public: //@{ /** - Returns the dimensions of the work area on the display. On Windows - this means the area not covered by the taskbar, etc. Other platforms - are currently defaulting to the whole display until a way is found to - provide this info for all window managers, etc. + This macro loads a bitmap from either application resources (on the + platforms for which they exist, i.e. Windows and OS2) or from an XPM file. + This can help to avoid using @ifdef_ when creating bitmaps. + + @see @ref overview_bitmap, wxICON() + + @header{wx/gdicmn.h} */ -void wxClientDisplayRect(int* x, int* y, int* width, - int* height); -wxRect wxGetClientDisplayRect(); +#define wxBITMAP(bitmapName) /** - Returns the display size in pixels. + This macro loads an icon from either application resources (on the + platforms for which they exist, i.e. Windows and OS2) or from an XPM file. + This can help to avoid using @ifdef_ when creating icons. + + @see @ref overview_bitmap, wxBITMAP() + + @header{wx/gdicmn.h} */ -void wxDisplaySize(int* width, int* height); -wxSize wxGetDisplaySize(); +wxICON(); /** - Returns the display size in millimeters. + Returns @true if the display is colour, @false otherwise. + + @header{wx/gdicmn.h} */ -void wxDisplaySizeMM(int* width, int* height); -wxSize wxGetDisplaySizeMM(); +bool wxColourDisplay(); /** - This macro loads an icon from either application resources (on the platforms - for which they exist, i.e. Windows and OS2) or from an XPM file. It allows to - avoid using @c #ifdefs when creating icons. + Returns the depth of the display (a value of 1 denotes a monochrome + display). - @see @ref overview_wxbitmapoverview, wxBITMAP() + @header{wx/gdicmn.h} */ -wxICON(); +int wxDisplayDepth(); /** - Returns @true if the display is colour, @false otherwise. + Globally sets the cursor; only has an effect on Windows, Mac and GTK+. You + should call this function with wxNullCursor to restore the system cursor. + + @see wxCursor, wxWindow::SetCursor() + + @header{wx/gdicmn.h} */ -bool wxColourDisplay(); +void wxSetCursor(const wxCursor& cursor); +//@} + +/** @ingroup group_funcmacro_gdi */ +//@{ /** - This macro loads a bitmap from either application resources (on the platforms - for which they exist, i.e. Windows and OS2) or from an XPM file. It allows to - avoid using @c #ifdefs when creating bitmaps. + Returns the dimensions of the work area on the display. On Windows this + means the area not covered by the taskbar, etc. Other platforms are + currently defaulting to the whole display until a way is found to provide + this info for all window managers, etc. - @see @ref overview_wxbitmapoverview, wxICON() + @header{wx/gdicmn.h} */ -#define wxBITMAP() /* implementation is private */ +void wxClientDisplayRect(int* x, int* y, int* width, int* height); +wxRect wxGetClientDisplayRect(); +//@} +/** @ingroup group_funcmacro_gdi */ +//@{ /** - Returns the depth of the display (a value of 1 denotes a monochrome display). + Returns the display size in pixels. + + @header{wx/gdicmn.h} */ -int wxDisplayDepth(); +void wxDisplaySize(int* width, int* height); +wxSize wxGetDisplaySize(); +//@} + +/** @ingroup group_funcmacro_gdi */ +//@{ +/** + Returns the display size in millimeters. + @header{wx/gdicmn.h} +*/ +void wxDisplaySizeMM(int* width, int* height); +wxSize wxGetDisplaySizeMM(); //@} diff --git a/interface/metafile.h b/interface/metafile.h index 30450985c0..f994f22cec 100644 --- a/interface/metafile.h +++ b/interface/metafile.h @@ -121,15 +121,14 @@ public: //@{ /** - @header{wx/metafile.h} - Given a filename for an existing, valid metafile (as constructed using wxMetafileDC) makes it into a placeable metafile by prepending a header containing the given bounding box. The bounding box may be obtained from a device context after drawing into it, using the functions wxDC::MinX(), - wxDC::MinY(), wxDC::MaxX() and wxDC::MaxY(). In addition to adding the - placeable metafile header, this function adds the equivalent of the - following code to the start of the metafile data: + wxDC::MinY(), wxDC::MaxX() and wxDC::MaxY(). + + In addition to adding the placeable metafile header, this function adds the + equivalent of the following code to the start of the metafile data: @code SetMapMode(dc, MM_ANISOTROPIC); @@ -138,15 +137,20 @@ public: @endcode This simulates the wxMM_TEXT mapping mode, which wxWidgets assumes. + Placeable metafiles may be imported by many Windows applications, and can - be used in RTF (Rich Text Format) files. @a scale allows the specification - of scale for the metafile. This function is only available under Windows. + be used in RTF (Rich Text Format) files. + + @a scale allows the specification of scale for the metafile. + + This function is only available under Windows. + + @header{wx/metafile.h} */ -bool wxMakeMetafilePlaceable(const wxString& filename, int minX, - int minY, - int maxX, - int maxY, - float scale = 1.0); +bool wxMakeMetafilePlaceable(const wxString& filename, + int minX, int minY, + int maxX, int maxY, + float scale = 1.0); //@} -- 2.47.2