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