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