]> git.saurik.com Git - wxWidgets.git/blame - interface/gdicmn.h
Restored the old Classes by Category page to live side-by-side with the full Classes...
[wxWidgets.git] / interface / gdicmn.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: gdicmn.h
e54c96f1 3// Purpose: interface of wxRealPoint
23324ae1
FM
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows license
7/////////////////////////////////////////////////////////////////////////////
8
698d17c3
FM
9
10/**
11 Bitmap flags.
12*/
13enum wxBitmapType
14{
15 wxBITMAP_TYPE_INVALID,
16 wxBITMAP_TYPE_BMP,
17 wxBITMAP_TYPE_BMP_RESOURCE,
18 wxBITMAP_TYPE_RESOURCE = wxBITMAP_TYPE_BMP_RESOURCE,
19 wxBITMAP_TYPE_ICO,
20 wxBITMAP_TYPE_ICO_RESOURCE,
21 wxBITMAP_TYPE_CUR,
22 wxBITMAP_TYPE_CUR_RESOURCE,
23 wxBITMAP_TYPE_XBM,
24 wxBITMAP_TYPE_XBM_DATA,
25 wxBITMAP_TYPE_XPM,
26 wxBITMAP_TYPE_XPM_DATA,
27 wxBITMAP_TYPE_TIF,
28 wxBITMAP_TYPE_TIF_RESOURCE,
29 wxBITMAP_TYPE_GIF,
30 wxBITMAP_TYPE_GIF_RESOURCE,
31 wxBITMAP_TYPE_PNG,
32 wxBITMAP_TYPE_PNG_RESOURCE,
33 wxBITMAP_TYPE_JPEG,
34 wxBITMAP_TYPE_JPEG_RESOURCE,
35 wxBITMAP_TYPE_PNM,
36 wxBITMAP_TYPE_PNM_RESOURCE,
37 wxBITMAP_TYPE_PCX,
38 wxBITMAP_TYPE_PCX_RESOURCE,
39 wxBITMAP_TYPE_PICT,
40 wxBITMAP_TYPE_PICT_RESOURCE,
41 wxBITMAP_TYPE_ICON,
42 wxBITMAP_TYPE_ICON_RESOURCE,
43 wxBITMAP_TYPE_ANI,
44 wxBITMAP_TYPE_IFF,
45 wxBITMAP_TYPE_TGA,
46 wxBITMAP_TYPE_MACCURSOR,
47 wxBITMAP_TYPE_MACCURSOR_RESOURCE,
48 wxBITMAP_TYPE_ANY = 50
49};
50
51/**
52 Standard cursors.
53*/
54enum wxStockCursor
55{
56 wxCURSOR_NONE,
57 wxCURSOR_ARROW,
58 wxCURSOR_RIGHT_ARROW,
59 wxCURSOR_BULLSEYE,
60 wxCURSOR_CHAR,
61 wxCURSOR_CROSS,
62 wxCURSOR_HAND,
63 wxCURSOR_IBEAM,
64 wxCURSOR_LEFT_BUTTON,
65 wxCURSOR_MAGNIFIER,
66 wxCURSOR_MIDDLE_BUTTON,
67 wxCURSOR_NO_ENTRY,
68 wxCURSOR_PAINT_BRUSH,
69 wxCURSOR_PENCIL,
70 wxCURSOR_POINT_LEFT,
71 wxCURSOR_POINT_RIGHT,
72 wxCURSOR_QUESTION_ARROW,
73 wxCURSOR_RIGHT_BUTTON,
74 wxCURSOR_SIZENESW,
75 wxCURSOR_SIZENS,
76 wxCURSOR_SIZENWSE,
77 wxCURSOR_SIZEWE,
78 wxCURSOR_SIZING,
79 wxCURSOR_SPRAYCAN,
80 wxCURSOR_WAIT,
81 wxCURSOR_WATCH,
82 wxCURSOR_BLANK,
83 wxCURSOR_DEFAULT, //!< standard X11 cursor
84 wxCURSOR_COPY_ARROW , //!< MacOS Theme Plus arrow
85 // Not yet implemented for Windows
86 wxCURSOR_CROSS_REVERSE,
87 wxCURSOR_DOUBLE_ARROW,
88 wxCURSOR_BASED_ARROW_UP,
89 wxCURSOR_BASED_ARROW_DOWN,
90 wxCURSOR_ARROWWAIT,
91 wxCURSOR_MAX
92};
93
94
95
23324ae1
FM
96/**
97 @class wxRealPoint
98 @wxheader{gdicmn.h}
7c913512 99
23324ae1
FM
100 A @b wxRealPoint is a useful data structure for graphics operations.
101 It contains floating point @e x and @e y members.
102 See also wxPoint for an integer version.
7c913512 103
23324ae1
FM
104 @library{wxcore}
105 @category{data}
7c913512 106
e54c96f1 107 @see wxPoint
23324ae1 108*/
7c913512 109class wxRealPoint
23324ae1
FM
110{
111public:
112 //@{
113 /**
114 Create a point.
23324ae1 115 double x
23324ae1 116 double y
23324ae1
FM
117 Members of the @b wxRealPoint object.
118 */
119 wxRealPoint();
7c913512 120 wxRealPoint(double x, double y);
23324ae1
FM
121 //@}
122};
123
124
e54c96f1 125
23324ae1
FM
126/**
127 @class wxRect
128 @wxheader{gdicmn.h}
7c913512 129
23324ae1 130 A class for manipulating rectangles.
7c913512 131
23324ae1
FM
132 @library{wxcore}
133 @category{data}
7c913512 134
e54c96f1 135 @see wxPoint, wxSize
23324ae1 136*/
7c913512 137class wxRect
23324ae1
FM
138{
139public:
140 //@{
141 /**
142 Creates a wxRect object from size values at the origin.
143 */
144 wxRect();
7c913512
FM
145 wxRect(int x, int y, int width, int height);
146 wxRect(const wxPoint& topLeft, const wxPoint& bottomRight);
147 wxRect(const wxPoint& pos, const wxSize& size);
148 wxRect(const wxSize& size);
23324ae1
FM
149 //@}
150
151 //@{
152 /**
153 Returns the rectangle having the same size as this one but centered relatively
154 to the given rectangle @e r. By default, rectangle is centred in both
4cc4bfaf 155 directions but if @a dir includes only @c wxVERTICAL or only
23324ae1
FM
156 @c wxHORIZONTAL flag, then it is only centered in this direction while
157 the other component of its position remains unchanged.
158 */
328f5751
FM
159 wxRect CentreIn(const wxRect& r, int dir = wxBOTH) const;
160 const wxRect CenterIn(const wxRect& r, int dir = wxBOTH) const;
23324ae1
FM
161 //@}
162
163 //@{
164 /**
165 Returns @true if the given rectangle is completely inside this rectangle
166 (or touches its boundary) and @false otherwise.
167 */
328f5751
FM
168 bool Contains(int x, int y) const;
169 const bool Contains(const wxPoint& pt) const;
170 const bool Contains(const wxRect& rect) const;
23324ae1
FM
171 //@}
172
173 //@{
174 /**
175 Decrease the rectangle size.
23324ae1
FM
176 This method is the opposite from Inflate():
177 Deflate(a, b) is equivalent to Inflate(-a, -b).
178 Please refer to Inflate() for full description.
8024723d 179
4cc4bfaf 180 @see Inflate()
23324ae1 181 */
328f5751
FM
182 void Deflate(wxCoord dx, wxCoord dy) const;
183 void Deflate(const wxSize& diff) const;
184 void Deflate(wxCoord diff) const;
185 wxRect Deflate(wxCoord dx, wxCoord dy) const;
23324ae1
FM
186 //@}
187
188 /**
189 Gets the bottom point of the rectangle.
190 */
328f5751 191 int GetBottom() const;
23324ae1
FM
192
193 /**
194 Gets the position of the bottom left corner.
195 */
328f5751 196 wxPoint GetBottomLeft() const;
23324ae1
FM
197
198 /**
199 Gets the position of the bottom right corner.
200 */
328f5751 201 wxPoint GetBottomRight() const;
23324ae1
FM
202
203 /**
204 Gets the height member.
205 */
328f5751 206 int GetHeight() const;
23324ae1
FM
207
208 /**
209 Gets the left point of the rectangle (the same as wxRect::GetX).
210 */
328f5751 211 int GetLeft() const;
23324ae1
FM
212
213 /**
214 Gets the position.
215 */
328f5751 216 wxPoint GetPosition() const;
23324ae1
FM
217
218 /**
219 Gets the right point of the rectangle.
220 */
328f5751 221 int GetRight() const;
23324ae1
FM
222
223 /**
224 Gets the size.
8024723d 225
4cc4bfaf 226 @see SetSize()
23324ae1 227 */
328f5751 228 wxSize GetSize() const;
23324ae1
FM
229
230 /**
231 Gets the top point of the rectangle (the same as wxRect::GetY).
232 */
328f5751 233 int GetTop() const;
23324ae1
FM
234
235 /**
7c913512 236 Gets the position of the top left corner of the rectangle, same as
23324ae1
FM
237 GetPosition().
238 */
328f5751 239 wxPoint GetTopLeft() const;
23324ae1
FM
240
241 /**
242 Gets the position of the top right corner.
243 */
328f5751 244 wxPoint GetTopRight() const;
23324ae1
FM
245
246 /**
247 Gets the width member.
248 */
328f5751 249 int GetWidth() const;
23324ae1
FM
250
251 /**
252 Gets the x member.
253 */
328f5751 254 int GetX() const;
23324ae1
FM
255
256 /**
257 Gets the y member.
258 */
328f5751 259 int GetY() const;
23324ae1
FM
260
261 //@{
262 /**
263 Increases the size of the rectangle.
4cc4bfaf 264 The second form uses the same @a diff for both @a dx and @e dy.
23324ae1
FM
265 The first two versions modify the rectangle in place, the last one returns a
266 new rectangle leaving this one unchanged.
23324ae1
FM
267 The left border is moved farther left and the right border is moved farther
268 right by @e dx. The upper border is moved farther up and the bottom border
269 is moved farther down by @e dy. (Note the the width and height of the
4cc4bfaf
FM
270 rectangle thus change by 2*@a dx and 2*@e dy, respectively.) If one or
271 both of @a dx and @a dy are negative, the opposite happens: the rectangle
23324ae1 272 size decreases in the respective direction.
cdbcf4c2 273 Inflating and deflating behaves "naturally". Defined more precisely, that
23324ae1 274 means:
cdbcf4c2 275 "Real" inflates (that is, @a dx and/or @a dy = 0) are not
23324ae1
FM
276 constrained. Thus inflating a rectangle can cause its upper left corner
277 to move into the negative numbers. (the versions prior to 2.5.4 forced
278 the top left coordinate to not fall below (0, 0), which implied a
279 forced move of the rectangle.)
23324ae1
FM
280 Deflates are clamped to not reduce the width or height of the
281 rectangle below zero. In such cases, the top-left corner is nonetheless
282 handled properly. For example, a rectangle at (10, 10) with size (20,
283 40) that is inflated by (-15, -15) will become located at (20, 25) at
284 size (0, 10). Finally, observe that the width and height are treated
285 independently. In the above example, the width is reduced by 20,
286 whereas the height is reduced by the full 30 (rather than also stopping
287 at 20, when the width reached zero).
8024723d 288
4cc4bfaf 289 @see Deflate()
23324ae1 290 */
328f5751
FM
291 void Inflate(wxCoord dx, wxCoord dy) const;
292 void Inflate(const wxSize& diff) const;
293 void Inflate(wxCoord diff) const;
294 wxRect Inflate(wxCoord dx, wxCoord dy) const;
23324ae1
FM
295 //@}
296
297 //@{
298 /**
299 Modifies the rectangle to contain the overlapping box of this rectangle and the
300 one passed in as parameter. The const version returns the new rectangle, the
301 other one modifies this rectangle in place.
302 */
303 wxRect Intersect(const wxRect& rect);
328f5751 304 const wxRect& Intersect(const wxRect& rect);
23324ae1
FM
305 //@}
306
307 /**
308 Returns @true if this rectangle has a non-empty intersection with the
4cc4bfaf 309 rectangle @a rect and @false otherwise.
23324ae1 310 */
328f5751 311 bool Intersects(const wxRect& rect) const;
23324ae1
FM
312
313 /**
7c913512 314 Returns @true if this rectangle has a width or height less than or equal to
23324ae1
FM
315 0 and @false otherwise.
316 */
328f5751 317 bool IsEmpty() const;
23324ae1
FM
318
319 //@{
320 /**
4cc4bfaf
FM
321 Moves the rectangle by the specified offset. If @a dx is positive, the
322 rectangle is moved to the right, if @a dy is positive, it is moved to the
23324ae1
FM
323 bottom, otherwise it is moved to the left or top respectively.
324 */
325 void Offset(wxCoord dx, wxCoord dy);
7c913512 326 void Offset(const wxPoint& pt);
23324ae1
FM
327 //@}
328
329 /**
330 Sets the height.
331 */
332 void SetHeight(int height);
333
334 /**
335 Sets the size.
8024723d 336
4cc4bfaf 337 @see GetSize()
23324ae1
FM
338 */
339 void SetSize(const wxSize& s);
340
341 /**
342 Sets the width.
343 */
344 void SetWidth(int width);
345
346 /**
347 Sets the x position.
348 */
4cc4bfaf 349 void SetX(int x);
23324ae1
FM
350
351 /**
352 Sets the y position.
353 */
4cc4bfaf 354 void SetY(int y);
23324ae1
FM
355
356 //@{
357 /**
358 Modifies the rectangle to contain the bounding box of this rectangle and the
359 one passed in as parameter. The const version returns the new rectangle, the
360 other one modifies this rectangle in place.
361 */
362 wxRect Union(const wxRect& rect);
328f5751 363 const wxRect& Union(const wxRect& rect);
23324ae1
FM
364 //@}
365
366 /**
367 int height
23324ae1
FM
368 Height member.
369 */
370
371
372 //@{
373 /**
374 Returns the intersection of two rectangles (which may be empty).
375 */
376 bool operator !=(const wxRect& r1, const wxRect& r2);
7c913512
FM
377 wxRect operator +(const wxRect& r1, const wxRect& r2);
378 wxRect operator +=(const wxRect& r);
379 See also wxRect operator *(const wxRect& r1,
380 const wxRect& r2);
381 wxRect operator *=(const wxRect& r);
23324ae1
FM
382 //@}
383
384 /**
385 Assignment operator.
386 */
387 void operator =(const wxRect& rect);
388
389 /**
390 Equality operator.
391 */
392 bool operator ==(const wxRect& r1, const wxRect& r2);
393
394 /**
395 int width
23324ae1
FM
396 Width member.
397 */
398
399
400 /**
401 int x
23324ae1
FM
402 x coordinate of the top-level corner of the rectangle.
403 */
404
405
406 /**
407 int y
23324ae1
FM
408 y coordinate of the top-level corner of the rectangle.
409 */
410};
411
412
e54c96f1 413
23324ae1
FM
414/**
415 @class wxPoint
416 @wxheader{gdicmn.h}
7c913512 417
23324ae1
FM
418 A @b wxPoint is a useful data structure for graphics operations.
419 It simply contains integer @e x and @e y members.
7c913512 420
23324ae1 421 See also wxRealPoint for a floating point version.
7c913512 422
23324ae1
FM
423 @library{wxcore}
424 @category{data}
7c913512 425
e54c96f1 426 @see wxRealPoint
23324ae1 427*/
7c913512 428class wxPoint
23324ae1
FM
429{
430public:
431 //@{
432 /**
433 Create a point.
434 */
435 wxPoint();
7c913512 436 wxPoint(int x, int y);
23324ae1
FM
437 //@}
438
439 //@{
440 /**
441 Operators for sum and subtraction between a wxPoint object and a
442 wxSize object.
443 */
444 void operator =(const wxPoint& pt);
7c913512
FM
445 bool operator ==(const wxPoint& p1, const wxPoint& p2);
446 bool operator !=(const wxPoint& p1, const wxPoint& p2);
447 wxPoint operator +(const wxPoint& p1, const wxPoint& p2);
448 wxPoint operator -(const wxPoint& p1, const wxPoint& p2);
449 wxPoint operator +=(const wxPoint& pt);
450 wxPoint operator -=(const wxPoint& pt);
451 wxPoint operator +(const wxPoint& pt, const wxSize& sz);
452 wxPoint operator -(const wxPoint& pt, const wxSize& sz);
453 wxPoint operator +(const wxSize& sz, const wxPoint& pt);
454 wxPoint operator -(const wxSize& sz, const wxPoint& pt);
455 wxPoint operator +=(const wxSize& sz);
456 wxPoint operator -=(const wxSize& sz);
23324ae1
FM
457 //@}
458
459 /**
460 int x
23324ae1
FM
461 x member.
462 */
463
464
465 /**
466 int y
23324ae1
FM
467 y member.
468 */
469};
470
471
e54c96f1 472
23324ae1
FM
473/**
474 @class wxColourDatabase
475 @wxheader{gdicmn.h}
7c913512 476
23324ae1 477 wxWidgets maintains a database of standard RGB colours for a predefined
cdbcf4c2 478 set of named colours (such as "BLACK", "LIGHT GREY"). The
23324ae1
FM
479 application may add to this set if desired by using
480 wxColourDatabase::AddColour and may use it to look up
481 colours by names using wxColourDatabase::Find or find the names
482 for the standard colour suing wxColourDatabase::FindName.
7c913512 483
23324ae1
FM
484 There is one predefined instance of this class called
485 @b wxTheColourDatabase.
7c913512 486
23324ae1
FM
487 @library{wxcore}
488 @category{FIXME}
7c913512 489
e54c96f1 490 @see wxColour
23324ae1 491*/
7c913512 492class wxColourDatabase
23324ae1
FM
493{
494public:
495 /**
496 Constructs the colour database. It will be initialized at the first use.
497 */
498 wxColourDatabase();
499
500 //@{
501 /**
502 Adds a colour to the database. If a colour with the same name already exists,
503 it is replaced.
23324ae1
FM
504 Please note that the overload taking a pointer is deprecated and will be
505 removed in the next wxWidgets version, please don't use it.
506 */
507 void AddColour(const wxString& colourName,
508 const wxColour& colour);
7c913512 509 void AddColour(const wxString& colourName, wxColour* colour);
23324ae1
FM
510 //@}
511
512 /**
513 Finds a colour given the name. Returns an invalid colour object (that is, such
514 that its @ref wxColour::isok Ok method returns @false) if the colour wasn't
515 found in the database.
516 */
517 wxColour Find(const wxString& colourName);
518
519 /**
520 Finds a colour name given the colour. Returns an empty string if the colour is
521 not found in the database.
522 */
328f5751 523 wxString FindName(const wxColour& colour) const;
23324ae1
FM
524};
525
526
e54c96f1 527
23324ae1
FM
528/**
529 @class wxFontList
530 @wxheader{gdicmn.h}
7c913512 531
23324ae1
FM
532 A font list is a list containing all fonts which have been created. There
533 is only one instance of this class: @b wxTheFontList. Use this object to search
534 for a previously created font of the desired type and create it if not already
535 found.
536 In some windowing systems, the font may be a scarce resource, so it is best to
537 reuse old resources if possible. When an application finishes, all fonts will
538 be
539 deleted and their resources freed, eliminating the possibility of 'memory
540 leaks'.
7c913512 541
23324ae1
FM
542 @library{wxcore}
543 @category{gdi}
7c913512 544
e54c96f1 545 @see wxFont
23324ae1
FM
546*/
547class wxFontList : public wxList
548{
549public:
550 /**
551 Constructor. The application should not construct its own font list:
552 use the object pointer @b wxTheFontList.
553 */
554 wxFontList();
555
556 /**
557 Finds a font of the given specification, or creates one and adds it to the
558 list. See the @ref wxFont::ctor "wxFont constructor" for
559 details of the arguments.
560 */
4cc4bfaf
FM
561 wxFont* FindOrCreateFont(int point_size, int family, int style,
562 int weight,
563 bool underline = false,
564 const wxString& facename = NULL,
565 wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
23324ae1
FM
566};
567
568
e54c96f1 569
23324ae1
FM
570/**
571 @class wxSize
572 @wxheader{gdicmn.h}
7c913512 573
23324ae1
FM
574 A @b wxSize is a useful data structure for graphics operations.
575 It simply contains integer @e width and @e height members.
7c913512 576
23324ae1
FM
577 wxSize is used throughout wxWidgets as well as wxPoint which, although almost
578 equivalent to wxSize, has a different meaning: wxPoint represents a position
579 while wxSize - the size.
7c913512 580
23324ae1
FM
581 @b wxPython note: wxPython defines aliases for the @c x and @c y members
582 named @c width and @c height since it makes much more sense for
583 sizes.
7c913512
FM
584
585
23324ae1
FM
586 @library{wxcore}
587 @category{data}
7c913512 588
e54c96f1 589 @see wxPoint, wxRealPoint
23324ae1 590*/
7c913512 591class wxSize
23324ae1
FM
592{
593public:
594 //@{
595 /**
596 Creates a size object.
597 */
598 wxSize();
7c913512 599 wxSize(int width, int height);
23324ae1
FM
600 //@}
601
602 //@{
603 /**
604 Decreases the size in x- and y- directions
23324ae1 605 By @e size.x and @e size.y for the first overload
4cc4bfaf
FM
606 By @a dx and @a dy for the second one
607 By @a d and @a d for the third one
8024723d 608
4cc4bfaf 609 @see IncBy()
23324ae1
FM
610 */
611 void DecBy(const wxSize& size);
7c913512
FM
612 void DecBy(int dx, int dy);
613 void DecBy(int d);
23324ae1
FM
614 //@}
615
616 /**
617 Decrements this object so that both of its dimensions are not greater than the
618 corresponding dimensions of the @e size.
8024723d 619
4cc4bfaf 620 @see IncTo()
23324ae1
FM
621 */
622 void DecTo(const wxSize& size);
623
624 /**
625 Gets the height member.
626 */
328f5751 627 int GetHeight() const;
23324ae1
FM
628
629 /**
630 Gets the width member.
631 */
328f5751 632 int GetWidth() const;
23324ae1
FM
633
634 //@{
635 /**
636 Increases the size in x- and y- directions
23324ae1 637 By @e size.x and @e size.y for the first overload
4cc4bfaf
FM
638 By @a dx and @a dy for the second one
639 By @a d and @a d for the third one
8024723d 640
4cc4bfaf 641 @see DecBy()
23324ae1
FM
642 */
643 void IncBy(const wxSize& size);
7c913512
FM
644 void IncBy(int dx, int dy);
645 void IncBy(int d);
23324ae1
FM
646 //@}
647
648 /**
649 Increments this object so that both of its dimensions are not less than the
650 corresponding dimensions of the @e size.
8024723d 651
4cc4bfaf 652 @see DecTo()
23324ae1
FM
653 */
654 void IncTo(const wxSize& size);
655
656 /**
657 Returns @true if neither of the size object components is equal to -1, which
658 is used as default for the size values in wxWidgets (hence the predefined
659 @c wxDefaultSize has both of its components equal to -1).
23324ae1
FM
660 This method is typically used before calling
661 SetDefaults().
662 */
328f5751 663 bool IsFullySpecified() const;
23324ae1
FM
664
665 //@{
666 /**
667 Operators for division and multiplication between a wxSize object and an
668 integer.
669 */
670 void operator =(const wxSize& sz);
7c913512
FM
671 bool operator ==(const wxSize& s1, const wxSize& s2);
672 bool operator !=(const wxSize& s1, const wxSize& s2);
673 wxSize operator +(const wxSize& s1, const wxSize& s2);
674 wxSize operator -(const wxSize& s1, const wxSize& s2);
675 wxSize operator +=(const wxSize& sz);
676 wxSize operator -=(const wxSize& sz);
677 wxSize operator /(const wxSize& sz, int factor);
678 wxSize operator *(const wxSize& sz, int factor);
679 wxSize operator *(int factor, const wxSize& sz);
680 wxSize operator /=(int factor);
681 wxSize operator *=(int factor);
23324ae1
FM
682 //@}
683
684 /**
685 Scales the dimensions of this object by the given factors.
686 If you want to scale both dimensions by the same factor you can also use
687 the @ref operators() "operator *="
23324ae1
FM
688 Returns a reference to this object (so that you can concatenate other
689 operations in the same line).
690 */
691 wxSize Scale(float xscale, float yscale);
692
693 /**
694 Sets the width and height members.
695 */
4cc4bfaf 696 void Set(int width, int height);
23324ae1
FM
697
698 /**
699 Combine this size object with another one replacing the default (i.e. equal
700 to -1) components of this object with those of the other. It is typically
701 used like this:
8024723d 702
4cc4bfaf 703 @see IsFullySpecified()
23324ae1
FM
704 */
705 void SetDefaults(const wxSize& sizeDefault);
706
707 /**
708 Sets the height.
709 */
710 void SetHeight(int height);
711
712 /**
713 Sets the width.
714 */
715 void SetWidth(int width);
716};
717
718
e54c96f1 719
23324ae1 720
e54c96f1 721
23324ae1
FM
722// ============================================================================
723// Global functions/macros
724// ============================================================================
725
3db7c3b1 726/** @ingroup group_funcmacro_gdi */
23324ae1 727//@{
c83e60aa 728
23324ae1 729/**
a055a116
BP
730 This macro loads a bitmap from either application resources (on the
731 platforms for which they exist, i.e. Windows and OS2) or from an XPM file.
732 This can help to avoid using @ifdef_ when creating bitmaps.
733
734 @see @ref overview_bitmap, wxICON()
735
736 @header{wx/gdicmn.h}
23324ae1 737*/
a055a116 738#define wxBITMAP(bitmapName)
23324ae1 739
23324ae1 740/**
a055a116
BP
741 This macro loads an icon from either application resources (on the
742 platforms for which they exist, i.e. Windows and OS2) or from an XPM file.
743 This can help to avoid using @ifdef_ when creating icons.
744
745 @see @ref overview_bitmap, wxBITMAP()
746
747 @header{wx/gdicmn.h}
23324ae1 748*/
a055a116 749wxICON();
23324ae1 750
23324ae1 751/**
a055a116
BP
752 Returns @true if the display is colour, @false otherwise.
753
754 @header{wx/gdicmn.h}
23324ae1 755*/
a055a116 756bool wxColourDisplay();
23324ae1
FM
757
758/**
a055a116
BP
759 Returns the depth of the display (a value of 1 denotes a monochrome
760 display).
7c913512 761
a055a116 762 @header{wx/gdicmn.h}
23324ae1 763*/
a055a116 764int wxDisplayDepth();
23324ae1
FM
765
766/**
a055a116
BP
767 Globally sets the cursor; only has an effect on Windows, Mac and GTK+. You
768 should call this function with wxNullCursor to restore the system cursor.
769
770 @see wxCursor, wxWindow::SetCursor()
771
772 @header{wx/gdicmn.h}
23324ae1 773*/
a055a116 774void wxSetCursor(const wxCursor& cursor);
23324ae1 775
a055a116
BP
776//@}
777
778/** @ingroup group_funcmacro_gdi */
779//@{
23324ae1 780/**
a055a116
BP
781 Returns the dimensions of the work area on the display. On Windows this
782 means the area not covered by the taskbar, etc. Other platforms are
783 currently defaulting to the whole display until a way is found to provide
784 this info for all window managers, etc.
7c913512 785
a055a116 786 @header{wx/gdicmn.h}
23324ae1 787*/
a055a116
BP
788void wxClientDisplayRect(int* x, int* y, int* width, int* height);
789wxRect wxGetClientDisplayRect();
790//@}
23324ae1 791
a055a116
BP
792/** @ingroup group_funcmacro_gdi */
793//@{
23324ae1 794/**
a055a116
BP
795 Returns the display size in pixels.
796
797 @header{wx/gdicmn.h}
23324ae1 798*/
a055a116
BP
799void wxDisplaySize(int* width, int* height);
800wxSize wxGetDisplaySize();
801//@}
802
803/** @ingroup group_funcmacro_gdi */
804//@{
805/**
806 Returns the display size in millimeters.
23324ae1 807
a055a116
BP
808 @header{wx/gdicmn.h}
809*/
810void wxDisplaySizeMM(int* width, int* height);
811wxSize wxGetDisplaySizeMM();
c83e60aa
BP
812//@}
813