]>
Commit | Line | Data |
---|---|---|
1e6feb95 VZ |
1 | /////////////////////////////////////////////////////////////////////////////// |
2 | // Name: univ/themes/gtk.cpp | |
3 | // Purpose: wxUniversal theme implementing GTK-like LNF | |
4 | // Author: Vadim Zeitlin | |
5 | // Modified by: | |
6 | // Created: 06.08.00 | |
7 | // RCS-ID: $Id$ | |
442b35b5 | 8 | // Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) |
1e6feb95 VZ |
9 | // Licence: wxWindows license |
10 | /////////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | // =========================================================================== | |
13 | // declarations | |
14 | // =========================================================================== | |
15 | ||
16 | // --------------------------------------------------------------------------- | |
17 | // headers | |
18 | // --------------------------------------------------------------------------- | |
19 | ||
20 | // for compilers that support precompilation, includes "wx.h". | |
21 | #include "wx/wxprec.h" | |
22 | ||
23 | #ifdef __BORLANDC__ | |
24 | #pragma hdrstop | |
25 | #endif | |
26 | ||
27 | #ifndef WX_PRECOMP | |
28 | #include "wx/intl.h" | |
29 | #include "wx/log.h" | |
30 | #include "wx/dcmemory.h" | |
31 | #include "wx/window.h" | |
32 | ||
0fe5e8fe VZ |
33 | #include "wx/menu.h" |
34 | ||
e4606ed9 | 35 | #include "wx/bmpbuttn.h" |
1e6feb95 VZ |
36 | #include "wx/button.h" |
37 | #include "wx/checkbox.h" | |
38 | #include "wx/listbox.h" | |
39 | #include "wx/checklst.h" | |
8cb172b4 | 40 | #include "wx/combobox.h" |
1e6feb95 VZ |
41 | #include "wx/scrolbar.h" |
42 | #include "wx/slider.h" | |
43 | #include "wx/textctrl.h" | |
3216dbf5 | 44 | #include "wx/toolbar.h" |
0fe5e8fe VZ |
45 | |
46 | #include "wx/settings.h" | |
1e6feb95 VZ |
47 | #endif // WX_PRECOMP |
48 | ||
49 | #include "wx/notebook.h" | |
50 | #include "wx/spinbutt.h" | |
536b70ac VS |
51 | #include "wx/toplevel.h" |
52 | #include "wx/artprov.h" | |
1e6feb95 VZ |
53 | |
54 | #include "wx/univ/renderer.h" | |
55 | #include "wx/univ/inphand.h" | |
56 | #include "wx/univ/colschem.h" | |
57 | #include "wx/univ/theme.h" | |
58 | ||
0fe5e8fe VZ |
59 | class WXDLLEXPORT wxGTKMenuGeometryInfo; |
60 | ||
1e6feb95 VZ |
61 | // ---------------------------------------------------------------------------- |
62 | // constants (to be removed, for testing only) | |
63 | // ---------------------------------------------------------------------------- | |
64 | ||
e44d6a1f | 65 | static const size_t BORDER_THICKNESS = 1; |
1e6feb95 VZ |
66 | |
67 | // ---------------------------------------------------------------------------- | |
68 | // wxGTKRenderer: draw the GUI elements in GTK style | |
69 | // ---------------------------------------------------------------------------- | |
70 | ||
71 | class wxGTKRenderer : public wxRenderer | |
72 | { | |
73 | public: | |
74 | wxGTKRenderer(const wxColourScheme *scheme); | |
75 | ||
76 | // implement the base class pure virtuals | |
77 | virtual void DrawBackground(wxDC& dc, | |
78 | const wxColour& col, | |
79 | const wxRect& rect, | |
193e19cf RR |
80 | int flags = 0, |
81 | wxWindow *window = NULL ); | |
1e6feb95 VZ |
82 | virtual void DrawLabel(wxDC& dc, |
83 | const wxString& label, | |
84 | const wxRect& rect, | |
85 | int flags = 0, | |
86 | int alignment = wxALIGN_LEFT | wxALIGN_TOP, | |
87 | int indexAccel = -1, | |
88 | wxRect *rectBounds = NULL); | |
89 | virtual void DrawButtonLabel(wxDC& dc, | |
90 | const wxString& label, | |
91 | const wxBitmap& image, | |
92 | const wxRect& rect, | |
93 | int flags = 0, | |
94 | int alignment = wxALIGN_LEFT | wxALIGN_TOP, | |
95 | int indexAccel = -1, | |
96 | wxRect *rectBounds = NULL); | |
97 | virtual void DrawBorder(wxDC& dc, | |
98 | wxBorder border, | |
99 | const wxRect& rect, | |
100 | int flags = 0, | |
101 | wxRect *rectIn = (wxRect *)NULL); | |
102 | virtual void DrawHorizontalLine(wxDC& dc, | |
103 | wxCoord y, wxCoord x1, wxCoord x2); | |
104 | virtual void DrawVerticalLine(wxDC& dc, | |
105 | wxCoord x, wxCoord y1, wxCoord y2); | |
106 | virtual void DrawFrame(wxDC& dc, | |
107 | const wxString& label, | |
108 | const wxRect& rect, | |
109 | int flags = 0, | |
110 | int alignment = wxALIGN_LEFT, | |
111 | int indexAccel = -1); | |
112 | virtual void DrawTextBorder(wxDC& dc, | |
113 | wxBorder border, | |
114 | const wxRect& rect, | |
115 | int flags = 0, | |
116 | wxRect *rectIn = (wxRect *)NULL); | |
117 | virtual void DrawButtonBorder(wxDC& dc, | |
118 | const wxRect& rect, | |
119 | int flags = 0, | |
120 | wxRect *rectIn = (wxRect *)NULL); | |
121 | virtual void DrawArrow(wxDC& dc, | |
122 | wxDirection dir, | |
123 | const wxRect& rect, | |
124 | int flags = 0); | |
125 | virtual void DrawScrollbarArrow(wxDC& dc, | |
126 | wxDirection dir, | |
127 | const wxRect& rect, | |
128 | int flags = 0); | |
129 | virtual void DrawScrollbarThumb(wxDC& dc, | |
130 | wxOrientation orient, | |
131 | const wxRect& rect, | |
132 | int flags = 0); | |
133 | virtual void DrawScrollbarShaft(wxDC& dc, | |
134 | wxOrientation orient, | |
135 | const wxRect& rect, | |
136 | int flags = 0); | |
137 | virtual void DrawScrollCorner(wxDC& dc, | |
138 | const wxRect& rect); | |
139 | virtual void DrawItem(wxDC& dc, | |
140 | const wxString& label, | |
141 | const wxRect& rect, | |
142 | int flags = 0); | |
143 | virtual void DrawCheckItem(wxDC& dc, | |
144 | const wxString& label, | |
145 | const wxBitmap& bitmap, | |
146 | const wxRect& rect, | |
147 | int flags = 0); | |
148 | virtual void DrawCheckButton(wxDC& dc, | |
149 | const wxString& label, | |
150 | const wxBitmap& bitmap, | |
151 | const wxRect& rect, | |
152 | int flags = 0, | |
153 | wxAlignment align = wxALIGN_LEFT, | |
154 | int indexAccel = -1); | |
155 | ||
156 | virtual void DrawRadioButton(wxDC& dc, | |
157 | const wxString& label, | |
158 | const wxBitmap& bitmap, | |
159 | const wxRect& rect, | |
160 | int flags = 0, | |
161 | wxAlignment align = wxALIGN_LEFT, | |
162 | int indexAccel = -1); | |
163 | ||
3216dbf5 VZ |
164 | virtual void DrawToolBarButton(wxDC& dc, |
165 | const wxString& label, | |
166 | const wxBitmap& bitmap, | |
167 | const wxRect& rect, | |
168 | int flags); | |
169 | ||
1e6feb95 VZ |
170 | virtual void DrawTextLine(wxDC& dc, |
171 | const wxString& text, | |
172 | const wxRect& rect, | |
173 | int selStart = -1, | |
174 | int selEnd = -1, | |
175 | int flags = 0); | |
176 | virtual void DrawLineWrapMark(wxDC& dc, const wxRect& rect); | |
177 | virtual void DrawTab(wxDC& dc, | |
178 | const wxRect& rect, | |
179 | wxDirection dir, | |
180 | const wxString& label, | |
181 | const wxBitmap& bitmap = wxNullBitmap, | |
182 | int flags = 0, | |
183 | int indexAccel = -1); | |
184 | ||
185 | virtual void DrawSliderShaft(wxDC& dc, | |
186 | const wxRect& rect, | |
187 | wxOrientation orient, | |
188 | int flags = 0, | |
189 | wxRect *rectShaft = NULL); | |
190 | virtual void DrawSliderThumb(wxDC& dc, | |
191 | const wxRect& rect, | |
192 | wxOrientation orient, | |
193 | int flags = 0); | |
194 | virtual void DrawSliderTicks(wxDC& dc, | |
195 | const wxRect& rect, | |
196 | const wxSize& sizeThumb, | |
197 | wxOrientation orient, | |
198 | int start, | |
199 | int end, | |
200 | int step, | |
201 | int flags) | |
202 | { | |
203 | // we don't have the ticks in GTK version | |
204 | } | |
205 | ||
206 | virtual void DrawMenuBarItem(wxDC& dc, | |
207 | const wxRect& rect, | |
208 | const wxString& label, | |
209 | int flags = 0, | |
210 | int indexAccel = -1); | |
211 | virtual void DrawMenuItem(wxDC& dc, | |
212 | wxCoord y, | |
213 | const wxMenuGeometryInfo& geometryInfo, | |
214 | const wxString& label, | |
215 | const wxString& accel, | |
216 | const wxBitmap& bitmap = wxNullBitmap, | |
217 | int flags = 0, | |
218 | int indexAccel = -1); | |
219 | virtual void DrawMenuSeparator(wxDC& dc, | |
220 | wxCoord y, | |
221 | const wxMenuGeometryInfo& geomInfo); | |
71e03035 VZ |
222 | |
223 | virtual void DrawStatusField(wxDC& dc, | |
224 | const wxRect& rect, | |
225 | const wxString& label, | |
226 | int flags = 0); | |
24a23c35 VS |
227 | |
228 | virtual void DrawFrameTitleBar(wxDC& dc, | |
229 | const wxRect& rect, | |
230 | const wxString& title, | |
231 | const wxIcon& icon, | |
232 | int flags, | |
813edf09 VS |
233 | int specialButton = 0, |
234 | int specialButtonFlag = 0); | |
24a23c35 VS |
235 | virtual void DrawFrameBorder(wxDC& dc, |
236 | const wxRect& rect, | |
237 | int flags); | |
238 | virtual void DrawFrameBackground(wxDC& dc, | |
239 | const wxRect& rect, | |
240 | int flags); | |
241 | virtual void DrawFrameTitle(wxDC& dc, | |
242 | const wxRect& rect, | |
243 | const wxString& title, | |
244 | int flags); | |
245 | virtual void DrawFrameIcon(wxDC& dc, | |
246 | const wxRect& rect, | |
247 | const wxIcon& icon, | |
248 | int flags); | |
249 | virtual void DrawFrameButton(wxDC& dc, | |
250 | wxCoord x, wxCoord y, | |
251 | int button, | |
252 | int flags = 0); | |
253 | ||
254 | // titlebars | |
255 | virtual wxRect GetFrameClientArea(const wxRect& rect, int flags) const; | |
256 | virtual wxSize GetFrameTotalSize(const wxSize& clientSize, int flags) const; | |
e7dda1ff | 257 | virtual wxSize GetFrameMinSize(int flags) const; |
24a23c35 | 258 | virtual wxSize GetFrameIconSize() const; |
813edf09 | 259 | virtual int HitTestFrame(const wxRect& rect, const wxPoint& pt, int flags) const; |
63f06c22 | 260 | |
1e6feb95 | 261 | virtual void GetComboBitmaps(wxBitmap *bmpNormal, |
1b488c0e | 262 | wxBitmap *bmpFocus, |
1e6feb95 VZ |
263 | wxBitmap *bmpPressed, |
264 | wxBitmap *bmpDisabled); | |
265 | ||
266 | virtual void AdjustSize(wxSize *size, const wxWindow *window); | |
267 | virtual wxRect GetBorderDimensions(wxBorder border) const; | |
268 | virtual bool AreScrollbarsInsideBorder() const; | |
269 | ||
270 | // geometry and hit testing | |
271 | virtual wxSize GetScrollbarArrowSize() const | |
272 | { return m_sizeScrollbarArrow; } | |
273 | virtual wxRect GetScrollbarRect(const wxScrollBar *scrollbar, | |
274 | wxScrollBar::Element elem, | |
275 | int thumbPos = -1) const; | |
276 | virtual wxCoord GetScrollbarSize(const wxScrollBar *scrollbar); | |
277 | virtual wxHitTest HitTestScrollbar(const wxScrollBar *scrollbar, | |
278 | const wxPoint& pt) const; | |
279 | virtual wxCoord ScrollbarToPixel(const wxScrollBar *scrollbar, | |
280 | int thumbPos = -1); | |
281 | virtual int PixelToScrollbar(const wxScrollBar *scrollbar, wxCoord coord); | |
282 | virtual wxCoord GetListboxItemHeight(wxCoord fontHeight) | |
283 | { return fontHeight + 2; } | |
284 | virtual wxSize GetCheckBitmapSize() const | |
285 | { return wxSize(10, 10); } | |
286 | virtual wxSize GetRadioBitmapSize() const | |
287 | { return wxSize(11, 11); } | |
288 | virtual wxCoord GetCheckItemMargin() const | |
289 | { return 2; } | |
290 | ||
3216dbf5 VZ |
291 | virtual wxSize GetToolBarButtonSize(wxCoord *separator) const |
292 | { if ( separator ) *separator = 5; return wxSize(16, 15); } | |
293 | virtual wxSize GetToolBarMargin() const | |
294 | { return wxSize(6, 6); } | |
295 | ||
1e6feb95 | 296 | virtual wxRect GetTextTotalArea(const wxTextCtrl *text, |
3216dbf5 | 297 | const wxRect& rect) const; |
1e6feb95 VZ |
298 | virtual wxRect GetTextClientArea(const wxTextCtrl *text, |
299 | const wxRect& rect, | |
3216dbf5 | 300 | wxCoord *extraSpaceBeyond) const; |
1e6feb95 VZ |
301 | |
302 | virtual wxSize GetTabIndent() const { return wxSize(2, 2); } | |
303 | virtual wxSize GetTabPadding() const { return wxSize(6, 6); } | |
304 | ||
305 | virtual wxCoord GetSliderDim() const { return 15; } | |
306 | virtual wxCoord GetSliderTickLen() const { return 0; } | |
307 | virtual wxRect GetSliderShaftRect(const wxRect& rect, | |
308 | wxOrientation orient) const; | |
309 | virtual wxSize GetSliderThumbSize(const wxRect& rect, | |
310 | wxOrientation orient) const; | |
311 | virtual wxSize GetProgressBarStep() const { return wxSize(16, 32); } | |
312 | ||
313 | virtual wxSize GetMenuBarItemSize(const wxSize& sizeText) const; | |
314 | virtual wxMenuGeometryInfo *GetMenuGeometry(wxWindow *win, | |
315 | const wxMenu& menu) const; | |
71e03035 VZ |
316 | |
317 | virtual wxSize GetStatusBarBorders(wxCoord *borderBetweenFields) const; | |
318 | ||
1e6feb95 VZ |
319 | // helpers for "wxBitmap wxColourScheme::Get()" |
320 | void DrawCheckBitmap(wxDC& dc, const wxRect& rect); | |
321 | void DrawUncheckBitmap(wxDC& dc, const wxRect& rect, bool isPressed); | |
322 | ||
323 | protected: | |
324 | // DrawBackground() helpers | |
325 | ||
326 | // get the colour to use for background | |
327 | wxColour GetBackgroundColour(int flags) const | |
328 | { | |
329 | if ( flags & wxCONTROL_PRESSED ) | |
330 | return wxSCHEME_COLOUR(m_scheme, CONTROL_PRESSED); | |
331 | else if ( flags & wxCONTROL_CURRENT ) | |
332 | return wxSCHEME_COLOUR(m_scheme, CONTROL_CURRENT); | |
333 | else | |
334 | return wxSCHEME_COLOUR(m_scheme, CONTROL); | |
335 | } | |
336 | ||
337 | // draw the background with any colour, not only the default one(s) | |
338 | void DoDrawBackground(wxDC& dc, | |
339 | const wxColour& col, | |
193e19cf RR |
340 | const wxRect& rect, |
341 | wxWindow *window = NULL); | |
1e6feb95 VZ |
342 | |
343 | // DrawBorder() helpers: all of them shift and clip the DC after drawing | |
344 | // the border | |
345 | ||
346 | // just draw a rectangle with the given pen | |
347 | void DrawRect(wxDC& dc, wxRect *rect, const wxPen& pen); | |
348 | ||
349 | // draw the lower left part of rectangle | |
350 | void DrawHalfRect(wxDC& dc, wxRect *rect, const wxPen& pen); | |
351 | ||
352 | // draw the rectange using the first brush for the left and top sides and | |
353 | // the second one for the bottom and right ones | |
354 | void DrawShadedRect(wxDC& dc, wxRect *rect, | |
355 | const wxPen& pen1, const wxPen& pen2); | |
356 | ||
357 | // as DrawShadedRect() but the pixels in the bottom left and upper right | |
358 | // border are drawn with the pen1, not pen2 | |
359 | void DrawAntiShadedRect(wxDC& dc, wxRect *rect, | |
360 | const wxPen& pen1, const wxPen& pen2); | |
361 | ||
362 | // used for drawing opened rectangles - draws only one side of it at once | |
363 | // (and doesn't adjust the rect) | |
364 | void DrawAntiShadedRectSide(wxDC& dc, | |
365 | const wxRect& rect, | |
366 | const wxPen& pen1, | |
367 | const wxPen& pen2, | |
368 | wxDirection dir); | |
369 | ||
370 | // draw an opened rect for the arrow in given direction | |
371 | void DrawArrowBorder(wxDC& dc, | |
372 | wxRect *rect, | |
373 | wxDirection dir); | |
374 | ||
375 | // draw two sides of the rectangle | |
376 | void DrawThumbBorder(wxDC& dc, | |
377 | wxRect *rect, | |
378 | wxOrientation orient); | |
379 | ||
380 | // draw the normal 3D border | |
381 | void DrawRaisedBorder(wxDC& dc, wxRect *rect); | |
382 | ||
383 | // just as DrawRaisedBorder() except that the bottom left and up right | |
384 | // pixels of the interior rect are drawn in another colour (i.e. the inner | |
385 | // rect is drawn with DrawAntiShadedRect() and not DrawShadedRect()) | |
386 | void DrawAntiRaisedBorder(wxDC& dc, wxRect *rect); | |
387 | ||
388 | // returns the size of the arrow for the scrollbar (depends on | |
389 | // orientation) | |
390 | wxSize GetScrollbarArrowSize(const wxScrollBar *scrollbar) const | |
391 | { | |
392 | wxSize size; | |
393 | if ( scrollbar->IsVertical() ) | |
394 | { | |
395 | size = m_sizeScrollbarArrow; | |
396 | } | |
397 | else | |
398 | { | |
399 | size.x = m_sizeScrollbarArrow.y; | |
400 | size.y = m_sizeScrollbarArrow.x; | |
401 | } | |
402 | ||
403 | return size; | |
404 | } | |
405 | ||
406 | // get the line wrap indicator bitmap | |
3216dbf5 | 407 | wxBitmap GetLineWrapBitmap() const; |
1e6feb95 VZ |
408 | |
409 | // DrawCheckBitmap and DrawRadioBitmap helpers | |
410 | ||
411 | // draw the check bitmaps once and cache them for later use | |
412 | wxBitmap GetCheckBitmap(int flags); | |
413 | ||
414 | // draw a /\ or \/ line from (x1, y1) to (x2, y1) passing by the point | |
415 | // ((x1 + x2)/2, y2) | |
416 | void DrawUpZag(wxDC& dc, | |
417 | wxCoord x1, wxCoord x2, | |
418 | wxCoord y1, wxCoord y2); | |
419 | void DrawDownZag(wxDC& dc, | |
420 | wxCoord x1, wxCoord x2, | |
421 | wxCoord y1, wxCoord y2); | |
422 | ||
423 | // draw the radio button bitmap for the given state | |
424 | void DrawRadioBitmap(wxDC& dc, const wxRect& rect, int flags); | |
425 | ||
426 | // draw check/radio - the bitmap must be a valid one by now | |
427 | void DoDrawCheckOrRadioBitmap(wxDC& dc, | |
428 | const wxString& label, | |
429 | const wxBitmap& bitmap, | |
430 | const wxRect& rectTotal, | |
431 | int flags, | |
432 | wxAlignment align, | |
433 | int indexAccel); | |
434 | ||
0fe5e8fe VZ |
435 | // common part of DrawMenuItem() and DrawMenuBarItem() |
436 | void DoDrawMenuItem(wxDC& dc, | |
437 | const wxRect& rect, | |
438 | const wxString& label, | |
439 | int flags, | |
440 | int indexAccel, | |
441 | const wxString& accel = _T(""), | |
442 | const wxBitmap& bitmap = wxNullBitmap, | |
443 | const wxGTKMenuGeometryInfo *geometryInfo = NULL); | |
444 | ||
1b488c0e VZ |
445 | // initialize the combo bitmaps |
446 | void InitComboBitmaps(); | |
447 | ||
1e6feb95 VZ |
448 | private: |
449 | const wxColourScheme *m_scheme; | |
450 | ||
451 | // data | |
452 | wxSize m_sizeScrollbarArrow; | |
453 | ||
454 | // GDI objects | |
455 | wxPen m_penBlack, | |
456 | m_penDarkGrey, | |
457 | m_penGrey, | |
458 | m_penLightGrey, | |
459 | m_penHighlight; | |
460 | ||
461 | // the checkbox bitmaps: first row is for the normal, second for the | |
462 | // pressed state and the columns are for checked and unchecked status | |
463 | // respectively | |
464 | wxBitmap m_bitmapsCheckbox[2][2]; | |
465 | ||
466 | // the line wrap bitmap (drawn at the end of wrapped lines) | |
467 | wxBitmap m_bmpLineWrap; | |
1b488c0e VZ |
468 | |
469 | // the combobox bitmaps | |
470 | enum | |
471 | { | |
472 | ComboState_Normal, | |
473 | ComboState_Focus, | |
474 | ComboState_Pressed, | |
475 | ComboState_Disabled, | |
476 | ComboState_Max | |
477 | }; | |
478 | ||
479 | wxBitmap m_bitmapsCombo[ComboState_Max]; | |
1e6feb95 VZ |
480 | }; |
481 | ||
482 | // ---------------------------------------------------------------------------- | |
483 | // wxGTKInputHandler and derived classes: process the keyboard and mouse | |
484 | // messages according to GTK standards | |
485 | // ---------------------------------------------------------------------------- | |
486 | ||
487 | class wxGTKInputHandler : public wxInputHandler | |
488 | { | |
489 | public: | |
490 | wxGTKInputHandler(wxGTKRenderer *renderer); | |
491 | ||
67e49a98 | 492 | virtual bool HandleKey(wxInputConsumer *control, |
1e6feb95 VZ |
493 | const wxKeyEvent& event, |
494 | bool pressed); | |
67e49a98 | 495 | virtual bool HandleMouse(wxInputConsumer *control, |
1e6feb95 | 496 | const wxMouseEvent& event); |
67e49a98 | 497 | virtual bool HandleMouseMove(wxInputConsumer *control, const wxMouseEvent& event); |
1e6feb95 VZ |
498 | |
499 | protected: | |
500 | wxGTKRenderer *m_renderer; | |
501 | }; | |
502 | ||
503 | class wxGTKScrollBarInputHandler : public wxStdScrollBarInputHandler | |
504 | { | |
505 | public: | |
506 | wxGTKScrollBarInputHandler(wxRenderer *renderer, wxInputHandler *handler) | |
507 | : wxStdScrollBarInputHandler(renderer, handler) { } | |
508 | ||
509 | protected: | |
510 | virtual void Highlight(wxScrollBar *scrollbar, bool doIt) | |
511 | { | |
512 | // only arrows and the thumb can be highlighted | |
513 | if ( !IsArrow() && m_htLast != wxHT_SCROLLBAR_THUMB ) | |
514 | return; | |
515 | ||
516 | wxStdScrollBarInputHandler::Highlight(scrollbar, doIt); | |
517 | } | |
518 | ||
519 | virtual void Press(wxScrollBar *scrollbar, bool doIt) | |
520 | { | |
521 | // only arrows can be pressed | |
522 | if ( !IsArrow() ) | |
523 | return; | |
524 | ||
525 | wxStdScrollBarInputHandler::Press(scrollbar, doIt); | |
526 | } | |
527 | ||
528 | virtual bool IsAllowedButton(int WXUNUSED(button)) { return TRUE; } | |
529 | ||
530 | bool IsArrow() const | |
531 | { | |
532 | return m_htLast == wxHT_SCROLLBAR_ARROW_LINE_1 || | |
533 | m_htLast == wxHT_SCROLLBAR_ARROW_LINE_2; | |
534 | } | |
535 | }; | |
536 | ||
537 | class wxGTKCheckboxInputHandler : public wxStdCheckboxInputHandler | |
538 | { | |
539 | public: | |
540 | wxGTKCheckboxInputHandler(wxInputHandler *handler) | |
541 | : wxStdCheckboxInputHandler(handler) { } | |
542 | ||
67e49a98 | 543 | virtual bool HandleKey(wxInputConsumer *control, |
1e6feb95 VZ |
544 | const wxKeyEvent& event, |
545 | bool pressed); | |
546 | }; | |
547 | ||
548 | class wxGTKTextCtrlInputHandler : public wxStdTextCtrlInputHandler | |
549 | { | |
550 | public: | |
551 | wxGTKTextCtrlInputHandler(wxInputHandler *handler) | |
552 | : wxStdTextCtrlInputHandler(handler) { } | |
553 | ||
67e49a98 | 554 | virtual bool HandleKey(wxInputConsumer *control, |
1e6feb95 VZ |
555 | const wxKeyEvent& event, |
556 | bool pressed); | |
557 | }; | |
558 | ||
559 | // ---------------------------------------------------------------------------- | |
560 | // wxGTKColourScheme: uses the standard GTK colours | |
561 | // ---------------------------------------------------------------------------- | |
562 | ||
563 | class wxGTKColourScheme : public wxColourScheme | |
564 | { | |
565 | public: | |
566 | virtual wxColour Get(StdColour col) const; | |
567 | virtual wxColour GetBackground(wxWindow *win) const; | |
568 | }; | |
569 | ||
536b70ac VS |
570 | // ---------------------------------------------------------------------------- |
571 | // wxGTKArtProvider | |
572 | // ---------------------------------------------------------------------------- | |
573 | ||
574 | class wxGTKArtProvider : public wxArtProvider | |
575 | { | |
576 | protected: | |
577 | virtual wxBitmap CreateBitmap(const wxArtID& id, | |
578 | const wxArtClient& client, | |
579 | const wxSize& size); | |
580 | }; | |
581 | ||
1e6feb95 VZ |
582 | // ---------------------------------------------------------------------------- |
583 | // wxGTKTheme | |
584 | // ---------------------------------------------------------------------------- | |
585 | ||
586 | WX_DEFINE_ARRAY(wxInputHandler *, wxArrayHandlers); | |
587 | ||
588 | class wxGTKTheme : public wxTheme | |
589 | { | |
590 | public: | |
591 | wxGTKTheme(); | |
592 | virtual ~wxGTKTheme(); | |
593 | ||
240889a1 | 594 | virtual wxRenderer *GetRenderer(); |
536b70ac | 595 | virtual wxArtProvider *GetArtProvider(); |
1e6feb95 | 596 | virtual wxInputHandler *GetInputHandler(const wxString& control); |
240889a1 | 597 | virtual wxColourScheme *GetColourScheme(); |
1e6feb95 VZ |
598 | |
599 | private: | |
600 | // get the default input handler | |
601 | wxInputHandler *GetDefaultInputHandler(); | |
602 | ||
603 | wxGTKRenderer *m_renderer; | |
536b70ac VS |
604 | |
605 | wxGTKArtProvider *m_artProvider; | |
1e6feb95 VZ |
606 | |
607 | // the names of the already created handlers and the handlers themselves | |
608 | // (these arrays are synchronized) | |
609 | wxSortedArrayString m_handlerNames; | |
610 | wxArrayHandlers m_handlers; | |
611 | ||
612 | wxGTKInputHandler *m_handlerDefault; | |
613 | ||
614 | wxGTKColourScheme *m_scheme; | |
615 | ||
616 | WX_DECLARE_THEME(gtk) | |
617 | }; | |
618 | ||
619 | // ============================================================================ | |
620 | // implementation | |
621 | // ============================================================================ | |
622 | ||
623 | WX_IMPLEMENT_THEME(wxGTKTheme, gtk, wxTRANSLATE("GTK+ theme")); | |
624 | ||
625 | // ---------------------------------------------------------------------------- | |
626 | // wxGTKTheme | |
627 | // ---------------------------------------------------------------------------- | |
628 | ||
629 | wxGTKTheme::wxGTKTheme() | |
630 | { | |
240889a1 VS |
631 | m_scheme = NULL; |
632 | m_renderer = NULL; | |
1e6feb95 VZ |
633 | m_handlerDefault = NULL; |
634 | } | |
635 | ||
636 | wxGTKTheme::~wxGTKTheme() | |
637 | { | |
638 | size_t count = m_handlers.GetCount(); | |
639 | for ( size_t n = 0; n < count; n++ ) | |
640 | { | |
641 | if ( m_handlers[n] != m_handlerDefault ) | |
642 | delete m_handlers[n]; | |
643 | } | |
644 | ||
645 | delete m_handlerDefault; | |
646 | delete m_renderer; | |
647 | delete m_scheme; | |
648 | } | |
649 | ||
240889a1 VS |
650 | wxRenderer *wxGTKTheme::GetRenderer() |
651 | { | |
652 | if ( !m_renderer ) | |
653 | { | |
654 | m_renderer = new wxGTKRenderer(GetColourScheme()); | |
655 | } | |
656 | ||
657 | return m_renderer; | |
658 | } | |
659 | ||
536b70ac VS |
660 | wxArtProvider *wxGTKTheme::GetArtProvider() |
661 | { | |
662 | if ( !m_artProvider ) | |
663 | { | |
664 | m_artProvider = new wxGTKArtProvider; | |
665 | } | |
666 | ||
667 | return m_artProvider; | |
668 | } | |
669 | ||
240889a1 VS |
670 | wxColourScheme *wxGTKTheme::GetColourScheme() |
671 | { | |
672 | if ( !m_scheme ) | |
673 | { | |
674 | m_scheme = new wxGTKColourScheme; | |
675 | } | |
676 | return m_scheme; | |
677 | } | |
678 | ||
1e6feb95 VZ |
679 | wxInputHandler *wxGTKTheme::GetDefaultInputHandler() |
680 | { | |
681 | if ( !m_handlerDefault ) | |
682 | { | |
683 | m_handlerDefault = new wxGTKInputHandler(m_renderer); | |
684 | } | |
685 | ||
686 | return m_handlerDefault; | |
687 | } | |
688 | ||
689 | wxInputHandler *wxGTKTheme::GetInputHandler(const wxString& control) | |
690 | { | |
691 | wxInputHandler *handler; | |
692 | int n = m_handlerNames.Index(control); | |
693 | if ( n == wxNOT_FOUND ) | |
694 | { | |
695 | // create a new handler | |
696 | if ( control == wxINP_HANDLER_SCROLLBAR ) | |
697 | handler = new wxGTKScrollBarInputHandler(m_renderer, | |
698 | GetDefaultInputHandler()); | |
699 | #if wxUSE_BUTTON | |
700 | else if ( control == wxINP_HANDLER_BUTTON ) | |
701 | handler = new wxStdButtonInputHandler(GetDefaultInputHandler()); | |
702 | #endif // wxUSE_CHECKBOX | |
703 | #if wxUSE_CHECKBOX | |
704 | else if ( control == wxINP_HANDLER_CHECKBOX ) | |
705 | handler = new wxGTKCheckboxInputHandler(GetDefaultInputHandler()); | |
706 | #endif // wxUSE_CHECKBOX | |
707 | #if wxUSE_COMBOBOX | |
708 | else if ( control == wxINP_HANDLER_COMBOBOX ) | |
709 | handler = new wxStdComboBoxInputHandler(GetDefaultInputHandler()); | |
710 | #endif // wxUSE_COMBOBOX | |
711 | #if wxUSE_LISTBOX | |
712 | else if ( control == wxINP_HANDLER_LISTBOX ) | |
713 | handler = new wxStdListboxInputHandler(GetDefaultInputHandler()); | |
714 | #endif // wxUSE_LISTBOX | |
715 | #if wxUSE_CHECKLISTBOX | |
716 | else if ( control == wxINP_HANDLER_CHECKLISTBOX ) | |
717 | handler = new wxStdCheckListboxInputHandler(GetDefaultInputHandler()); | |
718 | #endif // wxUSE_CHECKLISTBOX | |
719 | #if wxUSE_TEXTCTRL | |
720 | else if ( control == wxINP_HANDLER_TEXTCTRL ) | |
721 | handler = new wxGTKTextCtrlInputHandler(GetDefaultInputHandler()); | |
722 | #endif // wxUSE_TEXTCTRL | |
723 | #if wxUSE_SLIDER | |
724 | else if ( control == wxINP_HANDLER_SLIDER ) | |
725 | handler = new wxStdSliderButtonInputHandler(GetDefaultInputHandler()); | |
726 | #endif // wxUSE_SLIDER | |
727 | #if wxUSE_SPINBTN | |
728 | else if ( control == wxINP_HANDLER_SPINBTN ) | |
729 | handler = new wxStdSpinButtonInputHandler(GetDefaultInputHandler()); | |
730 | #endif // wxUSE_SPINBTN | |
731 | #if wxUSE_NOTEBOOK | |
732 | else if ( control == wxINP_HANDLER_NOTEBOOK ) | |
733 | handler = new wxStdNotebookInputHandler(GetDefaultInputHandler()); | |
734 | #endif // wxUSE_NOTEBOOK | |
3216dbf5 VZ |
735 | #if wxUSE_TOOLBAR |
736 | else if ( control == wxINP_HANDLER_TOOLBAR ) | |
737 | handler = new wxStdToolbarInputHandler(GetDefaultInputHandler()); | |
738 | #endif // wxUSE_TOOLBAR | |
813edf09 VS |
739 | else if ( control == wxINP_HANDLER_TOPLEVEL ) |
740 | handler = new wxStdFrameInputHandler(GetDefaultInputHandler()); | |
1e6feb95 VZ |
741 | else |
742 | handler = GetDefaultInputHandler(); | |
743 | ||
744 | n = m_handlerNames.Add(control); | |
745 | m_handlers.Insert(handler, n); | |
746 | } | |
747 | else // we already have it | |
748 | { | |
749 | handler = m_handlers[n]; | |
750 | } | |
751 | ||
752 | return handler; | |
753 | } | |
754 | ||
755 | // ============================================================================ | |
756 | // wxGTKColourScheme | |
757 | // ============================================================================ | |
758 | ||
759 | wxColour wxGTKColourScheme::GetBackground(wxWindow *win) const | |
760 | { | |
761 | wxColour col; | |
762 | if ( win->UseBgCol() ) | |
763 | { | |
764 | // use the user specified colour | |
765 | col = win->GetBackgroundColour(); | |
766 | } | |
767 | ||
768 | if ( win->IsContainerWindow() ) | |
769 | { | |
770 | // doesn't depend on the state | |
771 | if ( !col.Ok() ) | |
772 | { | |
773 | col = Get(WINDOW); | |
774 | } | |
775 | } | |
776 | else | |
777 | { | |
778 | int flags = win->GetStateFlags(); | |
779 | ||
780 | // the colour set by the user should be used for the normal state | |
781 | // and for the states for which we don't have any specific colours | |
782 | if ( !col.Ok() || (flags != 0) ) | |
783 | { | |
784 | if ( wxDynamicCast(win, wxScrollBar) ) | |
785 | col = Get(SCROLLBAR); | |
786 | else if ( (flags & wxCONTROL_CURRENT) && win->CanBeHighlighted() ) | |
787 | col = Get(CONTROL_CURRENT); | |
788 | else if ( flags & wxCONTROL_PRESSED ) | |
789 | col = Get(CONTROL_PRESSED); | |
790 | else | |
791 | col = Get(CONTROL); | |
792 | } | |
793 | } | |
794 | ||
795 | return col; | |
796 | } | |
797 | ||
798 | wxColour wxGTKColourScheme::Get(wxGTKColourScheme::StdColour col) const | |
799 | { | |
800 | switch ( col ) | |
801 | { | |
802 | case WINDOW: return *wxWHITE; | |
803 | ||
804 | case SHADOW_DARK: return *wxBLACK; | |
805 | case SHADOW_HIGHLIGHT: return *wxWHITE; | |
806 | case SHADOW_IN: return wxColour(0xd6d6d6); | |
807 | case SHADOW_OUT: return wxColour(0x969696); | |
808 | ||
809 | case CONTROL: return wxColour(0xd6d6d6); | |
810 | case CONTROL_PRESSED: return wxColour(0xc3c3c3); | |
811 | case CONTROL_CURRENT: return wxColour(0xeaeaea); | |
812 | ||
813 | case CONTROL_TEXT: return *wxBLACK; | |
814 | case CONTROL_TEXT_DISABLED: | |
815 | return wxColour(0x757575); | |
816 | case CONTROL_TEXT_DISABLED_SHADOW: | |
817 | return *wxWHITE; | |
818 | ||
819 | case SCROLLBAR: | |
820 | case SCROLLBAR_PRESSED: return wxColour(0xc3c3c3); | |
821 | ||
822 | case HIGHLIGHT: return wxColour(0x9c0000); | |
823 | case HIGHLIGHT_TEXT: return wxColour(0xffffff); | |
824 | ||
a407ff6a VZ |
825 | case GAUGE: return Get(CONTROL_CURRENT); |
826 | ||
1e6feb95 VZ |
827 | case MAX: |
828 | default: | |
829 | wxFAIL_MSG(_T("invalid standard colour")); | |
830 | return *wxBLACK; | |
831 | } | |
832 | } | |
833 | ||
834 | // ============================================================================ | |
835 | // wxGTKRenderer | |
836 | // ============================================================================ | |
837 | ||
838 | // ---------------------------------------------------------------------------- | |
839 | // construction | |
840 | // ---------------------------------------------------------------------------- | |
841 | ||
842 | wxGTKRenderer::wxGTKRenderer(const wxColourScheme *scheme) | |
843 | { | |
844 | // init data | |
845 | m_scheme = scheme; | |
846 | m_sizeScrollbarArrow = wxSize(15, 14); | |
847 | ||
848 | // init pens | |
849 | m_penBlack = wxPen(wxSCHEME_COLOUR(scheme, SHADOW_DARK), 0, wxSOLID); | |
850 | m_penDarkGrey = wxPen(wxSCHEME_COLOUR(scheme, SHADOW_OUT), 0, wxSOLID); | |
851 | m_penGrey = wxPen(wxSCHEME_COLOUR(scheme, SCROLLBAR), 0, wxSOLID); | |
852 | m_penLightGrey = wxPen(wxSCHEME_COLOUR(scheme, SHADOW_IN), 0, wxSOLID); | |
853 | m_penHighlight = wxPen(wxSCHEME_COLOUR(scheme, SHADOW_HIGHLIGHT), 0, wxSOLID); | |
854 | } | |
855 | ||
856 | // ---------------------------------------------------------------------------- | |
857 | // border stuff | |
858 | // ---------------------------------------------------------------------------- | |
859 | ||
860 | void wxGTKRenderer::DrawRect(wxDC& dc, wxRect *rect, const wxPen& pen) | |
861 | { | |
862 | // draw | |
863 | dc.SetPen(pen); | |
864 | dc.SetBrush(*wxTRANSPARENT_BRUSH); | |
865 | dc.DrawRectangle(*rect); | |
866 | ||
867 | // adjust the rect | |
868 | rect->Inflate(-1); | |
869 | } | |
870 | ||
871 | void wxGTKRenderer::DrawHalfRect(wxDC& dc, wxRect *rect, const wxPen& pen) | |
872 | { | |
873 | // draw the bottom and right sides | |
874 | dc.SetPen(pen); | |
875 | dc.DrawLine(rect->GetLeft(), rect->GetBottom(), | |
876 | rect->GetRight() + 1, rect->GetBottom()); | |
877 | dc.DrawLine(rect->GetRight(), rect->GetTop(), | |
878 | rect->GetRight(), rect->GetBottom()); | |
879 | ||
880 | // adjust the rect | |
881 | rect->width--; | |
882 | rect->height--; | |
883 | } | |
884 | ||
885 | void wxGTKRenderer::DrawShadedRect(wxDC& dc, wxRect *rect, | |
886 | const wxPen& pen1, const wxPen& pen2) | |
887 | { | |
888 | // draw the rectangle | |
889 | dc.SetPen(pen1); | |
890 | dc.DrawLine(rect->GetLeft(), rect->GetTop(), | |
891 | rect->GetLeft(), rect->GetBottom()); | |
892 | dc.DrawLine(rect->GetLeft() + 1, rect->GetTop(), | |
893 | rect->GetRight(), rect->GetTop()); | |
894 | dc.SetPen(pen2); | |
895 | dc.DrawLine(rect->GetRight(), rect->GetTop(), | |
896 | rect->GetRight(), rect->GetBottom()); | |
897 | dc.DrawLine(rect->GetLeft(), rect->GetBottom(), | |
898 | rect->GetRight() + 1, rect->GetBottom()); | |
899 | ||
900 | // adjust the rect | |
901 | rect->Inflate(-1); | |
902 | } | |
903 | ||
904 | void wxGTKRenderer::DrawAntiShadedRectSide(wxDC& dc, | |
905 | const wxRect& rect, | |
906 | const wxPen& pen1, | |
907 | const wxPen& pen2, | |
908 | wxDirection dir) | |
909 | { | |
910 | dc.SetPen(dir == wxLEFT || dir == wxUP ? pen1 : pen2); | |
911 | ||
912 | switch ( dir ) | |
913 | { | |
914 | case wxLEFT: | |
915 | dc.DrawLine(rect.GetLeft(), rect.GetTop(), | |
916 | rect.GetLeft(), rect.GetBottom() + 1); | |
917 | break; | |
918 | ||
919 | case wxUP: | |
920 | dc.DrawLine(rect.GetLeft(), rect.GetTop(), | |
921 | rect.GetRight() + 1, rect.GetTop()); | |
922 | break; | |
923 | ||
924 | case wxRIGHT: | |
925 | dc.DrawLine(rect.GetRight(), rect.GetTop(), | |
926 | rect.GetRight(), rect.GetBottom() + 1); | |
927 | break; | |
928 | ||
929 | case wxDOWN: | |
930 | dc.DrawLine(rect.GetLeft(), rect.GetBottom(), | |
931 | rect.GetRight() + 1, rect.GetBottom()); | |
932 | break; | |
933 | ||
934 | default: | |
935 | wxFAIL_MSG(_T("unknown rectangle side")); | |
936 | } | |
937 | } | |
938 | ||
939 | void wxGTKRenderer::DrawAntiShadedRect(wxDC& dc, wxRect *rect, | |
940 | const wxPen& pen1, const wxPen& pen2) | |
941 | { | |
942 | // draw the rectangle | |
943 | dc.SetPen(pen1); | |
944 | dc.DrawLine(rect->GetLeft(), rect->GetTop(), | |
945 | rect->GetLeft(), rect->GetBottom() + 1); | |
946 | dc.DrawLine(rect->GetLeft() + 1, rect->GetTop(), | |
947 | rect->GetRight() + 1, rect->GetTop()); | |
948 | dc.SetPen(pen2); | |
949 | dc.DrawLine(rect->GetRight(), rect->GetTop() + 1, | |
950 | rect->GetRight(), rect->GetBottom()); | |
951 | dc.DrawLine(rect->GetLeft() + 1, rect->GetBottom(), | |
952 | rect->GetRight() + 1, rect->GetBottom()); | |
953 | ||
954 | // adjust the rect | |
955 | rect->Inflate(-1); | |
956 | } | |
957 | ||
958 | void wxGTKRenderer::DrawRaisedBorder(wxDC& dc, wxRect *rect) | |
959 | { | |
960 | DrawShadedRect(dc, rect, m_penHighlight, m_penBlack); | |
961 | DrawShadedRect(dc, rect, m_penLightGrey, m_penDarkGrey); | |
962 | } | |
963 | ||
964 | void wxGTKRenderer::DrawAntiRaisedBorder(wxDC& dc, wxRect *rect) | |
965 | { | |
966 | DrawShadedRect(dc, rect, m_penHighlight, m_penBlack); | |
967 | DrawAntiShadedRect(dc, rect, m_penLightGrey, m_penDarkGrey); | |
968 | } | |
969 | ||
970 | void wxGTKRenderer::DrawBorder(wxDC& dc, | |
971 | wxBorder border, | |
972 | const wxRect& rectTotal, | |
973 | int flags, | |
974 | wxRect *rectIn) | |
975 | { | |
976 | size_t width; | |
977 | ||
978 | wxRect rect = rectTotal; | |
979 | ||
980 | switch ( border ) | |
981 | { | |
982 | case wxBORDER_SUNKEN: | |
89e7a223 | 983 | for ( width = 0; width < BORDER_THICKNESS; width++ ) |
1e6feb95 VZ |
984 | { |
985 | DrawAntiShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight); | |
986 | DrawShadedRect(dc, &rect, m_penBlack, m_penLightGrey); | |
987 | } | |
988 | break; | |
989 | ||
990 | case wxBORDER_STATIC: | |
89e7a223 | 991 | for ( width = 0; width < BORDER_THICKNESS; width++ ) |
e4606ed9 VZ |
992 | { |
993 | DrawShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight); | |
994 | } | |
1e6feb95 VZ |
995 | break; |
996 | ||
997 | case wxBORDER_RAISED: | |
89e7a223 | 998 | for ( width = 0; width < BORDER_THICKNESS; width++ ) |
1e6feb95 VZ |
999 | { |
1000 | DrawRaisedBorder(dc, &rect); | |
1001 | } | |
1002 | break; | |
1003 | ||
1004 | case wxBORDER_DOUBLE: | |
89e7a223 | 1005 | for ( width = 0; width < BORDER_THICKNESS; width++ ) |
e4606ed9 VZ |
1006 | { |
1007 | DrawShadedRect(dc, &rect, m_penLightGrey, m_penBlack); | |
1008 | DrawShadedRect(dc, &rect, m_penHighlight, m_penDarkGrey); | |
1009 | DrawRect(dc, &rect, m_penLightGrey); | |
1010 | } | |
1e6feb95 VZ |
1011 | break; |
1012 | ||
1013 | case wxBORDER_SIMPLE: | |
e4606ed9 VZ |
1014 | for ( width = 0; width < BORDER_THICKNESS; width++ ) |
1015 | { | |
1016 | DrawRect(dc, &rect, m_penBlack); | |
1017 | } | |
1e6feb95 VZ |
1018 | break; |
1019 | ||
1020 | default: | |
1021 | wxFAIL_MSG(_T("unknown border type")); | |
1022 | // fall through | |
1023 | ||
1024 | case wxBORDER_DEFAULT: | |
1025 | case wxBORDER_NONE: | |
1026 | break; | |
1027 | } | |
1028 | ||
1029 | if ( rectIn ) | |
1030 | *rectIn = rect; | |
1031 | } | |
1032 | ||
1033 | wxRect wxGTKRenderer::GetBorderDimensions(wxBorder border) const | |
1034 | { | |
1035 | wxCoord width; | |
1036 | switch ( border ) | |
1037 | { | |
1038 | case wxBORDER_RAISED: | |
1039 | case wxBORDER_SUNKEN: | |
1040 | width = 2*BORDER_THICKNESS; | |
1041 | break; | |
1042 | ||
1043 | case wxBORDER_SIMPLE: | |
1044 | case wxBORDER_STATIC: | |
e4606ed9 | 1045 | width = BORDER_THICKNESS; |
1e6feb95 VZ |
1046 | break; |
1047 | ||
1048 | case wxBORDER_DOUBLE: | |
e4606ed9 | 1049 | width = 3*BORDER_THICKNESS; |
1e6feb95 VZ |
1050 | break; |
1051 | ||
1052 | default: | |
1053 | wxFAIL_MSG(_T("unknown border type")); | |
1054 | // fall through | |
1055 | ||
1056 | case wxBORDER_DEFAULT: | |
1057 | case wxBORDER_NONE: | |
1058 | width = 0; | |
1059 | break; | |
1060 | } | |
1061 | ||
1062 | wxRect rect; | |
1063 | rect.x = | |
1064 | rect.y = | |
1065 | rect.width = | |
1066 | rect.height = width; | |
1067 | ||
1068 | return rect; | |
1069 | } | |
1070 | ||
1071 | bool wxGTKRenderer::AreScrollbarsInsideBorder() const | |
1072 | { | |
1073 | // no, the scrollbars are outside the border in GTK+ | |
1074 | return FALSE; | |
1075 | } | |
1076 | ||
1077 | // ---------------------------------------------------------------------------- | |
1078 | // special borders | |
1079 | // ---------------------------------------------------------------------------- | |
1080 | ||
1081 | void wxGTKRenderer::DrawTextBorder(wxDC& dc, | |
1082 | wxBorder border, | |
1083 | const wxRect& rectOrig, | |
1084 | int flags, | |
1085 | wxRect *rectIn) | |
1086 | { | |
1087 | wxRect rect = rectOrig; | |
1088 | ||
89e7a223 | 1089 | if ( border != wxBORDER_NONE ) |
1e6feb95 | 1090 | { |
e4606ed9 VZ |
1091 | if ( flags & wxCONTROL_FOCUSED ) |
1092 | { | |
1093 | DrawRect(dc, &rect, m_penBlack); | |
1094 | DrawAntiShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight); | |
1095 | } | |
1096 | else // !focused | |
1097 | { | |
1098 | DrawAntiShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight); | |
1099 | DrawAntiShadedRect(dc, &rect, m_penBlack, m_penHighlight); | |
1100 | } | |
1e6feb95 VZ |
1101 | } |
1102 | ||
1103 | if ( rectIn ) | |
1104 | *rectIn = rect; | |
1105 | } | |
1106 | ||
1107 | void wxGTKRenderer::DrawButtonBorder(wxDC& dc, | |
1108 | const wxRect& rectTotal, | |
1109 | int flags, | |
1110 | wxRect *rectIn) | |
1111 | { | |
1112 | wxRect rect = rectTotal; | |
1113 | ||
1114 | if ( flags & wxCONTROL_PRESSED ) | |
1115 | { | |
1116 | // button pressed: draw a black border around it and an inward shade | |
1117 | DrawRect(dc, &rect, m_penBlack); | |
e4606ed9 | 1118 | |
89e7a223 | 1119 | for ( size_t width = 0; width < BORDER_THICKNESS; width++ ) |
e4606ed9 VZ |
1120 | { |
1121 | DrawAntiShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight); | |
1122 | DrawAntiShadedRect(dc, &rect, m_penBlack, m_penDarkGrey); | |
1123 | } | |
1e6feb95 VZ |
1124 | } |
1125 | else | |
1126 | { | |
1127 | // button not pressed | |
1128 | ||
1129 | if ( flags & wxCONTROL_ISDEFAULT ) | |
1130 | { | |
1131 | // TODO | |
1132 | } | |
1133 | ||
1134 | if ( flags & wxCONTROL_FOCUSED ) | |
1135 | { | |
1136 | // button is currently default: add an extra border around it | |
1137 | DrawRect(dc, &rect, m_penBlack); | |
1138 | } | |
1139 | ||
1140 | // now draw a normal button | |
89e7a223 | 1141 | for ( size_t width = 0; width < BORDER_THICKNESS; width++ ) |
e4606ed9 VZ |
1142 | { |
1143 | DrawShadedRect(dc, &rect, m_penHighlight, m_penBlack); | |
1144 | DrawAntiShadedRect(dc, &rect, | |
1145 | wxPen(GetBackgroundColour(flags), 0, wxSOLID), | |
1146 | m_penDarkGrey); | |
1147 | } | |
1e6feb95 VZ |
1148 | } |
1149 | ||
1150 | if ( rectIn ) | |
1151 | { | |
1152 | *rectIn = rect; | |
1153 | } | |
1154 | } | |
1155 | ||
1156 | // ---------------------------------------------------------------------------- | |
1157 | // lines and frames | |
1158 | // ---------------------------------------------------------------------------- | |
1159 | ||
1160 | void wxGTKRenderer::DrawHorizontalLine(wxDC& dc, | |
1161 | wxCoord y, wxCoord x1, wxCoord x2) | |
1162 | { | |
1163 | dc.SetPen(m_penDarkGrey); | |
1164 | dc.DrawLine(x1, y, x2 + 1, y); | |
1165 | dc.SetPen(m_penHighlight); | |
1166 | y++; | |
1167 | dc.DrawLine(x1, y, x2 + 1, y); | |
1168 | } | |
1169 | ||
1170 | void wxGTKRenderer::DrawVerticalLine(wxDC& dc, | |
1171 | wxCoord x, wxCoord y1, wxCoord y2) | |
1172 | { | |
1173 | dc.SetPen(m_penDarkGrey); | |
1174 | dc.DrawLine(x, y1, x, y2 + 1); | |
1175 | dc.SetPen(m_penHighlight); | |
1176 | x++; | |
1177 | dc.DrawLine(x, y1, x, y2 + 1); | |
1178 | } | |
1179 | ||
1180 | void wxGTKRenderer::DrawFrame(wxDC& dc, | |
1181 | const wxString& label, | |
1182 | const wxRect& rect, | |
1183 | int flags, | |
1184 | int alignment, | |
1185 | int indexAccel) | |
1186 | { | |
1187 | wxCoord height = 0; // of the label | |
1188 | wxRect rectFrame = rect; | |
1189 | if ( !label.empty() ) | |
1190 | { | |
1191 | // the text should touch the top border of the rect, so the frame | |
1192 | // itself should be lower | |
1193 | dc.GetTextExtent(label, NULL, &height); | |
1194 | rectFrame.y += height / 2; | |
1195 | rectFrame.height -= height / 2; | |
1196 | ||
1197 | // TODO: the +4 should be customizable | |
1198 | ||
1199 | wxRect rectText; | |
1200 | rectText.x = rectFrame.x + 4; | |
1201 | rectText.y = rect.y; | |
1202 | rectText.width = rectFrame.width - 8; | |
1203 | rectText.height = height; | |
1204 | ||
1205 | wxRect rectLabel; | |
1206 | DrawLabel(dc, label, rectText, flags, alignment, indexAccel, &rectLabel); | |
1207 | rectLabel.x -= 1; | |
1208 | rectLabel.width += 2; | |
1209 | ||
1210 | StandardDrawFrame(dc, rectFrame, rectLabel); | |
1211 | ||
1212 | // GTK+ does it like this | |
1213 | dc.SetPen(m_penHighlight); | |
1214 | dc.DrawPoint(rectText.x, rectFrame.y); | |
1215 | dc.DrawPoint(rectText.x + rectLabel.width - 3, rectFrame.y); | |
1216 | } | |
1217 | else | |
1218 | { | |
1219 | // just draw the complete frame | |
1220 | DrawShadedRect(dc, &rectFrame, m_penDarkGrey, m_penHighlight); | |
1221 | DrawShadedRect(dc, &rectFrame, m_penHighlight, m_penDarkGrey); | |
1222 | } | |
1223 | } | |
1224 | ||
1225 | // ---------------------------------------------------------------------------- | |
1226 | // label | |
1227 | // ---------------------------------------------------------------------------- | |
1228 | ||
1229 | void wxGTKRenderer::DrawLabel(wxDC& dc, | |
1230 | const wxString& label, | |
1231 | const wxRect& rect, | |
1232 | int flags, | |
1233 | int alignment, | |
1234 | int indexAccel, | |
1235 | wxRect *rectBounds) | |
1236 | { | |
1237 | DrawButtonLabel(dc, label, wxNullBitmap, rect, flags, | |
1238 | alignment, indexAccel, rectBounds); | |
1239 | } | |
1240 | ||
1241 | void wxGTKRenderer::DrawButtonLabel(wxDC& dc, | |
1242 | const wxString& label, | |
1243 | const wxBitmap& image, | |
1244 | const wxRect& rect, | |
1245 | int flags, | |
1246 | int alignment, | |
1247 | int indexAccel, | |
1248 | wxRect *rectBounds) | |
1249 | { | |
1250 | if ( flags & wxCONTROL_DISABLED ) | |
1251 | { | |
1252 | // make the text grey and draw a shade for it | |
1253 | dc.SetTextForeground(*wxWHITE); // FIXME hardcoded colour | |
1254 | wxRect rectShadow = rect; | |
1255 | rectShadow.x++; | |
1256 | rectShadow.y++; | |
1257 | dc.DrawLabel(label, rectShadow, alignment, indexAccel); | |
1258 | dc.SetTextForeground(wxSCHEME_COLOUR(m_scheme, CONTROL_TEXT_DISABLED)); | |
1259 | } | |
0fe5e8fe VZ |
1260 | else |
1261 | { | |
1262 | dc.SetTextForeground(wxSCHEME_COLOUR(m_scheme, CONTROL_TEXT)); | |
1263 | } | |
1e6feb95 VZ |
1264 | |
1265 | dc.DrawLabel(label, image, rect, alignment, indexAccel, rectBounds); | |
1266 | } | |
1267 | ||
1268 | void wxGTKRenderer::DrawItem(wxDC& dc, | |
1269 | const wxString& label, | |
1270 | const wxRect& rect, | |
1271 | int flags) | |
1272 | { | |
1273 | wxLogTrace(_T("listbox"), _T("drawing item '%s' at (%d, %d)-(%d, %d)"), | |
1274 | label.c_str(), | |
1275 | rect.x, rect.y, | |
1276 | rect.x + rect.width, rect.y + rect.height); | |
1277 | ||
1278 | wxColour colFg; | |
1279 | if ( flags & wxCONTROL_SELECTED ) | |
1280 | { | |
1281 | dc.SetBrush(wxBrush(wxSCHEME_COLOUR(m_scheme, HIGHLIGHT), wxSOLID)); | |
1282 | dc.SetPen(*wxTRANSPARENT_PEN); | |
1283 | dc.DrawRectangle(rect); | |
1284 | ||
1285 | colFg = dc.GetTextForeground(); | |
1286 | dc.SetTextForeground(wxSCHEME_COLOUR(m_scheme, HIGHLIGHT_TEXT)); | |
1287 | } | |
1288 | ||
1289 | if ( flags & wxCONTROL_FOCUSED ) | |
1290 | { | |
1291 | dc.SetBrush(*wxTRANSPARENT_BRUSH); | |
1292 | wxRect rectFocus = rect; | |
1293 | DrawRect(dc, &rectFocus, m_penBlack); | |
1294 | } | |
1295 | ||
1296 | wxRect rectText = rect; | |
1297 | rectText.x += 2; | |
1298 | rectText.y++; | |
1299 | dc.DrawLabel(label, wxNullBitmap, rectText); | |
1300 | ||
1301 | if ( flags & wxCONTROL_SELECTED ) | |
1302 | { | |
1303 | dc.SetBackgroundMode(wxTRANSPARENT); | |
1304 | } | |
1305 | ||
1306 | // restore the text colour | |
1307 | if ( colFg.Ok() ) | |
1308 | { | |
1309 | dc.SetTextForeground(colFg); | |
1310 | } | |
1311 | } | |
1312 | ||
1313 | void wxGTKRenderer::DrawCheckItem(wxDC& dc, | |
1314 | const wxString& label, | |
1315 | const wxBitmap& bitmap, | |
1316 | const wxRect& rect, | |
1317 | int flags) | |
1318 | { | |
1319 | wxRect rectBitmap = rect; | |
1320 | rectBitmap.x -= 1; | |
1321 | rectBitmap.width = GetCheckBitmapSize().x; | |
0fe5e8fe | 1322 | |
1e6feb95 VZ |
1323 | // never draw the focus rect around the check indicators here |
1324 | DrawCheckButton(dc, _T(""), bitmap, rectBitmap, flags & ~wxCONTROL_FOCUSED); | |
1325 | ||
1326 | wxRect rectLabel = rect; | |
1327 | wxCoord shift = rectBitmap.width + 2*GetCheckItemMargin(); | |
1328 | rectLabel.x += shift; | |
1329 | rectLabel.width -= shift; | |
1330 | DrawItem(dc, label, rectLabel, flags); | |
1331 | } | |
1332 | ||
1333 | // ---------------------------------------------------------------------------- | |
1334 | // check/radion buttons | |
1335 | // ---------------------------------------------------------------------------- | |
1336 | ||
1337 | void wxGTKRenderer::DrawUncheckBitmap(wxDC& dc, | |
1338 | const wxRect& rectTotal, | |
1339 | bool isPressed) | |
1340 | { | |
1341 | wxRect rect = rectTotal; | |
1342 | DrawAntiRaisedBorder(dc, &rect); | |
1343 | ||
1344 | wxColour col = wxSCHEME_COLOUR(m_scheme, SHADOW_IN); | |
1345 | dc.SetPen(wxPen(col, 0, wxSOLID)); | |
1346 | dc.DrawPoint(rect.GetRight() - 1, rect.GetBottom() - 1); | |
1347 | ||
1348 | if ( isPressed ) | |
1349 | col = wxSCHEME_COLOUR(m_scheme, CONTROL_PRESSED); | |
1350 | //else: it is SHADOW_IN, leave as is | |
1351 | ||
1352 | dc.SetPen(*wxTRANSPARENT_PEN); | |
1353 | dc.SetBrush(wxBrush(col, wxSOLID)); | |
1354 | dc.DrawRectangle(rect); | |
1355 | } | |
1356 | ||
1357 | void wxGTKRenderer::DrawCheckBitmap(wxDC& dc, const wxRect& rectTotal) | |
1358 | { | |
1359 | wxRect rect = rectTotal; | |
1360 | DrawAntiShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight); | |
1361 | DrawShadedRect(dc, &rect, m_penBlack, m_penLightGrey); | |
1362 | ||
1363 | dc.SetPen(*wxTRANSPARENT_PEN); | |
1364 | dc.SetBrush(wxBrush(wxSCHEME_COLOUR(m_scheme, CONTROL_PRESSED), wxSOLID)); | |
1365 | dc.DrawRectangle(rect); | |
1366 | } | |
1367 | ||
1368 | void wxGTKRenderer::DrawRadioBitmap(wxDC& dc, | |
1369 | const wxRect& rect, | |
1370 | int flags) | |
1371 | { | |
1372 | wxCoord x = rect.x, | |
1373 | y = rect.y, | |
1374 | xRight = rect.GetRight(), | |
1375 | yBottom = rect.GetBottom(); | |
1376 | ||
1377 | wxCoord yMid = (y + yBottom) / 2; | |
1378 | ||
1379 | // this looks ugly when the background colour of the control is not the | |
1380 | // same ours - radiobox is not transparent as it should be | |
1381 | #if 0 | |
1382 | // first fill the middle: as FloodFill() is not implemented on all | |
1383 | // platforms, this is the only thing to do | |
1384 | wxColour colBg = flags & wxCONTROL_CURRENT | |
1385 | ? wxSCHEME_COLOUR(m_scheme, CONTROL_CURRENT) | |
1386 | : wxSCHEME_COLOUR(m_scheme, SHADOW_IN); | |
1387 | dc.SetBrush(wxBrush(colBg, wxSOLID)); | |
1388 | dc.SetPen(*wxTRANSPARENT_PEN); | |
1389 | dc.DrawRectangle(rect); | |
1390 | #endif // 0 | |
1391 | ||
1392 | // then draw the upper half | |
1393 | dc.SetPen(flags & wxCONTROL_CHECKED ? m_penDarkGrey : m_penHighlight); | |
1394 | DrawUpZag(dc, x, xRight, yMid, y); | |
1395 | DrawUpZag(dc, x + 1, xRight - 1, yMid, y + 1); | |
1396 | ||
1397 | bool drawIt = TRUE; | |
1398 | if ( flags & wxCONTROL_CHECKED ) | |
1399 | dc.SetPen(m_penBlack); | |
1400 | else if ( flags & wxCONTROL_PRESSED ) | |
1401 | dc.SetPen(wxPen(wxSCHEME_COLOUR(m_scheme, CONTROL_PRESSED), 0, wxSOLID)); | |
1402 | else // unchecked and unpressed | |
1403 | drawIt = FALSE; | |
1404 | ||
1405 | if ( drawIt ) | |
1406 | DrawUpZag(dc, x + 2, xRight - 2, yMid, y + 2); | |
1407 | ||
1408 | // and then the lower one | |
1409 | dc.SetPen(flags & wxCONTROL_CHECKED ? m_penHighlight : m_penBlack); | |
1410 | DrawDownZag(dc, x, xRight, yMid, yBottom); | |
1411 | if ( !(flags & wxCONTROL_CHECKED) ) | |
1412 | dc.SetPen(m_penDarkGrey); | |
1413 | DrawDownZag(dc, x + 1, xRight - 1, yMid, yBottom - 1); | |
1414 | ||
1415 | if ( !(flags & wxCONTROL_CHECKED) ) | |
1416 | drawIt = TRUE; // with the same pen | |
1417 | else if ( flags & wxCONTROL_PRESSED ) | |
1418 | { | |
1419 | dc.SetPen(wxPen(wxSCHEME_COLOUR(m_scheme, CONTROL_PRESSED), 0, wxSOLID)); | |
1420 | drawIt = TRUE; | |
1421 | } | |
1422 | else // checked and unpressed | |
1423 | drawIt = FALSE; | |
1424 | ||
1425 | if ( drawIt ) | |
1426 | DrawDownZag(dc, x + 2, xRight - 2, yMid, yBottom - 2); | |
1427 | } | |
1428 | ||
1429 | void wxGTKRenderer::DrawUpZag(wxDC& dc, | |
1430 | wxCoord x1, | |
1431 | wxCoord x2, | |
1432 | wxCoord y1, | |
1433 | wxCoord y2) | |
1434 | { | |
1435 | wxCoord xMid = (x1 + x2) / 2; | |
1436 | dc.DrawLine(x1, y1, xMid, y2); | |
1437 | dc.DrawLine(xMid, y2, x2 + 1, y1 + 1); | |
1438 | } | |
1439 | ||
1440 | void wxGTKRenderer::DrawDownZag(wxDC& dc, | |
1441 | wxCoord x1, | |
1442 | wxCoord x2, | |
1443 | wxCoord y1, | |
1444 | wxCoord y2) | |
1445 | { | |
1446 | wxCoord xMid = (x1 + x2) / 2; | |
1447 | dc.DrawLine(x1 + 1, y1 + 1, xMid, y2); | |
1448 | dc.DrawLine(xMid, y2, x2, y1); | |
1449 | } | |
1450 | ||
1451 | wxBitmap wxGTKRenderer::GetCheckBitmap(int flags) | |
1452 | { | |
1453 | if ( !m_bitmapsCheckbox[0][0].Ok() ) | |
1454 | { | |
1455 | // init the bitmaps once only | |
1456 | wxRect rect; | |
1457 | wxSize size = GetCheckBitmapSize(); | |
1458 | rect.width = size.x; | |
1459 | rect.height = size.y; | |
1460 | for ( int i = 0; i < 2; i++ ) | |
1461 | { | |
1462 | for ( int j = 0; j < 2; j++ ) | |
1463 | m_bitmapsCheckbox[i][j].Create(rect.width, rect.height); | |
1464 | } | |
1465 | ||
1466 | wxMemoryDC dc; | |
1467 | ||
1468 | // normal checked | |
1469 | dc.SelectObject(m_bitmapsCheckbox[0][0]); | |
1470 | DrawCheckBitmap(dc, rect); | |
1471 | ||
1472 | // normal unchecked | |
1473 | dc.SelectObject(m_bitmapsCheckbox[0][1]); | |
1474 | DrawUncheckBitmap(dc, rect, FALSE); | |
1475 | ||
1476 | // pressed checked | |
1477 | m_bitmapsCheckbox[1][0] = m_bitmapsCheckbox[0][0]; | |
1478 | ||
1479 | // pressed unchecked | |
1480 | dc.SelectObject(m_bitmapsCheckbox[1][1]); | |
1481 | DrawUncheckBitmap(dc, rect, TRUE); | |
1482 | } | |
1483 | ||
1484 | int row = flags & wxCONTROL_PRESSED ? 1 : 0; | |
1485 | int col = flags & wxCONTROL_CHECKED ? 0 : 1; | |
1486 | ||
1487 | return m_bitmapsCheckbox[row][col]; | |
1488 | } | |
1489 | ||
3216dbf5 | 1490 | wxBitmap wxGTKRenderer::GetLineWrapBitmap() const |
1e6feb95 VZ |
1491 | { |
1492 | if ( !m_bmpLineWrap.Ok() ) | |
1493 | { | |
1494 | // the line wrap bitmap as used by GTK+ | |
1495 | #define line_wrap_width 6 | |
1496 | #define line_wrap_height 9 | |
1497 | static const char line_wrap_bits[] = | |
1498 | { | |
1499 | 0x1e, 0x3e, 0x30, 0x30, 0x39, 0x1f, 0x0f, 0x0f, 0x1f, | |
1500 | }; | |
1501 | ||
1502 | wxBitmap bmpLineWrap(line_wrap_bits, line_wrap_width, line_wrap_height); | |
1503 | if ( !bmpLineWrap.Ok() ) | |
1504 | { | |
1505 | wxFAIL_MSG( _T("Failed to create line wrap XBM") ); | |
1506 | } | |
1507 | else | |
1508 | { | |
3216dbf5 | 1509 | wxConstCast(this, wxGTKRenderer)->m_bmpLineWrap = bmpLineWrap; |
1e6feb95 VZ |
1510 | } |
1511 | } | |
1512 | ||
1513 | return m_bmpLineWrap; | |
1514 | } | |
1515 | ||
1516 | void wxGTKRenderer::DrawCheckButton(wxDC& dc, | |
1517 | const wxString& label, | |
1518 | const wxBitmap& bitmapOrig, | |
1519 | const wxRect& rectTotal, | |
1520 | int flags, | |
1521 | wxAlignment align, | |
1522 | int indexAccel) | |
1523 | { | |
1524 | wxBitmap bitmap; | |
1525 | if ( bitmapOrig.Ok() ) | |
1526 | { | |
1527 | bitmap = bitmapOrig; | |
1528 | } | |
1529 | else | |
1530 | { | |
1531 | bitmap = GetCheckBitmap(flags); | |
1532 | } | |
1533 | ||
1534 | DoDrawCheckOrRadioBitmap(dc, label, bitmap, rectTotal, | |
1535 | flags, align, indexAccel); | |
1536 | } | |
1537 | ||
1538 | void wxGTKRenderer::DoDrawCheckOrRadioBitmap(wxDC& dc, | |
1539 | const wxString& label, | |
1540 | const wxBitmap& bitmap, | |
1541 | const wxRect& rectTotal, | |
1542 | int flags, | |
1543 | wxAlignment align, | |
1544 | int indexAccel) | |
1545 | { | |
1546 | wxRect rect = rectTotal; | |
1547 | ||
1548 | if ( flags & wxCONTROL_FOCUSED ) | |
1549 | { | |
1550 | // draw the focus border around everything | |
1551 | DrawRect(dc, &rect, m_penBlack); | |
1552 | } | |
1553 | else | |
1554 | { | |
1555 | // the border does not offset the string under GTK | |
1556 | rect.Inflate(-1); | |
1557 | } | |
1558 | ||
1559 | // calculate the position of the bitmap and of the label | |
1560 | wxCoord xBmp, | |
1561 | yBmp = rect.y + (rect.height - bitmap.GetHeight()) / 2; | |
1562 | ||
1563 | wxRect rectLabel; | |
1564 | dc.GetMultiLineTextExtent(label, NULL, &rectLabel.height); | |
1565 | rectLabel.y = rect.y + (rect.height - rectLabel.height) / 2; | |
1566 | ||
1567 | if ( align == wxALIGN_RIGHT ) | |
1568 | { | |
1569 | xBmp = rect.GetRight() - bitmap.GetWidth(); | |
1570 | rectLabel.x = rect.x + 2; | |
1571 | rectLabel.SetRight(xBmp); | |
1572 | } | |
1573 | else // normal (checkbox to the left of the text) case | |
1574 | { | |
1575 | xBmp = rect.x + 2; | |
1576 | rectLabel.x = xBmp + bitmap.GetWidth() + 4; | |
1577 | rectLabel.SetRight(rect.GetRight()); | |
1578 | } | |
1579 | ||
1580 | dc.DrawBitmap(bitmap, xBmp, yBmp, TRUE /* use mask */); | |
1581 | ||
1582 | DrawLabel(dc, label, rectLabel, flags, | |
1583 | wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL, indexAccel); | |
1584 | } | |
1585 | ||
1586 | void wxGTKRenderer::DrawRadioButton(wxDC& dc, | |
1587 | const wxString& label, | |
1588 | const wxBitmap& bitmapOrig, | |
1589 | const wxRect& rectTotal, | |
1590 | int flags, | |
1591 | wxAlignment align, | |
1592 | int indexAccel) | |
1593 | { | |
1594 | wxBitmap bitmap; | |
1595 | if ( bitmapOrig.Ok() ) | |
1596 | { | |
1597 | bitmap = bitmapOrig; | |
1598 | } | |
1599 | else | |
1600 | { | |
1601 | wxRect rect; | |
1602 | wxSize size = GetRadioBitmapSize(); | |
1603 | rect.width = size.x; | |
1604 | rect.height = size.y; | |
1605 | bitmap.Create(rect.width, rect.height); | |
1606 | wxMemoryDC dc; | |
1607 | dc.SelectObject(bitmap); | |
1608 | dc.SetBackground(*wxLIGHT_GREY_BRUSH); | |
1609 | dc.Clear(); | |
1610 | DrawRadioBitmap(dc, rect, flags); | |
1611 | bitmap.SetMask(new wxMask(bitmap, *wxLIGHT_GREY)); | |
1612 | } | |
1613 | ||
1614 | DoDrawCheckOrRadioBitmap(dc, label, bitmap, rectTotal, | |
1615 | flags, align, indexAccel); | |
1616 | } | |
1617 | ||
3216dbf5 VZ |
1618 | void wxGTKRenderer::DrawToolBarButton(wxDC& dc, |
1619 | const wxString& label, | |
1620 | const wxBitmap& bitmap, | |
1621 | const wxRect& rectOrig, | |
1622 | int flags) | |
1623 | { | |
1624 | // we don't draw the separators at all | |
1625 | if ( !label.empty() || bitmap.Ok() ) | |
1626 | { | |
1627 | wxRect rect = rectOrig; | |
1628 | rect.Deflate(BORDER_THICKNESS); | |
1629 | ||
1630 | if ( flags & wxCONTROL_PRESSED ) | |
1631 | { | |
2e7b0a16 VZ |
1632 | DrawBorder(dc, wxBORDER_SUNKEN, rect, flags, &rect); |
1633 | ||
1634 | DrawBackground(dc, wxSCHEME_COLOUR(m_scheme, CONTROL_PRESSED), rect); | |
3216dbf5 VZ |
1635 | } |
1636 | else if ( flags & wxCONTROL_CURRENT ) | |
1637 | { | |
2e7b0a16 VZ |
1638 | DrawBorder(dc, wxBORDER_RAISED, rect, flags, &rect); |
1639 | ||
1640 | DrawBackground(dc, wxSCHEME_COLOUR(m_scheme, CONTROL_CURRENT), rect); | |
3216dbf5 VZ |
1641 | } |
1642 | ||
1643 | dc.DrawLabel(label, bitmap, rect, wxALIGN_CENTRE); | |
1644 | } | |
1645 | } | |
1646 | ||
1e6feb95 VZ |
1647 | // ---------------------------------------------------------------------------- |
1648 | // text control | |
1649 | // ---------------------------------------------------------------------------- | |
1650 | ||
1651 | wxRect wxGTKRenderer::GetTextTotalArea(const wxTextCtrl *text, | |
3216dbf5 | 1652 | const wxRect& rect) const |
1e6feb95 VZ |
1653 | { |
1654 | wxRect rectTotal = rect; | |
89e7a223 | 1655 | rectTotal.Inflate(2*BORDER_THICKNESS); |
1e6feb95 VZ |
1656 | return rectTotal; |
1657 | } | |
1658 | ||
1659 | wxRect wxGTKRenderer::GetTextClientArea(const wxTextCtrl *text, | |
1660 | const wxRect& rect, | |
3216dbf5 | 1661 | wxCoord *extraSpaceBeyond) const |
1e6feb95 VZ |
1662 | { |
1663 | wxRect rectText = rect; | |
5836c908 | 1664 | rectText.Deflate(2*BORDER_THICKNESS); |
1e6feb95 VZ |
1665 | |
1666 | if ( text->WrapLines() ) | |
1667 | { | |
1668 | // leave enough for the line wrap bitmap indicator | |
1669 | wxCoord widthMark = GetLineWrapBitmap().GetWidth() + 2; | |
1670 | ||
1671 | rectText.width -= widthMark; | |
1672 | ||
1673 | if ( extraSpaceBeyond ) | |
1674 | *extraSpaceBeyond = widthMark; | |
1675 | } | |
1676 | ||
1677 | return rectText; | |
1678 | } | |
1679 | ||
1680 | void wxGTKRenderer::DrawTextLine(wxDC& dc, | |
1681 | const wxString& text, | |
1682 | const wxRect& rect, | |
1683 | int selStart, | |
1684 | int selEnd, | |
1685 | int flags) | |
1686 | { | |
1687 | // TODO: GTK+ draws selection even for unfocused controls, just with | |
1688 | // different colours | |
1689 | StandardDrawTextLine(dc, text, rect, selStart, selEnd, flags); | |
1690 | } | |
1691 | ||
1692 | void wxGTKRenderer::DrawLineWrapMark(wxDC& dc, const wxRect& rect) | |
1693 | { | |
1694 | wxBitmap bmpLineWrap = GetLineWrapBitmap(); | |
1695 | ||
1696 | // for a mono bitmap he colours it appears in depends on the current text | |
1697 | // colours, so set them correctly | |
1698 | wxColour colFgOld; | |
1699 | if ( bmpLineWrap.GetDepth() == 1 ) | |
1700 | { | |
1701 | colFgOld = dc.GetTextForeground(); | |
1702 | ||
1703 | // FIXME: I wonder what should we do if the background is black too? | |
1704 | dc.SetTextForeground(*wxBLACK); | |
1705 | } | |
1706 | ||
1707 | dc.DrawBitmap(bmpLineWrap, | |
1708 | rect.x, rect.y + (rect.height - bmpLineWrap.GetHeight())/2); | |
1709 | ||
1710 | if ( colFgOld.Ok() ) | |
1711 | { | |
1712 | // restore old colour | |
1713 | dc.SetTextForeground(colFgOld); | |
1714 | } | |
1715 | } | |
1716 | ||
1717 | // ---------------------------------------------------------------------------- | |
1718 | // notebook | |
1719 | // ---------------------------------------------------------------------------- | |
1720 | ||
1721 | void wxGTKRenderer::DrawTab(wxDC& dc, | |
1722 | const wxRect& rectOrig, | |
1723 | wxDirection dir, | |
1724 | const wxString& label, | |
1725 | const wxBitmap& bitmap, | |
1726 | int flags, | |
1727 | int indexAccel) | |
1728 | { | |
1729 | wxRect rect = rectOrig; | |
1730 | ||
1731 | // the current tab is drawn indented (to the top for default case) and | |
1732 | // bigger than the other ones | |
1733 | const wxSize indent = GetTabIndent(); | |
1734 | if ( flags & wxCONTROL_SELECTED ) | |
1735 | { | |
1736 | switch ( dir ) | |
1737 | { | |
1738 | default: | |
1739 | wxFAIL_MSG(_T("invaild notebook tab orientation")); | |
1740 | // fall through | |
1741 | ||
1742 | case wxTOP: | |
1743 | rect.Inflate(indent.x, 0); | |
1744 | rect.y -= indent.y; | |
1745 | rect.height += indent.y; | |
1746 | break; | |
1747 | ||
1748 | case wxBOTTOM: | |
1749 | rect.Inflate(indent.x, 0); | |
1750 | rect.height += indent.y; | |
1751 | break; | |
1752 | ||
1753 | case wxLEFT: | |
1754 | case wxRIGHT: | |
1755 | wxFAIL_MSG(_T("TODO")); | |
1756 | break; | |
1757 | } | |
1758 | } | |
1759 | ||
1760 | // selected tab has different colour | |
1761 | wxColour col = flags & wxCONTROL_SELECTED | |
1762 | ? wxSCHEME_COLOUR(m_scheme, SHADOW_IN) | |
1763 | : wxSCHEME_COLOUR(m_scheme, SCROLLBAR); | |
1764 | DoDrawBackground(dc, col, rect); | |
1765 | ||
1766 | if ( flags & wxCONTROL_FOCUSED ) | |
1767 | { | |
1768 | // draw the focus rect | |
1769 | wxRect rectBorder = rect; | |
1770 | rectBorder.Deflate(4, 3); | |
1771 | if ( dir == wxBOTTOM ) | |
1772 | rectBorder.Offset(0, -1); | |
1773 | ||
1774 | DrawRect(dc, &rectBorder, m_penBlack); | |
1775 | } | |
1776 | ||
1777 | // draw the text, image and the focus around them (if necessary) | |
1778 | wxRect rectLabel = rect; | |
1779 | rectLabel.Deflate(1, 1); | |
1780 | dc.DrawLabel(label, bitmap, rectLabel, wxALIGN_CENTRE, indexAccel); | |
1781 | ||
1782 | // now draw the tab itself | |
1783 | wxCoord x = rect.x, | |
1784 | y = rect.y, | |
1785 | x2 = rect.GetRight(), | |
1786 | y2 = rect.GetBottom(); | |
1787 | switch ( dir ) | |
1788 | { | |
1789 | default: | |
1790 | case wxTOP: | |
1791 | dc.SetPen(m_penHighlight); | |
1792 | dc.DrawLine(x, y2, x, y); | |
1793 | dc.DrawLine(x + 1, y, x2, y); | |
1794 | ||
1795 | dc.SetPen(m_penBlack); | |
1796 | dc.DrawLine(x2, y2, x2, y); | |
1797 | ||
1798 | dc.SetPen(m_penDarkGrey); | |
1799 | dc.DrawLine(x2 - 1, y2, x2 - 1, y + 1); | |
1800 | ||
1801 | if ( flags & wxCONTROL_SELECTED ) | |
1802 | { | |
1803 | dc.SetPen(m_penLightGrey); | |
1804 | ||
1805 | // overwrite the part of the border below this tab | |
1806 | dc.DrawLine(x + 1, y2 + 1, x2 - 1, y2 + 1); | |
1807 | ||
1808 | // and the shadow of the tab to the left of us | |
1809 | dc.DrawLine(x + 1, y + 2, x + 1, y2 + 1); | |
1810 | } | |
1811 | break; | |
1812 | ||
1813 | case wxBOTTOM: | |
1814 | dc.SetPen(m_penHighlight); | |
1815 | ||
1816 | // we need to continue one pixel further to overwrite the corner of | |
1817 | // the border for the selected tab | |
1818 | dc.DrawLine(x, y - (flags & wxCONTROL_SELECTED ? 1 : 0), | |
1819 | x, y2); | |
1820 | ||
1821 | // it doesn't work like this (TODO: implement it properly) | |
1822 | #if 0 | |
1823 | // erase the corner of the tab to the right | |
1824 | dc.SetPen(m_penLightGrey); | |
1825 | dc.DrawPoint(x2 - 1, y - 2); | |
1826 | dc.DrawPoint(x2 - 2, y - 2); | |
1827 | dc.DrawPoint(x2 - 2, y - 1); | |
1828 | #endif // 0 | |
1829 | ||
1830 | dc.SetPen(m_penBlack); | |
1831 | dc.DrawLine(x + 1, y2, x2, y2); | |
1832 | dc.DrawLine(x2, y, x2, y2); | |
1833 | ||
1834 | dc.SetPen(m_penDarkGrey); | |
1835 | dc.DrawLine(x + 2, y2 - 1, x2 - 1, y2 - 1); | |
1836 | dc.DrawLine(x2 - 1, y, x2 - 1, y2); | |
1837 | ||
1838 | if ( flags & wxCONTROL_SELECTED ) | |
1839 | { | |
1840 | dc.SetPen(m_penLightGrey); | |
1841 | ||
1842 | // overwrite the part of the (double!) border above this tab | |
1843 | dc.DrawLine(x + 1, y - 1, x2 - 1, y - 1); | |
1844 | dc.DrawLine(x + 1, y - 2, x2 - 1, y - 2); | |
1845 | ||
1846 | // and the shadow of the tab to the left of us | |
1847 | dc.DrawLine(x + 1, y2 - 1, x + 1, y - 1); | |
1848 | } | |
1849 | break; | |
1850 | ||
1851 | case wxLEFT: | |
1852 | case wxRIGHT: | |
1853 | wxFAIL_MSG(_T("TODO")); | |
1854 | } | |
1855 | } | |
1856 | ||
1857 | // ---------------------------------------------------------------------------- | |
1858 | // slider | |
1859 | // ---------------------------------------------------------------------------- | |
1860 | ||
1861 | wxSize wxGTKRenderer::GetSliderThumbSize(const wxRect& rect, | |
1862 | wxOrientation orient) const | |
1863 | { | |
1864 | static const wxCoord SLIDER_THUMB_LENGTH = 30; | |
1865 | ||
1866 | wxSize size; | |
1867 | ||
1868 | wxRect rectShaft = GetSliderShaftRect(rect, orient); | |
1869 | if ( orient == wxHORIZONTAL ) | |
1870 | { | |
1871 | size.x = wxMin(SLIDER_THUMB_LENGTH, rectShaft.width); | |
1872 | size.y = rectShaft.height; | |
1873 | } | |
1874 | else // vertical | |
1875 | { | |
1876 | size.y = wxMin(SLIDER_THUMB_LENGTH, rectShaft.height); | |
1877 | size.x = rectShaft.width; | |
1878 | } | |
1879 | ||
1880 | return size; | |
1881 | } | |
1882 | ||
1883 | wxRect wxGTKRenderer::GetSliderShaftRect(const wxRect& rect, | |
1884 | wxOrientation WXUNUSED(orient)) const | |
1885 | { | |
1886 | return rect.Deflate(2*BORDER_THICKNESS, 2*BORDER_THICKNESS); | |
1887 | } | |
1888 | ||
1889 | void wxGTKRenderer::DrawSliderShaft(wxDC& dc, | |
1890 | const wxRect& rectOrig, | |
1891 | wxOrientation orient, | |
1892 | int flags, | |
1893 | wxRect *rectShaft) | |
1894 | { | |
1895 | wxRect rect = rectOrig; | |
1896 | ||
1897 | // draw the border first | |
1898 | if ( flags & wxCONTROL_FOCUSED ) | |
1899 | { | |
1900 | DrawRect(dc, &rect, m_penBlack); | |
1901 | DrawAntiShadedRect(dc, &rect, m_penBlack, m_penLightGrey); | |
1902 | } | |
1903 | else // not focused, normal | |
1904 | { | |
1905 | DrawAntiShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight); | |
1906 | DrawAntiShadedRect(dc, &rect, m_penBlack, m_penLightGrey); | |
1907 | } | |
1908 | ||
1909 | // and the background | |
1910 | DoDrawBackground(dc, wxSCHEME_COLOUR(m_scheme, SCROLLBAR), rect); | |
1911 | ||
1912 | if ( rectShaft ) | |
1913 | *rectShaft = rect; | |
1914 | } | |
1915 | ||
1916 | void wxGTKRenderer::DrawSliderThumb(wxDC& dc, | |
1917 | const wxRect& rectOrig, | |
1918 | wxOrientation orient, | |
1919 | int flags) | |
1920 | { | |
1921 | // draw the thumb border | |
1922 | wxRect rect = rectOrig; | |
1923 | DrawAntiRaisedBorder(dc, &rect); | |
1924 | ||
1925 | // draw the handle in the middle | |
1926 | if ( orient == wxVERTICAL ) | |
1927 | { | |
1928 | rect.height = 2*BORDER_THICKNESS; | |
1929 | rect.y = rectOrig.y + (rectOrig.height - rect.height) / 2; | |
1930 | } | |
1931 | else // horz | |
1932 | { | |
1933 | rect.width = 2*BORDER_THICKNESS; | |
1934 | rect.x = rectOrig.x + (rectOrig.width - rect.width) / 2; | |
1935 | } | |
1936 | ||
1937 | DrawShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight); | |
1938 | } | |
1939 | ||
1940 | // ---------------------------------------------------------------------------- | |
1941 | // menu and menubar | |
1942 | // ---------------------------------------------------------------------------- | |
1943 | ||
0fe5e8fe VZ |
1944 | // wxGTKMenuGeometryInfo: the wxMenuGeometryInfo used by wxGTKRenderer |
1945 | class WXDLLEXPORT wxGTKMenuGeometryInfo : public wxMenuGeometryInfo | |
1946 | { | |
1947 | public: | |
1948 | virtual wxSize GetSize() const { return m_size; } | |
1949 | ||
1950 | wxCoord GetLabelOffset() const { return m_ofsLabel; } | |
1951 | wxCoord GetAccelOffset() const { return m_ofsAccel; } | |
1952 | ||
1953 | wxCoord GetItemHeight() const { return m_heightItem; } | |
1954 | ||
1955 | private: | |
1956 | // the total size of the menu | |
1957 | wxSize m_size; | |
1958 | ||
1959 | // the offset of the start of the menu item label | |
1960 | wxCoord m_ofsLabel; | |
1961 | ||
1962 | // the offset of the start of the accel label | |
1963 | wxCoord m_ofsAccel; | |
1964 | ||
1965 | // the height of a normal (not separator) item | |
1966 | wxCoord m_heightItem; | |
1967 | ||
1968 | friend wxMenuGeometryInfo * | |
1969 | wxGTKRenderer::GetMenuGeometry(wxWindow *, const wxMenu&) const; | |
1970 | }; | |
1971 | ||
1972 | // FIXME: all constants are hardcoded but shouldn't be | |
1973 | static const wxCoord MENU_LEFT_MARGIN = 9; | |
1974 | static const wxCoord MENU_RIGHT_MARGIN = 6; | |
1975 | ||
1976 | static const wxCoord MENU_HORZ_MARGIN = 6; | |
1977 | static const wxCoord MENU_VERT_MARGIN = 3; | |
1978 | ||
1979 | // the margin around bitmap/check marks (on each side) | |
1980 | static const wxCoord MENU_BMP_MARGIN = 2; | |
1981 | ||
1982 | // the margin between the labels and accel strings | |
1983 | static const wxCoord MENU_ACCEL_MARGIN = 8; | |
1984 | ||
1985 | // the separator height in pixels: in fact, strangely enough, the real height | |
1986 | // is 2 but Windows adds one extra pixel in the bottom margin, so take it into | |
1987 | // account here | |
1988 | static const wxCoord MENU_SEPARATOR_HEIGHT = 3; | |
1989 | ||
1990 | // the size of the standard checkmark bitmap | |
1991 | static const wxCoord MENU_CHECK_SIZE = 9; | |
1992 | ||
1e6feb95 VZ |
1993 | void wxGTKRenderer::DrawMenuBarItem(wxDC& dc, |
1994 | const wxRect& rect, | |
1995 | const wxString& label, | |
1996 | int flags, | |
1997 | int indexAccel) | |
1998 | { | |
0fe5e8fe | 1999 | DoDrawMenuItem(dc, rect, label, flags, indexAccel); |
1e6feb95 VZ |
2000 | } |
2001 | ||
2002 | void wxGTKRenderer::DrawMenuItem(wxDC& dc, | |
2003 | wxCoord y, | |
0fe5e8fe | 2004 | const wxMenuGeometryInfo& gi, |
1e6feb95 VZ |
2005 | const wxString& label, |
2006 | const wxString& accel, | |
2007 | const wxBitmap& bitmap, | |
2008 | int flags, | |
2009 | int indexAccel) | |
2010 | { | |
0fe5e8fe VZ |
2011 | const wxGTKMenuGeometryInfo& geomInfo = (const wxGTKMenuGeometryInfo&)gi; |
2012 | ||
2013 | wxRect rect; | |
2014 | rect.x = 0; | |
2015 | rect.y = y; | |
2016 | rect.width = geomInfo.GetSize().x; | |
2017 | rect.height = geomInfo.GetItemHeight(); | |
2018 | ||
2019 | DoDrawMenuItem(dc, rect, label, flags, indexAccel, accel, bitmap, &geomInfo); | |
2020 | } | |
2021 | ||
2022 | void wxGTKRenderer::DoDrawMenuItem(wxDC& dc, | |
2023 | const wxRect& rectOrig, | |
2024 | const wxString& label, | |
2025 | int flags, | |
2026 | int indexAccel, | |
2027 | const wxString& accel, | |
2028 | const wxBitmap& bitmap, | |
2029 | const wxGTKMenuGeometryInfo *geometryInfo) | |
2030 | { | |
2031 | wxRect rect = rectOrig; | |
2032 | ||
2033 | // draw the selected item specially | |
2034 | if ( flags & wxCONTROL_SELECTED ) | |
2035 | { | |
2036 | wxRect rectIn; | |
2037 | DrawBorder(dc, wxBORDER_RAISED, rect, flags, &rectIn); | |
2038 | ||
2039 | DrawBackground(dc, wxSCHEME_COLOUR(m_scheme, CONTROL_CURRENT), rectIn); | |
2040 | } | |
2041 | ||
2042 | rect.Deflate(MENU_HORZ_MARGIN, MENU_VERT_MARGIN); | |
2043 | ||
2044 | // draw the bitmap: use the bitmap provided or the standard checkmark for | |
2045 | // the checkable items | |
2046 | if ( geometryInfo ) | |
2047 | { | |
2048 | wxBitmap bmp = bitmap; | |
2049 | if ( !bmp.Ok() && (flags & wxCONTROL_CHECKABLE) ) | |
2050 | { | |
2051 | bmp = GetCheckBitmap(flags); | |
2052 | } | |
2053 | ||
2054 | if ( bmp.Ok() ) | |
2055 | { | |
2056 | rect.SetRight(geometryInfo->GetLabelOffset()); | |
2057 | wxControlRenderer::DrawBitmap(dc, bmp, rect); | |
2058 | } | |
2059 | } | |
2060 | //else: menubar items don't have bitmaps | |
2061 | ||
2062 | // draw the label | |
2063 | if ( geometryInfo ) | |
2064 | { | |
2065 | rect.x = geometryInfo->GetLabelOffset(); | |
2066 | rect.SetRight(geometryInfo->GetAccelOffset()); | |
2067 | } | |
2068 | ||
2069 | DrawLabel(dc, label, rect, flags, wxALIGN_CENTRE_VERTICAL, indexAccel); | |
2070 | ||
2071 | // draw the accel string | |
2072 | if ( !accel.empty() ) | |
2073 | { | |
2074 | // menubar items shouldn't have them | |
2075 | wxCHECK_RET( geometryInfo, _T("accel strings only valid for menus") ); | |
2076 | ||
2077 | rect.x = geometryInfo->GetAccelOffset(); | |
2078 | rect.SetRight(geometryInfo->GetSize().x); | |
2079 | ||
2080 | // NB: no accel index here | |
2081 | DrawLabel(dc, accel, rect, flags, wxALIGN_CENTRE_VERTICAL); | |
2082 | } | |
2083 | ||
2084 | // draw the submenu indicator | |
2085 | if ( flags & wxCONTROL_ISSUBMENU ) | |
2086 | { | |
2087 | wxCHECK_RET( geometryInfo, _T("wxCONTROL_ISSUBMENU only valid for menus") ); | |
2088 | ||
2089 | rect.x = geometryInfo->GetSize().x - MENU_RIGHT_MARGIN; | |
2090 | rect.width = MENU_RIGHT_MARGIN; | |
2091 | ||
2092 | DrawArrow(dc, wxRIGHT, rect, flags); | |
2093 | } | |
1e6feb95 VZ |
2094 | } |
2095 | ||
2096 | void wxGTKRenderer::DrawMenuSeparator(wxDC& dc, | |
2097 | wxCoord y, | |
2098 | const wxMenuGeometryInfo& geomInfo) | |
2099 | { | |
0fe5e8fe | 2100 | DrawHorizontalLine(dc, y + MENU_VERT_MARGIN, 0, geomInfo.GetSize().x); |
1e6feb95 VZ |
2101 | } |
2102 | ||
2103 | wxSize wxGTKRenderer::GetMenuBarItemSize(const wxSize& sizeText) const | |
2104 | { | |
0fe5e8fe VZ |
2105 | wxSize size = sizeText; |
2106 | ||
2107 | // TODO: make this configurable | |
2108 | size.x += 2*MENU_HORZ_MARGIN; | |
2109 | size.y += 2*MENU_VERT_MARGIN; | |
2110 | ||
2111 | return size; | |
1e6feb95 VZ |
2112 | } |
2113 | ||
2114 | wxMenuGeometryInfo *wxGTKRenderer::GetMenuGeometry(wxWindow *win, | |
2115 | const wxMenu& menu) const | |
2116 | { | |
0fe5e8fe VZ |
2117 | // prepare the dc: for now we draw all the items with the system font |
2118 | wxClientDC dc(win); | |
2119 | dc.SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); | |
2120 | ||
2121 | // the height of a normal item | |
2122 | wxCoord heightText = dc.GetCharHeight(); | |
2123 | ||
2124 | // the total height | |
2125 | wxCoord height = 0; | |
2126 | ||
2127 | // the max length of label and accel strings: the menu width is the sum of | |
2128 | // them, even if they're for different items (as the accels should be | |
2129 | // aligned) | |
2130 | // | |
2131 | // the max length of the bitmap is never 0 as Windows always leaves enough | |
2132 | // space for a check mark indicator | |
2133 | wxCoord widthLabelMax = 0, | |
2134 | widthAccelMax = 0, | |
2135 | widthBmpMax = MENU_LEFT_MARGIN; | |
2136 | ||
2137 | for ( wxMenuItemList::Node *node = menu.GetMenuItems().GetFirst(); | |
2138 | node; | |
2139 | node = node->GetNext() ) | |
2140 | { | |
2141 | // height of this item | |
2142 | wxCoord h; | |
2143 | ||
2144 | wxMenuItem *item = node->GetData(); | |
2145 | if ( item->IsSeparator() ) | |
2146 | { | |
2147 | h = MENU_SEPARATOR_HEIGHT; | |
2148 | } | |
2149 | else // not separator | |
2150 | { | |
2151 | h = heightText; | |
2152 | ||
2153 | wxCoord widthLabel; | |
2154 | dc.GetTextExtent(item->GetLabel(), &widthLabel, NULL); | |
2155 | if ( widthLabel > widthLabelMax ) | |
2156 | { | |
2157 | widthLabelMax = widthLabel; | |
2158 | } | |
2159 | ||
2160 | wxCoord widthAccel; | |
2161 | dc.GetTextExtent(item->GetAccelString(), &widthAccel, NULL); | |
2162 | if ( widthAccel > widthAccelMax ) | |
2163 | { | |
2164 | widthAccelMax = widthAccel; | |
2165 | } | |
2166 | ||
2167 | const wxBitmap& bmp = item->GetBitmap(); | |
2168 | if ( bmp.Ok() ) | |
2169 | { | |
2170 | wxCoord widthBmp = bmp.GetWidth(); | |
2171 | if ( widthBmp > widthBmpMax ) | |
2172 | widthBmpMax = widthBmp; | |
2173 | } | |
2174 | //else if ( item->IsCheckable() ): no need to check for this as | |
2175 | // MENU_LEFT_MARGIN is big enough to show the check mark | |
2176 | } | |
2177 | ||
2178 | h += 2*MENU_VERT_MARGIN; | |
2179 | ||
2180 | // remember the item position and height | |
2181 | item->SetGeometry(height, h); | |
2182 | ||
2183 | height += h; | |
2184 | } | |
2185 | ||
2186 | // bundle the metrics into a struct and return it | |
2187 | wxGTKMenuGeometryInfo *gi = new wxGTKMenuGeometryInfo; | |
2188 | ||
2189 | gi->m_ofsLabel = widthBmpMax + 2*MENU_BMP_MARGIN; | |
2190 | gi->m_ofsAccel = gi->m_ofsLabel + widthLabelMax; | |
2191 | if ( widthAccelMax > 0 ) | |
2192 | { | |
2193 | // if we actually have any accesl, add a margin | |
2194 | gi->m_ofsAccel += MENU_ACCEL_MARGIN; | |
2195 | } | |
2196 | ||
2197 | gi->m_heightItem = heightText + 2*MENU_VERT_MARGIN; | |
2198 | ||
2199 | gi->m_size.x = gi->m_ofsAccel + widthAccelMax + MENU_RIGHT_MARGIN; | |
2200 | gi->m_size.y = height; | |
1e6feb95 | 2201 | |
0fe5e8fe | 2202 | return gi; |
1e6feb95 | 2203 | } |
71e03035 VZ |
2204 | |
2205 | // ---------------------------------------------------------------------------- | |
2206 | // status bar | |
2207 | // ---------------------------------------------------------------------------- | |
2208 | ||
2209 | wxSize wxGTKRenderer::GetStatusBarBorders(wxCoord *borderBetweenFields) const | |
2210 | { | |
2211 | return wxSize(0, 0); | |
2212 | } | |
2213 | ||
2214 | void wxGTKRenderer::DrawStatusField(wxDC& dc, | |
2215 | const wxRect& rect, | |
2216 | const wxString& label, | |
2217 | int flags) | |
2218 | { | |
2219 | } | |
1b488c0e | 2220 | |
1e6feb95 VZ |
2221 | // ---------------------------------------------------------------------------- |
2222 | // combobox | |
2223 | // ---------------------------------------------------------------------------- | |
2224 | ||
1b488c0e VZ |
2225 | void wxGTKRenderer::InitComboBitmaps() |
2226 | { | |
2227 | wxSize sizeArrow = m_sizeScrollbarArrow; | |
2228 | sizeArrow.x -= 2; | |
2229 | sizeArrow.y -= 2; | |
2230 | ||
2231 | size_t n; | |
2232 | ||
2233 | for ( n = ComboState_Normal; n < ComboState_Max; n++ ) | |
2234 | { | |
2235 | m_bitmapsCombo[n].Create(sizeArrow.x, sizeArrow.y); | |
2236 | } | |
2237 | ||
2238 | static const int comboButtonFlags[ComboState_Max] = | |
2239 | { | |
2240 | 0, | |
2241 | wxCONTROL_CURRENT, | |
2242 | wxCONTROL_PRESSED, | |
2243 | wxCONTROL_DISABLED, | |
2244 | }; | |
2245 | ||
2246 | wxRect rect(wxPoint(0, 0), sizeArrow); | |
2247 | ||
2248 | wxMemoryDC dc; | |
2249 | for ( n = ComboState_Normal; n < ComboState_Max; n++ ) | |
2250 | { | |
2251 | int flags = comboButtonFlags[n]; | |
2252 | ||
2253 | dc.SelectObject(m_bitmapsCombo[n]); | |
2254 | DoDrawBackground(dc, GetBackgroundColour(flags), rect); | |
2255 | DrawArrow(dc, wxDOWN, rect, flags); | |
2256 | } | |
2257 | } | |
2258 | ||
1e6feb95 | 2259 | void wxGTKRenderer::GetComboBitmaps(wxBitmap *bmpNormal, |
1b488c0e | 2260 | wxBitmap *bmpFocus, |
1e6feb95 VZ |
2261 | wxBitmap *bmpPressed, |
2262 | wxBitmap *bmpDisabled) | |
2263 | { | |
1b488c0e VZ |
2264 | if ( !m_bitmapsCombo[ComboState_Normal].Ok() ) |
2265 | { | |
2266 | InitComboBitmaps(); | |
2267 | } | |
2268 | ||
2269 | if ( bmpNormal ) | |
2270 | *bmpNormal = m_bitmapsCombo[ComboState_Normal]; | |
2271 | if ( bmpFocus ) | |
2272 | *bmpFocus = m_bitmapsCombo[ComboState_Focus]; | |
2273 | if ( bmpPressed ) | |
2274 | *bmpPressed = m_bitmapsCombo[ComboState_Pressed]; | |
2275 | if ( bmpDisabled ) | |
2276 | *bmpDisabled = m_bitmapsCombo[ComboState_Disabled]; | |
1e6feb95 VZ |
2277 | } |
2278 | ||
2279 | // ---------------------------------------------------------------------------- | |
2280 | // background | |
2281 | // ---------------------------------------------------------------------------- | |
2282 | ||
2283 | void wxGTKRenderer::DoDrawBackground(wxDC& dc, | |
2284 | const wxColour& col, | |
193e19cf RR |
2285 | const wxRect& rect, |
2286 | wxWindow *window ) | |
1e6feb95 VZ |
2287 | { |
2288 | wxBrush brush(col, wxSOLID); | |
2289 | dc.SetBrush(brush); | |
2290 | dc.SetPen(*wxTRANSPARENT_PEN); | |
2291 | dc.DrawRectangle(rect); | |
2292 | } | |
2293 | ||
2294 | void wxGTKRenderer::DrawBackground(wxDC& dc, | |
2295 | const wxColour& col, | |
2296 | const wxRect& rect, | |
193e19cf RR |
2297 | int flags, |
2298 | wxWindow *window ) | |
1e6feb95 VZ |
2299 | { |
2300 | wxColour colBg = col.Ok() ? col : GetBackgroundColour(flags); | |
193e19cf | 2301 | DoDrawBackground(dc, colBg, rect, window ); |
1e6feb95 VZ |
2302 | } |
2303 | ||
2304 | // ---------------------------------------------------------------------------- | |
2305 | // scrollbar | |
2306 | // ---------------------------------------------------------------------------- | |
2307 | ||
2308 | void wxGTKRenderer::DrawArrowBorder(wxDC& dc, | |
2309 | wxRect *rect, | |
2310 | wxDirection dir) | |
2311 | { | |
2312 | static const wxDirection sides[] = | |
2313 | { | |
2314 | wxUP, wxLEFT, wxRIGHT, wxDOWN | |
2315 | }; | |
2316 | ||
2317 | wxRect rect1, rect2, rectInner; | |
2318 | rect1 = | |
2319 | rect2 = | |
2320 | rectInner = *rect; | |
2321 | ||
2322 | rect2.Inflate(-1); | |
2323 | rectInner.Inflate(-2); | |
2324 | ||
2325 | DoDrawBackground(dc, wxSCHEME_COLOUR(m_scheme, SCROLLBAR), *rect); | |
2326 | ||
2327 | // find the side not to draw and also adjust the rectangles to compensate | |
2328 | // for it | |
2329 | wxDirection sideToOmit; | |
2330 | switch ( dir ) | |
2331 | { | |
2332 | case wxUP: | |
2333 | sideToOmit = wxDOWN; | |
2334 | rect2.height += 1; | |
2335 | rectInner.height += 1; | |
2336 | break; | |
2337 | ||
2338 | case wxDOWN: | |
2339 | sideToOmit = wxUP; | |
2340 | rect2.y -= 1; | |
2341 | rect2.height += 1; | |
2342 | rectInner.y -= 2; | |
2343 | rectInner.height += 1; | |
2344 | break; | |
2345 | ||
2346 | case wxLEFT: | |
2347 | sideToOmit = wxRIGHT; | |
2348 | rect2.width += 1; | |
2349 | rectInner.width += 1; | |
2350 | break; | |
2351 | ||
2352 | case wxRIGHT: | |
2353 | sideToOmit = wxLEFT; | |
2354 | rect2.x -= 1; | |
2355 | rect2.width += 1; | |
2356 | rectInner.x -= 2; | |
2357 | rectInner.width += 1; | |
2358 | break; | |
2359 | ||
2360 | default: | |
2361 | wxFAIL_MSG(_T("unknown arrow direction")); | |
2362 | return; | |
2363 | } | |
2364 | ||
2365 | // the outer rect first | |
2366 | size_t n; | |
2367 | for ( n = 0; n < WXSIZEOF(sides); n++ ) | |
2368 | { | |
2369 | wxDirection side = sides[n]; | |
2370 | if ( side == sideToOmit ) | |
2371 | continue; | |
2372 | ||
2373 | DrawAntiShadedRectSide(dc, rect1, m_penDarkGrey, m_penHighlight, side); | |
2374 | } | |
2375 | ||
2376 | // and then the inner one | |
2377 | for ( n = 0; n < WXSIZEOF(sides); n++ ) | |
2378 | { | |
2379 | wxDirection side = sides[n]; | |
2380 | if ( side == sideToOmit ) | |
2381 | continue; | |
2382 | ||
2383 | DrawAntiShadedRectSide(dc, rect2, m_penBlack, m_penGrey, side); | |
2384 | } | |
2385 | ||
2386 | *rect = rectInner; | |
2387 | } | |
2388 | ||
2389 | void wxGTKRenderer::DrawScrollbarArrow(wxDC& dc, | |
2390 | wxDirection dir, | |
2391 | const wxRect& rectArrow, | |
2392 | int flags) | |
2393 | { | |
2394 | // first of all, draw the border around it - but we don't want the border | |
2395 | // on the side opposite to the arrow point | |
2396 | wxRect rect = rectArrow; | |
2397 | DrawArrowBorder(dc, &rect, dir); | |
2398 | ||
2399 | // then the arrow itself | |
2400 | DrawArrow(dc, dir, rect, flags); | |
2401 | } | |
2402 | ||
2403 | // gtk_default_draw_arrow() takes ~350 lines and we can't do much better here | |
2404 | // these people are just crazy :-( | |
2405 | void wxGTKRenderer::DrawArrow(wxDC& dc, | |
2406 | wxDirection dir, | |
2407 | const wxRect& rect, | |
2408 | int flags) | |
2409 | { | |
2410 | enum | |
2411 | { | |
2412 | Point_First, | |
2413 | Point_Second, | |
2414 | Point_Third, | |
2415 | Point_Max | |
2416 | }; | |
2417 | ||
2418 | wxPoint ptArrow[Point_Max]; | |
2419 | ||
2420 | wxColour colInside = GetBackgroundColour(flags); | |
2421 | wxPen penShadow[4]; | |
2422 | if ( flags & wxCONTROL_DISABLED ) | |
2423 | { | |
2424 | penShadow[0] = m_penDarkGrey; | |
2425 | penShadow[1] = m_penDarkGrey; | |
2426 | penShadow[2] = wxNullPen; | |
2427 | penShadow[3] = wxNullPen; | |
2428 | } | |
2429 | else if ( flags & wxCONTROL_PRESSED ) | |
2430 | { | |
2431 | penShadow[0] = m_penDarkGrey; | |
2432 | penShadow[1] = m_penHighlight; | |
2433 | penShadow[2] = wxNullPen; | |
2434 | penShadow[3] = m_penBlack; | |
2435 | } | |
2436 | else // normal arrow | |
2437 | { | |
2438 | penShadow[0] = m_penHighlight; | |
2439 | penShadow[1] = m_penBlack; | |
2440 | penShadow[2] = m_penDarkGrey; | |
2441 | penShadow[3] = wxNullPen; | |
2442 | } | |
2443 | ||
2444 | wxCoord middle; | |
2445 | if ( dir == wxUP || dir == wxDOWN ) | |
2446 | { | |
2447 | // horz middle | |
2448 | middle = (rect.GetRight() + rect.GetLeft() + 1) / 2; | |
2449 | } | |
2450 | else // horz arrow | |
2451 | { | |
2452 | middle = (rect.GetTop() + rect.GetBottom() + 1) / 2; | |
2453 | } | |
2454 | ||
2455 | // draw the arrow interior | |
2456 | dc.SetPen(*wxTRANSPARENT_PEN); | |
2457 | dc.SetBrush(wxBrush(colInside, wxSOLID)); | |
2458 | ||
2459 | switch ( dir ) | |
2460 | { | |
2461 | case wxUP: | |
2462 | ptArrow[Point_First].x = rect.GetLeft(); | |
2463 | ptArrow[Point_First].y = rect.GetBottom(); | |
2464 | ptArrow[Point_Second].x = middle; | |
2465 | ptArrow[Point_Second].y = rect.GetTop(); | |
2466 | ptArrow[Point_Third].x = rect.GetRight(); | |
2467 | ptArrow[Point_Third].y = rect.GetBottom(); | |
2468 | break; | |
2469 | ||
2470 | case wxDOWN: | |
2471 | ptArrow[Point_First] = rect.GetPosition(); | |
2472 | ptArrow[Point_Second].x = middle; | |
2473 | ptArrow[Point_Second].y = rect.GetBottom(); | |
2474 | ptArrow[Point_Third].x = rect.GetRight(); | |
2475 | ptArrow[Point_Third].y = rect.GetTop(); | |
2476 | break; | |
2477 | ||
2478 | case wxLEFT: | |
2479 | ptArrow[Point_First].x = rect.GetRight(); | |
2480 | ptArrow[Point_First].y = rect.GetTop(); | |
2481 | ptArrow[Point_Second].x = rect.GetLeft(); | |
2482 | ptArrow[Point_Second].y = middle; | |
2483 | ptArrow[Point_Third].x = rect.GetRight(); | |
2484 | ptArrow[Point_Third].y = rect.GetBottom(); | |
2485 | break; | |
2486 | ||
2487 | case wxRIGHT: | |
2488 | ptArrow[Point_First] = rect.GetPosition(); | |
2489 | ptArrow[Point_Second].x = rect.GetRight(); | |
2490 | ptArrow[Point_Second].y = middle; | |
2491 | ptArrow[Point_Third].x = rect.GetLeft(); | |
2492 | ptArrow[Point_Third].y = rect.GetBottom(); | |
2493 | break; | |
2494 | ||
2495 | default: | |
2496 | wxFAIL_MSG(_T("unknown arrow direction")); | |
2497 | } | |
2498 | ||
2499 | dc.DrawPolygon(WXSIZEOF(ptArrow), ptArrow); | |
2500 | ||
2501 | // draw the arrow border | |
2502 | dc.SetPen(penShadow[0]); | |
2503 | switch ( dir ) | |
2504 | { | |
2505 | case wxUP: | |
2506 | dc.DrawLine(ptArrow[Point_Second], ptArrow[Point_First]); | |
2507 | dc.DrawPoint(ptArrow[Point_First]); | |
2508 | if ( penShadow[3].Ok() ) | |
2509 | { | |
2510 | dc.SetPen(penShadow[3]); | |
2511 | dc.DrawLine(ptArrow[Point_First].x + 1, ptArrow[Point_First].y, | |
2512 | ptArrow[Point_Second].x, ptArrow[Point_Second].y); | |
2513 | } | |
2514 | dc.SetPen(penShadow[1]); | |
2515 | dc.DrawLine(ptArrow[Point_Second].x + 1, ptArrow[Point_Second].y + 1, | |
2516 | ptArrow[Point_Third].x, ptArrow[Point_Third].y); | |
2517 | dc.DrawPoint(ptArrow[Point_Third]); | |
2518 | dc.DrawLine(ptArrow[Point_Third].x - 2, ptArrow[Point_Third].y, | |
2519 | ptArrow[Point_First].x + 1, ptArrow[Point_First].y); | |
2520 | if ( penShadow[2].Ok() ) | |
2521 | { | |
2522 | dc.SetPen(penShadow[2]); | |
2523 | dc.DrawLine(ptArrow[Point_Third].x - 1, ptArrow[Point_Third].y, | |
2524 | ptArrow[Point_Second].x, ptArrow[Point_Second].y + 1); | |
2525 | dc.DrawLine(ptArrow[Point_Third].x - 1, ptArrow[Point_Third].y - 1, | |
2526 | ptArrow[Point_First].x + 2, ptArrow[Point_First].y - 1); | |
2527 | } | |
2528 | break; | |
2529 | ||
2530 | case wxDOWN: | |
2531 | dc.DrawLine(ptArrow[Point_First], ptArrow[Point_Second]); | |
2532 | dc.DrawLine(ptArrow[Point_First].x + 2, ptArrow[Point_First].y, | |
2533 | ptArrow[Point_Third].x - 1, ptArrow[Point_Third].y); | |
2534 | if ( penShadow[2].Ok() ) | |
2535 | { | |
2536 | dc.SetPen(penShadow[2]); | |
2537 | dc.DrawLine(ptArrow[Point_Second].x, ptArrow[Point_Second].y - 1, | |
2538 | ptArrow[Point_Third].x - 1, ptArrow[Point_Third].y - 1); | |
2539 | } | |
2540 | dc.SetPen(penShadow[1]); | |
2541 | dc.DrawLine(ptArrow[Point_Second], ptArrow[Point_Third]); | |
2542 | dc.DrawPoint(ptArrow[Point_Third]); | |
2543 | break; | |
2544 | ||
2545 | case wxLEFT: | |
2546 | dc.DrawLine(ptArrow[Point_Second], ptArrow[Point_First]); | |
2547 | dc.DrawPoint(ptArrow[Point_First]); | |
2548 | if ( penShadow[2].Ok() ) | |
2549 | { | |
2550 | dc.SetPen(penShadow[2]); | |
2551 | dc.DrawLine(ptArrow[Point_Third].x - 1, ptArrow[Point_Third].y, | |
2552 | ptArrow[Point_First].x - 1, ptArrow[Point_First].y + 2); | |
2553 | dc.DrawLine(ptArrow[Point_Third].x, ptArrow[Point_Third].y, | |
2554 | ptArrow[Point_Second].x + 2, ptArrow[Point_Second].y + 1); | |
2555 | } | |
2556 | dc.SetPen(penShadow[1]); | |
2557 | dc.DrawLine(ptArrow[Point_Third].x, ptArrow[Point_Third].y, | |
2558 | ptArrow[Point_First].x, ptArrow[Point_First].y + 1); | |
2559 | dc.DrawLine(ptArrow[Point_Second].x + 1, ptArrow[Point_Second].y + 1, | |
2560 | ptArrow[Point_Third].x - 1, ptArrow[Point_Third].y); | |
2561 | break; | |
2562 | ||
2563 | case wxRIGHT: | |
2564 | dc.DrawLine(ptArrow[Point_First], ptArrow[Point_Third]); | |
2565 | dc.DrawLine(ptArrow[Point_First].x + 2, ptArrow[Point_First].y + 1, | |
2566 | ptArrow[Point_Second].x, ptArrow[Point_Second].y); | |
2567 | dc.SetPen(penShadow[1]); | |
2568 | dc.DrawLine(ptArrow[Point_Second], ptArrow[Point_Third]); | |
2569 | dc.DrawPoint(ptArrow[Point_Third]); | |
2570 | break; | |
2571 | ||
2572 | default: | |
2573 | wxFAIL_MSG(_T("unknown arrow direction")); | |
2574 | return; | |
2575 | } | |
2576 | } | |
2577 | ||
2578 | void wxGTKRenderer::DrawThumbBorder(wxDC& dc, | |
2579 | wxRect *rect, | |
2580 | wxOrientation orient) | |
2581 | { | |
2582 | if ( orient == wxVERTICAL ) | |
2583 | { | |
2584 | DrawAntiShadedRectSide(dc, *rect, m_penDarkGrey, m_penHighlight, | |
2585 | wxLEFT); | |
2586 | DrawAntiShadedRectSide(dc, *rect, m_penDarkGrey, m_penHighlight, | |
2587 | wxRIGHT); | |
2588 | rect->Inflate(-1, 0); | |
2589 | ||
2590 | DrawAntiShadedRectSide(dc, *rect, m_penBlack, m_penGrey, | |
2591 | wxLEFT); | |
2592 | DrawAntiShadedRectSide(dc, *rect, m_penBlack, m_penGrey, | |
2593 | wxRIGHT); | |
2594 | rect->Inflate(-1, 0); | |
2595 | } | |
2596 | else | |
2597 | { | |
2598 | DrawAntiShadedRectSide(dc, *rect, m_penDarkGrey, m_penHighlight, | |
2599 | wxUP); | |
2600 | DrawAntiShadedRectSide(dc, *rect, m_penDarkGrey, m_penHighlight, | |
2601 | wxDOWN); | |
2602 | rect->Inflate(0, -1); | |
2603 | ||
2604 | DrawAntiShadedRectSide(dc, *rect, m_penBlack, m_penGrey, | |
2605 | wxUP); | |
2606 | DrawAntiShadedRectSide(dc, *rect, m_penBlack, m_penGrey, | |
2607 | wxDOWN); | |
2608 | rect->Inflate(0, -1); | |
2609 | } | |
2610 | } | |
2611 | ||
2612 | void wxGTKRenderer::DrawScrollbarThumb(wxDC& dc, | |
2613 | wxOrientation orient, | |
2614 | const wxRect& rect, | |
2615 | int flags) | |
2616 | { | |
2617 | // the thumb is never pressed never has focus border under GTK and the | |
2618 | // scrollbar background never changes at all | |
2619 | int flagsThumb = flags & ~(wxCONTROL_PRESSED | wxCONTROL_FOCUSED); | |
2620 | ||
2621 | // we don't want the border in the direction of the scrollbar movement | |
2622 | wxRect rectThumb = rect; | |
2623 | DrawThumbBorder(dc, &rectThumb, orient); | |
2624 | ||
2625 | DrawButtonBorder(dc, rectThumb, flagsThumb, &rectThumb); | |
2626 | DrawBackground(dc, wxNullColour, rectThumb, flagsThumb); | |
2627 | } | |
2628 | ||
2629 | void wxGTKRenderer::DrawScrollbarShaft(wxDC& dc, | |
2630 | wxOrientation orient, | |
2631 | const wxRect& rect, | |
2632 | int flags) | |
2633 | { | |
2634 | wxRect rectBar = rect; | |
2635 | DrawThumbBorder(dc, &rectBar, orient); | |
2636 | DoDrawBackground(dc, wxSCHEME_COLOUR(m_scheme, SCROLLBAR), rectBar); | |
2637 | } | |
2638 | ||
2639 | void wxGTKRenderer::DrawScrollCorner(wxDC& dc, const wxRect& rect) | |
2640 | { | |
2641 | DoDrawBackground(dc, wxSCHEME_COLOUR(m_scheme, CONTROL), rect); | |
2642 | } | |
2643 | ||
2644 | wxRect wxGTKRenderer::GetScrollbarRect(const wxScrollBar *scrollbar, | |
2645 | wxScrollBar::Element elem, | |
2646 | int thumbPos) const | |
2647 | { | |
2648 | // as GTK scrollbars can't be disabled, it makes no sense to remove the | |
2649 | // thumb for a scrollbar with range 0 - instead, make it fill the entire | |
2650 | // scrollbar shaft | |
2651 | if ( (elem == wxScrollBar::Element_Thumb) && !scrollbar->GetRange() ) | |
2652 | { | |
2653 | elem = wxScrollBar::Element_Bar_2; | |
2654 | } | |
2655 | ||
2656 | return StandardGetScrollbarRect(scrollbar, elem, | |
2657 | thumbPos, | |
2658 | GetScrollbarArrowSize(scrollbar)); | |
2659 | } | |
2660 | ||
2661 | wxCoord wxGTKRenderer::GetScrollbarSize(const wxScrollBar *scrollbar) | |
2662 | { | |
2663 | return StandardScrollBarSize(scrollbar, GetScrollbarArrowSize(scrollbar)); | |
2664 | } | |
2665 | ||
2666 | wxHitTest wxGTKRenderer::HitTestScrollbar(const wxScrollBar *scrollbar, | |
2667 | const wxPoint& pt) const | |
2668 | { | |
2669 | return StandardHitTestScrollbar(scrollbar, pt, | |
2670 | GetScrollbarArrowSize(scrollbar)); | |
2671 | } | |
2672 | ||
2673 | wxCoord wxGTKRenderer::ScrollbarToPixel(const wxScrollBar *scrollbar, | |
2674 | int thumbPos) | |
2675 | { | |
2676 | return StandardScrollbarToPixel(scrollbar, thumbPos, | |
2677 | GetScrollbarArrowSize(scrollbar)); | |
2678 | } | |
2679 | ||
2680 | int wxGTKRenderer::PixelToScrollbar(const wxScrollBar *scrollbar, | |
2681 | wxCoord coord) | |
2682 | { | |
2683 | return StandardPixelToScrollbar(scrollbar, coord, | |
2684 | GetScrollbarArrowSize(scrollbar)); | |
2685 | } | |
2686 | ||
2687 | // ---------------------------------------------------------------------------- | |
2688 | // size adjustments | |
2689 | // ---------------------------------------------------------------------------- | |
2690 | ||
2691 | void wxGTKRenderer::AdjustSize(wxSize *size, const wxWindow *window) | |
2692 | { | |
e4606ed9 VZ |
2693 | #if wxUSE_BMPBUTTON |
2694 | if ( wxDynamicCast(window, wxBitmapButton) ) | |
2695 | { | |
2696 | size->x += 4; | |
2697 | size->y += 4; | |
2698 | } else | |
2699 | #endif // wxUSE_BMPBUTTON | |
2700 | #if wxUSE_BUTTON | |
1e6feb95 VZ |
2701 | if ( wxDynamicCast(window, wxButton) ) |
2702 | { | |
1b465102 VZ |
2703 | if ( !(window->GetWindowStyle() & wxBU_EXACTFIT) ) |
2704 | { | |
2705 | // TODO: this is ad hoc... | |
2706 | size->x += 3*window->GetCharWidth(); | |
2707 | wxCoord minBtnHeight = 18; | |
2708 | if ( size->y < minBtnHeight ) | |
2709 | size->y = minBtnHeight; | |
2710 | ||
2711 | // button border width | |
2712 | size->y += 4; | |
2713 | } | |
e4606ed9 | 2714 | } else |
ee1e43a7 | 2715 | #endif //wxUSE_BUTTON |
e4606ed9 | 2716 | if ( wxDynamicCast(window, wxScrollBar) ) |
1e6feb95 VZ |
2717 | { |
2718 | // we only set the width of vert scrollbars and height of the | |
2719 | // horizontal ones | |
2720 | if ( window->GetWindowStyle() & wxSB_HORIZONTAL ) | |
2721 | size->y = m_sizeScrollbarArrow.x; | |
2722 | else | |
2723 | size->x = m_sizeScrollbarArrow.x; | |
2724 | } | |
2725 | else | |
2726 | { | |
2727 | // take into account the border width | |
2728 | wxRect rectBorder = GetBorderDimensions(window->GetBorder()); | |
2729 | size->x += rectBorder.x + rectBorder.width; | |
2730 | size->y += rectBorder.y + rectBorder.height; | |
2731 | } | |
2732 | } | |
2733 | ||
24a23c35 VS |
2734 | // ---------------------------------------------------------------------------- |
2735 | // top level windows | |
2736 | // ---------------------------------------------------------------------------- | |
2737 | ||
2738 | void wxGTKRenderer::DrawFrameTitleBar(wxDC& dc, | |
2739 | const wxRect& rect, | |
2740 | const wxString& title, | |
2741 | const wxIcon& icon, | |
2742 | int flags, | |
813edf09 VS |
2743 | int specialButton, |
2744 | int specialButtonFlag) | |
24a23c35 VS |
2745 | { |
2746 | } | |
2747 | ||
2748 | void wxGTKRenderer::DrawFrameBorder(wxDC& dc, | |
2749 | const wxRect& rect, | |
2750 | int flags) | |
2751 | { | |
2752 | } | |
2753 | ||
2754 | void wxGTKRenderer::DrawFrameBackground(wxDC& dc, | |
2755 | const wxRect& rect, | |
2756 | int flags) | |
2757 | { | |
2758 | } | |
2759 | ||
2760 | void wxGTKRenderer::DrawFrameTitle(wxDC& dc, | |
2761 | const wxRect& rect, | |
2762 | const wxString& title, | |
2763 | int flags) | |
2764 | { | |
2765 | } | |
2766 | ||
2767 | void wxGTKRenderer::DrawFrameIcon(wxDC& dc, | |
2768 | const wxRect& rect, | |
2769 | const wxIcon& icon, | |
2770 | int flags) | |
2771 | { | |
2772 | } | |
2773 | ||
2774 | void wxGTKRenderer::DrawFrameButton(wxDC& dc, | |
2775 | wxCoord x, wxCoord y, | |
2776 | int button, | |
2e9f62da | 2777 | int flags) |
24a23c35 VS |
2778 | { |
2779 | } | |
2780 | ||
2781 | wxRect wxGTKRenderer::GetFrameClientArea(const wxRect& rect, int flags) const | |
2782 | { | |
2783 | return rect; | |
2784 | } | |
2785 | ||
2786 | wxSize wxGTKRenderer::GetFrameTotalSize(const wxSize& clientSize, int flags) const | |
2787 | { | |
2788 | return clientSize; | |
2789 | } | |
2790 | ||
e7dda1ff VS |
2791 | wxSize wxGTKRenderer::GetFrameMinSize(int flags) const |
2792 | { | |
2793 | return wxSize(0,0); | |
2794 | } | |
2795 | ||
24a23c35 VS |
2796 | wxSize wxGTKRenderer::GetFrameIconSize() const |
2797 | { | |
2798 | return wxSize(-1, -1); | |
2799 | } | |
2800 | ||
813edf09 VS |
2801 | int wxGTKRenderer::HitTestFrame(const wxRect& rect, const wxPoint& pt, int flags) const |
2802 | { | |
2803 | return wxHT_TOPLEVEL_CLIENT_AREA; | |
2804 | } | |
2805 | ||
24a23c35 | 2806 | |
63f06c22 VS |
2807 | // ---------------------------------------------------------------------------- |
2808 | // standard icons | |
2809 | // ---------------------------------------------------------------------------- | |
2810 | ||
2811 | static char *error_xpm[] = { | |
2812 | /* columns rows colors chars-per-pixel */ | |
2813 | "48 48 537 2", | |
2814 | " c Gray0", | |
2815 | ". c #000001010101", | |
2816 | "X c #010101010101", | |
2817 | "o c #010102020202", | |
2818 | "O c #020202020202", | |
2819 | "+ c #020203030303", | |
2820 | "@ c #030302020202", | |
2821 | "# c Gray1", | |
2822 | "$ c #020204040404", | |
2823 | "% c #030304040404", | |
2824 | "& c #070703030202", | |
2825 | "* c #040404040404", | |
2826 | "= c #040405050505", | |
2827 | "- c Gray2", | |
2828 | "; c #050507070707", | |
2829 | ": c #060606060606", | |
2830 | "> c #060607070707", | |
2831 | ", c #070707070707", | |
2832 | "< c #070709090909", | |
2833 | "1 c #0c0c04040303", | |
2834 | "2 c #0d0d04040404", | |
2835 | "3 c #0d0d05050404", | |
2836 | "4 c Gray3", | |
2837 | "5 c #080809090909", | |
2838 | "6 c #090909090909", | |
2839 | "7 c #0b0b0b0b0b0b", | |
2840 | "8 c #0a0a0d0d0d0d", | |
2841 | "9 c #0b0b0d0d0d0d", | |
2842 | "0 c #0c0c0c0c0c0c", | |
2843 | "q c Gray5", | |
2844 | "w c #0d0d0f0f1010", | |
2845 | "e c #101006060505", | |
2846 | "r c #141404040303", | |
2847 | "t c #141407070606", | |
2848 | "y c #171707070606", | |
2849 | "u c #1d1d09090707", | |
2850 | "i c #181809090808", | |
2851 | "p c #1d1d09090808", | |
2852 | "a c #1e1e0a0a0808", | |
2853 | "s c #1e1e0b0b0909", | |
2854 | "d c #101010101010", | |
2855 | "f c #101011111212", | |
2856 | "g c Gray7", | |
2857 | "h c #131313131313", | |
2858 | "j c Gray9", | |
2859 | "k c #181818181818", | |
2860 | "l c #191919191919", | |
2861 | "z c Gray11", | |
2862 | "x c #1d1d1d1d1d1d", | |
2863 | "c c Gray12", | |
2864 | "v c #24240b0b0a0a", | |
2865 | "b c #27270d0d0b0b", | |
2866 | "n c #2b2b0e0e0c0c", | |
2867 | "m c #2d2d0e0e0b0b", | |
2868 | "M c #30300e0e0b0b", | |
2869 | "N c #33330d0d0909", | |
2870 | "B c #3a3a0f0f0b0b", | |
2871 | "V c #333310100e0e", | |
2872 | "C c #373710100d0d", | |
2873 | "Z c #373711110e0e", | |
2874 | "A c #363612120f0f", | |
2875 | "S c #3d3d13130f0f", | |
2876 | "D c #363612121010", | |
2877 | "F c Gray14", | |
2878 | "G c #252525252525", | |
2879 | "H c #2a2a2a2a2a2a", | |
2880 | "J c Gray18", | |
2881 | "K c #323232323232", | |
2882 | "L c Gray20", | |
2883 | "P c Gray22", | |
2884 | "I c #3f3f3f3f3f3f", | |
2885 | "U c #414113130e0e", | |
2886 | "Y c #414113130f0f", | |
2887 | "T c #404013131010", | |
2888 | "R c #404014141111", | |
2889 | "E c #404015151212", | |
2890 | "W c #4d4d17171212", | |
2891 | "Q c #4e4e18181313", | |
2892 | "! c #4e4e18181414", | |
2893 | "~ c #4e4e19191515", | |
2894 | "^ c #4e4e1a1a1616", | |
2895 | "/ c #57571b1b1515", | |
2896 | "( c #595917171010", | |
2897 | ") c #5b5b1a1a1313", | |
2898 | "_ c #58581b1b1616", | |
2899 | "` c #58581c1c1717", | |
2900 | "' c #5c5c1e1e1a1a", | |
2901 | "] c #5c5c1f1f1b1b", | |
2902 | "[ c #6e6e19190f0f", | |
2903 | "{ c #67671c1c1616", | |
2904 | "} c #6b6b1b1b1212", | |
2905 | "| c #68681e1e1717", | |
2906 | " . c #6e6e1e1e1616", | |
2907 | ".. c #79791e1e1515", | |
2908 | "X. c #666622221d1d", | |
2909 | "o. c #6b6b24241e1e", | |
2910 | "O. c #6c6c22221d1d", | |
2911 | "+. c #6d6d24241f1f", | |
2912 | "@. c #7d7d23231c1c", | |
2913 | "#. c #727226262020", | |
2914 | "$. c #757526262020", | |
2915 | "%. c #777728282222", | |
2916 | "&. c #7f7f28282121", | |
2917 | "*. c #484848484848", | |
2918 | "=. c Gray33", | |
2919 | "-. c #555555555555", | |
2920 | ";. c #656565656565", | |
2921 | ":. c Gray", | |
2922 | ">. c #94941f1f1212", | |
2923 | ",. c #96961f1f1111", | |
2924 | "<. c #98981f1f1111", | |
2925 | "1. c #818126261e1e", | |
2926 | "2. c #858523231919", | |
2927 | "3. c #858525251c1c", | |
2928 | "4. c #878728281e1e", | |
2929 | "5. c #898921211717", | |
2930 | "6. c #8a8a22221616", | |
2931 | "7. c #8b8b25251c1c", | |
2932 | "8. c #8c8c27271d1d", | |
2933 | "9. c #888828281f1f", | |
2934 | "0. c #8a8a29291f1f", | |
2935 | "q. c #959520201111", | |
2936 | "w. c #969620201111", | |
2937 | "e. c #949424241717", | |
2938 | "r. c #969624241717", | |
2939 | "t. c #909024241919", | |
2940 | "y. c #929225251919", | |
2941 | "u. c #929225251b1b", | |
2942 | "i. c #959526261b1b", | |
2943 | "p. c #969624241818", | |
2944 | "a. c #90902a2a1f1f", | |
2945 | "s. c #969629291f1f", | |
2946 | "d. c #9b9b20201313", | |
2947 | "f. c #999924241616", | |
2948 | "g. c #9c9c21211212", | |
2949 | "h. c #9f9f21211212", | |
2950 | "j. c #9d9d22221414", | |
2951 | "k. c #9d9d23231414", | |
2952 | "l. c #9c9c23231616", | |
2953 | "z. c #989827271b1b", | |
2954 | "x. c #999927271b1b", | |
2955 | "c. c #9a9a26261b1b", | |
2956 | "v. c #989827271c1c", | |
2957 | "b. c #9c9c25251818", | |
2958 | "n. c #9c9c27271b1b", | |
2959 | "m. c #9d9d27271b1b", | |
2960 | "M. c #999928281c1c", | |
2961 | "N. c #999929291e1e", | |
2962 | "B. c #9b9b28281c1c", | |
2963 | "V. c #9b9b28281d1d", | |
2964 | "C. c #9a9a29291e1e", | |
2965 | "Z. c #9a9a2a2a1e1e", | |
2966 | "A. c #9a9a2b2b1f1f", | |
2967 | "S. c #9b9b2a2a1f1f", | |
2968 | "D. c #9c9c28281c1c", | |
2969 | "F. c #9e9e29291f1f", | |
2970 | "G. c #9f9f29291e1e", | |
2971 | "H. c #9e9e2a2a1e1e", | |
2972 | "J. c #83832b2b2424", | |
2973 | "K. c #83832c2c2525", | |
2974 | "L. c #84842a2a2424", | |
2975 | "P. c #8b8b29292121", | |
2976 | "I. c #89892b2b2424", | |
2977 | "U. c #8b8b2c2c2626", | |
2978 | "Y. c #8f8f2a2a2222", | |
2979 | "T. c #8f8f2b2b2323", | |
2980 | "R. c #8d8d2e2e2828", | |
2981 | "E. c #8f8f2f2f2828", | |
2982 | "W. c #8f8f38383232", | |
2983 | "Q. c #919129292020", | |
2984 | "!. c #90902b2b2222", | |
2985 | "~. c #91912d2d2525", | |
2986 | "^. c #90902d2d2626", | |
2987 | "/. c #969629292020", | |
2988 | "(. c #95952c2c2323", | |
2989 | "). c #97972c2c2222", | |
2990 | "_. c #94942d2d2525", | |
2991 | "`. c #94942e2e2626", | |
2992 | "'. c #97972d2d2525", | |
2993 | "]. c #96962e2e2424", | |
2994 | "[. c #97972e2e2626", | |
2995 | "{. c #97972f2f2727", | |
2996 | "}. c #99992b2b2020", | |
2997 | "|. c #99992c2c2121", | |
2998 | " X c #98982d2d2323", | |
2999 | ".X c #99992c2c2222", | |
3000 | "XX c #9b9b2c2c2121", | |
3001 | "oX c #9a9a2c2c2323", | |
3002 | "OX c #98982d2d2424", | |
3003 | "+X c #98982e2e2525", | |
3004 | "@X c #98982e2e2626", | |
3005 | "#X c #9d9d2b2b2121", | |
3006 | "$X c #9e9e2a2a2020", | |
3007 | "%X c #9c9c2c2c2121", | |
3008 | "&X c #9c9c2d2d2323", | |
3009 | "*X c #9d9d2e2e2323", | |
3010 | "=X c #9f9f2d2d2323", | |
3011 | "-X c #9e9e2e2e2020", | |
3012 | ";X c #9f9f2e2e2323", | |
3013 | ":X c #9c9c2d2d2424", | |
3014 | ">X c #9d9d2f2f2525", | |
3015 | ",X c #9c9c2f2f2626", | |
3016 | "<X c #9d9d2f2f2626", | |
3017 | "1X c #9f9f2e2e2424", | |
3018 | "2X c #9f9f2f2f2525", | |
3019 | "3X c #9f9f2f2f2626", | |
3020 | "4X c #939330302828", | |
3021 | "5X c #909036362f2f", | |
3022 | "6X c #949430302929", | |
3023 | "7X c #959530302828", | |
3024 | "8X c #949430302a2a", | |
3025 | "9X c #969630302828", | |
3026 | "0X c #969630302929", | |
3027 | "qX c #9d9d30302727", | |
3028 | "wX c #9e9e30302626", | |
3029 | "eX c #9e9e30302727", | |
3030 | "rX c #9e9e31312727", | |
3031 | "tX c #9f9f30302626", | |
3032 | "yX c #989831312929", | |
3033 | "uX c #9a9a30302929", | |
3034 | "iX c #9a9a31312a2a", | |
3035 | "pX c #9a9a32322a2a", | |
3036 | "aX c #9d9d31312929", | |
3037 | "sX c #9d9d32322929", | |
3038 | "dX c #9c9c32322a2a", | |
3039 | "fX c #9d9d32322a2a", | |
3040 | "gX c #9d9d33332a2a", | |
3041 | "hX c #9d9d33332b2b", | |
3042 | "jX c #9e9e31312828", | |
3043 | "kX c #9e9e31312929", | |
3044 | "lX c #9f9f31312828", | |
3045 | "zX c #9e9e32322929", | |
3046 | "xX c #9f9f32322a2a", | |
3047 | "cX c #9f9f33332a2a", | |
3048 | "vX c #9f9f33332b2b", | |
3049 | "bX c #9d9d3a3a3232", | |
3050 | "nX c #9f9f39393030", | |
3051 | "mX c #9f9f3e3e3636", | |
3052 | "MX c #a3a323231313", | |
3053 | "NX c #a0a022221414", | |
3054 | "BX c #a2a223231414", | |
3055 | "VX c #a0a024241616", | |
3056 | "CX c #a4a422221212", | |
3057 | "ZX c #a4a423231313", | |
3058 | "AX c #a5a522221212", | |
3059 | "SX c #a6a622221212", | |
3060 | "DX c #a6a622221313", | |
3061 | "FX c #a7a722221212", | |
3062 | "GX c #a4a424241515", | |
3063 | "HX c #a5a525251616", | |
3064 | "JX c #a7a724241414", | |
3065 | "KX c #a7a724241515", | |
3066 | "LX c #a6a625251717", | |
3067 | "PX c #a7a725251616", | |
3068 | "IX c #a7a725251717", | |
3069 | "UX c #a6a626261717", | |
3070 | "YX c #a0a025251818", | |
3071 | "TX c #a3a325251818", | |
3072 | "RX c #a2a226261818", | |
3073 | "EX c #a3a326261818", | |
3074 | "WX c #a2a227271a1a", | |
3075 | "QX c #a2a227271b1b", | |
3076 | "!X c #a3a327271a1a", | |
3077 | "~X c #a5a527271919", | |
3078 | "^X c #a5a527271a1a", | |
3079 | "/X c #a6a626261818", | |
3080 | "(X c #a6a627271818", | |
3081 | ")X c #a6a627271919", | |
3082 | "_X c #a3a328281b1b", | |
3083 | "`X c #a1a128281c1c", | |
3084 | "'X c #a1a129291d1d", | |
3085 | "]X c #a1a129291e1e", | |
3086 | "[X c #a0a02a2a1f1f", | |
3087 | "{X c #a1a12a2a1f1f", | |
3088 | "}X c #a2a228281c1c", | |
3089 | "|X c #a2a229291c1c", | |
3090 | " o c #a3a32b2b1f1f", | |
3091 | ".o c #a5a528281a1a", | |
3092 | "Xo c #a5a528281b1b", | |
3093 | "oo c #a5a529291b1b", | |
3094 | "Oo c #a4a429291c1c", | |
3095 | "+o c #a4a429291d1d", | |
3096 | "@o c #a5a529291c1c", | |
3097 | "#o c #a5a529291d1d", | |
3098 | "$o c #a4a42a2a1d1d", | |
3099 | "%o c #a4a42a2a1e1e", | |
3100 | "&o c #a4a42b2b1e1e", | |
3101 | "*o c #a4a42b2b1f1f", | |
3102 | "=o c #a9a921211010", | |
3103 | "-o c #a9a921211111", | |
3104 | ";o c #a8a822221111", | |
3105 | ":o c #a9a922221111", | |
3106 | ">o c #a8a822221212", | |
3107 | ",o c #a8a823231212", | |
3108 | "<o c #a8a823231313", | |
3109 | "1o c #abab23231313", | |
3110 | "2o c #a8a823231414", | |
3111 | "3o c #a9a924241313", | |
3112 | "4o c #a8a824241414", | |
3113 | "5o c #acac22221111", | |
3114 | "6o c #aeae22221212", | |
3115 | "7o c #aeae23231212", | |
3116 | "8o c #afaf24241313", | |
3117 | "9o c #a9a927271818", | |
3118 | "0o c #abab27271919", | |
3119 | "qo c #a8a829291b1b", | |
3120 | "wo c #abab28281a1a", | |
3121 | "eo c #a8a829291c1c", | |
3122 | "ro c #a8a82a2a1d1d", | |
3123 | "to c #abab29291c1c", | |
3124 | "yo c #adad29291b1b", | |
3125 | "uo c #adad2a2a1b1b", | |
3126 | "io c #aeae28281a1a", | |
3127 | "po c #adad2b2b1d1d", | |
3128 | "ao c #b1b123231111", | |
3129 | "so c #b3b323231010", | |
3130 | "do c #b3b323231111", | |
3131 | "fo c #b1b126261515", | |
3132 | "go c #b1b126261717", | |
3133 | "ho c #b2b225251414", | |
3134 | "jo c #b6b624241212", | |
3135 | "ko c #b5b525251414", | |
3136 | "lo c #b5b526261515", | |
3137 | "zo c #b4b427271717", | |
3138 | "xo c #b1b127271818", | |
3139 | "co c #b3b32a2a1a1a", | |
3140 | "vo c #b6b628281919", | |
3141 | "bo c #b7b728281919", | |
3142 | "no c #b5b52a2a1c1c", | |
3143 | "mo c #b4b42c2c1d1d", | |
3144 | "Mo c #b9b923231111", | |
3145 | "No c #bbbb25251313", | |
3146 | "Bo c #baba26261414", | |
3147 | "Vo c #bebe25251212", | |
3148 | "Co c #bdbd27271616", | |
3149 | "Zo c #baba2b2b1a1a", | |
3150 | "Ao c #bcbc2a2a1818", | |
3151 | "So c #bebe2b2b1b1b", | |
3152 | "Do c #bdbd2c2c1d1d", | |
3153 | "Fo c #a0a02a2a2020", | |
3154 | "Go c #a0a02b2b2020", | |
3155 | "Ho c #a2a22b2b2020", | |
3156 | "Jo c #a0a02c2c2020", | |
3157 | "Ko c #a0a02c2c2121", | |
3158 | "Lo c #a0a02d2d2222", | |
3159 | "Po c #a0a02d2d2323", | |
3160 | "Io c #a1a12d2d2222", | |
3161 | "Uo c #a0a02e2e2323", | |
3162 | "Yo c #a1a12f2f2222", | |
3163 | "To c #a2a22d2d2121", | |
3164 | "Ro c #a3a32c2c2020", | |
3165 | "Eo c #a3a32c2c2121", | |
3166 | "Wo c #a3a32d2d2121", | |
3167 | "Qo c #a2a22d2d2222", | |
3168 | "!o c #a2a22e2e2323", | |
3169 | "~o c #a0a02e2e2424", | |
3170 | "^o c #a0a02f2f2525", | |
3171 | "/o c #a1a12f2f2424", | |
3172 | "(o c #a1a12f2f2525", | |
3173 | ")o c #a2a22e2e2424", | |
3174 | "_o c #a2a22f2f2424", | |
3175 | "`o c #a9a92f2f2020", | |
3176 | "'o c #aaaa2f2f2020", | |
3177 | "]o c #a0a031312727", | |
3178 | "[o c #a1a130302626", | |
3179 | "{o c #a1a130302727", | |
3180 | "}o c #a0a031312828", | |
3181 | "|o c #a0a032322929", | |
3182 | " O c #a0a032322a2a", | |
3183 | ".O c #a1a137372d2d", | |
3184 | "XO c #a2a236362c2c", | |
3185 | "oO c #a6a636362b2b", | |
3186 | "OO c #a3a338382e2e", | |
3187 | "+O c #a7a739392f2f", | |
3188 | "@O c #a7a73a3a2f2f", | |
3189 | "#O c #abab32322424", | |
3190 | "$O c #abab32322525", | |
3191 | "%O c #aaaa33332626", | |
3192 | "&O c #aaaa33332727", | |
3193 | "*O c #abab33332626", | |
3194 | "=O c #aaaa34342727", | |
3195 | "-O c #acac30302121", | |
3196 | ";O c #acac30302222", | |
3197 | ":O c #acac31312323", | |
3198 | ">O c #a9a935352929", | |
3199 | ",O c #a9a936362a2a", | |
3200 | "<O c #a9a936362b2b", | |
3201 | "1O c #a9a937372b2b", | |
3202 | "2O c #aaaa34342828", | |
3203 | "3O c #aaaa35352929", | |
3204 | "4O c #a8a837372c2c", | |
3205 | "5O c #a9a937372c2c", | |
3206 | "6O c #a8a838382d2d", | |
3207 | "7O c #a8a838382e2e", | |
3208 | "8O c #a8a839392e2e", | |
3209 | "9O c #a9a93f3f2f2f", | |
3210 | "0O c #a2a23b3b3232", | |
3211 | "qO c #a2a23d3d3535", | |
3212 | "wO c #a2a23e3e3636", | |
3213 | "eO c #a6a63b3b3131", | |
3214 | "rO c #a5a53d3d3434", | |
3215 | "tO c #a5a53e3e3535", | |
3216 | "yO c #afaf3f3f3333", | |
3217 | "uO c #c3c325251212", | |
3218 | "iO c #c3c326261313", | |
3219 | "pO c #c3c327271414", | |
3220 | "aO c #c7c728281616", | |
3221 | "sO c #c6c62c2c1a1a", | |
3222 | "dO c #c7c72e2e1d1d", | |
3223 | "fO c #cdcd2e2e1c1c", | |
3224 | "gO c #cfcf2f2f1c1c", | |
3225 | "hO c #d0d028281313", | |
3226 | "jO c #d3d329291414", | |
3227 | "kO c #d5d529291313", | |
3228 | "lO c #d0d02e2e1b1b", | |
3229 | "zO c #d8d829291414", | |
3230 | "xO c #dddd2a2a1414", | |
3231 | "cO c #dddd2d2d1717", | |
3232 | "vO c #dfdf30301c1c", | |
3233 | "bO c #e2e22b2b1515", | |
3234 | "nO c #ebeb2d2d1414", | |
3235 | "mO c #eded2e2e1717", | |
3236 | "MO c #e4e431311b1b", | |
3237 | "NO c #e9e930301a1a", | |
3238 | "BO c #ebeb31311b1b", | |
3239 | "VO c #e8e833331d1d", | |
3240 | "CO c #e9e932321c1c", | |
3241 | "ZO c #ebeb33331e1e", | |
3242 | "AO c #eeee30301a1a", | |
3243 | "SO c #eeee32321b1b", | |
3244 | "DO c #eaea3a3a1b1b", | |
3245 | "FO c #f1f132321b1b", | |
3246 | "GO c #f3f331311919", | |
3247 | "HO c #f7f732321b1b", | |
3248 | "JO c #f6f636361b1b", | |
3249 | "KO c #f6f638381c1c", | |
3250 | "LO c #fcfc30301717", | |
3251 | "PO c #fefe33331717", | |
3252 | "IO c #ffff32321616", | |
3253 | "UO c #fdfd35351717", | |
3254 | "YO c #ffff34341717", | |
3255 | "TO c #fafa30301919", | |
3256 | "RO c #fafa31311818", | |
3257 | "EO c #fafa36361919", | |
3258 | "WO c #fdfd33331919", | |
3259 | "QO c #ffff33331818", | |
3260 | "!O c #fdfd35351818", | |
3261 | "~O c #fafa3c3c1a1a", | |
3262 | "^O c #fafa3d3d1a1a", | |
3263 | "/O c #fbfb3d3d1d1d", | |
3264 | "(O c #fdfd38381919", | |
3265 | ")O c #fcfc39391a1a", | |
3266 | "_O c #ffff3a3a1a1a", | |
3267 | "`O c #ffff3f3f1b1b", | |
3268 | "'O c #ffff3c3c1d1d", | |
3269 | "]O c #ffff3e3e1d1d", | |
3270 | "[O c #c1c178782e2e", | |
3271 | "{O c #ffff40401e1e", | |
3272 | "}O c #d4d48d8d1d1d", | |
3273 | "|O c #cdcd86862222", | |
3274 | " + c #c1c181813838", | |
3275 | ".+ c #c7c79d9d3737", | |
3276 | "X+ c #c5c59c9c3939", | |
3277 | "o+ c #c4c49c9c3a3a", | |
3278 | "O+ c #c8c89b9b3030", | |
3279 | "++ c #cbcb9d9d3131", | |
3280 | "@+ c #caca9e9e3434", | |
3281 | "#+ c #cccc9d9d3030", | |
3282 | "$+ c #cccc9f9f3232", | |
3283 | "%+ c #cbcba0a03737", | |
3284 | "&+ c #cfcfa3a33737", | |
3285 | "*+ c #cfcfa3a33838", | |
3286 | "=+ c #cfcfa5a53e3e", | |
3287 | "-+ c #d5d5a8a82e2e", | |
3288 | ";+ c #dadaa8a82f2f", | |
3289 | ":+ c #dadaacac2f2f", | |
3290 | ">+ c #dbdbacac2e2e", | |
3291 | ",+ c #dddda8a82a2a", | |
3292 | "<+ c #ddddacac2a2a", | |
3293 | "1+ c #dedeadad2929", | |
3294 | "2+ c #dfdfaeae2828", | |
3295 | "3+ c #dcdcadad2d2d", | |
3296 | "4+ c #d0d0a1a13131", | |
3297 | "5+ c #d1d1a2a23030", | |
3298 | "6+ c #d1d1a3a33333", | |
3299 | "7+ c #d2d2a3a33232", | |
3300 | "8+ c #d3d3a3a33232", | |
3301 | "9+ c #d3d3a4a43333", | |
3302 | "0+ c #d1d1a4a43636", | |
3303 | "q+ c #d1d1a4a43737", | |
3304 | "w+ c #d2d2a4a43535", | |
3305 | "e+ c #d2d2a4a43636", | |
3306 | "r+ c #d5d5a5a53333", | |
3307 | "t+ c #d5d5a6a63434", | |
3308 | "y+ c #d4d4a6a63737", | |
3309 | "u+ c #d6d6a7a73535", | |
3310 | "i+ c #d7d7a7a73434", | |
3311 | "p+ c #d2d2a5a53939", | |
3312 | "a+ c #d3d3a6a63838", | |
3313 | "s+ c #d3d3a6a63a3a", | |
3314 | "d+ c #d0d0a5a53d3d", | |
3315 | "f+ c #d1d1a5a53c3c", | |
3316 | "g+ c #d0d0a5a53f3f", | |
3317 | "h+ c #d8d8a7a73333", | |
3318 | "j+ c #d9d9a8a83232", | |
3319 | "k+ c #d9d9acac3232", | |
3320 | "l+ c #dfdfadad3636", | |
3321 | "z+ c #d9d9abab3e3e", | |
3322 | "x+ c #dadaaeae3939", | |
3323 | "c+ c #dbdbafaf3a3a", | |
3324 | "v+ c #dadaacac3f3f", | |
3325 | "b+ c #dbdbadad3e3e", | |
3326 | "n+ c #dfdfb1b13535", | |
3327 | "m+ c #dfdfb0b03636", | |
3328 | "M+ c #dcdcb0b03b3b", | |
3329 | "N+ c #ddddb0b03a3a", | |
3330 | "B+ c #dedeb1b13939", | |
3331 | "V+ c #e3e3afaf2222", | |
3332 | "C+ c #e0e0adad2525", | |
3333 | "Z+ c #e1e1aeae2424", | |
3334 | "A+ c #e4e4afaf2121", | |
3335 | "S+ c #e2e2b2b23232", | |
3336 | "D+ c #e0e0b2b23434", | |
3337 | "F+ c #cfcfa5a54040", | |
3338 | "G+ c #d3d3aaaa4747", | |
3339 | "H+ c #d5d5abab4343", | |
3340 | "J+ c #d6d6abab4242", | |
3341 | "K+ c #d4d4aaaa4444", | |
3342 | "L+ c #d2d2aaaa4848", | |
3343 | "P+ c #d8d8acac4040", | |
3344 | "I+ c #dfdfb4b44545", | |
3345 | "U+ c #fbfbfbfbfbfb", | |
3346 | "Y+ c Gray99", | |
3347 | "T+ c #fdfdfdfdfdfd", | |
3348 | "R+ c #fefefefefefe", | |
3349 | "E+ c Gray100", | |
3350 | "W+ c None", | |
3351 | /* pixels */ | |
3352 | "W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", | |
3353 | "W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", | |
3354 | "W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", | |
3355 | "W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", | |
3356 | "W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", | |
3357 | "W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", | |
3358 | "W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", | |
3359 | "W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", | |
3360 | "W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+'O(OWOTOGOAOBONOCOZOVO W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", | |
3361 | "W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+]O_OQOmOjOpOBokohohofozoAosOfOgOSo W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", | |
3362 | "W+W+W+W+W+W+W+W+W+W+W+W+W+W+)OIOxOiOdo7o1o>oAX,.q.BXPXPX9o0ocoDono W+W+W+W+W+W+W+W+W+W+W+W+W+", | |
3363 | "W+W+W+W+W+W+W+W+W+W+W+W+`O!OnOuOao5o:o>o,oSXh.MXKXPXPXUXTX(X)Xqouoto5. W+W+W+W+W+W+W+W+W+W+W+W+", | |
3364 | "W+W+W+W+W+W+W+W+W+W+W+^OPOzOMo5o-o:o>oFXSXw.NXKXPXIXUX/X)X)XWXXoooro#o.. W+W+W+W+W+W+W+W+W+W+", | |
3365 | "W+W+W+W+W+W+W+W+W+W+~OYOhOso=o-o;o>o<o<oZXd.ZXPXLXUX/X*O*O.oXooo}X$o$ov.( W+W+W+W+W+W+W+W+W+", | |
3366 | "W+W+W+W+W+W+W+W+W+{OUOkOao=o:o>o>o<o2oJXKXGXj.VXHX/X)X~X=O2OooOoB.'X]XH.2.s W+W+W+W+W+W+W+W+W+", | |
3367 | "W+W+W+W+W+W+W+W+W+)ObOjo=o:o>o,o<o2o-O;OPXPXHXl.f.RX^X.oXo3O>O,O%o&o[XFoN.{ w W+W+W+W+W+W+W+W+", | |
3368 | "W+W+W+W+W+W+W+W+/OLOVo5o:o>o,o<o'o`oKX:O:OUX/X(XYXr.b.Xo@oOo$o<O1O oRoGo$X8.Z q W+W+W+W+W+W+W+", | |
3369 | "W+W+W+W+W+W+W+W+EOjO6o;o>o<o<o4o>.-X:OIX#O$O)X)X.o!Xe.p.`X$o%o*o4O6OEoJoKo/.) $ W+W+W+W+W+W+", | |
3370 | "W+W+W+W+W+W+W+DORONo;o>oCX<.JXKXk.PXLX#O$O*O%O.oXooo_Xy.t.m.*o oRo7O8OQoLoXX@.i f W+W+W+W+W+W+", | |
3371 | "W+W+W+W+W+W+W+KOcO8oFX<oDXg.KXPXPXUX/X/X*O&OyO2O@oOo$o|Xx.u.V.RoEoTo+O9OYoUo9.M 8 W+W+W+W+W+W+", | |
3372 | "W+W+W+W+W+W+ JOaO3o}OA+A+V+Z+Z+C+2+2+1+,+<+B+I+N+:+j+k+h+7+O+6+y+y+a+[OIo1X!.Y = 7 W+W+W+W+W+", | |
3373 | "W+W+W+W+W+W+ HOCo<oA+V+V+Z+Z+C+2+2+1+<+<+3+>+x+c+b+k+h+i+i+t+e+y+a+s+p+(o2X(.W % 9 W+W+W+W+W+", | |
3374 | "W+W+W+W+W+W+ FOloJXV+V+Z+S+C+2+1+1+<+3+3+>+;+-+5+z+v+i+u+u+y+a+a+s+f+f+[o3X]./ + < F W+W+W+W+W+", | |
3375 | "W+W+W+W+W+W+ SOfoKXV+Z+C+C+D+n+1+<+3+3+>+:+:+j+8+4+r+P+P+y+a+a+.+X+X+o+{owX_._ o ; z W+W+W+W+W+", | |
3376 | "W+W+W+W+W+W+ MOgoPXZ+C+2+2+1+l+m+3+>+>+:+j+k+h+i+9+$+w+J+H+H+s+f+f+d+g+]oeX~.! . + l W+W+W+W+W+", | |
3377 | "W+W+W+W+W+W+ vOxoPXC+2+2+1+<+<+B+N+>+:+j+k+#+i+i+u+0+@+&+s+K+G+d+d+=+F+}ojXI.S . + l W+W+W+W+W+", | |
3378 | "W+W+W+W+W+W+ lOvoUX|O1+1+<+<+3+>+N+M+j+k+h+++++u+y+y+q+%+*+f+L+L+=+F+ +|ouX&.v . + l E+W+W+W+W+", | |
3379 | "W+W+W+W+W+W+ boZo/XEX)X.oXooon.c.$o<O5O oRoEoA.}.!o|..X~o&X2X{o]orO|o|oaX7XO.2 o > z E+W+W+W+W+", | |
3380 | "W+W+W+W+W+W+ [ dOwo~X.oXoooOo$oz.i.G.oORoEoWoQoa.a._o X(o^o<XtX}o|otOcXfXU.~ X + 5 F E+W+W+W+W+", | |
3381 | "W+W+W+W+W+W+ 4 ioyo.oQX@oOo$o%o&oM.F.C.XOKoQo!o)o4.0.OXOX{otX,XlX|ocXwOyX$.p O * q K W+W+W+W+W+", | |
3382 | "W+W+W+W+W+W+ q } moeo@oOo$o%o&o oRoZ.HoOO.O%X=X/ooX>X[o'.}o}oqXkXcXvXmXW.^ X + - j =.W+W+W+W+W+", | |
3383 | "W+W+W+W+W+W+W+ - 6.po+o'X%o&o oRoRoA.}.Qo@OPo*X~o[o[o]o[.[.|oxXzXvXhXE.X.e O + 6 J Y+W+W+W+W+W+", | |
3384 | "W+W+W+W+W+W+W+ X r n.$o]X{X oRoEoWoQo|.|.)oeO(o[o{o]o}o|o{.xXvXvXdX8X#.b X + o d I Y+W+W+W+W+W+", | |
3385 | "W+W+W+W+W+W+W+W+ - B D.[X[XGoEoWoQo!o!o_o(oeOnXY.+X}o|o|o9X0XvXhX8X%.D X O # 6 H :.W+W+W+W+W+W+", | |
3386 | "W+W+W+W+W+W+W+W+ * N 7.S.GoKoKo!o)o/o(o[oOX0O5X@X|o OcXvXgXpXR.+.V X O + + j =.E+W+W+W+W+W+W+", | |
3387 | "W+W+W+W+W+W+W+W+W+L # u .s.#XLoPo;X(o[o[o]o[.bXtOxXcXfXpX6XK.] a X O + - j *.T+W+W+W+W+W+W+W+", | |
3388 | "W+W+W+W+W+W+W+W+W+W+ - U 3.Q.).:X2X2XwXeXrXjXqOsXiX4XJ.o.E & O O + O 0 K T+E+W+W+W+W+W+W+W+", | |
3389 | "W+W+W+W+W+W+W+W+W+W+ - 1 C | 1.P.T._.`.`.^.U.L.$.' A 3 X O O # - q J :.Y+W+W+W+W+W+W+W+W+", | |
3390 | "W+W+W+W+W+W+W+W+W+W+W+ # - # O y m T Q _ ` ~ R n t @ O O O + O # g P :.E+W+W+W+W+W+W+W+W+W+", | |
3391 | "W+W+W+W+W+W+W+W+W+W+W+W+W+ - # # # O O O O O O O O O O O + # + 7 x ;.T+Y+W+W+W+W+W+W+W+W+W+W+", | |
3392 | "W+W+W+W+W+W+W+W+W+W+W+W+W+W+ G k : # - # # X X + . # # # O , g j -.:.R+E+W+W+W+W+W+W+W+W+W+W+W+", | |
3393 | "W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+ h 6 : 6 6 # # # 6 6 0 g F *.:.T+E+W+W+W+W+W+W+W+W+W+W+W+W+W+", | |
3394 | "W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+ L F c z z z c F K =.T+E+U+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", | |
3395 | "W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+E+E+E+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", | |
3396 | "W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", | |
3397 | "W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", | |
3398 | "W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", | |
3399 | "W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+" | |
3400 | }; | |
3401 | ||
3402 | static char *info_xpm[] = { | |
3403 | /* columns rows colors chars-per-pixel */ | |
3404 | "48 48 478 2", | |
3405 | " c Gray0", | |
3406 | ". c #010101010101", | |
3407 | "X c #020202020202", | |
3408 | "o c #050505050404", | |
3409 | "O c Gray2", | |
3410 | "+ c #080808080707", | |
3411 | "@ c #090909090808", | |
3412 | "# c #0b0b0b0b0909", | |
3413 | "$ c #0b0b0b0b0b0b", | |
3414 | "% c #0c0c0c0c0b0b", | |
3415 | "& c #0d0d0d0d0a0a", | |
3416 | "* c #0c0c0c0c0c0c", | |
3417 | "= c #0f0f0e0e0c0c", | |
3418 | "- c #0f0f0f0f0e0e", | |
3419 | "; c Gray6", | |
3420 | ": c #101010100e0e", | |
3421 | "> c #121212120f0f", | |
3422 | ", c #101010101010", | |
3423 | "< c #121212121111", | |
3424 | "1 c #131313131111", | |
3425 | "2 c #131313131313", | |
3426 | "3 c #141414141111", | |
3427 | "4 c #141414141212", | |
3428 | "5 c #161616161313", | |
3429 | "6 c #161616161414", | |
3430 | "7 c #1a1a1a1a1717", | |
3431 | "8 c #1d1d1d1d1616", | |
3432 | "9 c #191919191919", | |
3433 | "0 c #1e1e1e1e1e1e", | |
3434 | "q c #20201d1d1313", | |
3435 | "w c #202020201c1c", | |
3436 | "e c #212121211d1d", | |
3437 | "r c #212120201e1e", | |
3438 | "t c #232323231f1f", | |
3439 | "y c #242421211919", | |
3440 | "u c Gray15", | |
3441 | "i c #272727272727", | |
3442 | "p c #2a2a2a2a2727", | |
3443 | "a c #282828282828", | |
3444 | "s c #2a2a2a2a2a2a", | |
3445 | "d c #2c2c2c2c2a2a", | |
3446 | "f c #2f2f2f2f2929", | |
3447 | "g c #2d2d2d2d2d2d", | |
3448 | "h c Gray18", | |
3449 | "j c #313131312b2b", | |
3450 | "k c #303030302f2f", | |
3451 | "l c #333333332f2f", | |
3452 | "z c #353535352e2e", | |
3453 | "x c #383835352626", | |
3454 | "c c #3b3b37372424", | |
3455 | "v c #333333333131", | |
3456 | "b c Gray20", | |
3457 | "n c #343434343434", | |
3458 | "m c #353535353535", | |
3459 | "M c #393937373232", | |
3460 | "N c #383838383737", | |
3461 | "B c #3d3d3d3d3535", | |
3462 | "V c Gray23", | |
3463 | "C c #3e3e3e3e3e3e", | |
3464 | "Z c #42423f3f3636", | |
3465 | "A c #434340403232", | |
3466 | "S c #424242423a3a", | |
3467 | "D c #434343433d3d", | |
3468 | "F c #444444443b3b", | |
3469 | "G c #474744443939", | |
3470 | "H c #4f4f49493838", | |
3471 | "J c #4d4d49493c3c", | |
3472 | "K c #434343434242", | |
3473 | "L c #434343434343", | |
3474 | "P c #474747474242", | |
3475 | "I c #464646464444", | |
3476 | "U c #464646464646", | |
3477 | "Y c Gray28", | |
3478 | "T c #4b4b4b4b4444", | |
3479 | "R c #4d4d4c4c4747", | |
3480 | "E c #4e4e4e4e4545", | |
3481 | "W c #494949494949", | |
3482 | "Q c #4b4b4b4b4b4b", | |
3483 | "! c #4e4e4e4e4e4e", | |
3484 | "~ c #4f4f4f4f4e4e", | |
3485 | "^ c #525252524848", | |
3486 | "/ c #525252524949", | |
3487 | "( c #555555554e4e", | |
3488 | ") c #565656564f4f", | |
3489 | "_ c #5a5a59594c4c", | |
3490 | "` c #5f5f5c5c4f4f", | |
3491 | "' c Gray32", | |
3492 | "] c Gray33", | |
3493 | "[ c #585858585151", | |
3494 | "{ c #585858585858", | |
3495 | "} c #595959595858", | |
3496 | "| c #5c5c5c5c5b5b", | |
3497 | " . c #5f5f5e5e5959", | |
3498 | ".. c #6d6d66664d4d", | |
3499 | "X. c #646461615959", | |
3500 | "o. c #71716d6d5b5b", | |
3501 | "O. c #797971715757", | |
3502 | "+. c #626262626262", | |
3503 | "@. c Gray39", | |
3504 | "#. c #646464646464", | |
3505 | "$. c #696969696464", | |
3506 | "%. c #6d6d6d6d6464", | |
3507 | "&. c #696969696868", | |
3508 | "*. c #6b6b6b6b6a6a", | |
3509 | "=. c #6d6d6d6d6d6d", | |
3510 | "-. c #6f6f6f6f6f6f", | |
3511 | ";. c #73736f6f6161", | |
3512 | ":. c #707070706b6b", | |
3513 | ">. c #717171716f6f", | |
3514 | ",. c #757575756c6c", | |
3515 | "<. c #797976766c6c", | |
3516 | "1. c #7f7f7a7a6464", | |
3517 | "2. c Gray45", | |
3518 | "3. c #757575757171", | |
3519 | "4. c #7b7b7b7b7a7a", | |
3520 | "5. c #7b7b7b7b7b7b", | |
3521 | "6. c #7f7f7f7f7b7b", | |
3522 | "7. c Gray49", | |
3523 | "8. c #818179795959", | |
3524 | "9. c #808079795f5f", | |
3525 | "0. c #8f8f82825555", | |
3526 | "q. c #959588885757", | |
3527 | "w. c #9b9b8c8c5a5a", | |
3528 | "e. c #929289896363", | |
3529 | "r. c #9d9d91916464", | |
3530 | "t. c #a9a999995959", | |
3531 | "y. c #abab9b9b5b5b", | |
3532 | "u. c #b3b3a0a05e5e", | |
3533 | "i. c #a9a9a0a07777", | |
3534 | "p. c #aeaea4a47575", | |
3535 | "a. c #b9b9a9a96464", | |
3536 | "s. c #babaa8a86464", | |
3537 | "d. c #b7b7aaaa7c7c", | |
3538 | "f. c #c1c1aeae6767", | |
3539 | "g. c #c4c4b2b26969", | |
3540 | "h. c #c4c4b3b36b6b", | |
3541 | "j. c #c6c6b3b36a6a", | |
3542 | "k. c #c9c9b7b76d6d", | |
3543 | "l. c #ccccb9b96e6e", | |
3544 | "z. c #c1c1b3b37272", | |
3545 | "x. c #c2c2b0b07171", | |
3546 | "c. c #c6c6b6b67777", | |
3547 | "v. c #cacab8b87171", | |
3548 | "b. c #cdcdbcbc7070", | |
3549 | "n. c #d1d1bcbc7070", | |
3550 | "m. c #d1d1bfbf7373", | |
3551 | "M. c #d1d1c0c07676", | |
3552 | "N. c #d9d9c5c57777", | |
3553 | "B. c #d9d9c6c67777", | |
3554 | "V. c #dadac7c77777", | |
3555 | "C. c #d9d9c6c67979", | |
3556 | "Z. c #dbdbc7c77c7c", | |
3557 | "A. c #dbdbc8c87878", | |
3558 | "S. c #dbdbc9c97c7c", | |
3559 | "D. c #dadac8c87e7e", | |
3560 | "F. c #dbdbc9c97e7e", | |
3561 | "G. c #e2e2cdcd7f7f", | |
3562 | "H. c #e4e4d0d07e7e", | |
3563 | "J. c #e4e4d0d07f7f", | |
3564 | "K. c #e4e4d1d17e7e", | |
3565 | "L. c #e6e6d2d27e7e", | |
3566 | "P. c #818181818181", | |
3567 | "I. c #838383838383", | |
3568 | "U. c #848484848484", | |
3569 | "Y. c Gray53", | |
3570 | "T. c #898987878282", | |
3571 | "R. c #8d8d8d8d8585", | |
3572 | "E. c #8d8d8d8d8787", | |
3573 | "W. c #929292928d8d", | |
3574 | "Q. c #969696968e8e", | |
3575 | "!. c #989895958585", | |
3576 | "~. c #9b9b95958484", | |
3577 | "^. c #929292929292", | |
3578 | "/. c #939393939393", | |
3579 | "(. c Gray58", | |
3580 | "). c Gray60", | |
3581 | "_. c #9d9d9d9d9999", | |
3582 | "`. c #9e9e9e9e9a9a", | |
3583 | "'. c #a2a29c9c8484", | |
3584 | "]. c None", | |
3585 | "[. c #b8b8b0b09595", | |
3586 | "{. c #a0a0a0a0a0a0", | |
3587 | "}. c Gray63", | |
3588 | "|. c #a5a5a5a5a5a5", | |
3589 | " X c #a7a7a7a7a7a7", | |
3590 | ".X c #a9a9a9a9a4a4", | |
3591 | "XX c #aeaeaeaea9a9", | |
3592 | "oX c #babab6b6a9a9", | |
3593 | "OX c #b3b3b3b3b0b0", | |
3594 | "+X c #b3b3b3b3b1b1", | |
3595 | "@X c #b4b4b4b4b2b2", | |
3596 | "#X c #b4b4b4b4b4b4", | |
3597 | "$X c #b6b6b6b6b6b6", | |
3598 | "%X c #b9b9b9b9b1b1", | |
3599 | "&X c Gray73", | |
3600 | "*X c #bbbbbbbbbbbb", | |
3601 | "=X c #bcbcbcbcb9b9", | |
3602 | "-X c Gray75", | |
3603 | ";X c #c1c1b9b99999", | |
3604 | ":X c #c2c2bebeafaf", | |
3605 | ">X c #d7d7c4c48080", | |
3606 | ",X c #d8d8c7c78e8e", | |
3607 | "<X c #dfdfcbcb8080", | |
3608 | "1X c #dcdccbcb8484", | |
3609 | "2X c #d7d7c8c89696", | |
3610 | "3X c #c4c4c4c4b5b5", | |
3611 | "4X c #c8c8c8c8b9b9", | |
3612 | "5X c #cbcbcbcbbcbc", | |
3613 | "6X c #dfdfd2d2a9a9", | |
3614 | "7X c #e0e0cece8a8a", | |
3615 | "8X c #e3e3d1d18686", | |
3616 | "9X c #e7e7d1d18080", | |
3617 | "0X c #e5e5d1d18787", | |
3618 | "qX c #e7e7d4d48080", | |
3619 | "wX c #e5e5d4d48d8d", | |
3620 | "eX c #e6e6d6d68c8c", | |
3621 | "rX c #eeeed6d68181", | |
3622 | "tX c #efefd7d78282", | |
3623 | "yX c #e8e8d6d68b8b", | |
3624 | "uX c #e8e8d4d48d8d", | |
3625 | "iX c #ececd7d78c8c", | |
3626 | "pX c #efefd8d88181", | |
3627 | "aX c #efefd8d88282", | |
3628 | "sX c #efefd9d98686", | |
3629 | "dX c #eeeedbdb8b8b", | |
3630 | "fX c #eeeedada8d8d", | |
3631 | "gX c #efefdada8e8e", | |
3632 | "hX c #efefdcdc8b8b", | |
3633 | "jX c #efefdddd8f8f", | |
3634 | "kX c #eaeadada9191", | |
3635 | "lX c #e9e9dada9696", | |
3636 | "zX c #ededd9d99090", | |
3637 | "xX c #efefdddd9292", | |
3638 | "cX c #efefdddd9393", | |
3639 | "vX c #ebebdbdb9999", | |
3640 | "bX c #f1f1dcdc8686", | |
3641 | "nX c #f3f3dede8787", | |
3642 | "mX c #f4f4dede8787", | |
3643 | "MX c #f2f2dcdc8a8a", | |
3644 | "NX c #f3f3dfdf8d8d", | |
3645 | "BX c #f0f0dcdc9191", | |
3646 | "VX c #f1f1dcdc9292", | |
3647 | "CX c #f0f0dfdf9292", | |
3648 | "ZX c #f0f0dddd9c9c", | |
3649 | "AX c #f1f1dfdfa1a1", | |
3650 | "SX c #f1f1e0e08e8e", | |
3651 | "DX c #f6f6e3e38f8f", | |
3652 | "FX c #f7f7e5e58f8f", | |
3653 | "GX c #f2f2e0e09090", | |
3654 | "HX c #f2f2e0e09393", | |
3655 | "JX c #f3f3e0e09393", | |
3656 | "KX c #f3f3e2e29090", | |
3657 | "LX c #f1f1e1e19595", | |
3658 | "PX c #f2f2e0e09797", | |
3659 | "IX c #f3f3e2e29595", | |
3660 | "UX c #f3f3e2e29696", | |
3661 | "YX c #f4f4e1e19191", | |
3662 | "TX c #f5f5e1e19090", | |
3663 | "RX c #f5f5e3e39191", | |
3664 | "EX c #f5f5e2e29393", | |
3665 | "WX c #f5f5e3e39393", | |
3666 | "QX c #f4f4e3e39595", | |
3667 | "!X c #f6f6e5e59191", | |
3668 | "~X c #f6f6e4e49393", | |
3669 | "^X c #f6f6e5e59393", | |
3670 | "/X c #f7f7e4e49393", | |
3671 | "(X c #f7f7e6e69191", | |
3672 | ")X c #f6f6e4e49696", | |
3673 | "_X c #f7f7e6e69595", | |
3674 | "`X c #f6f6e6e69797", | |
3675 | "'X c #f1f1e1e19b9b", | |
3676 | "]X c #f2f2e2e29a9a", | |
3677 | "[X c #f4f4e2e29898", | |
3678 | "{X c #f6f6e4e49898", | |
3679 | "}X c #f6f6e4e49999", | |
3680 | "|X c #f6f6e5e59b9b", | |
3681 | " o c #f4f4e4e49d9d", | |
3682 | ".o c #f5f5e4e49c9c", | |
3683 | "Xo c #f6f6e5e59d9d", | |
3684 | "oo c #f7f7e6e69f9f", | |
3685 | "Oo c #f8f8e6e69191", | |
3686 | "+o c #f8f8e7e79191", | |
3687 | "@o c #f8f8e7e79393", | |
3688 | "#o c #f8f8e7e79595", | |
3689 | "$o c #f8f8e7e79696", | |
3690 | "%o c #f9f9e8e89b9b", | |
3691 | "&o c #f9f9e9e99b9b", | |
3692 | "*o c #f9f9e8e89e9e", | |
3693 | "=o c #edede7e7baba", | |
3694 | "-o c #f1f1e3e3a4a4", | |
3695 | ";o c #f3f3e3e3a7a7", | |
3696 | ":o c #f2f2e4e4a1a1", | |
3697 | ">o c #f3f3e4e4a1a1", | |
3698 | ",o c #f3f3e6e6a3a3", | |
3699 | "<o c #f4f4e5e5a0a0", | |
3700 | "1o c #f5f5e4e4a3a3", | |
3701 | "2o c #f5f5e7e7a2a2", | |
3702 | "3o c #f6f6e6e6a0a0", | |
3703 | "4o c #f7f7e7e7a0a0", | |
3704 | "5o c #f7f7e7e7a5a5", | |
3705 | "6o c #f6f6e7e7a7a7", | |
3706 | "7o c #f1f1e6e6adad", | |
3707 | "8o c #f3f3e6e6adad", | |
3708 | "9o c #f3f3e7e7adad", | |
3709 | "0o c #f7f7e8e8a6a6", | |
3710 | "qo c #f7f7e8e8a7a7", | |
3711 | "wo c #f7f7eaeaafaf", | |
3712 | "eo c #f9f9e9e9a7a7", | |
3713 | "ro c #fafaeaeaa6a6", | |
3714 | "to c #f8f8e8e8a9a9", | |
3715 | "yo c #f8f8eaeaaeae", | |
3716 | "uo c #f8f8eaeaafaf", | |
3717 | "io c #fafaececafaf", | |
3718 | "po c #f4f4e7e7b2b2", | |
3719 | "ao c #f5f5e7e7b2b2", | |
3720 | "so c #f4f4e7e7bbbb", | |
3721 | "do c #f7f7ebebb1b1", | |
3722 | "fo c #f4f4e9e9bbbb", | |
3723 | "go c #f6f6ebebbebe", | |
3724 | "ho c #f8f8ebebb1b1", | |
3725 | "jo c #f9f9ebebb1b1", | |
3726 | "ko c #fafaededb7b7", | |
3727 | "lo c #f8f8ececb8b8", | |
3728 | "zo c #f8f8ececb9b9", | |
3729 | "xo c #f8f8ededbaba", | |
3730 | "co c #fafaeeeebbbb", | |
3731 | "vo c #c2c2c2c2c1c1", | |
3732 | "bo c #c3c3c3c3c1c1", | |
3733 | "no c Gray76", | |
3734 | "mo c #c3c3c3c3c2c2", | |
3735 | "Mo c #c7c7c7c7c5c5", | |
3736 | "No c #cacacacac4c4", | |
3737 | "Bo c Gray79", | |
3738 | "Vo c #cacacacacaca", | |
3739 | "Co c #cbcbcbcbcbcb", | |
3740 | "Zo c #cfcfcfcfc8c8", | |
3741 | "Ao c Gray80", | |
3742 | "So c #cfcfcfcfcece", | |
3743 | "Do c #d8d8d8d8cdcd", | |
3744 | "Fo c #ddddd9d9caca", | |
3745 | "Go c #d4d4d4d4d1d1", | |
3746 | "Ho c #d7d7d7d7d3d3", | |
3747 | "Jo c #d5d5d5d5d5d5", | |
3748 | "Ko c Gray85", | |
3749 | "Lo c #dadadadad8d8", | |
3750 | "Po c #dadadadadada", | |
3751 | "Io c gainsboro", | |
3752 | "Uo c #dddddddddddd", | |
3753 | "Yo c #dededededddd", | |
3754 | "To c #dfdfdfdfdede", | |
3755 | "Ro c #e0e0e0e0d7d7", | |
3756 | "Eo c #e5e5e5e5dddd", | |
3757 | "Wo c #f3f3eaeac1c1", | |
3758 | "Qo c #f4f4e9e9c1c1", | |
3759 | "!o c #f5f5e9e9c2c2", | |
3760 | "~o c #f4f4e9e9c4c4", | |
3761 | "^o c #f7f7eeeec3c3", | |
3762 | "/o c #f4f4eaeac9c9", | |
3763 | "(o c #f4f4eaeacaca", | |
3764 | ")o c #f9f9efefcbcb", | |
3765 | "_o c #f8f8efefcfcf", | |
3766 | "`o c #f7f7efefd0d0", | |
3767 | "'o c #f7f7eeeed9d9", | |
3768 | "]o c #f7f7efefd8d8", | |
3769 | "[o c #f9f9f0f0c7c7", | |
3770 | "{o c #fafaf3f3d0d0", | |
3771 | "}o c #fafaf2f2d2d2", | |
3772 | "|o c #fafaf2f2d3d3", | |
3773 | " O c #f8f8f1f1dbdb", | |
3774 | ".O c #f9f9f1f1dbdb", | |
3775 | "XO c #f8f8f2f2dbdb", | |
3776 | "oO c #f9f9f2f2dbdb", | |
3777 | "OO c #fafaf3f3dada", | |
3778 | "+O c #fafaf3f3dbdb", | |
3779 | "@O c #f8f8f1f1dcdc", | |
3780 | "#O c #f8f8f2f2dede", | |
3781 | "$O c #fafaf4f4d9d9", | |
3782 | "%O c #fafaf5f5dede", | |
3783 | "&O c #e7e7e7e7e1e1", | |
3784 | "*O c #e4e4e4e4e4e4", | |
3785 | "=O c #e9e9e9e9e2e2", | |
3786 | "-O c #ebebebebe6e6", | |
3787 | ";O c Gray91", | |
3788 | ":O c #edededede8e8", | |
3789 | ">O c #ecececececec", | |
3790 | ",O c Gray93", | |
3791 | "<O c #efefefefeeee", | |
3792 | "1O c #efefefefefef", | |
3793 | "2O c #f1f1f1f1ecec", | |
3794 | "3O c #f2f2f2f2eeee", | |
3795 | "4O c #fafaf3f3e5e5", | |
3796 | "5O c #f9f9f4f4e0e0", | |
3797 | "6O c #f9f9f4f4e2e2", | |
3798 | "7O c #f9f9f4f4e3e3", | |
3799 | "8O c #f9f9f5f5e3e3", | |
3800 | "9O c #fafaf4f4e1e1", | |
3801 | "0O c #f9f9f4f4e5e5", | |
3802 | "qO c #f9f9f5f5e4e4", | |
3803 | "wO c #f9f9f5f5e5e5", | |
3804 | "eO c #f9f9f4f4e6e6", | |
3805 | "rO c #f9f9f4f4e7e7", | |
3806 | "tO c #f9f9f5f5e6e6", | |
3807 | "yO c #f9f9f6f6e5e5", | |
3808 | "uO c #f9f9f6f6e7e7", | |
3809 | "iO c #fafaf5f5e4e4", | |
3810 | "pO c #fafaf5f5e5e5", | |
3811 | "aO c #fafaf5f5e6e6", | |
3812 | "sO c #fafaf5f5e7e7", | |
3813 | "dO c #fbfbf5f5e6e6", | |
3814 | "fO c #fafaf6f6e6e6", | |
3815 | "gO c #fafaf6f6e7e7", | |
3816 | "hO c #fbfbf6f6e7e7", | |
3817 | "jO c #f9f9f6f6eaea", | |
3818 | "kO c #fafaf5f5e8e8", | |
3819 | "lO c #fafaf6f6e8e8", | |
3820 | "zO c #fafaf6f6e9e9", | |
3821 | "xO c #fafaf7f7eaea", | |
3822 | "cO c #fafaf7f7ebeb", | |
3823 | "vO c #fbfbf7f7eaea", | |
3824 | "bO c #fbfbf7f7ecec", | |
3825 | "nO c #fbfbf7f7eded", | |
3826 | "mO c #fafaf8f8ecec", | |
3827 | "MO c #fbfbf8f8eded", | |
3828 | "NO c #fbfbf8f8eeee", | |
3829 | "BO c #fbfbf9f9efef", | |
3830 | "VO c Gray94", | |
3831 | "CO c #f1f1f1f1f1f1", | |
3832 | "ZO c #f4f4f4f4f0f0", | |
3833 | "AO c #f4f4f4f4f1f1", | |
3834 | "SO c #f5f5f5f5f2f2", | |
3835 | "DO c #f6f6f6f6f3f3", | |
3836 | "FO c #f4f4f4f4f4f4", | |
3837 | "GO c Gray96", | |
3838 | "HO c #f6f6f6f6f4f4", | |
3839 | "JO c #f7f7f7f7f5f5", | |
3840 | "KO c #f6f6f6f6f6f6", | |
3841 | "LO c Gray97", | |
3842 | "PO c #f8f8f8f8f5f5", | |
3843 | "IO c #f8f8f8f8f6f6", | |
3844 | "UO c #f8f8f8f8f7f7", | |
3845 | "YO c #f9f9f9f9f7f7", | |
3846 | "TO c #fafaf9f9f4f4", | |
3847 | "RO c #fafafafaf6f6", | |
3848 | "EO c #fbfbfbfbf7f7", | |
3849 | "WO c #fefefcfcf0f0", | |
3850 | "QO c #fefefcfcf1f1", | |
3851 | "!O c #fefefcfcf3f3", | |
3852 | "~O c #fefefcfcf4f4", | |
3853 | "^O c #fefefcfcf5f5", | |
3854 | "/O c #fefefdfdf5f5", | |
3855 | "(O c #fefefdfdf6f6", | |
3856 | ")O c #fefefdfdf7f7", | |
3857 | "_O c #f9f9f9f9f8f8", | |
3858 | "`O c #f9f9f9f9f9f9", | |
3859 | "'O c #fafafafaf8f8", | |
3860 | "]O c #fafafafaf9f9", | |
3861 | "[O c #fbfbfbfbf8f8", | |
3862 | "{O c #fbfbfbfbf9f9", | |
3863 | "}O c Gray98", | |
3864 | "|O c #fbfbfbfbfafa", | |
3865 | " + c #fbfbfbfbfbfb", | |
3866 | ".+ c #fcfcfcfcf9f9", | |
3867 | "X+ c #fcfcfcfcfafa", | |
3868 | "o+ c #fcfcfcfcfbfb", | |
3869 | "O+ c #fefefdfdf8f8", | |
3870 | "++ c #fefefdfdf9f9", | |
3871 | "@+ c #fefefdfdfafa", | |
3872 | "#+ c #fefefdfdfbfb", | |
3873 | "$+ c #fefefefefafa", | |
3874 | "%+ c #fefefefefbfb", | |
3875 | "&+ c Gray99", | |
3876 | "*+ c #fdfdfdfdfcfc", | |
3877 | "=+ c #fdfdfdfdfdfd", | |
3878 | "-+ c #fefefefefcfc", | |
3879 | ";+ c #fefefefefdfd", | |
3880 | ":+ c #fefefefefefe", | |
3881 | ">+ c None", | |
3882 | ",+ c None", | |
3883 | /* pixels */ | |
3884 | ",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+,+,+,+,+,+,+,+,+", | |
3885 | ",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+(O>+>+>+>+>+>+>+>+,+,+,+,+,+,+", | |
3886 | ",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+QOO+>+>+>+>+>+>+>+++!OO+>+>+>+>+>+>+>+>+,+,+,+,+,+", | |
3887 | ",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+++/O$+>+>+>+>+>+>+>+(O(O/O>+>+>+>+>+>+>+>+>+,+,+,+,+", | |
3888 | ",+,+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+>+$+)OO+>+>+>+>+>+>+%+$+++O+>+>+>+>+>+>+>+>+>+>+>+,+,+", | |
3889 | ",+,+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+>+O+++++-+>+>+>+>+;+-+;+-+@+>+>+>+>+>+>+)O>+>+>+>+,+,+", | |
3890 | ",+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+>+>+@+;+;+-+>+>+>+>+;+:+:+;+%+>+>+>+>+%+/O~O>+>+>+>+>+,+", | |
3891 | ",+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+>+>+>+-+;+:+:+:+>+>+:+:+:+:+:+:+>+;+-+++++)O$+>+>+>+>+>+>+", | |
3892 | ",+,+,+,+,+,+,+,+,+,+>+>+>+/OQO++>+>+>+>+>+>+;+:+:+:+:+:+:+:+:+:+:+:+:+:+;+-+-+;+++%+>+>+>+>+>+>+", | |
3893 | ",+,+,+,+,+,+,+,+,+,+>+>+>+)O~O/O)O@+;+>+>+>+:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+:+;+@+>+>+>+>+>+>+>+", | |
3894 | ",+,+,+,+,+,+,+,+,+>+>+>+>+>+$+)O#+;+;+;+:+:+:+:+:+:+COVoCoCo,O:+:+:+:+:+:+:+:+;+;+>+>+>+>+>+>+>+", | |
3895 | ",+,+,+,+,+,+,+,+,+>+>+>+>+>+>+++-+:+:+:+:+:+:+,O).Q 2 h M Z y a +.no}O:+:+:+:+:+>+>+>+>+>+>+>+>+", | |
3896 | ",+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+-+:+:+:+:+:+nog ;.7XjX[XYXJXiX,Xd.w.` $X:+:+:+:+>+>+>+>+>+>+>+>+", | |
3897 | ",+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+;+;+:+:+:+}.0 :XVXTX5oyoeo#o$o.ovXG.>Xr I.`O:+:+>+>+>+>+>+>+>+>+", | |
3898 | ",+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+>+:+:+:+no0 FosXgXuo[o%O{oro*o@o/XcX0X6X} /.:+:+:+:+;+;+%+@+/OQO", | |
3899 | ",+,+,+,+,+,+,+>+>+>+(O!O(OO+@+-+;+:+:+}OY oX1omXpo8OfOMOBOmOOO&o+oDXxX<X2Xb Bo:+:+:+:+;+-+O+(O>+", | |
3900 | ",+,+,+,+,+,+,+>+>+>+WO~O)O@+-+;+:+:+:+#X] ZXNXoo_opO6OhOsOzOfOko%oOoRXyXn.'.' :+:+:+:+;+%+%+>+>+", | |
3901 | ",+,+,+,+,+,+,+>+>+>+>+++)O$+;+:+:+:+:+U.!.rXEXto9OgO6OqO6OtOsO^o4o(XFXSXA.c.p Po:+:+:+;+;+>+>+>+", | |
3902 | ",+,+,+,+,+,+,+>+>+>+>+>+>+-+%+;+:+:+:+#.;XaX}XxoiOpOdOaO.O7OXOgo3oOoOoKXH.f.X.{.:+:+:+:+>+>+>+>+", | |
3903 | ",+,+,+,+,+,+,+>+>+>+>+>+>+>+>+:+:+:+:+#.;XpX{XxoqOlOlOwO6O#O`o!o<o_X_XIXL.j.<.5.:+:+>+>+>+>+>+>+", | |
3904 | ",+,+,+,+,+,+,+>+>+>+>+>+>+>+>+>+:+:+:+@.[.pXEXxosONOcOyOjO5O/odo2o`X|XHXqXl.O.(.:+>+>+>+>+>+>+>+", | |
3905 | ",+,+,+,+,+,+,+>+>+>+>+>+>+>+>+;+:+:+:+P.T.BX)XwopObOuOkOnOcolo(o,o^X~XGXK.g...|.:+:+>+>+>+>+>+>+", | |
3906 | ",+,+,+,+,+,+,+>+>+>+>+>+>+>+>+-+:+:+:+-XU zXMX0o$ONO OrO)oioao=o]X!XWXhXB.y.q Jo:+:+:+>+>+>+>+>+", | |
3907 | ",+,+,+,+,+,+,+>+>+>+>+>+>+>+EOX+&+&+*+`O-.~.bXXo|ovO0O4Ozo6o9o-oQXRXkXJ.b.8.! `O:+:+:+;+>+>+>+>+", | |
3908 | ",+,+,+,+,+,+,+>+>+>+>+>+>+++[OX+&+&+*+*+YoC fXqo}oxOeO'o7o o:o'XCXwXF.N.a.H X:+:+:+:+;+-+>+>+>+", | |
3909 | ",+,+,+,+,+,+,+>+>+>+>+++(O++[O|Oo+&+*+*+=+u PXjo+O@O]o~o>oUXLXlXeXD.V.h.q.m FO:+:+:+:+;+$+%+>+>+", | |
3910 | ",+,+,+,+,+,+,+,+>+>+>+O+(OO+TO[O.+o+&+*+*OA nXhooOWoQo8o'XjXdX1XM.m.k.r.D }.:+:+:+:+;+-+++O+$+>+", | |
3911 | ",+,+,+,+,+,+,+,+>+>+>+)O++%+ROo+{OX+o+&+voJ tXfosoAX;oPXjX8XC.v.z.p.1.$ 7.}O:+:+:+;+-+@+O+)O^O>+", | |
3912 | ",+,+,+,+,+,+,+,+>+>+>+>+>+>+'O|Oo+*+=+=+%.< x ._ i.uX9XZ.S.s.0.c = W *X:+:+>+>+>+>+>+>+>+>+>+>+", | |
3913 | ",+,+,+,+,+,+,+,+,+>+>+>+>+>+_O]Oo+&+*+=+z _.@X<OLo$.8 e.x.u.t.G +.IoGO:+:+:+>+>+>+>+>+>+>+>+>+>+", | |
3914 | ",+,+,+,+,+,+,+,+,+>+>+>+>+>+YO'O|Oo+&+`Oo 6 ( R.GoKONo[ R 9.o.s Ko*+*+:+:+:+>+>+>+>+>+>+>+>+>+>+", | |
3915 | ",+,+,+,+,+,+,+,+,+,+>+>+>+>+IOYO]O|Oo+{ t Mo.XB 1 E.bo4.| & V &X*+*+*+:+:+;+>+>+>+>+>+>+>+>+>+>+", | |
3916 | ",+,+,+,+,+,+,+,+,+,+>+>+>+>+HOIOYOVO|O9 ^ Ho=+LOZof P >.3.; >O&+&+&+&+:+:+-+>+>+>+>+>+>+>+>+>+>+", | |
3917 | ",+,+,+,+,+,+,+,+,+,+,+>+>+>+AOHOIO>OVO + f Q.To ++X:.~ S L =+=+=+o+o+:+:+%+>+>+>+>+>+>+>+>+>+>+", | |
3918 | ",+,+,+,+,+,+,+,+,+,+,+,+>+>+3OAOHO;O9 =XXXT - W.^.-.&.4 Y.*+*+*+X+[O;+;+@+>+>+>+>+>+>+>+>+>+,+", | |
3919 | ",+,+,+,+,+,+,+,+,+,+,+,+>+>+:O3OAOHO ,.moVOVO%X/ I 6.=.O LO&+o+o+o+'O++@+O+%+>+>+>+>+>+>+>+>+,+", | |
3920 | ",+,+,+,+,+,+,+,+,+,+,+,+,+>+Eo:O3OAO F v OX1OSo&.K ) i + +|O|O|O]O>+%+(O@+>+>+>+>+>+>+>+,+,+", | |
3921 | ",+,+,+,+,+,+,+,+,+,+,+,+,+,+5XEo-O2O* 5 > f d `.-.*. n ]O]O]O'O'O_O>+>+++O+>+>+>+>+>+>+,+,+,+", | |
3922 | ",+,+,+,+,+,+,+,+,+,+,+,+,+,+].5XRo-OAo : e w N &.2. UOYOYOYOUOIOPO>+>+>+>+>+>+>+>+>+,+,+,+,+", | |
3923 | ",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].Do&O3 @ 5 1 # j l k , JOJOJOHOHODOSO>+>+>+>+>+>+>+,+,+,+,+,+,+", | |
3924 | ",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].5XE . 3 7 % : PoUoAOAOAOAOZO3O3O>+>+>+>+>+>+,+,+,+,+,+,+,+", | |
3925 | ",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].].].X X . X * -O:O2O2O2O2O2O:O-O-O>+>+>+>+,+,+,+,+,+,+,+,+,+", | |
3926 | ",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].].].].].3X4XDoRoRo=O=O=O=O=ORoRoDo>+>+,+,+,+,+,+,+,+,+,+,+,+", | |
3927 | ",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].].].].].].].].].].5X5X5X5X5X].].].,+,+,+,+,+,+,+,+,+,+,+,+,+", | |
3928 | ",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].].].].].].].].].].].].].].].].].].,+,+,+,+,+,+,+,+,+,+,+,+,+", | |
3929 | ",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].].].].].].].].].].].].].].].].].].,+,+,+,+,+,+,+,+,+,+,+,+,+", | |
3930 | ",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+", | |
3931 | ",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+" | |
3932 | }; | |
3933 | ||
3934 | /* XPM */ | |
3935 | static char *warning_xpm[] = { | |
3936 | /* columns rows colors chars-per-pixel */ | |
3937 | "48 48 270 2", | |
3938 | " c Gray0", | |
3939 | ". c #010100000000", | |
3940 | "X c #010101010000", | |
3941 | "o c #010101010101", | |
3942 | "O c #020201010000", | |
3943 | "+ c #030301010000", | |
3944 | "@ c #020202020000", | |
3945 | "# c #020202020202", | |
3946 | "$ c Gray1", | |
3947 | "% c #040403030000", | |
3948 | "& c #050504040000", | |
3949 | "* c #070704040000", | |
3950 | "= c #040404040404", | |
3951 | "- c Gray2", | |
3952 | "; c #060606060606", | |
3953 | ": c #090907070000", | |
3954 | "> c #090907070101", | |
3955 | ", c #0e0e03030202", | |
3956 | "< c #0d0d04040303", | |
3957 | "1 c #0a0a08080000", | |
3958 | "2 c #0b0b09090000", | |
3959 | "3 c #0e0e0b0b0000", | |
3960 | "4 c Gray3", | |
3961 | "5 c #090909090909", | |
3962 | "6 c Gray4", | |
3963 | "7 c #0b0b0b0b0b0b", | |
3964 | "8 c Gray6", | |
3965 | "9 c #171704040202", | |
3966 | "0 c #10100d0d0101", | |
3967 | "q c #13130f0f0000", | |
3968 | "w c #13130f0f0101", | |
3969 | "e c #1c1c07070505", | |
3970 | "r c #151510100101", | |
3971 | "t c #191913130000", | |
3972 | "y c #1d1d16160202", | |
3973 | "u c #1e1e17170202", | |
3974 | "i c #111111111111", | |
3975 | "p c #161616161616", | |
3976 | "a c #212107070505", | |
3977 | "s c #222207070505", | |
3978 | "d c #232307070404", | |
3979 | "f c #232307070505", | |
3980 | "g c #262608080606", | |
3981 | "h c #2b2b0a0a0707", | |
3982 | "j c #2c2c08080505", | |
3983 | "k c #2e2e08080505", | |
3984 | "l c #2e2e09090606", | |
3985 | "z c #2e2e0a0a0808", | |
3986 | "x c #24241c1c0303", | |
3987 | "c c #25251d1d0202", | |
3988 | "v c #25251d1d0303", | |
3989 | "b c #27271e1e0202", | |
3990 | "n c #3b3b0b0b0707", | |
3991 | "m c #3b3b0c0c0909", | |
3992 | "M c #3c3c0c0c0909", | |
3993 | "N c #3d3d0c0c0909", | |
3994 | "B c #3e3e0c0c0808", | |
3995 | "V c #292920200303", | |
3996 | "C c #2c2c23230303", | |
3997 | "Z c #313126260404", | |
3998 | "A c #313126260505", | |
3999 | "S c #333327270404", | |
4000 | "D c #38382c2c0505", | |
4001 | "F c #3c3c2e2e0505", | |
4002 | "G c Gray17", | |
4003 | "H c #41410c0c0707", | |
4004 | "J c #42420c0c0606", | |
4005 | "K c #42420c0c0707", | |
4006 | "L c #42420d0d0808", | |
4007 | "P c #44440e0e0909", | |
4008 | "I c #44440e0e0a0a", | |
4009 | "U c #47470e0e0909", | |
4010 | "Y c #46460e0e0a0a", | |
4011 | "T c #49490d0d0707", | |
4012 | "R c #4d4d0d0d0707", | |
4013 | "E c #49490e0e0909", | |
4014 | "W c #49490e0e0a0a", | |
4015 | "Q c #4d4d10100c0c", | |
4016 | "! c #52520e0e0707", | |
4017 | "~ c #575711110909", | |
4018 | "^ c #5a5a12120d0d", | |
4019 | "/ c #5d5d11110b0b", | |
4020 | "( c #5e5e11110a0a", | |
4021 | ") c #5c5c12120d0d", | |
4022 | "_ c #5e5e12120c0c", | |
4023 | "` c #404031310404", | |
4024 | "' c #404031310505", | |
4025 | "] c #414132320606", | |
4026 | "[ c #424233330505", | |
4027 | "{ c #454535350606", | |
4028 | "} c #4b4b3a3a0707", | |
4029 | "| c #4e4e3d3d0606", | |
4030 | " . c #51513f3f0707", | |
4031 | ".. c #606012120b0b", | |
4032 | "X. c #636311110909", | |
4033 | "o. c #616113130e0e", | |
4034 | "O. c #646412120909", | |
4035 | "+. c #6a6a13130b0b", | |
4036 | "@. c #6e6e13130a0a", | |
4037 | "#. c #6e6e14140a0a", | |
4038 | "$. c #6f6f14140b0b", | |
4039 | "%. c #6d6d16160e0e", | |
4040 | "&. c #6e6e15150c0c", | |
4041 | "*. c #717115150d0d", | |
4042 | "=. c #727215150d0d", | |
4043 | "-. c #737315150c0c", | |
4044 | ";. c #737316160e0e", | |
4045 | ":. c #777715150c0c", | |
4046 | ">. c #787815150b0b", | |
4047 | ",. c #787815150c0c", | |
4048 | "<. c #737317171111", | |
4049 | "1. c #7a7a17171010", | |
4050 | "2. c #787818181212", | |
4051 | "3. c #7b7b19191212", | |
4052 | "4. c #525240400707", | |
4053 | "5. c #676750500909", | |
4054 | "6. c #696952520a0a", | |
4055 | "7. c #717157570a0a", | |
4056 | "8. c #74745a5a0c0c", | |
4057 | "9. c #7a7a61610909", | |
4058 | "0. c #7c7c61610c0c", | |
4059 | "q. c #858517170c0c", | |
4060 | "w. c #868618180d0d", | |
4061 | "e. c #8a8a18180c0c", | |
4062 | "r. c #8a8a19190f0f", | |
4063 | "t. c #808018181010", | |
4064 | "y. c #80801a1a1313", | |
4065 | "u. c #868619191010", | |
4066 | "i. c #86861b1b1313", | |
4067 | "p. c #87871b1b1212", | |
4068 | "a. c #85851b1b1414", | |
4069 | "s. c #88881a1a1111", | |
4070 | "d. c #89891a1a1111", | |
4071 | "f. c #8b8b1c1c1515", | |
4072 | "g. c #8d8d1b1b1212", | |
4073 | "h. c #8f8f1b1b1010", | |
4074 | "j. c #8c8c1c1c1414", | |
4075 | "k. c #90901a1a0f0f", | |
4076 | "l. c #91911a1a0f0f", | |
4077 | "z. c #92921a1a0e0e", | |
4078 | "x. c #9b9b1b1b0e0e", | |
4079 | "c. c #9a9a1c1c0f0f", | |
4080 | "v. c #93931b1b1010", | |
4081 | "b. c #90901e1e1212", | |
4082 | "n. c #97971e1e1515", | |
4083 | "m. c #99991d1d1313", | |
4084 | "M. c #98981d1d1414", | |
4085 | "N. c #98981f1f1717", | |
4086 | "B. c #99991f1f1616", | |
4087 | "V. c #9a9a1f1f1515", | |
4088 | "C. c #9b9b1e1e1414", | |
4089 | "Z. c #9b9b1f1f1717", | |
4090 | "A. c #9c9c1e1e1313", | |
4091 | "S. c #9d9d1e1e1212", | |
4092 | "D. c #9e9e1d1d1111", | |
4093 | "F. c #9f9f1d1d1010", | |
4094 | "G. c #9f9f1e1e1313", | |
4095 | "H. c #9d9d1f1f1515", | |
4096 | "J. c #9c9c1f1f1616", | |
4097 | "K. c #9e9e1e1e1414", | |
4098 | "L. c #a0a01d1d0f0f", | |
4099 | "P. c #a1a11c1c0e0e", | |
4100 | "I. c #a2a21d1d0f0f", | |
4101 | "U. c #a3a31c1c0e0e", | |
4102 | "Y. c #a3a31d1d0f0f", | |
4103 | "T. c #a4a41c1c0e0e", | |
4104 | "R. c #a6a61d1d0f0f", | |
4105 | "E. c #a7a71d1d0e0e", | |
4106 | "W. c #a9a91d1d0f0f", | |
4107 | "Q. c #a1a11d1d1010", | |
4108 | "!. c #a1a11d1d1111", | |
4109 | "~. c #a0a01e1e1212", | |
4110 | "^. c #a2a21d1d1010", | |
4111 | "/. c #b3b31f1f0f0f", | |
4112 | "(. c #b2b21f1f1010", | |
4113 | "). c #b9b920200f0f", | |
4114 | "_. c #b6b621211111", | |
4115 | "`. c #b7b720201010", | |
4116 | "'. c #baba20201010", | |
4117 | "]. c #bdbd21211111", | |
4118 | "[. c #bfbf22221212", | |
4119 | "{. c #abab42421616", | |
4120 | "}. c #b1b140401010", | |
4121 | "|. c #b9b95b5b1313", | |
4122 | " X c #bbbb5b5b1111", | |
4123 | ".X c #bfbf6f6f1616", | |
4124 | "XX c #92924f4f4848", | |
4125 | "oX c #c6c622221010", | |
4126 | "OX c #c8c823231212", | |
4127 | "+X c #caca23231010", | |
4128 | "@X c #cdcd25251313", | |
4129 | "#X c #d1d124241212", | |
4130 | "$X c #d2d224241111", | |
4131 | "%X c #d2d226261414", | |
4132 | "&X c #d5d525251111", | |
4133 | "*X c #d4d425251313", | |
4134 | "=X c #d9d926261313", | |
4135 | "-X c #dbdb26261212", | |
4136 | ";X c #d8d827271515", | |
4137 | ":X c #dcdc26261313", | |
4138 | ">X c #dede26261212", | |
4139 | ",X c #e0e027271212", | |
4140 | "<X c #e3e327271313", | |
4141 | "1X c #e6e627271212", | |
4142 | "2X c #e4e42e2e1a1a", | |
4143 | "3X c #ebeb27271313", | |
4144 | "4X c #ebeb28281212", | |
4145 | "5X c #e8e828281414", | |
4146 | "6X c #eaea29291515", | |
4147 | "7X c #eaea2a2a1616", | |
4148 | "8X c #ecec29291313", | |
4149 | "9X c #eeee29291313", | |
4150 | "0X c #eded29291414", | |
4151 | "qX c #ecec2a2a1616", | |
4152 | "wX c #efef29291414", | |
4153 | "eX c #f1f129291212", | |
4154 | "rX c #f3f329291212", | |
4155 | "tX c #f4f429291313", | |
4156 | "yX c #f5f529291313", | |
4157 | "uX c #f5f52a2a1313", | |
4158 | "iX c #f6f629291313", | |
4159 | "pX c #f7f729291313", | |
4160 | "aX c #f4f429291414", | |
4161 | "sX c #f4f42a2a1414", | |
4162 | "dX c #f6f62b2b1414", | |
4163 | "fX c #c1c169691616", | |
4164 | "gX c #c2c26f6f1212", | |
4165 | "hX c #c1c16f6f1414", | |
4166 | "jX c #c5c56b6b1212", | |
4167 | "kX c #c5c57e7e1616", | |
4168 | "lX c #c7c77e7e1414", | |
4169 | "zX c #c8c87e7e1414", | |
4170 | "xX c #b9b993930e0e", | |
4171 | "cX c #bdbd93931212", | |
4172 | "vX c #c9c985851717", | |
4173 | "bX c #cbcb86861717", | |
4174 | "nX c #cdcd87871313", | |
4175 | "mX c #cccc86861414", | |
4176 | "MX c #cccc86861515", | |
4177 | "NX c #cbcb89891414", | |
4178 | "BX c #cfcf88881212", | |
4179 | "VX c #cfcf8c8c1212", | |
4180 | "CX c #c3c39b9b0f0f", | |
4181 | "ZX c #c4c498981313", | |
4182 | "AX c #c7c79a9a1414", | |
4183 | "SX c #cbcb9e9e1313", | |
4184 | "DX c #d1d189891212", | |
4185 | "FX c #d2d288881414", | |
4186 | "GX c #d0d08c8c1313", | |
4187 | "HX c #d7d7a8a81616", | |
4188 | "JX c #d7d7a8a81a1a", | |
4189 | "KX c #d8d8a5a51c1c", | |
4190 | "LX c #dadaaaaa1616", | |
4191 | "PX c #dadaaaaa1717", | |
4192 | "IX c #dbdbaaaa1616", | |
4193 | "UX c #dbdbabab1717", | |
4194 | "YX c #dcdcabab1515", | |
4195 | "TX c #dcdcaeae1111", | |
4196 | "RX c #dedeacac1313", | |
4197 | "EX c #dfdfadad1313", | |
4198 | "WX c #d8d8a9a91919", | |
4199 | "QX c #d8d8a9a91a1a", | |
4200 | "!X c #d9d9aaaa1919", | |
4201 | "~X c #dfdfb1b11212", | |
4202 | "^X c #e0e0adad1111", | |
4203 | "/X c #e1e1aeae1212", | |
4204 | "(X c #e0e0aeae1414", | |
4205 | ")X c #e0e0b2b21313", | |
4206 | "_X c #808080808080", | |
4207 | "`X c None", | |
4208 | /* pixels */ | |
4209 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X", | |
4210 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X", | |
4211 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X", | |
4212 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X", | |
4213 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X", | |
4214 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X", | |
4215 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X", | |
4216 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X9XsXoXb._X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X", | |
4217 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X8XdX$XW.q. `X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X", | |
4218 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`XE.iX&XE.P.x.O. `X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X", | |
4219 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`XE.pX,X/.T.T.P.e.k i `X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X", | |
4220 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X4X8X).T.T.}.T.c.X. `X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X", | |
4221 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`XE.uX+XT.T. XgXY.L.z.n `X`X`X`X`X`X`X`X`X`X`X`X`X`X`X", | |
4222 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`XE.yX-XR.T.T.^X~XY.Y.L.:. `X`X`X`X`X`X`X`X`X`X`X`X`X`X", | |
4223 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X4X8X`.T.U./X~X~XFXY.F.l.R `X`X`X`X`X`X`X`X`X`X`X`X`X`X", | |
4224 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`XE.uX+XT.T.jX~X~X~X~XQ.^.F.-. `X`X`X`X`X`X`X`X`X`X`X`X`X", | |
4225 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`XE.tX>XR.T.T.^XTXxXTXRXBX^.F.k.T `X`X`X`X`X`X`X`X`X`X`X`X`X", | |
4226 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X1XwX'.T.T.DXCXX 3 ' RXRX^.!.D.-. `X`X`X`X`X`X`X`X`X`X`X`X", | |
4227 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`XE.rX#XT.T.T.~X9.* q @ RXRXnX!.D.k.E `X`X`X`X`X`X`X`X`X`X`X`X", | |
4228 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X4X5X(.T.T.)X~XC + . t RXRXYX!.!.S.=. `X`X`X`X`X`X`X`X`X`X`X", | |
4229 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X`XE.uXOXT.T.FX~X~Xc % V RXYXYXnX~.S.h.E `X`X`X`X`X`X`X`X`X`X`X", | |
4230 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`XE.eX:XR.T.Y.~X~X~Xb y [ YXYXYXYX~.~.S.*. `X`X`X`X`X`X`X`X`X`X", | |
4231 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X@.0X].T.T.GX~X~XRX| ` { YXYXYXIXmX~.S.d.U `X`X`X`X`X`X`X`X`X`X", | |
4232 | "`X`X`X`X`X`X`X`X`X`X`X`X`XR.aX=XR.T.Y.~X~X~XRXu X v ] YXYXIXIXIX~.G.m.( `X`X`X`X`X`X`X`X`X", | |
4233 | "`X`X`X`X`X`X`X`X`X`X`X`X`X<X6X`.T.I.)X~X~XRXRX: X 2 v YXIXIXIXIXMXG.A.u.j `X`X`X`X`X`X`X`X`X", | |
4234 | "`X`X`X`X`X`X`X`X`X`X`X`XR.wX*XT.Y.FX~X~XRXRXRX& 0 1 S IXIXIXIXPXPXG.G.M._ p `X`X`X`X`X`X`X`X", | |
4235 | "`X`X`X`X`X`X`X`X`X`X`X`X2X6X`.Y.Y.~X~XRXRXRXRX& w % 4.IXIXIXPXPXPXMXK.C.1.e `X`X`X`X`X`X`X`X", | |
4236 | "`X`X`X`X`X`X`X`X`X`X`XR.wX*XY.Y.GX~XRXRXRXRXYXD .r 7.IXIXPXPXPXPXWXK.K.g.W `X`X`X`X`X`X`X`X", | |
4237 | "`X`X`X`X`X`X`X`X`X`X`X2X6X`.Y.Y.~XRXRXRXRXYXYXcX5.Z AXIXIXPXPXPXWXWXbXK.V.%.$ `X`X`X`X`X`X`X", | |
4238 | "`X`X`X`X`X`X`X`X`X`XR.wX*XY.Y.GX~XRXRXRXYXYXYXYXIXIXIXIXPXPXPXPXWXWXWXH.V.p.P `X`X`X`X`X`X`X", | |
4239 | "`X`X`X`X`X`X`X`X`X`X2X6X_.Y.Y.~XRXRXRXYXYXYXYXSXv x ZXPXPXPXPXWXWXWXJXfXH.n.) = `X`X`X`X`X`X", | |
4240 | "`X`X`X`X`X`X`X`X`XR.wX%XY.Y.VXRXRXRXRXYXYXYXIX} O O 6.PXPXPXWXWXWXWXJXvXH.B.3.h `X`X`X`X`X`X", | |
4241 | "`X`X`X`X`X`X`X`X`XXXqX_.Y.Y.RXRXRXRXYXYXYXYXIXF % > 8.PXPXWXWXWXWXJXJXJXH.J.j.Y - `X`X`X`X`X`X", | |
4242 | "`X`X`X`X`X`X`X`XR.3X;XY.Y.zX(XEXRXYXYXYXYXIXIXcXA 0.HXPXWXWXWXWXJXJXJXJX.XJ.B.o. 7 `X`X`X`X`X", | |
4243 | "`X`X`X`X`X`X`X`X#.7X[.Y.^.^.^.^.!.!.!.|.hXlXNXLXUXUXUX!X!X!X!XQXQXQXQXKXkX{.B.2.g G `X`X`X`X`X", | |
4244 | "`X`X`X`X`X`X`X`XJ @XY.L.^.^.^.!.!.!.!.~.~.~.~.G.G.G.G.K.K.K.H.H.H.H.J.J.J.J.Z.f.I `X`X`X`X", | |
4245 | "`X`X`X`X`X`X`X`X9 >.! +.$.,.w.r.v.D.S.~.~.~.G.G.G.G.K.K.K.H.H.H.H.J.J.J.J.Z.Z.N.^ o `X`X`X`X", | |
4246 | "`X`X`X`X`X`X`X`X - # # , d l H K ~ / ..&.;.;.;.t.s.s.s.s.p.p.p.i.i.i.i.a.a.y.<.Q # ; `X`X`X`X", | |
4247 | "`X`X`X`X`X`X`X`X # # # # # # # # # < s a a f L B B B B B B N N N M M M m z e # `X`X`X`X", | |
4248 | "`X`X`X`X`X`X`X`X $ $ # # # # # # # # # # # # # # # # # # # # # # # # # o `X`X`X`X", | |
4249 | "`X`X`X`X`X`X`X`X`X 8 6 o o = = $ $ # # # # # # # # # # # # # # $ $ `X`X`X`X", | |
4250 | "`X`X`X`X`X`X`X`X`X`X`X`X`X 5 5 4 `X`X`X`X", | |
4251 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X `X`X`X`X`X`X", | |
4252 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X", | |
4253 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X", | |
4254 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X", | |
4255 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X", | |
4256 | "`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X" | |
4257 | }; | |
4258 | ||
4259 | /* XPM */ | |
4260 | static char *question_xpm[] = { | |
4261 | /* columns rows colors chars-per-pixel */ | |
4262 | "48 48 101 2", | |
4263 | " c Gray0", | |
4264 | ". c Transparent", | |
4265 | "X c #010101010101", | |
4266 | "o c #000000000202", | |
4267 | "O c #000001010202", | |
4268 | "+ c #010101010202", | |
4269 | "@ c #010102020303", | |
4270 | "# c #020202020202", | |
4271 | "$ c #020202020303", | |
4272 | "% c Gray1", | |
4273 | "& c #030305050707", | |
4274 | "* c #040404040404", | |
4275 | "= c #040404040606", | |
4276 | "- c #070707070707", | |
4277 | "; c #060607070808", | |
4278 | ": c #060608080a0a", | |
4279 | "> c #060608080b0b", | |
4280 | ", c Gray3", | |
4281 | "< c #0d0d0d0d0c0c", | |
4282 | "1 c Gray6", | |
4283 | "2 c #191915150d0d", | |
4284 | "3 c Gray8", | |
4285 | "4 c Gray10", | |
4286 | "5 c #22221c1c1212", | |
4287 | "6 c #393939393939", | |
4288 | "7 c #2b2b3d3d6161", | |
4289 | "8 c #353545456464", | |
4290 | "9 c #65654f4f2424", | |
4291 | "0 c #6b6b55552727", | |
4292 | "q c #6e6e55552626", | |
4293 | "w c #707056562727", | |
4294 | "e c #717159592929", | |
4295 | "r c #73735f5f3b3b", | |
4296 | "t c #7c7c62622d2d", | |
4297 | "y c #7f7f69694141", | |
4298 | "u c Gray39", | |
4299 | "i c #727272727272", | |
4300 | "p c #737375757979", | |
4301 | "a c Gray50", | |
4302 | "s c #808063632d2d", | |
4303 | "d c #828266662f2f", | |
4304 | "f c #87876a6a3131", | |
4305 | "g c #8c8c6d6d3131", | |
4306 | "h c #929273733535", | |
4307 | "j c #939374743535", | |
4308 | "k c #949475753636", | |
4309 | "l c #979777773737", | |
4310 | "z c #99997a7a3b3b", | |
4311 | "x c #9d9d7d7d3a3a", | |
4312 | "c c #a2a27f7f3b3b", | |
4313 | "v c #92927c7c5252", | |
4314 | "b c #a6a682823c3c", | |
4315 | "n c #a8a884843d3d", | |
4316 | "m c #aaaa86863e3e", | |
4317 | "M c #a6a687874848", | |
4318 | "N c #a3a38e8e5555", | |
4319 | "B c #a4a48b8b5a5a", | |
4320 | "V c #b3b38d8d4040", | |
4321 | "C c #b8b892924343", | |
4322 | "Z c #b9b993934444", | |
4323 | "A c #bebe95954444", | |
4324 | "S c #bebe9b9b5353", | |
4325 | "D c #bebea3a36363", | |
4326 | "F c #bfbfa1a16a6a", | |
4327 | "G c #bebea2a27272", | |
4328 | "H c #c0c097974545", | |
4329 | "J c #c3c39f9f5555", | |
4330 | "K c #c3c39f9f5757", | |
4331 | "L c #c9c9a4a45b5b", | |
4332 | "P c #d2d2a6a64c4c", | |
4333 | "I c #d2d2a6a64d4d", | |
4334 | "U c #d8d8abab4e4e", | |
4335 | "Y c #d8d8acac5858", | |
4336 | "T c #d8d8acac5b5b", | |
4337 | "R c #d8d8b1b15f5f", | |
4338 | "E c #c3c3a4a46666", | |
4339 | "W c #c6c6a7a76a6a", | |
4340 | "Q c #c9c9acac7373", | |
4341 | "! c #d2d2b0b06c6c", | |
4342 | "~ c #d8d8b1b16363", | |
4343 | "^ c #d8d8b1b16565", | |
4344 | "/ c #dcdcb4b46363", | |
4345 | "( c #d8d8b5b56e6e", | |
4346 | ") c #d8d8b6b66e6e", | |
4347 | "_ c #dadab8b87272", | |
4348 | "` c #ddddbcbc7474", | |
4349 | "' c #d8d8baba7b7b", | |
4350 | "] c #f7f7c3c35a5a", | |
4351 | "[ c #f7f7c9c96d6d", | |
4352 | "{ c #f7f7cfcf7e7e", | |
4353 | "} c #aaaaaaaaaaaa", | |
4354 | "| c #d8d8bebe8686", | |
4355 | " . c #dcdcc4c49494", | |
4356 | ".. c #f7f7d4d48c8c", | |
4357 | "X. c #f7f7d8d89999", | |
4358 | "o. c #f7f7dcdca5a5", | |
4359 | "O. c #f7f7dfdfafaf", | |
4360 | "+. c #f7f7e2e2b8b8", | |
4361 | "@. c #f7f7e5e5c0c0", | |
4362 | "#. c Gray100", | |
4363 | "$. c None", | |
4364 | /* pixels */ | |
4365 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4366 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4367 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4368 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4369 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4370 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4371 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4372 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4373 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.< $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4374 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. c C U x b t $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4375 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. U X.X.+.X.' ' ' S b $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4376 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. ] O.@.X...] ] ] { ' R b q $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4377 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.< ] O.o.] n j j m ] ] { ) R b * $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4378 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$. D X.+.] k h ] ] [ R R s 1 $.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4379 | "$.$.$.$.$.$.$.$.$.$.$.$.$.< [ @.{ k o 7 @ K ] { U R b % $.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4380 | "$.$.$.$.$.$.$.$.$.$.$.$.$. N ..O.U o 8 a a B ] [ R U b # #.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4381 | "$.$.$.$.$.$.$.$.$.$.$.$.$. I { ] b 8 a #.#. B [ [ ) U d # } #.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4382 | "$.$.$.$.$.$.$.$.$.$.$.$.$. ] { ] b a #.#.$. B ] ) ) U 9 % } #.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4383 | "$.$.$.$.$.$.$.$.$.$.$.$.$. / R A d a #.$. E [ ' U b a } #.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4384 | "$.$.$.$.$.$.$.$.$.$.$.$.$. a #.$. g ! | R U e + a } #.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4385 | "$.$.$.$.$.$.$.$.$.$.$.$.$. : a #. Z ..| U A 3 a #.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4386 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$. a a a a a a - V [ | U U $ a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4387 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. a a a a #. ] ..( Y z . 3 a #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4388 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. 0 J ._ Q F 2 3 a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4389 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. f ! ( L W y & a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4390 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. l ' ^ T G . p } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4391 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. H ' ~ T v = a #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4392 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. U | R U r a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4393 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. S ' U A X a #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4394 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. M M b s ; } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4395 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. 4 6 O a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4396 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. O > a #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4397 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. a i u a a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4398 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.5 , #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4399 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. ` { ..A $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4400 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. { X.X.U # $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4401 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. ....R A # } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4402 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. ..) U A # } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4403 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. P R A w # } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4404 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. # } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4405 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. + a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4406 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. , , , a a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4407 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. a a a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4408 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4409 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4410 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4411 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", | |
4412 | "$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$." | |
4413 | }; | |
4414 | ||
536b70ac VS |
4415 | wxBitmap wxGTKArtProvider::CreateBitmap(const wxArtID& id, |
4416 | const wxArtClient& WXUNUSED(client), | |
4417 | const wxSize& WXUNUSED(size)) | |
63f06c22 | 4418 | { |
536b70ac VS |
4419 | if ( id == wxART_INFORMATION ) |
4420 | return wxBitmap(info_xpm); | |
4421 | if ( id == wxART_ERROR ) | |
4422 | return wxBitmap(error_xpm); | |
4423 | if ( id == wxART_WARNING ) | |
4424 | return wxBitmap(warning_xpm); | |
4425 | if ( id == wxART_QUESTION ) | |
4426 | return wxBitmap(question_xpm); | |
4427 | return wxNullBitmap; | |
63f06c22 VS |
4428 | } |
4429 | ||
24a23c35 | 4430 | |
1e6feb95 VZ |
4431 | // ============================================================================ |
4432 | // wxInputHandler | |
4433 | // ============================================================================ | |
4434 | ||
4435 | // ---------------------------------------------------------------------------- | |
4436 | // wxGTKInputHandler | |
4437 | // ---------------------------------------------------------------------------- | |
4438 | ||
4439 | wxGTKInputHandler::wxGTKInputHandler(wxGTKRenderer *renderer) | |
4440 | { | |
4441 | m_renderer = renderer; | |
4442 | } | |
4443 | ||
67e49a98 | 4444 | bool wxGTKInputHandler::HandleKey(wxInputConsumer *control, |
1e6feb95 VZ |
4445 | const wxKeyEvent& event, |
4446 | bool pressed) | |
4447 | { | |
4448 | return FALSE; | |
4449 | } | |
4450 | ||
67e49a98 | 4451 | bool wxGTKInputHandler::HandleMouse(wxInputConsumer *control, |
1e6feb95 VZ |
4452 | const wxMouseEvent& event) |
4453 | { | |
4454 | // clicking on the control gives it focus | |
67e49a98 | 4455 | if ( event.ButtonDown() && wxWindow::FindFocus() != control->GetInputWindow() ) |
1e6feb95 | 4456 | { |
67e49a98 | 4457 | control->GetInputWindow()->SetFocus(); |
1e6feb95 VZ |
4458 | |
4459 | return TRUE; | |
4460 | } | |
4461 | ||
4462 | return FALSE; | |
4463 | } | |
4464 | ||
67e49a98 | 4465 | bool wxGTKInputHandler::HandleMouseMove(wxInputConsumer *control, |
1e6feb95 VZ |
4466 | const wxMouseEvent& event) |
4467 | { | |
4468 | if ( event.Entering() ) | |
4469 | { | |
67e49a98 | 4470 | control->GetInputWindow()->SetCurrent(TRUE); |
1e6feb95 VZ |
4471 | } |
4472 | else if ( event.Leaving() ) | |
4473 | { | |
67e49a98 | 4474 | control->GetInputWindow()->SetCurrent(FALSE); |
1e6feb95 VZ |
4475 | } |
4476 | else | |
4477 | { | |
4478 | return FALSE; | |
4479 | } | |
4480 | ||
4481 | return TRUE; | |
4482 | } | |
4483 | ||
4484 | // ---------------------------------------------------------------------------- | |
4485 | // wxGTKCheckboxInputHandler | |
4486 | // ---------------------------------------------------------------------------- | |
4487 | ||
67e49a98 | 4488 | bool wxGTKCheckboxInputHandler::HandleKey(wxInputConsumer *control, |
1e6feb95 VZ |
4489 | const wxKeyEvent& event, |
4490 | bool pressed) | |
4491 | { | |
4492 | if ( pressed ) | |
4493 | { | |
4494 | int keycode = event.GetKeyCode(); | |
4495 | if ( keycode == WXK_SPACE || keycode == WXK_RETURN ) | |
4496 | { | |
4497 | control->PerformAction(wxACTION_CHECKBOX_TOGGLE); | |
4498 | ||
4499 | return TRUE; | |
4500 | } | |
4501 | } | |
4502 | ||
4503 | return FALSE; | |
4504 | } | |
4505 | ||
4506 | // ---------------------------------------------------------------------------- | |
4507 | // wxGTKTextCtrlInputHandler | |
4508 | // ---------------------------------------------------------------------------- | |
4509 | ||
67e49a98 | 4510 | bool wxGTKTextCtrlInputHandler::HandleKey(wxInputConsumer *control, |
1e6feb95 VZ |
4511 | const wxKeyEvent& event, |
4512 | bool pressed) | |
4513 | { | |
4514 | // handle only GTK-specific text bindings here, the others are handled in | |
4515 | // the base class | |
4516 | if ( pressed ) | |
4517 | { | |
4518 | wxControlAction action; | |
4519 | int keycode = event.GetKeyCode(); | |
4520 | if ( event.ControlDown() ) | |
4521 | { | |
4522 | switch ( keycode ) | |
4523 | { | |
4524 | case 'A': | |
4525 | action = wxACTION_TEXT_HOME; | |
4526 | break; | |
4527 | ||
4528 | case 'B': | |
4529 | action = wxACTION_TEXT_LEFT; | |
4530 | break; | |
4531 | ||
4532 | case 'D': | |
4533 | action << wxACTION_TEXT_PREFIX_DEL << wxACTION_TEXT_RIGHT; | |
4534 | break; | |
4535 | ||
4536 | case 'E': | |
4537 | action = wxACTION_TEXT_END; | |
4538 | break; | |
4539 | ||
4540 | case 'F': | |
4541 | action = wxACTION_TEXT_RIGHT; | |
4542 | break; | |
4543 | ||
4544 | case 'H': | |
4545 | action << wxACTION_TEXT_PREFIX_DEL << wxACTION_TEXT_LEFT; | |
4546 | break; | |
4547 | ||
4548 | case 'K': | |
4549 | action << wxACTION_TEXT_PREFIX_DEL << wxACTION_TEXT_END; | |
4550 | break; | |
4551 | ||
4552 | case 'N': | |
4553 | action = wxACTION_TEXT_DOWN; | |
4554 | break; | |
4555 | ||
4556 | case 'P': | |
4557 | action = wxACTION_TEXT_UP; | |
4558 | break; | |
4559 | ||
4560 | case 'U': | |
4561 | //delete the entire line | |
4562 | control->PerformAction(wxACTION_TEXT_HOME); | |
4563 | action << wxACTION_TEXT_PREFIX_DEL << wxACTION_TEXT_END; | |
4564 | break; | |
4565 | ||
4566 | case 'W': | |
4567 | action << wxACTION_TEXT_PREFIX_DEL << wxACTION_TEXT_WORD_LEFT; | |
4568 | break; | |
4569 | } | |
4570 | } | |
4571 | else if ( event.AltDown() ) | |
4572 | { | |
4573 | switch ( keycode ) | |
4574 | { | |
4575 | case 'B': | |
4576 | action = wxACTION_TEXT_WORD_LEFT; | |
4577 | break; | |
4578 | ||
4579 | case 'D': | |
4580 | action << wxACTION_TEXT_PREFIX_DEL << wxACTION_TEXT_WORD_RIGHT; | |
4581 | break; | |
4582 | ||
4583 | case 'F': | |
4584 | action = wxACTION_TEXT_WORD_RIGHT; | |
4585 | break; | |
4586 | } | |
4587 | } | |
4588 | ||
4589 | if ( action != wxACTION_NONE ) | |
4590 | { | |
4591 | control->PerformAction(action); | |
4592 | ||
4593 | return TRUE; | |
4594 | } | |
4595 | } | |
4596 | ||
4597 | return wxStdTextCtrlInputHandler::HandleKey(control, event, pressed); | |
4598 | } |