// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
+
+/**
+ Bitmap flags.
+*/
+enum wxBitmapType
+{
+ wxBITMAP_TYPE_INVALID,
+ wxBITMAP_TYPE_BMP,
+ wxBITMAP_TYPE_BMP_RESOURCE,
+ wxBITMAP_TYPE_RESOURCE = wxBITMAP_TYPE_BMP_RESOURCE,
+ wxBITMAP_TYPE_ICO,
+ wxBITMAP_TYPE_ICO_RESOURCE,
+ wxBITMAP_TYPE_CUR,
+ wxBITMAP_TYPE_CUR_RESOURCE,
+ wxBITMAP_TYPE_XBM,
+ wxBITMAP_TYPE_XBM_DATA,
+ wxBITMAP_TYPE_XPM,
+ wxBITMAP_TYPE_XPM_DATA,
+ wxBITMAP_TYPE_TIF,
+ wxBITMAP_TYPE_TIF_RESOURCE,
+ wxBITMAP_TYPE_GIF,
+ wxBITMAP_TYPE_GIF_RESOURCE,
+ wxBITMAP_TYPE_PNG,
+ wxBITMAP_TYPE_PNG_RESOURCE,
+ wxBITMAP_TYPE_JPEG,
+ wxBITMAP_TYPE_JPEG_RESOURCE,
+ wxBITMAP_TYPE_PNM,
+ wxBITMAP_TYPE_PNM_RESOURCE,
+ wxBITMAP_TYPE_PCX,
+ wxBITMAP_TYPE_PCX_RESOURCE,
+ wxBITMAP_TYPE_PICT,
+ wxBITMAP_TYPE_PICT_RESOURCE,
+ wxBITMAP_TYPE_ICON,
+ wxBITMAP_TYPE_ICON_RESOURCE,
+ wxBITMAP_TYPE_ANI,
+ wxBITMAP_TYPE_IFF,
+ wxBITMAP_TYPE_TGA,
+ wxBITMAP_TYPE_MACCURSOR,
+ wxBITMAP_TYPE_MACCURSOR_RESOURCE,
+ wxBITMAP_TYPE_ANY = 50
+};
+
+/**
+ Standard cursors.
+*/
+enum wxStockCursor
+{
+ wxCURSOR_NONE,
+ wxCURSOR_ARROW,
+ wxCURSOR_RIGHT_ARROW,
+ wxCURSOR_BULLSEYE,
+ wxCURSOR_CHAR,
+ wxCURSOR_CROSS,
+ wxCURSOR_HAND,
+ wxCURSOR_IBEAM,
+ wxCURSOR_LEFT_BUTTON,
+ wxCURSOR_MAGNIFIER,
+ wxCURSOR_MIDDLE_BUTTON,
+ wxCURSOR_NO_ENTRY,
+ wxCURSOR_PAINT_BRUSH,
+ wxCURSOR_PENCIL,
+ wxCURSOR_POINT_LEFT,
+ wxCURSOR_POINT_RIGHT,
+ wxCURSOR_QUESTION_ARROW,
+ wxCURSOR_RIGHT_BUTTON,
+ wxCURSOR_SIZENESW,
+ wxCURSOR_SIZENS,
+ wxCURSOR_SIZENWSE,
+ wxCURSOR_SIZEWE,
+ wxCURSOR_SIZING,
+ wxCURSOR_SPRAYCAN,
+ wxCURSOR_WAIT,
+ wxCURSOR_WATCH,
+ wxCURSOR_BLANK,
+ wxCURSOR_DEFAULT, //!< standard X11 cursor
+ wxCURSOR_COPY_ARROW , //!< MacOS Theme Plus arrow
+ // Not yet implemented for Windows
+ wxCURSOR_CROSS_REVERSE,
+ wxCURSOR_DOUBLE_ARROW,
+ wxCURSOR_BASED_ARROW_UP,
+ wxCURSOR_BASED_ARROW_DOWN,
+ wxCURSOR_ARROWWAIT,
+ wxCURSOR_MAX
+};
+
+
+
/**
@class wxRealPoint
@wxheader{gdicmn.h}
This method is the opposite from Inflate():
Deflate(a, b) is equivalent to Inflate(-a, -b).
Please refer to Inflate() for full description.
-
+
@see Inflate()
*/
void Deflate(wxCoord dx, wxCoord dy) const;
/**
Gets the size.
-
+
@see SetSize()
*/
wxSize GetSize() const;
independently. In the above example, the width is reduced by 20,
whereas the height is reduced by the full 30 (rather than also stopping
at 20, when the width reached zero).
-
+
@see Deflate()
*/
void Inflate(wxCoord dx, wxCoord dy) const;
/**
Sets the size.
-
+
@see GetSize()
*/
void SetSize(const wxSize& s);
-/**
- @class wxBrushList
- @ingroup group_class_gdi
- @wxheader{gdicmn.h}
-
- A brush list is a list containing all brushes which have been created.
-
- @library{wxcore}
- @category{gdi}
-
- @see wxBrush
-*/
-class wxBrushList : public wxList
-{
-public:
- /**
- Constructor. The application should not construct its own brush list:
- use the object pointer @b wxTheBrushList.
- */
- wxBrushList();
-
- /**
- Finds a brush with the specified attributes and returns it, else creates a new
- brush, adds it
- to the brush list, and returns it.
-
- @param colour
- Colour object.
- @param style
- Brush style. See wxBrush::SetStyle for a list of styles.
- */
- wxBrush* FindOrCreateBrush(const wxColour& colour,
- int style = wxSOLID);
-};
-
-
-
/**
@class wxPoint
@wxheader{gdicmn.h}
/**
@class wxFontList
- @ingroup group_class_gdi
@wxheader{gdicmn.h}
A font list is a list containing all fonts which have been created. There
By @e size.x and @e size.y for the first overload
By @a dx and @a dy for the second one
By @a d and @a d for the third one
-
+
@see IncBy()
*/
void DecBy(const wxSize& size);
/**
Decrements this object so that both of its dimensions are not greater than the
corresponding dimensions of the @e size.
-
+
@see IncTo()
*/
void DecTo(const wxSize& size);
By @e size.x and @e size.y for the first overload
By @a dx and @a dy for the second one
By @a d and @a d for the third one
-
+
@see DecBy()
*/
void IncBy(const wxSize& size);
/**
Increments this object so that both of its dimensions are not less than the
corresponding dimensions of the @e size.
-
+
@see DecTo()
*/
void IncTo(const wxSize& size);
Combine this size object with another one replacing the default (i.e. equal
to -1) components of this object with those of the other. It is typically
used like this:
-
+
@see IsFullySpecified()
*/
void SetDefaults(const wxSize& sizeDefault);
-/**
- @class wxPenList
- @ingroup group_class_gdi
- @wxheader{gdicmn.h}
-
- There is only one instance of this class: @b wxThePenList. Use
- this object to search for a previously created pen of the desired
- type and create it if not already found. In some windowing systems,
- the pen may be a scarce resource, so it can pay to reuse old
- resources if possible. When an application finishes, all pens will
- be deleted and their resources freed, eliminating the possibility of
- 'memory leaks'. However, it is best not to rely on this automatic
- cleanup because it can lead to double deletion in some circumstances.
-
- There are two mechanisms in recent versions of wxWidgets which make the
- pen list less useful than it once was. Under Windows, scarce resources
- are cleaned up internally if they are not being used. Also, a referencing
- counting mechanism applied to all GDI objects means that some sharing
- of underlying resources is possible. You don't have to keep track of pointers,
- working out when it is safe delete a pen, because the referencing counting does
- it for you. For example, you can set a pen in a device context, and then
- immediately delete the pen you passed, because the pen is 'copied'.
-
- So you may find it easier to ignore the pen list, and instead create
- and copy pens as you see fit. If your Windows resource meter suggests
- your application is using too many resources, you can resort to using
- GDI lists to share objects explicitly.
-
- The only compelling use for the pen list is for wxWidgets to keep
- track of pens in order to clean them up on exit. It is also kept for
- backward compatibility with earlier versions of wxWidgets.
-
- @library{wxcore}
- @category{gdi}
-
- @see wxPen
-*/
-class wxPenList
-{
-public:
- /**
- Constructor. The application should not construct its own pen list:
- use the object pointer @b wxThePenList.
- */
- wxPenList();
-
- //@{
- /**
- Finds a pen with the specified attributes and returns it, else creates a new
- pen, adds it
- to the pen list, and returns it.
-
- @param colour
- Colour object.
- @param colourName
- Colour name, which should be in the colour database.
- @param width
- Width of pen.
- @param style
- Pen style. See wxPen::wxPen for a list of styles.
- */
- wxPen* FindOrCreatePen(const wxColour& colour, int width,
- int style);
- wxPen* FindOrCreatePen(const wxString& colourName, int width,
- int style);
- //@}
-};
-
// ============================================================================
//@{
/**
- 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();
//@}