]> git.saurik.com Git - wxWidgets.git/blame - src/univ/themes/gtk.cpp
more GTK-ish toolbar drawing
[wxWidgets.git] / src / univ / themes / gtk.cpp
CommitLineData
1e6feb95
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: univ/themes/gtk.cpp
3// Purpose: wxUniversal theme implementing GTK-like LNF
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 06.08.00
7// RCS-ID: $Id$
442b35b5 8// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
1e6feb95
VZ
9// Licence: wxWindows license
10///////////////////////////////////////////////////////////////////////////////
11
12// ===========================================================================
13// declarations
14// ===========================================================================
15
16// ---------------------------------------------------------------------------
17// headers
18// ---------------------------------------------------------------------------
19
20// for compilers that support precompilation, includes "wx.h".
21#include "wx/wxprec.h"
22
23#ifdef __BORLANDC__
24 #pragma hdrstop
25#endif
26
27#ifndef WX_PRECOMP
28 #include "wx/intl.h"
29 #include "wx/log.h"
30 #include "wx/dcmemory.h"
31 #include "wx/window.h"
32
e4606ed9 33 #include "wx/bmpbuttn.h"
1e6feb95
VZ
34 #include "wx/button.h"
35 #include "wx/checkbox.h"
36 #include "wx/listbox.h"
37 #include "wx/checklst.h"
8cb172b4 38 #include "wx/combobox.h"
1e6feb95
VZ
39 #include "wx/scrolbar.h"
40 #include "wx/slider.h"
41 #include "wx/textctrl.h"
3216dbf5 42 #include "wx/toolbar.h"
1e6feb95
VZ
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"
813edf09 52#include "wx/toplevel.h"
1e6feb95
VZ
53
54// ----------------------------------------------------------------------------
55// constants (to be removed, for testing only)
56// ----------------------------------------------------------------------------
57
e44d6a1f 58static const size_t BORDER_THICKNESS = 1;
1e6feb95
VZ
59
60// ----------------------------------------------------------------------------
61// wxGTKRenderer: draw the GUI elements in GTK style
62// ----------------------------------------------------------------------------
63
64class wxGTKRenderer : public wxRenderer
65{
66public:
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
3216dbf5
VZ
156 virtual void DrawToolBarButton(wxDC& dc,
157 const wxString& label,
158 const wxBitmap& bitmap,
159 const wxRect& rect,
160 int flags);
161
1e6feb95
VZ
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);
71e03035
VZ
214
215 virtual void DrawStatusField(wxDC& dc,
216 const wxRect& rect,
217 const wxString& label,
218 int flags = 0);
24a23c35
VS
219
220 virtual void DrawFrameTitleBar(wxDC& dc,
221 const wxRect& rect,
222 const wxString& title,
223 const wxIcon& icon,
224 int flags,
813edf09
VS
225 int specialButton = 0,
226 int specialButtonFlag = 0);
24a23c35
VS
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;
e7dda1ff 249 virtual wxSize GetFrameMinSize(int flags) const;
24a23c35 250 virtual wxSize GetFrameIconSize() const;
813edf09 251 virtual int HitTestFrame(const wxRect& rect, const wxPoint& pt, int flags) const;
63f06c22
VS
252
253 virtual wxIcon GetStdIcon(int which) const;
24a23c35 254
1e6feb95 255 virtual void GetComboBitmaps(wxBitmap *bmpNormal,
1b488c0e 256 wxBitmap *bmpFocus,
1e6feb95
VZ
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
3216dbf5
VZ
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
1e6feb95 290 virtual wxRect GetTextTotalArea(const wxTextCtrl *text,
3216dbf5 291 const wxRect& rect) const;
1e6feb95
VZ
292 virtual wxRect GetTextClientArea(const wxTextCtrl *text,
293 const wxRect& rect,
3216dbf5 294 wxCoord *extraSpaceBeyond) const;
1e6feb95
VZ
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;
71e03035
VZ
310
311 virtual wxSize GetStatusBarBorders(wxCoord *borderBetweenFields) const;
312
1e6feb95
VZ
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
317protected:
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
3216dbf5 400 wxBitmap GetLineWrapBitmap() const;
1e6feb95
VZ
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
1b488c0e
VZ
428 // initialize the combo bitmaps
429 void InitComboBitmaps();
430
1e6feb95
VZ
431private:
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;
1b488c0e
VZ
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];
1e6feb95
VZ
463};
464
465// ----------------------------------------------------------------------------
466// wxGTKInputHandler and derived classes: process the keyboard and mouse
467// messages according to GTK standards
468// ----------------------------------------------------------------------------
469
470class wxGTKInputHandler : public wxInputHandler
471{
472public:
473 wxGTKInputHandler(wxGTKRenderer *renderer);
474
67e49a98 475 virtual bool HandleKey(wxInputConsumer *control,
1e6feb95
VZ
476 const wxKeyEvent& event,
477 bool pressed);
67e49a98 478 virtual bool HandleMouse(wxInputConsumer *control,
1e6feb95 479 const wxMouseEvent& event);
67e49a98 480 virtual bool HandleMouseMove(wxInputConsumer *control, const wxMouseEvent& event);
1e6feb95
VZ
481
482protected:
483 wxGTKRenderer *m_renderer;
484};
485
486class wxGTKScrollBarInputHandler : public wxStdScrollBarInputHandler
487{
488public:
489 wxGTKScrollBarInputHandler(wxRenderer *renderer, wxInputHandler *handler)
490 : wxStdScrollBarInputHandler(renderer, handler) { }
491
492protected:
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
520class wxGTKCheckboxInputHandler : public wxStdCheckboxInputHandler
521{
522public:
523 wxGTKCheckboxInputHandler(wxInputHandler *handler)
524 : wxStdCheckboxInputHandler(handler) { }
525
67e49a98 526 virtual bool HandleKey(wxInputConsumer *control,
1e6feb95
VZ
527 const wxKeyEvent& event,
528 bool pressed);
529};
530
531class wxGTKTextCtrlInputHandler : public wxStdTextCtrlInputHandler
532{
533public:
534 wxGTKTextCtrlInputHandler(wxInputHandler *handler)
535 : wxStdTextCtrlInputHandler(handler) { }
536
67e49a98 537 virtual bool HandleKey(wxInputConsumer *control,
1e6feb95
VZ
538 const wxKeyEvent& event,
539 bool pressed);
540};
541
542// ----------------------------------------------------------------------------
543// wxGTKColourScheme: uses the standard GTK colours
544// ----------------------------------------------------------------------------
545
546class wxGTKColourScheme : public wxColourScheme
547{
548public:
549 virtual wxColour Get(StdColour col) const;
550 virtual wxColour GetBackground(wxWindow *win) const;
551};
552
553// ----------------------------------------------------------------------------
554// wxGTKTheme
555// ----------------------------------------------------------------------------
556
557WX_DEFINE_ARRAY(wxInputHandler *, wxArrayHandlers);
558
559class wxGTKTheme : public wxTheme
560{
561public:
562 wxGTKTheme();
563 virtual ~wxGTKTheme();
564
240889a1 565 virtual wxRenderer *GetRenderer();
1e6feb95 566 virtual wxInputHandler *GetInputHandler(const wxString& control);
240889a1 567 virtual wxColourScheme *GetColourScheme();
1e6feb95
VZ
568
569private:
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
591WX_IMPLEMENT_THEME(wxGTKTheme, gtk, wxTRANSLATE("GTK+ theme"));
592
593// ----------------------------------------------------------------------------
594// wxGTKTheme
595// ----------------------------------------------------------------------------
596
597wxGTKTheme::wxGTKTheme()
598{
240889a1
VS
599 m_scheme = NULL;
600 m_renderer = NULL;
1e6feb95
VZ
601 m_handlerDefault = NULL;
602}
603
604wxGTKTheme::~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
240889a1
VS
618wxRenderer *wxGTKTheme::GetRenderer()
619{
620 if ( !m_renderer )
621 {
622 m_renderer = new wxGTKRenderer(GetColourScheme());
623 }
624
625 return m_renderer;
626}
627
628wxColourScheme *wxGTKTheme::GetColourScheme()
629{
630 if ( !m_scheme )
631 {
632 m_scheme = new wxGTKColourScheme;
633 }
634 return m_scheme;
635}
636
1e6feb95
VZ
637wxInputHandler *wxGTKTheme::GetDefaultInputHandler()
638{
639 if ( !m_handlerDefault )
640 {
641 m_handlerDefault = new wxGTKInputHandler(m_renderer);
642 }
643
644 return m_handlerDefault;
645}
646
647wxInputHandler *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
3216dbf5
VZ
693#if wxUSE_TOOLBAR
694 else if ( control == wxINP_HANDLER_TOOLBAR )
695 handler = new wxStdToolbarInputHandler(GetDefaultInputHandler());
696#endif // wxUSE_TOOLBAR
813edf09
VS
697 else if ( control == wxINP_HANDLER_TOPLEVEL )
698 handler = new wxStdFrameInputHandler(GetDefaultInputHandler());
1e6feb95
VZ
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
717wxColour 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
756wxColour 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
a407ff6a
VZ
783 case GAUGE: return Get(CONTROL_CURRENT);
784
1e6feb95
VZ
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
800wxGTKRenderer::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
818void 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
829void 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
843void 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
862void 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
897void 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
916void 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
922void 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
928void 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:
89e7a223 941 for ( width = 0; width < BORDER_THICKNESS; width++ )
1e6feb95
VZ
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:
89e7a223 949 for ( width = 0; width < BORDER_THICKNESS; width++ )
e4606ed9
VZ
950 {
951 DrawShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight);
952 }
1e6feb95
VZ
953 break;
954
955 case wxBORDER_RAISED:
89e7a223 956 for ( width = 0; width < BORDER_THICKNESS; width++ )
1e6feb95
VZ
957 {
958 DrawRaisedBorder(dc, &rect);
959 }
960 break;
961
962 case wxBORDER_DOUBLE:
89e7a223 963 for ( width = 0; width < BORDER_THICKNESS; width++ )
e4606ed9
VZ
964 {
965 DrawShadedRect(dc, &rect, m_penLightGrey, m_penBlack);
966 DrawShadedRect(dc, &rect, m_penHighlight, m_penDarkGrey);
967 DrawRect(dc, &rect, m_penLightGrey);
968 }
1e6feb95
VZ
969 break;
970
971 case wxBORDER_SIMPLE:
e4606ed9
VZ
972 for ( width = 0; width < BORDER_THICKNESS; width++ )
973 {
974 DrawRect(dc, &rect, m_penBlack);
975 }
1e6feb95
VZ
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
991wxRect 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:
e4606ed9 1003 width = BORDER_THICKNESS;
1e6feb95
VZ
1004 break;
1005
1006 case wxBORDER_DOUBLE:
e4606ed9 1007 width = 3*BORDER_THICKNESS;
1e6feb95
VZ
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
1029bool 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
1039void wxGTKRenderer::DrawTextBorder(wxDC& dc,
1040 wxBorder border,
1041 const wxRect& rectOrig,
1042 int flags,
1043 wxRect *rectIn)
1044{
1045 wxRect rect = rectOrig;
1046
89e7a223 1047 if ( border != wxBORDER_NONE )
1e6feb95 1048 {
e4606ed9
VZ
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 }
1e6feb95
VZ
1059 }
1060
1061 if ( rectIn )
1062 *rectIn = rect;
1063}
1064
1065void 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);
e4606ed9 1076
89e7a223 1077 for ( size_t width = 0; width < BORDER_THICKNESS; width++ )
e4606ed9
VZ
1078 {
1079 DrawAntiShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight);
1080 DrawAntiShadedRect(dc, &rect, m_penBlack, m_penDarkGrey);
1081 }
1e6feb95
VZ
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
89e7a223 1099 for ( size_t width = 0; width < BORDER_THICKNESS; width++ )
e4606ed9
VZ
1100 {
1101 DrawShadedRect(dc, &rect, m_penHighlight, m_penBlack);
1102 DrawAntiShadedRect(dc, &rect,
1103 wxPen(GetBackgroundColour(flags), 0, wxSOLID),
1104 m_penDarkGrey);
1105 }
1e6feb95
VZ
1106 }
1107
1108 if ( rectIn )
1109 {
1110 *rectIn = rect;
1111 }
1112}
1113
1114// ----------------------------------------------------------------------------
1115// lines and frames
1116// ----------------------------------------------------------------------------
1117
1118void 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
1128void 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
1138void 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
1187void 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
1199void 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
1222void 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
1267void 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
1290void 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
1310void 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
1321void 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
1382void 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
1393void 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
1404wxBitmap 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
3216dbf5 1443wxBitmap wxGTKRenderer::GetLineWrapBitmap() const
1e6feb95
VZ
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 {
3216dbf5 1462 wxConstCast(this, wxGTKRenderer)->m_bmpLineWrap = bmpLineWrap;
1e6feb95
VZ
1463 }
1464 }
1465
1466 return m_bmpLineWrap;
1467}
1468
1469void 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
1491void 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
1539void 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
3216dbf5
VZ
1571void 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 {
2e7b0a16
VZ
1585 DrawBorder(dc, wxBORDER_SUNKEN, rect, flags, &rect);
1586
1587 DrawBackground(dc, wxSCHEME_COLOUR(m_scheme, CONTROL_PRESSED), rect);
3216dbf5
VZ
1588 }
1589 else if ( flags & wxCONTROL_CURRENT )
1590 {
2e7b0a16
VZ
1591 DrawBorder(dc, wxBORDER_RAISED, rect, flags, &rect);
1592
1593 DrawBackground(dc, wxSCHEME_COLOUR(m_scheme, CONTROL_CURRENT), rect);
3216dbf5
VZ
1594 }
1595
1596 dc.DrawLabel(label, bitmap, rect, wxALIGN_CENTRE);
1597 }
1598}
1599
1e6feb95
VZ
1600// ----------------------------------------------------------------------------
1601// text control
1602// ----------------------------------------------------------------------------
1603
1604wxRect wxGTKRenderer::GetTextTotalArea(const wxTextCtrl *text,
3216dbf5 1605 const wxRect& rect) const
1e6feb95
VZ
1606{
1607 wxRect rectTotal = rect;
89e7a223 1608 rectTotal.Inflate(2*BORDER_THICKNESS);
1e6feb95
VZ
1609 return rectTotal;
1610}
1611
1612wxRect wxGTKRenderer::GetTextClientArea(const wxTextCtrl *text,
1613 const wxRect& rect,
3216dbf5 1614 wxCoord *extraSpaceBeyond) const
1e6feb95
VZ
1615{
1616 wxRect rectText = rect;
5836c908 1617 rectText.Deflate(2*BORDER_THICKNESS);
1e6feb95
VZ
1618
1619 if ( text->WrapLines() )
1620 {
1621 // leave enough for the line wrap bitmap indicator
1622 wxCoord widthMark = GetLineWrapBitmap().GetWidth() + 2;
1623
1624 rectText.width -= widthMark;
1625
1626 if ( extraSpaceBeyond )
1627 *extraSpaceBeyond = widthMark;
1628 }
1629
1630 return rectText;
1631}
1632
1633void wxGTKRenderer::DrawTextLine(wxDC& dc,
1634 const wxString& text,
1635 const wxRect& rect,
1636 int selStart,
1637 int selEnd,
1638 int flags)
1639{
1640 // TODO: GTK+ draws selection even for unfocused controls, just with
1641 // different colours
1642 StandardDrawTextLine(dc, text, rect, selStart, selEnd, flags);
1643}
1644
1645void wxGTKRenderer::DrawLineWrapMark(wxDC& dc, const wxRect& rect)
1646{
1647 wxBitmap bmpLineWrap = GetLineWrapBitmap();
1648
1649 // for a mono bitmap he colours it appears in depends on the current text
1650 // colours, so set them correctly
1651 wxColour colFgOld;
1652 if ( bmpLineWrap.GetDepth() == 1 )
1653 {
1654 colFgOld = dc.GetTextForeground();
1655
1656 // FIXME: I wonder what should we do if the background is black too?
1657 dc.SetTextForeground(*wxBLACK);
1658 }
1659
1660 dc.DrawBitmap(bmpLineWrap,
1661 rect.x, rect.y + (rect.height - bmpLineWrap.GetHeight())/2);
1662
1663 if ( colFgOld.Ok() )
1664 {
1665 // restore old colour
1666 dc.SetTextForeground(colFgOld);
1667 }
1668}
1669
1670// ----------------------------------------------------------------------------
1671// notebook
1672// ----------------------------------------------------------------------------
1673
1674void wxGTKRenderer::DrawTab(wxDC& dc,
1675 const wxRect& rectOrig,
1676 wxDirection dir,
1677 const wxString& label,
1678 const wxBitmap& bitmap,
1679 int flags,
1680 int indexAccel)
1681{
1682 wxRect rect = rectOrig;
1683
1684 // the current tab is drawn indented (to the top for default case) and
1685 // bigger than the other ones
1686 const wxSize indent = GetTabIndent();
1687 if ( flags & wxCONTROL_SELECTED )
1688 {
1689 switch ( dir )
1690 {
1691 default:
1692 wxFAIL_MSG(_T("invaild notebook tab orientation"));
1693 // fall through
1694
1695 case wxTOP:
1696 rect.Inflate(indent.x, 0);
1697 rect.y -= indent.y;
1698 rect.height += indent.y;
1699 break;
1700
1701 case wxBOTTOM:
1702 rect.Inflate(indent.x, 0);
1703 rect.height += indent.y;
1704 break;
1705
1706 case wxLEFT:
1707 case wxRIGHT:
1708 wxFAIL_MSG(_T("TODO"));
1709 break;
1710 }
1711 }
1712
1713 // selected tab has different colour
1714 wxColour col = flags & wxCONTROL_SELECTED
1715 ? wxSCHEME_COLOUR(m_scheme, SHADOW_IN)
1716 : wxSCHEME_COLOUR(m_scheme, SCROLLBAR);
1717 DoDrawBackground(dc, col, rect);
1718
1719 if ( flags & wxCONTROL_FOCUSED )
1720 {
1721 // draw the focus rect
1722 wxRect rectBorder = rect;
1723 rectBorder.Deflate(4, 3);
1724 if ( dir == wxBOTTOM )
1725 rectBorder.Offset(0, -1);
1726
1727 DrawRect(dc, &rectBorder, m_penBlack);
1728 }
1729
1730 // draw the text, image and the focus around them (if necessary)
1731 wxRect rectLabel = rect;
1732 rectLabel.Deflate(1, 1);
1733 dc.DrawLabel(label, bitmap, rectLabel, wxALIGN_CENTRE, indexAccel);
1734
1735 // now draw the tab itself
1736 wxCoord x = rect.x,
1737 y = rect.y,
1738 x2 = rect.GetRight(),
1739 y2 = rect.GetBottom();
1740 switch ( dir )
1741 {
1742 default:
1743 case wxTOP:
1744 dc.SetPen(m_penHighlight);
1745 dc.DrawLine(x, y2, x, y);
1746 dc.DrawLine(x + 1, y, x2, y);
1747
1748 dc.SetPen(m_penBlack);
1749 dc.DrawLine(x2, y2, x2, y);
1750
1751 dc.SetPen(m_penDarkGrey);
1752 dc.DrawLine(x2 - 1, y2, x2 - 1, y + 1);
1753
1754 if ( flags & wxCONTROL_SELECTED )
1755 {
1756 dc.SetPen(m_penLightGrey);
1757
1758 // overwrite the part of the border below this tab
1759 dc.DrawLine(x + 1, y2 + 1, x2 - 1, y2 + 1);
1760
1761 // and the shadow of the tab to the left of us
1762 dc.DrawLine(x + 1, y + 2, x + 1, y2 + 1);
1763 }
1764 break;
1765
1766 case wxBOTTOM:
1767 dc.SetPen(m_penHighlight);
1768
1769 // we need to continue one pixel further to overwrite the corner of
1770 // the border for the selected tab
1771 dc.DrawLine(x, y - (flags & wxCONTROL_SELECTED ? 1 : 0),
1772 x, y2);
1773
1774 // it doesn't work like this (TODO: implement it properly)
1775#if 0
1776 // erase the corner of the tab to the right
1777 dc.SetPen(m_penLightGrey);
1778 dc.DrawPoint(x2 - 1, y - 2);
1779 dc.DrawPoint(x2 - 2, y - 2);
1780 dc.DrawPoint(x2 - 2, y - 1);
1781#endif // 0
1782
1783 dc.SetPen(m_penBlack);
1784 dc.DrawLine(x + 1, y2, x2, y2);
1785 dc.DrawLine(x2, y, x2, y2);
1786
1787 dc.SetPen(m_penDarkGrey);
1788 dc.DrawLine(x + 2, y2 - 1, x2 - 1, y2 - 1);
1789 dc.DrawLine(x2 - 1, y, x2 - 1, y2);
1790
1791 if ( flags & wxCONTROL_SELECTED )
1792 {
1793 dc.SetPen(m_penLightGrey);
1794
1795 // overwrite the part of the (double!) border above this tab
1796 dc.DrawLine(x + 1, y - 1, x2 - 1, y - 1);
1797 dc.DrawLine(x + 1, y - 2, x2 - 1, y - 2);
1798
1799 // and the shadow of the tab to the left of us
1800 dc.DrawLine(x + 1, y2 - 1, x + 1, y - 1);
1801 }
1802 break;
1803
1804 case wxLEFT:
1805 case wxRIGHT:
1806 wxFAIL_MSG(_T("TODO"));
1807 }
1808}
1809
1810// ----------------------------------------------------------------------------
1811// slider
1812// ----------------------------------------------------------------------------
1813
1814wxSize wxGTKRenderer::GetSliderThumbSize(const wxRect& rect,
1815 wxOrientation orient) const
1816{
1817 static const wxCoord SLIDER_THUMB_LENGTH = 30;
1818
1819 wxSize size;
1820
1821 wxRect rectShaft = GetSliderShaftRect(rect, orient);
1822 if ( orient == wxHORIZONTAL )
1823 {
1824 size.x = wxMin(SLIDER_THUMB_LENGTH, rectShaft.width);
1825 size.y = rectShaft.height;
1826 }
1827 else // vertical
1828 {
1829 size.y = wxMin(SLIDER_THUMB_LENGTH, rectShaft.height);
1830 size.x = rectShaft.width;
1831 }
1832
1833 return size;
1834}
1835
1836wxRect wxGTKRenderer::GetSliderShaftRect(const wxRect& rect,
1837 wxOrientation WXUNUSED(orient)) const
1838{
1839 return rect.Deflate(2*BORDER_THICKNESS, 2*BORDER_THICKNESS);
1840}
1841
1842void wxGTKRenderer::DrawSliderShaft(wxDC& dc,
1843 const wxRect& rectOrig,
1844 wxOrientation orient,
1845 int flags,
1846 wxRect *rectShaft)
1847{
1848 wxRect rect = rectOrig;
1849
1850 // draw the border first
1851 if ( flags & wxCONTROL_FOCUSED )
1852 {
1853 DrawRect(dc, &rect, m_penBlack);
1854 DrawAntiShadedRect(dc, &rect, m_penBlack, m_penLightGrey);
1855 }
1856 else // not focused, normal
1857 {
1858 DrawAntiShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight);
1859 DrawAntiShadedRect(dc, &rect, m_penBlack, m_penLightGrey);
1860 }
1861
1862 // and the background
1863 DoDrawBackground(dc, wxSCHEME_COLOUR(m_scheme, SCROLLBAR), rect);
1864
1865 if ( rectShaft )
1866 *rectShaft = rect;
1867}
1868
1869void wxGTKRenderer::DrawSliderThumb(wxDC& dc,
1870 const wxRect& rectOrig,
1871 wxOrientation orient,
1872 int flags)
1873{
1874 // draw the thumb border
1875 wxRect rect = rectOrig;
1876 DrawAntiRaisedBorder(dc, &rect);
1877
1878 // draw the handle in the middle
1879 if ( orient == wxVERTICAL )
1880 {
1881 rect.height = 2*BORDER_THICKNESS;
1882 rect.y = rectOrig.y + (rectOrig.height - rect.height) / 2;
1883 }
1884 else // horz
1885 {
1886 rect.width = 2*BORDER_THICKNESS;
1887 rect.x = rectOrig.x + (rectOrig.width - rect.width) / 2;
1888 }
1889
1890 DrawShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight);
1891}
1892
1893// ----------------------------------------------------------------------------
1894// menu and menubar
1895// ----------------------------------------------------------------------------
1896
1897void wxGTKRenderer::DrawMenuBarItem(wxDC& dc,
1898 const wxRect& rect,
1899 const wxString& label,
1900 int flags,
1901 int indexAccel)
1902{
1903 DrawLabel(dc, label, rect, flags, wxALIGN_CENTRE, indexAccel);
1904}
1905
1906void wxGTKRenderer::DrawMenuItem(wxDC& dc,
1907 wxCoord y,
1908 const wxMenuGeometryInfo& geometryInfo,
1909 const wxString& label,
1910 const wxString& accel,
1911 const wxBitmap& bitmap,
1912 int flags,
1913 int indexAccel)
1914{
1915 wxFAIL_MSG(_T("TODO"));
1916}
1917
1918void wxGTKRenderer::DrawMenuSeparator(wxDC& dc,
1919 wxCoord y,
1920 const wxMenuGeometryInfo& geomInfo)
1921{
1922 wxFAIL_MSG(_T("TODO"));
1923}
1924
1925wxSize wxGTKRenderer::GetMenuBarItemSize(const wxSize& sizeText) const
1926{
1927 return sizeText;
1928}
1929
1930wxMenuGeometryInfo *wxGTKRenderer::GetMenuGeometry(wxWindow *win,
1931 const wxMenu& menu) const
1932{
1933 wxFAIL_MSG(_T("TODO"));
1934
1935 return NULL;
1936}
71e03035
VZ
1937
1938// ----------------------------------------------------------------------------
1939// status bar
1940// ----------------------------------------------------------------------------
1941
1942wxSize wxGTKRenderer::GetStatusBarBorders(wxCoord *borderBetweenFields) const
1943{
1944 return wxSize(0, 0);
1945}
1946
1947void wxGTKRenderer::DrawStatusField(wxDC& dc,
1948 const wxRect& rect,
1949 const wxString& label,
1950 int flags)
1951{
1952}
1b488c0e 1953
1e6feb95
VZ
1954// ----------------------------------------------------------------------------
1955// combobox
1956// ----------------------------------------------------------------------------
1957
1b488c0e
VZ
1958void wxGTKRenderer::InitComboBitmaps()
1959{
1960 wxSize sizeArrow = m_sizeScrollbarArrow;
1961 sizeArrow.x -= 2;
1962 sizeArrow.y -= 2;
1963
1964 size_t n;
1965
1966 for ( n = ComboState_Normal; n < ComboState_Max; n++ )
1967 {
1968 m_bitmapsCombo[n].Create(sizeArrow.x, sizeArrow.y);
1969 }
1970
1971 static const int comboButtonFlags[ComboState_Max] =
1972 {
1973 0,
1974 wxCONTROL_CURRENT,
1975 wxCONTROL_PRESSED,
1976 wxCONTROL_DISABLED,
1977 };
1978
1979 wxRect rect(wxPoint(0, 0), sizeArrow);
1980
1981 wxMemoryDC dc;
1982 for ( n = ComboState_Normal; n < ComboState_Max; n++ )
1983 {
1984 int flags = comboButtonFlags[n];
1985
1986 dc.SelectObject(m_bitmapsCombo[n]);
1987 DoDrawBackground(dc, GetBackgroundColour(flags), rect);
1988 DrawArrow(dc, wxDOWN, rect, flags);
1989 }
1990}
1991
1e6feb95 1992void wxGTKRenderer::GetComboBitmaps(wxBitmap *bmpNormal,
1b488c0e 1993 wxBitmap *bmpFocus,
1e6feb95
VZ
1994 wxBitmap *bmpPressed,
1995 wxBitmap *bmpDisabled)
1996{
1b488c0e
VZ
1997 if ( !m_bitmapsCombo[ComboState_Normal].Ok() )
1998 {
1999 InitComboBitmaps();
2000 }
2001
2002 if ( bmpNormal )
2003 *bmpNormal = m_bitmapsCombo[ComboState_Normal];
2004 if ( bmpFocus )
2005 *bmpFocus = m_bitmapsCombo[ComboState_Focus];
2006 if ( bmpPressed )
2007 *bmpPressed = m_bitmapsCombo[ComboState_Pressed];
2008 if ( bmpDisabled )
2009 *bmpDisabled = m_bitmapsCombo[ComboState_Disabled];
1e6feb95
VZ
2010}
2011
2012// ----------------------------------------------------------------------------
2013// background
2014// ----------------------------------------------------------------------------
2015
2016void wxGTKRenderer::DoDrawBackground(wxDC& dc,
2017 const wxColour& col,
2018 const wxRect& rect)
2019{
2020 wxBrush brush(col, wxSOLID);
2021 dc.SetBrush(brush);
2022 dc.SetPen(*wxTRANSPARENT_PEN);
2023 dc.DrawRectangle(rect);
2024}
2025
2026void wxGTKRenderer::DrawBackground(wxDC& dc,
2027 const wxColour& col,
2028 const wxRect& rect,
2029 int flags)
2030{
2031 wxColour colBg = col.Ok() ? col : GetBackgroundColour(flags);
2032 DoDrawBackground(dc, colBg, rect);
2033}
2034
2035// ----------------------------------------------------------------------------
2036// scrollbar
2037// ----------------------------------------------------------------------------
2038
2039void wxGTKRenderer::DrawArrowBorder(wxDC& dc,
2040 wxRect *rect,
2041 wxDirection dir)
2042{
2043 static const wxDirection sides[] =
2044 {
2045 wxUP, wxLEFT, wxRIGHT, wxDOWN
2046 };
2047
2048 wxRect rect1, rect2, rectInner;
2049 rect1 =
2050 rect2 =
2051 rectInner = *rect;
2052
2053 rect2.Inflate(-1);
2054 rectInner.Inflate(-2);
2055
2056 DoDrawBackground(dc, wxSCHEME_COLOUR(m_scheme, SCROLLBAR), *rect);
2057
2058 // find the side not to draw and also adjust the rectangles to compensate
2059 // for it
2060 wxDirection sideToOmit;
2061 switch ( dir )
2062 {
2063 case wxUP:
2064 sideToOmit = wxDOWN;
2065 rect2.height += 1;
2066 rectInner.height += 1;
2067 break;
2068
2069 case wxDOWN:
2070 sideToOmit = wxUP;
2071 rect2.y -= 1;
2072 rect2.height += 1;
2073 rectInner.y -= 2;
2074 rectInner.height += 1;
2075 break;
2076
2077 case wxLEFT:
2078 sideToOmit = wxRIGHT;
2079 rect2.width += 1;
2080 rectInner.width += 1;
2081 break;
2082
2083 case wxRIGHT:
2084 sideToOmit = wxLEFT;
2085 rect2.x -= 1;
2086 rect2.width += 1;
2087 rectInner.x -= 2;
2088 rectInner.width += 1;
2089 break;
2090
2091 default:
2092 wxFAIL_MSG(_T("unknown arrow direction"));
2093 return;
2094 }
2095
2096 // the outer rect first
2097 size_t n;
2098 for ( n = 0; n < WXSIZEOF(sides); n++ )
2099 {
2100 wxDirection side = sides[n];
2101 if ( side == sideToOmit )
2102 continue;
2103
2104 DrawAntiShadedRectSide(dc, rect1, m_penDarkGrey, m_penHighlight, side);
2105 }
2106
2107 // and then the inner one
2108 for ( n = 0; n < WXSIZEOF(sides); n++ )
2109 {
2110 wxDirection side = sides[n];
2111 if ( side == sideToOmit )
2112 continue;
2113
2114 DrawAntiShadedRectSide(dc, rect2, m_penBlack, m_penGrey, side);
2115 }
2116
2117 *rect = rectInner;
2118}
2119
2120void wxGTKRenderer::DrawScrollbarArrow(wxDC& dc,
2121 wxDirection dir,
2122 const wxRect& rectArrow,
2123 int flags)
2124{
2125 // first of all, draw the border around it - but we don't want the border
2126 // on the side opposite to the arrow point
2127 wxRect rect = rectArrow;
2128 DrawArrowBorder(dc, &rect, dir);
2129
2130 // then the arrow itself
2131 DrawArrow(dc, dir, rect, flags);
2132}
2133
2134// gtk_default_draw_arrow() takes ~350 lines and we can't do much better here
2135// these people are just crazy :-(
2136void wxGTKRenderer::DrawArrow(wxDC& dc,
2137 wxDirection dir,
2138 const wxRect& rect,
2139 int flags)
2140{
2141 enum
2142 {
2143 Point_First,
2144 Point_Second,
2145 Point_Third,
2146 Point_Max
2147 };
2148
2149 wxPoint ptArrow[Point_Max];
2150
2151 wxColour colInside = GetBackgroundColour(flags);
2152 wxPen penShadow[4];
2153 if ( flags & wxCONTROL_DISABLED )
2154 {
2155 penShadow[0] = m_penDarkGrey;
2156 penShadow[1] = m_penDarkGrey;
2157 penShadow[2] = wxNullPen;
2158 penShadow[3] = wxNullPen;
2159 }
2160 else if ( flags & wxCONTROL_PRESSED )
2161 {
2162 penShadow[0] = m_penDarkGrey;
2163 penShadow[1] = m_penHighlight;
2164 penShadow[2] = wxNullPen;
2165 penShadow[3] = m_penBlack;
2166 }
2167 else // normal arrow
2168 {
2169 penShadow[0] = m_penHighlight;
2170 penShadow[1] = m_penBlack;
2171 penShadow[2] = m_penDarkGrey;
2172 penShadow[3] = wxNullPen;
2173 }
2174
2175 wxCoord middle;
2176 if ( dir == wxUP || dir == wxDOWN )
2177 {
2178 // horz middle
2179 middle = (rect.GetRight() + rect.GetLeft() + 1) / 2;
2180 }
2181 else // horz arrow
2182 {
2183 middle = (rect.GetTop() + rect.GetBottom() + 1) / 2;
2184 }
2185
2186 // draw the arrow interior
2187 dc.SetPen(*wxTRANSPARENT_PEN);
2188 dc.SetBrush(wxBrush(colInside, wxSOLID));
2189
2190 switch ( dir )
2191 {
2192 case wxUP:
2193 ptArrow[Point_First].x = rect.GetLeft();
2194 ptArrow[Point_First].y = rect.GetBottom();
2195 ptArrow[Point_Second].x = middle;
2196 ptArrow[Point_Second].y = rect.GetTop();
2197 ptArrow[Point_Third].x = rect.GetRight();
2198 ptArrow[Point_Third].y = rect.GetBottom();
2199 break;
2200
2201 case wxDOWN:
2202 ptArrow[Point_First] = rect.GetPosition();
2203 ptArrow[Point_Second].x = middle;
2204 ptArrow[Point_Second].y = rect.GetBottom();
2205 ptArrow[Point_Third].x = rect.GetRight();
2206 ptArrow[Point_Third].y = rect.GetTop();
2207 break;
2208
2209 case wxLEFT:
2210 ptArrow[Point_First].x = rect.GetRight();
2211 ptArrow[Point_First].y = rect.GetTop();
2212 ptArrow[Point_Second].x = rect.GetLeft();
2213 ptArrow[Point_Second].y = middle;
2214 ptArrow[Point_Third].x = rect.GetRight();
2215 ptArrow[Point_Third].y = rect.GetBottom();
2216 break;
2217
2218 case wxRIGHT:
2219 ptArrow[Point_First] = rect.GetPosition();
2220 ptArrow[Point_Second].x = rect.GetRight();
2221 ptArrow[Point_Second].y = middle;
2222 ptArrow[Point_Third].x = rect.GetLeft();
2223 ptArrow[Point_Third].y = rect.GetBottom();
2224 break;
2225
2226 default:
2227 wxFAIL_MSG(_T("unknown arrow direction"));
2228 }
2229
2230 dc.DrawPolygon(WXSIZEOF(ptArrow), ptArrow);
2231
2232 // draw the arrow border
2233 dc.SetPen(penShadow[0]);
2234 switch ( dir )
2235 {
2236 case wxUP:
2237 dc.DrawLine(ptArrow[Point_Second], ptArrow[Point_First]);
2238 dc.DrawPoint(ptArrow[Point_First]);
2239 if ( penShadow[3].Ok() )
2240 {
2241 dc.SetPen(penShadow[3]);
2242 dc.DrawLine(ptArrow[Point_First].x + 1, ptArrow[Point_First].y,
2243 ptArrow[Point_Second].x, ptArrow[Point_Second].y);
2244 }
2245 dc.SetPen(penShadow[1]);
2246 dc.DrawLine(ptArrow[Point_Second].x + 1, ptArrow[Point_Second].y + 1,
2247 ptArrow[Point_Third].x, ptArrow[Point_Third].y);
2248 dc.DrawPoint(ptArrow[Point_Third]);
2249 dc.DrawLine(ptArrow[Point_Third].x - 2, ptArrow[Point_Third].y,
2250 ptArrow[Point_First].x + 1, ptArrow[Point_First].y);
2251 if ( penShadow[2].Ok() )
2252 {
2253 dc.SetPen(penShadow[2]);
2254 dc.DrawLine(ptArrow[Point_Third].x - 1, ptArrow[Point_Third].y,
2255 ptArrow[Point_Second].x, ptArrow[Point_Second].y + 1);
2256 dc.DrawLine(ptArrow[Point_Third].x - 1, ptArrow[Point_Third].y - 1,
2257 ptArrow[Point_First].x + 2, ptArrow[Point_First].y - 1);
2258 }
2259 break;
2260
2261 case wxDOWN:
2262 dc.DrawLine(ptArrow[Point_First], ptArrow[Point_Second]);
2263 dc.DrawLine(ptArrow[Point_First].x + 2, ptArrow[Point_First].y,
2264 ptArrow[Point_Third].x - 1, ptArrow[Point_Third].y);
2265 if ( penShadow[2].Ok() )
2266 {
2267 dc.SetPen(penShadow[2]);
2268 dc.DrawLine(ptArrow[Point_Second].x, ptArrow[Point_Second].y - 1,
2269 ptArrow[Point_Third].x - 1, ptArrow[Point_Third].y - 1);
2270 }
2271 dc.SetPen(penShadow[1]);
2272 dc.DrawLine(ptArrow[Point_Second], ptArrow[Point_Third]);
2273 dc.DrawPoint(ptArrow[Point_Third]);
2274 break;
2275
2276 case wxLEFT:
2277 dc.DrawLine(ptArrow[Point_Second], ptArrow[Point_First]);
2278 dc.DrawPoint(ptArrow[Point_First]);
2279 if ( penShadow[2].Ok() )
2280 {
2281 dc.SetPen(penShadow[2]);
2282 dc.DrawLine(ptArrow[Point_Third].x - 1, ptArrow[Point_Third].y,
2283 ptArrow[Point_First].x - 1, ptArrow[Point_First].y + 2);
2284 dc.DrawLine(ptArrow[Point_Third].x, ptArrow[Point_Third].y,
2285 ptArrow[Point_Second].x + 2, ptArrow[Point_Second].y + 1);
2286 }
2287 dc.SetPen(penShadow[1]);
2288 dc.DrawLine(ptArrow[Point_Third].x, ptArrow[Point_Third].y,
2289 ptArrow[Point_First].x, ptArrow[Point_First].y + 1);
2290 dc.DrawLine(ptArrow[Point_Second].x + 1, ptArrow[Point_Second].y + 1,
2291 ptArrow[Point_Third].x - 1, ptArrow[Point_Third].y);
2292 break;
2293
2294 case wxRIGHT:
2295 dc.DrawLine(ptArrow[Point_First], ptArrow[Point_Third]);
2296 dc.DrawLine(ptArrow[Point_First].x + 2, ptArrow[Point_First].y + 1,
2297 ptArrow[Point_Second].x, ptArrow[Point_Second].y);
2298 dc.SetPen(penShadow[1]);
2299 dc.DrawLine(ptArrow[Point_Second], ptArrow[Point_Third]);
2300 dc.DrawPoint(ptArrow[Point_Third]);
2301 break;
2302
2303 default:
2304 wxFAIL_MSG(_T("unknown arrow direction"));
2305 return;
2306 }
2307}
2308
2309void wxGTKRenderer::DrawThumbBorder(wxDC& dc,
2310 wxRect *rect,
2311 wxOrientation orient)
2312{
2313 if ( orient == wxVERTICAL )
2314 {
2315 DrawAntiShadedRectSide(dc, *rect, m_penDarkGrey, m_penHighlight,
2316 wxLEFT);
2317 DrawAntiShadedRectSide(dc, *rect, m_penDarkGrey, m_penHighlight,
2318 wxRIGHT);
2319 rect->Inflate(-1, 0);
2320
2321 DrawAntiShadedRectSide(dc, *rect, m_penBlack, m_penGrey,
2322 wxLEFT);
2323 DrawAntiShadedRectSide(dc, *rect, m_penBlack, m_penGrey,
2324 wxRIGHT);
2325 rect->Inflate(-1, 0);
2326 }
2327 else
2328 {
2329 DrawAntiShadedRectSide(dc, *rect, m_penDarkGrey, m_penHighlight,
2330 wxUP);
2331 DrawAntiShadedRectSide(dc, *rect, m_penDarkGrey, m_penHighlight,
2332 wxDOWN);
2333 rect->Inflate(0, -1);
2334
2335 DrawAntiShadedRectSide(dc, *rect, m_penBlack, m_penGrey,
2336 wxUP);
2337 DrawAntiShadedRectSide(dc, *rect, m_penBlack, m_penGrey,
2338 wxDOWN);
2339 rect->Inflate(0, -1);
2340 }
2341}
2342
2343void wxGTKRenderer::DrawScrollbarThumb(wxDC& dc,
2344 wxOrientation orient,
2345 const wxRect& rect,
2346 int flags)
2347{
2348 // the thumb is never pressed never has focus border under GTK and the
2349 // scrollbar background never changes at all
2350 int flagsThumb = flags & ~(wxCONTROL_PRESSED | wxCONTROL_FOCUSED);
2351
2352 // we don't want the border in the direction of the scrollbar movement
2353 wxRect rectThumb = rect;
2354 DrawThumbBorder(dc, &rectThumb, orient);
2355
2356 DrawButtonBorder(dc, rectThumb, flagsThumb, &rectThumb);
2357 DrawBackground(dc, wxNullColour, rectThumb, flagsThumb);
2358}
2359
2360void wxGTKRenderer::DrawScrollbarShaft(wxDC& dc,
2361 wxOrientation orient,
2362 const wxRect& rect,
2363 int flags)
2364{
2365 wxRect rectBar = rect;
2366 DrawThumbBorder(dc, &rectBar, orient);
2367 DoDrawBackground(dc, wxSCHEME_COLOUR(m_scheme, SCROLLBAR), rectBar);
2368}
2369
2370void wxGTKRenderer::DrawScrollCorner(wxDC& dc, const wxRect& rect)
2371{
2372 DoDrawBackground(dc, wxSCHEME_COLOUR(m_scheme, CONTROL), rect);
2373}
2374
2375wxRect wxGTKRenderer::GetScrollbarRect(const wxScrollBar *scrollbar,
2376 wxScrollBar::Element elem,
2377 int thumbPos) const
2378{
2379 // as GTK scrollbars can't be disabled, it makes no sense to remove the
2380 // thumb for a scrollbar with range 0 - instead, make it fill the entire
2381 // scrollbar shaft
2382 if ( (elem == wxScrollBar::Element_Thumb) && !scrollbar->GetRange() )
2383 {
2384 elem = wxScrollBar::Element_Bar_2;
2385 }
2386
2387 return StandardGetScrollbarRect(scrollbar, elem,
2388 thumbPos,
2389 GetScrollbarArrowSize(scrollbar));
2390}
2391
2392wxCoord wxGTKRenderer::GetScrollbarSize(const wxScrollBar *scrollbar)
2393{
2394 return StandardScrollBarSize(scrollbar, GetScrollbarArrowSize(scrollbar));
2395}
2396
2397wxHitTest wxGTKRenderer::HitTestScrollbar(const wxScrollBar *scrollbar,
2398 const wxPoint& pt) const
2399{
2400 return StandardHitTestScrollbar(scrollbar, pt,
2401 GetScrollbarArrowSize(scrollbar));
2402}
2403
2404wxCoord wxGTKRenderer::ScrollbarToPixel(const wxScrollBar *scrollbar,
2405 int thumbPos)
2406{
2407 return StandardScrollbarToPixel(scrollbar, thumbPos,
2408 GetScrollbarArrowSize(scrollbar));
2409}
2410
2411int wxGTKRenderer::PixelToScrollbar(const wxScrollBar *scrollbar,
2412 wxCoord coord)
2413{
2414 return StandardPixelToScrollbar(scrollbar, coord,
2415 GetScrollbarArrowSize(scrollbar));
2416}
2417
2418// ----------------------------------------------------------------------------
2419// size adjustments
2420// ----------------------------------------------------------------------------
2421
2422void wxGTKRenderer::AdjustSize(wxSize *size, const wxWindow *window)
2423{
e4606ed9
VZ
2424#if wxUSE_BMPBUTTON
2425 if ( wxDynamicCast(window, wxBitmapButton) )
2426 {
2427 size->x += 4;
2428 size->y += 4;
2429 } else
2430#endif // wxUSE_BMPBUTTON
2431#if wxUSE_BUTTON
1e6feb95
VZ
2432 if ( wxDynamicCast(window, wxButton) )
2433 {
1b465102
VZ
2434 if ( !(window->GetWindowStyle() & wxBU_EXACTFIT) )
2435 {
2436 // TODO: this is ad hoc...
2437 size->x += 3*window->GetCharWidth();
2438 wxCoord minBtnHeight = 18;
2439 if ( size->y < minBtnHeight )
2440 size->y = minBtnHeight;
2441
2442 // button border width
2443 size->y += 4;
2444 }
e4606ed9 2445 } else
ee1e43a7 2446#endif //wxUSE_BUTTON
e4606ed9 2447 if ( wxDynamicCast(window, wxScrollBar) )
1e6feb95
VZ
2448 {
2449 // we only set the width of vert scrollbars and height of the
2450 // horizontal ones
2451 if ( window->GetWindowStyle() & wxSB_HORIZONTAL )
2452 size->y = m_sizeScrollbarArrow.x;
2453 else
2454 size->x = m_sizeScrollbarArrow.x;
2455 }
2456 else
2457 {
2458 // take into account the border width
2459 wxRect rectBorder = GetBorderDimensions(window->GetBorder());
2460 size->x += rectBorder.x + rectBorder.width;
2461 size->y += rectBorder.y + rectBorder.height;
2462 }
2463}
2464
24a23c35
VS
2465// ----------------------------------------------------------------------------
2466// top level windows
2467// ----------------------------------------------------------------------------
2468
2469void wxGTKRenderer::DrawFrameTitleBar(wxDC& dc,
2470 const wxRect& rect,
2471 const wxString& title,
2472 const wxIcon& icon,
2473 int flags,
813edf09
VS
2474 int specialButton,
2475 int specialButtonFlag)
24a23c35
VS
2476{
2477}
2478
2479void wxGTKRenderer::DrawFrameBorder(wxDC& dc,
2480 const wxRect& rect,
2481 int flags)
2482{
2483}
2484
2485void wxGTKRenderer::DrawFrameBackground(wxDC& dc,
2486 const wxRect& rect,
2487 int flags)
2488{
2489}
2490
2491void wxGTKRenderer::DrawFrameTitle(wxDC& dc,
2492 const wxRect& rect,
2493 const wxString& title,
2494 int flags)
2495{
2496}
2497
2498void wxGTKRenderer::DrawFrameIcon(wxDC& dc,
2499 const wxRect& rect,
2500 const wxIcon& icon,
2501 int flags)
2502{
2503}
2504
2505void wxGTKRenderer::DrawFrameButton(wxDC& dc,
2506 wxCoord x, wxCoord y,
2507 int button,
2e9f62da 2508 int flags)
24a23c35
VS
2509{
2510}
2511
2512wxRect wxGTKRenderer::GetFrameClientArea(const wxRect& rect, int flags) const
2513{
2514 return rect;
2515}
2516
2517wxSize wxGTKRenderer::GetFrameTotalSize(const wxSize& clientSize, int flags) const
2518{
2519 return clientSize;
2520}
2521
e7dda1ff
VS
2522wxSize wxGTKRenderer::GetFrameMinSize(int flags) const
2523{
2524 return wxSize(0,0);
2525}
2526
24a23c35
VS
2527wxSize wxGTKRenderer::GetFrameIconSize() const
2528{
2529 return wxSize(-1, -1);
2530}
2531
813edf09
VS
2532int wxGTKRenderer::HitTestFrame(const wxRect& rect, const wxPoint& pt, int flags) const
2533{
2534 return wxHT_TOPLEVEL_CLIENT_AREA;
2535}
2536
24a23c35 2537
63f06c22
VS
2538// ----------------------------------------------------------------------------
2539// standard icons
2540// ----------------------------------------------------------------------------
2541
2542static char *error_xpm[] = {
2543/* columns rows colors chars-per-pixel */
2544"48 48 537 2",
2545" c Gray0",
2546". c #000001010101",
2547"X c #010101010101",
2548"o c #010102020202",
2549"O c #020202020202",
2550"+ c #020203030303",
2551"@ c #030302020202",
2552"# c Gray1",
2553"$ c #020204040404",
2554"% c #030304040404",
2555"& c #070703030202",
2556"* c #040404040404",
2557"= c #040405050505",
2558"- c Gray2",
2559"; c #050507070707",
2560": c #060606060606",
2561"> c #060607070707",
2562", c #070707070707",
2563"< c #070709090909",
2564"1 c #0c0c04040303",
2565"2 c #0d0d04040404",
2566"3 c #0d0d05050404",
2567"4 c Gray3",
2568"5 c #080809090909",
2569"6 c #090909090909",
2570"7 c #0b0b0b0b0b0b",
2571"8 c #0a0a0d0d0d0d",
2572"9 c #0b0b0d0d0d0d",
2573"0 c #0c0c0c0c0c0c",
2574"q c Gray5",
2575"w c #0d0d0f0f1010",
2576"e c #101006060505",
2577"r c #141404040303",
2578"t c #141407070606",
2579"y c #171707070606",
2580"u c #1d1d09090707",
2581"i c #181809090808",
2582"p c #1d1d09090808",
2583"a c #1e1e0a0a0808",
2584"s c #1e1e0b0b0909",
2585"d c #101010101010",
2586"f c #101011111212",
2587"g c Gray7",
2588"h c #131313131313",
2589"j c Gray9",
2590"k c #181818181818",
2591"l c #191919191919",
2592"z c Gray11",
2593"x c #1d1d1d1d1d1d",
2594"c c Gray12",
2595"v c #24240b0b0a0a",
2596"b c #27270d0d0b0b",
2597"n c #2b2b0e0e0c0c",
2598"m c #2d2d0e0e0b0b",
2599"M c #30300e0e0b0b",
2600"N c #33330d0d0909",
2601"B c #3a3a0f0f0b0b",
2602"V c #333310100e0e",
2603"C c #373710100d0d",
2604"Z c #373711110e0e",
2605"A c #363612120f0f",
2606"S c #3d3d13130f0f",
2607"D c #363612121010",
2608"F c Gray14",
2609"G c #252525252525",
2610"H c #2a2a2a2a2a2a",
2611"J c Gray18",
2612"K c #323232323232",
2613"L c Gray20",
2614"P c Gray22",
2615"I c #3f3f3f3f3f3f",
2616"U c #414113130e0e",
2617"Y c #414113130f0f",
2618"T c #404013131010",
2619"R c #404014141111",
2620"E c #404015151212",
2621"W c #4d4d17171212",
2622"Q c #4e4e18181313",
2623"! c #4e4e18181414",
2624"~ c #4e4e19191515",
2625"^ c #4e4e1a1a1616",
2626"/ c #57571b1b1515",
2627"( c #595917171010",
2628") c #5b5b1a1a1313",
2629"_ c #58581b1b1616",
2630"` c #58581c1c1717",
2631"' c #5c5c1e1e1a1a",
2632"] c #5c5c1f1f1b1b",
2633"[ c #6e6e19190f0f",
2634"{ c #67671c1c1616",
2635"} c #6b6b1b1b1212",
2636"| c #68681e1e1717",
2637" . c #6e6e1e1e1616",
2638".. c #79791e1e1515",
2639"X. c #666622221d1d",
2640"o. c #6b6b24241e1e",
2641"O. c #6c6c22221d1d",
2642"+. c #6d6d24241f1f",
2643"@. c #7d7d23231c1c",
2644"#. c #727226262020",
2645"$. c #757526262020",
2646"%. c #777728282222",
2647"&. c #7f7f28282121",
2648"*. c #484848484848",
2649"=. c Gray33",
2650"-. c #555555555555",
2651";. c #656565656565",
2652":. c Gray",
2653">. c #94941f1f1212",
2654",. c #96961f1f1111",
2655"<. c #98981f1f1111",
2656"1. c #818126261e1e",
2657"2. c #858523231919",
2658"3. c #858525251c1c",
2659"4. c #878728281e1e",
2660"5. c #898921211717",
2661"6. c #8a8a22221616",
2662"7. c #8b8b25251c1c",
2663"8. c #8c8c27271d1d",
2664"9. c #888828281f1f",
2665"0. c #8a8a29291f1f",
2666"q. c #959520201111",
2667"w. c #969620201111",
2668"e. c #949424241717",
2669"r. c #969624241717",
2670"t. c #909024241919",
2671"y. c #929225251919",
2672"u. c #929225251b1b",
2673"i. c #959526261b1b",
2674"p. c #969624241818",
2675"a. c #90902a2a1f1f",
2676"s. c #969629291f1f",
2677"d. c #9b9b20201313",
2678"f. c #999924241616",
2679"g. c #9c9c21211212",
2680"h. c #9f9f21211212",
2681"j. c #9d9d22221414",
2682"k. c #9d9d23231414",
2683"l. c #9c9c23231616",
2684"z. c #989827271b1b",
2685"x. c #999927271b1b",
2686"c. c #9a9a26261b1b",
2687"v. c #989827271c1c",
2688"b. c #9c9c25251818",
2689"n. c #9c9c27271b1b",
2690"m. c #9d9d27271b1b",
2691"M. c #999928281c1c",
2692"N. c #999929291e1e",
2693"B. c #9b9b28281c1c",
2694"V. c #9b9b28281d1d",
2695"C. c #9a9a29291e1e",
2696"Z. c #9a9a2a2a1e1e",
2697"A. c #9a9a2b2b1f1f",
2698"S. c #9b9b2a2a1f1f",
2699"D. c #9c9c28281c1c",
2700"F. c #9e9e29291f1f",
2701"G. c #9f9f29291e1e",
2702"H. c #9e9e2a2a1e1e",
2703"J. c #83832b2b2424",
2704"K. c #83832c2c2525",
2705"L. c #84842a2a2424",
2706"P. c #8b8b29292121",
2707"I. c #89892b2b2424",
2708"U. c #8b8b2c2c2626",
2709"Y. c #8f8f2a2a2222",
2710"T. c #8f8f2b2b2323",
2711"R. c #8d8d2e2e2828",
2712"E. c #8f8f2f2f2828",
2713"W. c #8f8f38383232",
2714"Q. c #919129292020",
2715"!. c #90902b2b2222",
2716"~. c #91912d2d2525",
2717"^. c #90902d2d2626",
2718"/. c #969629292020",
2719"(. c #95952c2c2323",
2720"). c #97972c2c2222",
2721"_. c #94942d2d2525",
2722"`. c #94942e2e2626",
2723"'. c #97972d2d2525",
2724"]. c #96962e2e2424",
2725"[. c #97972e2e2626",
2726"{. c #97972f2f2727",
2727"}. c #99992b2b2020",
2728"|. c #99992c2c2121",
2729" X c #98982d2d2323",
2730".X c #99992c2c2222",
2731"XX c #9b9b2c2c2121",
2732"oX c #9a9a2c2c2323",
2733"OX c #98982d2d2424",
2734"+X c #98982e2e2525",
2735"@X c #98982e2e2626",
2736"#X c #9d9d2b2b2121",
2737"$X c #9e9e2a2a2020",
2738"%X c #9c9c2c2c2121",
2739"&X c #9c9c2d2d2323",
2740"*X c #9d9d2e2e2323",
2741"=X c #9f9f2d2d2323",
2742"-X c #9e9e2e2e2020",
2743";X c #9f9f2e2e2323",
2744":X c #9c9c2d2d2424",
2745">X c #9d9d2f2f2525",
2746",X c #9c9c2f2f2626",
2747"<X c #9d9d2f2f2626",
2748"1X c #9f9f2e2e2424",
2749"2X c #9f9f2f2f2525",
2750"3X c #9f9f2f2f2626",
2751"4X c #939330302828",
2752"5X c #909036362f2f",
2753"6X c #949430302929",
2754"7X c #959530302828",
2755"8X c #949430302a2a",
2756"9X c #969630302828",
2757"0X c #969630302929",
2758"qX c #9d9d30302727",
2759"wX c #9e9e30302626",
2760"eX c #9e9e30302727",
2761"rX c #9e9e31312727",
2762"tX c #9f9f30302626",
2763"yX c #989831312929",
2764"uX c #9a9a30302929",
2765"iX c #9a9a31312a2a",
2766"pX c #9a9a32322a2a",
2767"aX c #9d9d31312929",
2768"sX c #9d9d32322929",
2769"dX c #9c9c32322a2a",
2770"fX c #9d9d32322a2a",
2771"gX c #9d9d33332a2a",
2772"hX c #9d9d33332b2b",
2773"jX c #9e9e31312828",
2774"kX c #9e9e31312929",
2775"lX c #9f9f31312828",
2776"zX c #9e9e32322929",
2777"xX c #9f9f32322a2a",
2778"cX c #9f9f33332a2a",
2779"vX c #9f9f33332b2b",
2780"bX c #9d9d3a3a3232",
2781"nX c #9f9f39393030",
2782"mX c #9f9f3e3e3636",
2783"MX c #a3a323231313",
2784"NX c #a0a022221414",
2785"BX c #a2a223231414",
2786"VX c #a0a024241616",
2787"CX c #a4a422221212",
2788"ZX c #a4a423231313",
2789"AX c #a5a522221212",
2790"SX c #a6a622221212",
2791"DX c #a6a622221313",
2792"FX c #a7a722221212",
2793"GX c #a4a424241515",
2794"HX c #a5a525251616",
2795"JX c #a7a724241414",
2796"KX c #a7a724241515",
2797"LX c #a6a625251717",
2798"PX c #a7a725251616",
2799"IX c #a7a725251717",
2800"UX c #a6a626261717",
2801"YX c #a0a025251818",
2802"TX c #a3a325251818",
2803"RX c #a2a226261818",
2804"EX c #a3a326261818",
2805"WX c #a2a227271a1a",
2806"QX c #a2a227271b1b",
2807"!X c #a3a327271a1a",
2808"~X c #a5a527271919",
2809"^X c #a5a527271a1a",
2810"/X c #a6a626261818",
2811"(X c #a6a627271818",
2812")X c #a6a627271919",
2813"_X c #a3a328281b1b",
2814"`X c #a1a128281c1c",
2815"'X c #a1a129291d1d",
2816"]X c #a1a129291e1e",
2817"[X c #a0a02a2a1f1f",
2818"{X c #a1a12a2a1f1f",
2819"}X c #a2a228281c1c",
2820"|X c #a2a229291c1c",
2821" o c #a3a32b2b1f1f",
2822".o c #a5a528281a1a",
2823"Xo c #a5a528281b1b",
2824"oo c #a5a529291b1b",
2825"Oo c #a4a429291c1c",
2826"+o c #a4a429291d1d",
2827"@o c #a5a529291c1c",
2828"#o c #a5a529291d1d",
2829"$o c #a4a42a2a1d1d",
2830"%o c #a4a42a2a1e1e",
2831"&o c #a4a42b2b1e1e",
2832"*o c #a4a42b2b1f1f",
2833"=o c #a9a921211010",
2834"-o c #a9a921211111",
2835";o c #a8a822221111",
2836":o c #a9a922221111",
2837">o c #a8a822221212",
2838",o c #a8a823231212",
2839"<o c #a8a823231313",
2840"1o c #abab23231313",
2841"2o c #a8a823231414",
2842"3o c #a9a924241313",
2843"4o c #a8a824241414",
2844"5o c #acac22221111",
2845"6o c #aeae22221212",
2846"7o c #aeae23231212",
2847"8o c #afaf24241313",
2848"9o c #a9a927271818",
2849"0o c #abab27271919",
2850"qo c #a8a829291b1b",
2851"wo c #abab28281a1a",
2852"eo c #a8a829291c1c",
2853"ro c #a8a82a2a1d1d",
2854"to c #abab29291c1c",
2855"yo c #adad29291b1b",
2856"uo c #adad2a2a1b1b",
2857"io c #aeae28281a1a",
2858"po c #adad2b2b1d1d",
2859"ao c #b1b123231111",
2860"so c #b3b323231010",
2861"do c #b3b323231111",
2862"fo c #b1b126261515",
2863"go c #b1b126261717",
2864"ho c #b2b225251414",
2865"jo c #b6b624241212",
2866"ko c #b5b525251414",
2867"lo c #b5b526261515",
2868"zo c #b4b427271717",
2869"xo c #b1b127271818",
2870"co c #b3b32a2a1a1a",
2871"vo c #b6b628281919",
2872"bo c #b7b728281919",
2873"no c #b5b52a2a1c1c",
2874"mo c #b4b42c2c1d1d",
2875"Mo c #b9b923231111",
2876"No c #bbbb25251313",
2877"Bo c #baba26261414",
2878"Vo c #bebe25251212",
2879"Co c #bdbd27271616",
2880"Zo c #baba2b2b1a1a",
2881"Ao c #bcbc2a2a1818",
2882"So c #bebe2b2b1b1b",
2883"Do c #bdbd2c2c1d1d",
2884"Fo c #a0a02a2a2020",
2885"Go c #a0a02b2b2020",
2886"Ho c #a2a22b2b2020",
2887"Jo c #a0a02c2c2020",
2888"Ko c #a0a02c2c2121",
2889"Lo c #a0a02d2d2222",
2890"Po c #a0a02d2d2323",
2891"Io c #a1a12d2d2222",
2892"Uo c #a0a02e2e2323",
2893"Yo c #a1a12f2f2222",
2894"To c #a2a22d2d2121",
2895"Ro c #a3a32c2c2020",
2896"Eo c #a3a32c2c2121",
2897"Wo c #a3a32d2d2121",
2898"Qo c #a2a22d2d2222",
2899"!o c #a2a22e2e2323",
2900"~o c #a0a02e2e2424",
2901"^o c #a0a02f2f2525",
2902"/o c #a1a12f2f2424",
2903"(o c #a1a12f2f2525",
2904")o c #a2a22e2e2424",
2905"_o c #a2a22f2f2424",
2906"`o c #a9a92f2f2020",
2907"'o c #aaaa2f2f2020",
2908"]o c #a0a031312727",
2909"[o c #a1a130302626",
2910"{o c #a1a130302727",
2911"}o c #a0a031312828",
2912"|o c #a0a032322929",
2913" O c #a0a032322a2a",
2914".O c #a1a137372d2d",
2915"XO c #a2a236362c2c",
2916"oO c #a6a636362b2b",
2917"OO c #a3a338382e2e",
2918"+O c #a7a739392f2f",
2919"@O c #a7a73a3a2f2f",
2920"#O c #abab32322424",
2921"$O c #abab32322525",
2922"%O c #aaaa33332626",
2923"&O c #aaaa33332727",
2924"*O c #abab33332626",
2925"=O c #aaaa34342727",
2926"-O c #acac30302121",
2927";O c #acac30302222",
2928":O c #acac31312323",
2929">O c #a9a935352929",
2930",O c #a9a936362a2a",
2931"<O c #a9a936362b2b",
2932"1O c #a9a937372b2b",
2933"2O c #aaaa34342828",
2934"3O c #aaaa35352929",
2935"4O c #a8a837372c2c",
2936"5O c #a9a937372c2c",
2937"6O c #a8a838382d2d",
2938"7O c #a8a838382e2e",
2939"8O c #a8a839392e2e",
2940"9O c #a9a93f3f2f2f",
2941"0O c #a2a23b3b3232",
2942"qO c #a2a23d3d3535",
2943"wO c #a2a23e3e3636",
2944"eO c #a6a63b3b3131",
2945"rO c #a5a53d3d3434",
2946"tO c #a5a53e3e3535",
2947"yO c #afaf3f3f3333",
2948"uO c #c3c325251212",
2949"iO c #c3c326261313",
2950"pO c #c3c327271414",
2951"aO c #c7c728281616",
2952"sO c #c6c62c2c1a1a",
2953"dO c #c7c72e2e1d1d",
2954"fO c #cdcd2e2e1c1c",
2955"gO c #cfcf2f2f1c1c",
2956"hO c #d0d028281313",
2957"jO c #d3d329291414",
2958"kO c #d5d529291313",
2959"lO c #d0d02e2e1b1b",
2960"zO c #d8d829291414",
2961"xO c #dddd2a2a1414",
2962"cO c #dddd2d2d1717",
2963"vO c #dfdf30301c1c",
2964"bO c #e2e22b2b1515",
2965"nO c #ebeb2d2d1414",
2966"mO c #eded2e2e1717",
2967"MO c #e4e431311b1b",
2968"NO c #e9e930301a1a",
2969"BO c #ebeb31311b1b",
2970"VO c #e8e833331d1d",
2971"CO c #e9e932321c1c",
2972"ZO c #ebeb33331e1e",
2973"AO c #eeee30301a1a",
2974"SO c #eeee32321b1b",
2975"DO c #eaea3a3a1b1b",
2976"FO c #f1f132321b1b",
2977"GO c #f3f331311919",
2978"HO c #f7f732321b1b",
2979"JO c #f6f636361b1b",
2980"KO c #f6f638381c1c",
2981"LO c #fcfc30301717",
2982"PO c #fefe33331717",
2983"IO c #ffff32321616",
2984"UO c #fdfd35351717",
2985"YO c #ffff34341717",
2986"TO c #fafa30301919",
2987"RO c #fafa31311818",
2988"EO c #fafa36361919",
2989"WO c #fdfd33331919",
2990"QO c #ffff33331818",
2991"!O c #fdfd35351818",
2992"~O c #fafa3c3c1a1a",
2993"^O c #fafa3d3d1a1a",
2994"/O c #fbfb3d3d1d1d",
2995"(O c #fdfd38381919",
2996")O c #fcfc39391a1a",
2997"_O c #ffff3a3a1a1a",
2998"`O c #ffff3f3f1b1b",
2999"'O c #ffff3c3c1d1d",
3000"]O c #ffff3e3e1d1d",
3001"[O c #c1c178782e2e",
3002"{O c #ffff40401e1e",
3003"}O c #d4d48d8d1d1d",
3004"|O c #cdcd86862222",
3005" + c #c1c181813838",
3006".+ c #c7c79d9d3737",
3007"X+ c #c5c59c9c3939",
3008"o+ c #c4c49c9c3a3a",
3009"O+ c #c8c89b9b3030",
3010"++ c #cbcb9d9d3131",
3011"@+ c #caca9e9e3434",
3012"#+ c #cccc9d9d3030",
3013"$+ c #cccc9f9f3232",
3014"%+ c #cbcba0a03737",
3015"&+ c #cfcfa3a33737",
3016"*+ c #cfcfa3a33838",
3017"=+ c #cfcfa5a53e3e",
3018"-+ c #d5d5a8a82e2e",
3019";+ c #dadaa8a82f2f",
3020":+ c #dadaacac2f2f",
3021">+ c #dbdbacac2e2e",
3022",+ c #dddda8a82a2a",
3023"<+ c #ddddacac2a2a",
3024"1+ c #dedeadad2929",
3025"2+ c #dfdfaeae2828",
3026"3+ c #dcdcadad2d2d",
3027"4+ c #d0d0a1a13131",
3028"5+ c #d1d1a2a23030",
3029"6+ c #d1d1a3a33333",
3030"7+ c #d2d2a3a33232",
3031"8+ c #d3d3a3a33232",
3032"9+ c #d3d3a4a43333",
3033"0+ c #d1d1a4a43636",
3034"q+ c #d1d1a4a43737",
3035"w+ c #d2d2a4a43535",
3036"e+ c #d2d2a4a43636",
3037"r+ c #d5d5a5a53333",
3038"t+ c #d5d5a6a63434",
3039"y+ c #d4d4a6a63737",
3040"u+ c #d6d6a7a73535",
3041"i+ c #d7d7a7a73434",
3042"p+ c #d2d2a5a53939",
3043"a+ c #d3d3a6a63838",
3044"s+ c #d3d3a6a63a3a",
3045"d+ c #d0d0a5a53d3d",
3046"f+ c #d1d1a5a53c3c",
3047"g+ c #d0d0a5a53f3f",
3048"h+ c #d8d8a7a73333",
3049"j+ c #d9d9a8a83232",
3050"k+ c #d9d9acac3232",
3051"l+ c #dfdfadad3636",
3052"z+ c #d9d9abab3e3e",
3053"x+ c #dadaaeae3939",
3054"c+ c #dbdbafaf3a3a",
3055"v+ c #dadaacac3f3f",
3056"b+ c #dbdbadad3e3e",
3057"n+ c #dfdfb1b13535",
3058"m+ c #dfdfb0b03636",
3059"M+ c #dcdcb0b03b3b",
3060"N+ c #ddddb0b03a3a",
3061"B+ c #dedeb1b13939",
3062"V+ c #e3e3afaf2222",
3063"C+ c #e0e0adad2525",
3064"Z+ c #e1e1aeae2424",
3065"A+ c #e4e4afaf2121",
3066"S+ c #e2e2b2b23232",
3067"D+ c #e0e0b2b23434",
3068"F+ c #cfcfa5a54040",
3069"G+ c #d3d3aaaa4747",
3070"H+ c #d5d5abab4343",
3071"J+ c #d6d6abab4242",
3072"K+ c #d4d4aaaa4444",
3073"L+ c #d2d2aaaa4848",
3074"P+ c #d8d8acac4040",
3075"I+ c #dfdfb4b44545",
3076"U+ c #fbfbfbfbfbfb",
3077"Y+ c Gray99",
3078"T+ c #fdfdfdfdfdfd",
3079"R+ c #fefefefefefe",
3080"E+ c Gray100",
3081"W+ c None",
3082/* pixels */
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+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+",
3085"W+W+W+W+W+W+W+W+W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W+",
3117"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+",
3118"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+",
3119"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+",
3120"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+",
3121"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+",
3122"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+",
3123"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+",
3124"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+",
3125"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+",
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+E+E+E+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+",
3127"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+",
3128"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+",
3129"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+",
3130"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+"
3131};
3132
3133static char *info_xpm[] = {
3134/* columns rows colors chars-per-pixel */
3135"48 48 478 2",
3136" c Gray0",
3137". c #010101010101",
3138"X c #020202020202",
3139"o c #050505050404",
3140"O c Gray2",
3141"+ c #080808080707",
3142"@ c #090909090808",
3143"# c #0b0b0b0b0909",
3144"$ c #0b0b0b0b0b0b",
3145"% c #0c0c0c0c0b0b",
3146"& c #0d0d0d0d0a0a",
3147"* c #0c0c0c0c0c0c",
3148"= c #0f0f0e0e0c0c",
3149"- c #0f0f0f0f0e0e",
3150"; c Gray6",
3151": c #101010100e0e",
3152"> c #121212120f0f",
3153", c #101010101010",
3154"< c #121212121111",
3155"1 c #131313131111",
3156"2 c #131313131313",
3157"3 c #141414141111",
3158"4 c #141414141212",
3159"5 c #161616161313",
3160"6 c #161616161414",
3161"7 c #1a1a1a1a1717",
3162"8 c #1d1d1d1d1616",
3163"9 c #191919191919",
3164"0 c #1e1e1e1e1e1e",
3165"q c #20201d1d1313",
3166"w c #202020201c1c",
3167"e c #212121211d1d",
3168"r c #212120201e1e",
3169"t c #232323231f1f",
3170"y c #242421211919",
3171"u c Gray15",
3172"i c #272727272727",
3173"p c #2a2a2a2a2727",
3174"a c #282828282828",
3175"s c #2a2a2a2a2a2a",
3176"d c #2c2c2c2c2a2a",
3177"f c #2f2f2f2f2929",
3178"g c #2d2d2d2d2d2d",
3179"h c Gray18",
3180"j c #313131312b2b",
3181"k c #303030302f2f",
3182"l c #333333332f2f",
3183"z c #353535352e2e",
3184"x c #383835352626",
3185"c c #3b3b37372424",
3186"v c #333333333131",
3187"b c Gray20",
3188"n c #343434343434",
3189"m c #353535353535",
3190"M c #393937373232",
3191"N c #383838383737",
3192"B c #3d3d3d3d3535",
3193"V c Gray23",
3194"C c #3e3e3e3e3e3e",
3195"Z c #42423f3f3636",
3196"A c #434340403232",
3197"S c #424242423a3a",
3198"D c #434343433d3d",
3199"F c #444444443b3b",
3200"G c #474744443939",
3201"H c #4f4f49493838",
3202"J c #4d4d49493c3c",
3203"K c #434343434242",
3204"L c #434343434343",
3205"P c #474747474242",
3206"I c #464646464444",
3207"U c #464646464646",
3208"Y c Gray28",
3209"T c #4b4b4b4b4444",
3210"R c #4d4d4c4c4747",
3211"E c #4e4e4e4e4545",
3212"W c #494949494949",
3213"Q c #4b4b4b4b4b4b",
3214"! c #4e4e4e4e4e4e",
3215"~ c #4f4f4f4f4e4e",
3216"^ c #525252524848",
3217"/ c #525252524949",
3218"( c #555555554e4e",
3219") c #565656564f4f",
3220"_ c #5a5a59594c4c",
3221"` c #5f5f5c5c4f4f",
3222"' c Gray32",
3223"] c Gray33",
3224"[ c #585858585151",
3225"{ c #585858585858",
3226"} c #595959595858",
3227"| c #5c5c5c5c5b5b",
3228" . c #5f5f5e5e5959",
3229".. c #6d6d66664d4d",
3230"X. c #646461615959",
3231"o. c #71716d6d5b5b",
3232"O. c #797971715757",
3233"+. c #626262626262",
3234"@. c Gray39",
3235"#. c #646464646464",
3236"$. c #696969696464",
3237"%. c #6d6d6d6d6464",
3238"&. c #696969696868",
3239"*. c #6b6b6b6b6a6a",
3240"=. c #6d6d6d6d6d6d",
3241"-. c #6f6f6f6f6f6f",
3242";. c #73736f6f6161",
3243":. c #707070706b6b",
3244">. c #717171716f6f",
3245",. c #757575756c6c",
3246"<. c #797976766c6c",
3247"1. c #7f7f7a7a6464",
3248"2. c Gray45",
3249"3. c #757575757171",
3250"4. c #7b7b7b7b7a7a",
3251"5. c #7b7b7b7b7b7b",
3252"6. c #7f7f7f7f7b7b",
3253"7. c Gray49",
3254"8. c #818179795959",
3255"9. c #808079795f5f",
3256"0. c #8f8f82825555",
3257"q. c #959588885757",
3258"w. c #9b9b8c8c5a5a",
3259"e. c #929289896363",
3260"r. c #9d9d91916464",
3261"t. c #a9a999995959",
3262"y. c #abab9b9b5b5b",
3263"u. c #b3b3a0a05e5e",
3264"i. c #a9a9a0a07777",
3265"p. c #aeaea4a47575",
3266"a. c #b9b9a9a96464",
3267"s. c #babaa8a86464",
3268"d. c #b7b7aaaa7c7c",
3269"f. c #c1c1aeae6767",
3270"g. c #c4c4b2b26969",
3271"h. c #c4c4b3b36b6b",
3272"j. c #c6c6b3b36a6a",
3273"k. c #c9c9b7b76d6d",
3274"l. c #ccccb9b96e6e",
3275"z. c #c1c1b3b37272",
3276"x. c #c2c2b0b07171",
3277"c. c #c6c6b6b67777",
3278"v. c #cacab8b87171",
3279"b. c #cdcdbcbc7070",
3280"n. c #d1d1bcbc7070",
3281"m. c #d1d1bfbf7373",
3282"M. c #d1d1c0c07676",
3283"N. c #d9d9c5c57777",
3284"B. c #d9d9c6c67777",
3285"V. c #dadac7c77777",
3286"C. c #d9d9c6c67979",
3287"Z. c #dbdbc7c77c7c",
3288"A. c #dbdbc8c87878",
3289"S. c #dbdbc9c97c7c",
3290"D. c #dadac8c87e7e",
3291"F. c #dbdbc9c97e7e",
3292"G. c #e2e2cdcd7f7f",
3293"H. c #e4e4d0d07e7e",
3294"J. c #e4e4d0d07f7f",
3295"K. c #e4e4d1d17e7e",
3296"L. c #e6e6d2d27e7e",
3297"P. c #818181818181",
3298"I. c #838383838383",
3299"U. c #848484848484",
3300"Y. c Gray53",
3301"T. c #898987878282",
3302"R. c #8d8d8d8d8585",
3303"E. c #8d8d8d8d8787",
3304"W. c #929292928d8d",
3305"Q. c #969696968e8e",
3306"!. c #989895958585",
3307"~. c #9b9b95958484",
3308"^. c #929292929292",
3309"/. c #939393939393",
3310"(. c Gray58",
3311"). c Gray60",
3312"_. c #9d9d9d9d9999",
3313"`. c #9e9e9e9e9a9a",
3314"'. c #a2a29c9c8484",
3315"]. c None",
3316"[. c #b8b8b0b09595",
3317"{. c #a0a0a0a0a0a0",
3318"}. c Gray63",
3319"|. c #a5a5a5a5a5a5",
3320" X c #a7a7a7a7a7a7",
3321".X c #a9a9a9a9a4a4",
3322"XX c #aeaeaeaea9a9",
3323"oX c #babab6b6a9a9",
3324"OX c #b3b3b3b3b0b0",
3325"+X c #b3b3b3b3b1b1",
3326"@X c #b4b4b4b4b2b2",
3327"#X c #b4b4b4b4b4b4",
3328"$X c #b6b6b6b6b6b6",
3329"%X c #b9b9b9b9b1b1",
3330"&X c Gray73",
3331"*X c #bbbbbbbbbbbb",
3332"=X c #bcbcbcbcb9b9",
3333"-X c Gray75",
3334";X c #c1c1b9b99999",
3335":X c #c2c2bebeafaf",
3336">X c #d7d7c4c48080",
3337",X c #d8d8c7c78e8e",
3338"<X c #dfdfcbcb8080",
3339"1X c #dcdccbcb8484",
3340"2X c #d7d7c8c89696",
3341"3X c #c4c4c4c4b5b5",
3342"4X c #c8c8c8c8b9b9",
3343"5X c #cbcbcbcbbcbc",
3344"6X c #dfdfd2d2a9a9",
3345"7X c #e0e0cece8a8a",
3346"8X c #e3e3d1d18686",
3347"9X c #e7e7d1d18080",
3348"0X c #e5e5d1d18787",
3349"qX c #e7e7d4d48080",
3350"wX c #e5e5d4d48d8d",
3351"eX c #e6e6d6d68c8c",
3352"rX c #eeeed6d68181",
3353"tX c #efefd7d78282",
3354"yX c #e8e8d6d68b8b",
3355"uX c #e8e8d4d48d8d",
3356"iX c #ececd7d78c8c",
3357"pX c #efefd8d88181",
3358"aX c #efefd8d88282",
3359"sX c #efefd9d98686",
3360"dX c #eeeedbdb8b8b",
3361"fX c #eeeedada8d8d",
3362"gX c #efefdada8e8e",
3363"hX c #efefdcdc8b8b",
3364"jX c #efefdddd8f8f",
3365"kX c #eaeadada9191",
3366"lX c #e9e9dada9696",
3367"zX c #ededd9d99090",
3368"xX c #efefdddd9292",
3369"cX c #efefdddd9393",
3370"vX c #ebebdbdb9999",
3371"bX c #f1f1dcdc8686",
3372"nX c #f3f3dede8787",
3373"mX c #f4f4dede8787",
3374"MX c #f2f2dcdc8a8a",
3375"NX c #f3f3dfdf8d8d",
3376"BX c #f0f0dcdc9191",
3377"VX c #f1f1dcdc9292",
3378"CX c #f0f0dfdf9292",
3379"ZX c #f0f0dddd9c9c",
3380"AX c #f1f1dfdfa1a1",
3381"SX c #f1f1e0e08e8e",
3382"DX c #f6f6e3e38f8f",
3383"FX c #f7f7e5e58f8f",
3384"GX c #f2f2e0e09090",
3385"HX c #f2f2e0e09393",
3386"JX c #f3f3e0e09393",
3387"KX c #f3f3e2e29090",
3388"LX c #f1f1e1e19595",
3389"PX c #f2f2e0e09797",
3390"IX c #f3f3e2e29595",
3391"UX c #f3f3e2e29696",
3392"YX c #f4f4e1e19191",
3393"TX c #f5f5e1e19090",
3394"RX c #f5f5e3e39191",
3395"EX c #f5f5e2e29393",
3396"WX c #f5f5e3e39393",
3397"QX c #f4f4e3e39595",
3398"!X c #f6f6e5e59191",
3399"~X c #f6f6e4e49393",
3400"^X c #f6f6e5e59393",
3401"/X c #f7f7e4e49393",
3402"(X c #f7f7e6e69191",
3403")X c #f6f6e4e49696",
3404"_X c #f7f7e6e69595",
3405"`X c #f6f6e6e69797",
3406"'X c #f1f1e1e19b9b",
3407"]X c #f2f2e2e29a9a",
3408"[X c #f4f4e2e29898",
3409"{X c #f6f6e4e49898",
3410"}X c #f6f6e4e49999",
3411"|X c #f6f6e5e59b9b",
3412" o c #f4f4e4e49d9d",
3413".o c #f5f5e4e49c9c",
3414"Xo c #f6f6e5e59d9d",
3415"oo c #f7f7e6e69f9f",
3416"Oo c #f8f8e6e69191",
3417"+o c #f8f8e7e79191",
3418"@o c #f8f8e7e79393",
3419"#o c #f8f8e7e79595",
3420"$o c #f8f8e7e79696",
3421"%o c #f9f9e8e89b9b",
3422"&o c #f9f9e9e99b9b",
3423"*o c #f9f9e8e89e9e",
3424"=o c #edede7e7baba",
3425"-o c #f1f1e3e3a4a4",
3426";o c #f3f3e3e3a7a7",
3427":o c #f2f2e4e4a1a1",
3428">o c #f3f3e4e4a1a1",
3429",o c #f3f3e6e6a3a3",
3430"<o c #f4f4e5e5a0a0",
3431"1o c #f5f5e4e4a3a3",
3432"2o c #f5f5e7e7a2a2",
3433"3o c #f6f6e6e6a0a0",
3434"4o c #f7f7e7e7a0a0",
3435"5o c #f7f7e7e7a5a5",
3436"6o c #f6f6e7e7a7a7",
3437"7o c #f1f1e6e6adad",
3438"8o c #f3f3e6e6adad",
3439"9o c #f3f3e7e7adad",
3440"0o c #f7f7e8e8a6a6",
3441"qo c #f7f7e8e8a7a7",
3442"wo c #f7f7eaeaafaf",
3443"eo c #f9f9e9e9a7a7",
3444"ro c #fafaeaeaa6a6",
3445"to c #f8f8e8e8a9a9",
3446"yo c #f8f8eaeaaeae",
3447"uo c #f8f8eaeaafaf",
3448"io c #fafaececafaf",
3449"po c #f4f4e7e7b2b2",
3450"ao c #f5f5e7e7b2b2",
3451"so c #f4f4e7e7bbbb",
3452"do c #f7f7ebebb1b1",
3453"fo c #f4f4e9e9bbbb",
3454"go c #f6f6ebebbebe",
3455"ho c #f8f8ebebb1b1",
3456"jo c #f9f9ebebb1b1",
3457"ko c #fafaededb7b7",
3458"lo c #f8f8ececb8b8",
3459"zo c #f8f8ececb9b9",
3460"xo c #f8f8ededbaba",
3461"co c #fafaeeeebbbb",
3462"vo c #c2c2c2c2c1c1",
3463"bo c #c3c3c3c3c1c1",
3464"no c Gray76",
3465"mo c #c3c3c3c3c2c2",
3466"Mo c #c7c7c7c7c5c5",
3467"No c #cacacacac4c4",
3468"Bo c Gray79",
3469"Vo c #cacacacacaca",
3470"Co c #cbcbcbcbcbcb",
3471"Zo c #cfcfcfcfc8c8",
3472"Ao c Gray80",
3473"So c #cfcfcfcfcece",
3474"Do c #d8d8d8d8cdcd",
3475"Fo c #ddddd9d9caca",
3476"Go c #d4d4d4d4d1d1",
3477"Ho c #d7d7d7d7d3d3",
3478"Jo c #d5d5d5d5d5d5",
3479"Ko c Gray85",
3480"Lo c #dadadadad8d8",
3481"Po c #dadadadadada",
3482"Io c gainsboro",
3483"Uo c #dddddddddddd",
3484"Yo c #dededededddd",
3485"To c #dfdfdfdfdede",
3486"Ro c #e0e0e0e0d7d7",
3487"Eo c #e5e5e5e5dddd",
3488"Wo c #f3f3eaeac1c1",
3489"Qo c #f4f4e9e9c1c1",
3490"!o c #f5f5e9e9c2c2",
3491"~o c #f4f4e9e9c4c4",
3492"^o c #f7f7eeeec3c3",
3493"/o c #f4f4eaeac9c9",
3494"(o c #f4f4eaeacaca",
3495")o c #f9f9efefcbcb",
3496"_o c #f8f8efefcfcf",
3497"`o c #f7f7efefd0d0",
3498"'o c #f7f7eeeed9d9",
3499"]o c #f7f7efefd8d8",
3500"[o c #f9f9f0f0c7c7",
3501"{o c #fafaf3f3d0d0",
3502"}o c #fafaf2f2d2d2",
3503"|o c #fafaf2f2d3d3",
3504" O c #f8f8f1f1dbdb",
3505".O c #f9f9f1f1dbdb",
3506"XO c #f8f8f2f2dbdb",
3507"oO c #f9f9f2f2dbdb",
3508"OO c #fafaf3f3dada",
3509"+O c #fafaf3f3dbdb",
3510"@O c #f8f8f1f1dcdc",
3511"#O c #f8f8f2f2dede",
3512"$O c #fafaf4f4d9d9",
3513"%O c #fafaf5f5dede",
3514"&O c #e7e7e7e7e1e1",
3515"*O c #e4e4e4e4e4e4",
3516"=O c #e9e9e9e9e2e2",
3517"-O c #ebebebebe6e6",
3518";O c Gray91",
3519":O c #edededede8e8",
3520">O c #ecececececec",
3521",O c Gray93",
3522"<O c #efefefefeeee",
3523"1O c #efefefefefef",
3524"2O c #f1f1f1f1ecec",
3525"3O c #f2f2f2f2eeee",
3526"4O c #fafaf3f3e5e5",
3527"5O c #f9f9f4f4e0e0",
3528"6O c #f9f9f4f4e2e2",
3529"7O c #f9f9f4f4e3e3",
3530"8O c #f9f9f5f5e3e3",
3531"9O c #fafaf4f4e1e1",
3532"0O c #f9f9f4f4e5e5",
3533"qO c #f9f9f5f5e4e4",
3534"wO c #f9f9f5f5e5e5",
3535"eO c #f9f9f4f4e6e6",
3536"rO c #f9f9f4f4e7e7",
3537"tO c #f9f9f5f5e6e6",
3538"yO c #f9f9f6f6e5e5",
3539"uO c #f9f9f6f6e7e7",
3540"iO c #fafaf5f5e4e4",
3541"pO c #fafaf5f5e5e5",
3542"aO c #fafaf5f5e6e6",
3543"sO c #fafaf5f5e7e7",
3544"dO c #fbfbf5f5e6e6",
3545"fO c #fafaf6f6e6e6",
3546"gO c #fafaf6f6e7e7",
3547"hO c #fbfbf6f6e7e7",
3548"jO c #f9f9f6f6eaea",
3549"kO c #fafaf5f5e8e8",
3550"lO c #fafaf6f6e8e8",
3551"zO c #fafaf6f6e9e9",
3552"xO c #fafaf7f7eaea",
3553"cO c #fafaf7f7ebeb",
3554"vO c #fbfbf7f7eaea",
3555"bO c #fbfbf7f7ecec",
3556"nO c #fbfbf7f7eded",
3557"mO c #fafaf8f8ecec",
3558"MO c #fbfbf8f8eded",
3559"NO c #fbfbf8f8eeee",
3560"BO c #fbfbf9f9efef",
3561"VO c Gray94",
3562"CO c #f1f1f1f1f1f1",
3563"ZO c #f4f4f4f4f0f0",
3564"AO c #f4f4f4f4f1f1",
3565"SO c #f5f5f5f5f2f2",
3566"DO c #f6f6f6f6f3f3",
3567"FO c #f4f4f4f4f4f4",
3568"GO c Gray96",
3569"HO c #f6f6f6f6f4f4",
3570"JO c #f7f7f7f7f5f5",
3571"KO c #f6f6f6f6f6f6",
3572"LO c Gray97",
3573"PO c #f8f8f8f8f5f5",
3574"IO c #f8f8f8f8f6f6",
3575"UO c #f8f8f8f8f7f7",
3576"YO c #f9f9f9f9f7f7",
3577"TO c #fafaf9f9f4f4",
3578"RO c #fafafafaf6f6",
3579"EO c #fbfbfbfbf7f7",
3580"WO c #fefefcfcf0f0",
3581"QO c #fefefcfcf1f1",
3582"!O c #fefefcfcf3f3",
3583"~O c #fefefcfcf4f4",
3584"^O c #fefefcfcf5f5",
3585"/O c #fefefdfdf5f5",
3586"(O c #fefefdfdf6f6",
3587")O c #fefefdfdf7f7",
3588"_O c #f9f9f9f9f8f8",
3589"`O c #f9f9f9f9f9f9",
3590"'O c #fafafafaf8f8",
3591"]O c #fafafafaf9f9",
3592"[O c #fbfbfbfbf8f8",
3593"{O c #fbfbfbfbf9f9",
3594"}O c Gray98",
3595"|O c #fbfbfbfbfafa",
3596" + c #fbfbfbfbfbfb",
3597".+ c #fcfcfcfcf9f9",
3598"X+ c #fcfcfcfcfafa",
3599"o+ c #fcfcfcfcfbfb",
3600"O+ c #fefefdfdf8f8",
3601"++ c #fefefdfdf9f9",
3602"@+ c #fefefdfdfafa",
3603"#+ c #fefefdfdfbfb",
3604"$+ c #fefefefefafa",
3605"%+ c #fefefefefbfb",
3606"&+ c Gray99",
3607"*+ c #fdfdfdfdfcfc",
3608"=+ c #fdfdfdfdfdfd",
3609"-+ c #fefefefefcfc",
3610";+ c #fefefefefdfd",
3611":+ c #fefefefefefe",
3612">+ c None",
3613",+ c None",
3614/* pixels */
3615",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+,+,+,+,+,+,+,+,+",
3616",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+(O>+>+>+>+>+>+>+>+,+,+,+,+,+,+",
3617",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+QOO+>+>+>+>+>+>+>+++!OO+>+>+>+>+>+>+>+>+,+,+,+,+,+",
3618",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+++/O$+>+>+>+>+>+>+>+(O(O/O>+>+>+>+>+>+>+>+>+,+,+,+,+",
3619",+,+,+,+,+,+,+,+,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+o+o+o+'O++@+O+%+>+>+>+>+>+>+>+>+,+",
3651",+,+,+,+,+,+,+,+,+,+,+,+,+>+Eo:O3OAO F v OX1OSo&.K ) i + +|O|O|O]O>+%+(O@+>+>+>+>+>+>+>+,+,+",
3652",+,+,+,+,+,+,+,+,+,+,+,+,+,+5XEo-O2O* 5 > f d `.-.*. n ]O]O]O'O'O_O>+>+++O+>+>+>+>+>+>+,+,+,+",
3653",+,+,+,+,+,+,+,+,+,+,+,+,+,+].5XRo-OAo : e w N &.2. UOYOYOYOUOIOPO>+>+>+>+>+>+>+>+>+,+,+,+,+",
3654",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].Do&O3 @ 5 1 # j l k , JOJOJOHOHODOSO>+>+>+>+>+>+>+,+,+,+,+,+,+",
3655",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].5XE . 3 7 % : PoUoAOAOAOAOZO3O3O>+>+>+>+>+>+,+,+,+,+,+,+,+",
3656",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].].].X X . X * -O:O2O2O2O2O2O:O-O-O>+>+>+>+,+,+,+,+,+,+,+,+,+",
3657",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].].].].].3X4XDoRoRo=O=O=O=O=ORoRoDo>+>+,+,+,+,+,+,+,+,+,+,+,+",
3658",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].].].].].].].].].].5X5X5X5X5X].].].,+,+,+,+,+,+,+,+,+,+,+,+,+",
3659",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].].].].].].].].].].].].].].].].].].,+,+,+,+,+,+,+,+,+,+,+,+,+",
3660",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].].].].].].].].].].].].].].].].].].,+,+,+,+,+,+,+,+,+,+,+,+,+",
3661",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+",
3662",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+"
3663};
3664
3665/* XPM */
3666static char *warning_xpm[] = {
3667/* columns rows colors chars-per-pixel */
3668"48 48 270 2",
3669" c Gray0",
3670". c #010100000000",
3671"X c #010101010000",
3672"o c #010101010101",
3673"O c #020201010000",
3674"+ c #030301010000",
3675"@ c #020202020000",
3676"# c #020202020202",
3677"$ c Gray1",
3678"% c #040403030000",
3679"& c #050504040000",
3680"* c #070704040000",
3681"= c #040404040404",
3682"- c Gray2",
3683"; c #060606060606",
3684": c #090907070000",
3685"> c #090907070101",
3686", c #0e0e03030202",
3687"< c #0d0d04040303",
3688"1 c #0a0a08080000",
3689"2 c #0b0b09090000",
3690"3 c #0e0e0b0b0000",
3691"4 c Gray3",
3692"5 c #090909090909",
3693"6 c Gray4",
3694"7 c #0b0b0b0b0b0b",
3695"8 c Gray6",
3696"9 c #171704040202",
3697"0 c #10100d0d0101",
3698"q c #13130f0f0000",
3699"w c #13130f0f0101",
3700"e c #1c1c07070505",
3701"r c #151510100101",
3702"t c #191913130000",
3703"y c #1d1d16160202",
3704"u c #1e1e17170202",
3705"i c #111111111111",
3706"p c #161616161616",
3707"a c #212107070505",
3708"s c #222207070505",
3709"d c #232307070404",
3710"f c #232307070505",
3711"g c #262608080606",
3712"h c #2b2b0a0a0707",
3713"j c #2c2c08080505",
3714"k c #2e2e08080505",
3715"l c #2e2e09090606",
3716"z c #2e2e0a0a0808",
3717"x c #24241c1c0303",
3718"c c #25251d1d0202",
3719"v c #25251d1d0303",
3720"b c #27271e1e0202",
3721"n c #3b3b0b0b0707",
3722"m c #3b3b0c0c0909",
3723"M c #3c3c0c0c0909",
3724"N c #3d3d0c0c0909",
3725"B c #3e3e0c0c0808",
3726"V c #292920200303",
3727"C c #2c2c23230303",
3728"Z c #313126260404",
3729"A c #313126260505",
3730"S c #333327270404",
3731"D c #38382c2c0505",
3732"F c #3c3c2e2e0505",
3733"G c Gray17",
3734"H c #41410c0c0707",
3735"J c #42420c0c0606",
3736"K c #42420c0c0707",
3737"L c #42420d0d0808",
3738"P c #44440e0e0909",
3739"I c #44440e0e0a0a",
3740"U c #47470e0e0909",
3741"Y c #46460e0e0a0a",
3742"T c #49490d0d0707",
3743"R c #4d4d0d0d0707",
3744"E c #49490e0e0909",
3745"W c #49490e0e0a0a",
3746"Q c #4d4d10100c0c",
3747"! c #52520e0e0707",
3748"~ c #575711110909",
3749"^ c #5a5a12120d0d",
3750"/ c #5d5d11110b0b",
3751"( c #5e5e11110a0a",
3752") c #5c5c12120d0d",
3753"_ c #5e5e12120c0c",
3754"` c #404031310404",
3755"' c #404031310505",
3756"] c #414132320606",
3757"[ c #424233330505",
3758"{ c #454535350606",
3759"} c #4b4b3a3a0707",
3760"| c #4e4e3d3d0606",
3761" . c #51513f3f0707",
3762".. c #606012120b0b",
3763"X. c #636311110909",
3764"o. c #616113130e0e",
3765"O. c #646412120909",
3766"+. c #6a6a13130b0b",
3767"@. c #6e6e13130a0a",
3768"#. c #6e6e14140a0a",
3769"$. c #6f6f14140b0b",
3770"%. c #6d6d16160e0e",
3771"&. c #6e6e15150c0c",
3772"*. c #717115150d0d",
3773"=. c #727215150d0d",
3774"-. c #737315150c0c",
3775";. c #737316160e0e",
3776":. c #777715150c0c",
3777">. c #787815150b0b",
3778",. c #787815150c0c",
3779"<. c #737317171111",
3780"1. c #7a7a17171010",
3781"2. c #787818181212",
3782"3. c #7b7b19191212",
3783"4. c #525240400707",
3784"5. c #676750500909",
3785"6. c #696952520a0a",
3786"7. c #717157570a0a",
3787"8. c #74745a5a0c0c",
3788"9. c #7a7a61610909",
3789"0. c #7c7c61610c0c",
3790"q. c #858517170c0c",
3791"w. c #868618180d0d",
3792"e. c #8a8a18180c0c",
3793"r. c #8a8a19190f0f",
3794"t. c #808018181010",
3795"y. c #80801a1a1313",
3796"u. c #868619191010",
3797"i. c #86861b1b1313",
3798"p. c #87871b1b1212",
3799"a. c #85851b1b1414",
3800"s. c #88881a1a1111",
3801"d. c #89891a1a1111",
3802"f. c #8b8b1c1c1515",
3803"g. c #8d8d1b1b1212",
3804"h. c #8f8f1b1b1010",
3805"j. c #8c8c1c1c1414",
3806"k. c #90901a1a0f0f",
3807"l. c #91911a1a0f0f",
3808"z. c #92921a1a0e0e",
3809"x. c #9b9b1b1b0e0e",
3810"c. c #9a9a1c1c0f0f",
3811"v. c #93931b1b1010",
3812"b. c #90901e1e1212",
3813"n. c #97971e1e1515",
3814"m. c #99991d1d1313",
3815"M. c #98981d1d1414",
3816"N. c #98981f1f1717",
3817"B. c #99991f1f1616",
3818"V. c #9a9a1f1f1515",
3819"C. c #9b9b1e1e1414",
3820"Z. c #9b9b1f1f1717",
3821"A. c #9c9c1e1e1313",
3822"S. c #9d9d1e1e1212",
3823"D. c #9e9e1d1d1111",
3824"F. c #9f9f1d1d1010",
3825"G. c #9f9f1e1e1313",
3826"H. c #9d9d1f1f1515",
3827"J. c #9c9c1f1f1616",
3828"K. c #9e9e1e1e1414",
3829"L. c #a0a01d1d0f0f",
3830"P. c #a1a11c1c0e0e",
3831"I. c #a2a21d1d0f0f",
3832"U. c #a3a31c1c0e0e",
3833"Y. c #a3a31d1d0f0f",
3834"T. c #a4a41c1c0e0e",
3835"R. c #a6a61d1d0f0f",
3836"E. c #a7a71d1d0e0e",
3837"W. c #a9a91d1d0f0f",
3838"Q. c #a1a11d1d1010",
3839"!. c #a1a11d1d1111",
3840"~. c #a0a01e1e1212",
3841"^. c #a2a21d1d1010",
3842"/. c #b3b31f1f0f0f",
3843"(. c #b2b21f1f1010",
3844"). c #b9b920200f0f",
3845"_. c #b6b621211111",
3846"`. c #b7b720201010",
3847"'. c #baba20201010",
3848"]. c #bdbd21211111",
3849"[. c #bfbf22221212",
3850"{. c #abab42421616",
3851"}. c #b1b140401010",
3852"|. c #b9b95b5b1313",
3853" X c #bbbb5b5b1111",
3854".X c #bfbf6f6f1616",
3855"XX c #92924f4f4848",
3856"oX c #c6c622221010",
3857"OX c #c8c823231212",
3858"+X c #caca23231010",
3859"@X c #cdcd25251313",
3860"#X c #d1d124241212",
3861"$X c #d2d224241111",
3862"%X c #d2d226261414",
3863"&X c #d5d525251111",
3864"*X c #d4d425251313",
3865"=X c #d9d926261313",
3866"-X c #dbdb26261212",
3867";X c #d8d827271515",
3868":X c #dcdc26261313",
3869">X c #dede26261212",
3870",X c #e0e027271212",
3871"<X c #e3e327271313",
3872"1X c #e6e627271212",
3873"2X c #e4e42e2e1a1a",
3874"3X c #ebeb27271313",
3875"4X c #ebeb28281212",
3876"5X c #e8e828281414",
3877"6X c #eaea29291515",
3878"7X c #eaea2a2a1616",
3879"8X c #ecec29291313",
3880"9X c #eeee29291313",
3881"0X c #eded29291414",
3882"qX c #ecec2a2a1616",
3883"wX c #efef29291414",
3884"eX c #f1f129291212",
3885"rX c #f3f329291212",
3886"tX c #f4f429291313",
3887"yX c #f5f529291313",
3888"uX c #f5f52a2a1313",
3889"iX c #f6f629291313",
3890"pX c #f7f729291313",
3891"aX c #f4f429291414",
3892"sX c #f4f42a2a1414",
3893"dX c #f6f62b2b1414",
3894"fX c #c1c169691616",
3895"gX c #c2c26f6f1212",
3896"hX c #c1c16f6f1414",
3897"jX c #c5c56b6b1212",
3898"kX c #c5c57e7e1616",
3899"lX c #c7c77e7e1414",
3900"zX c #c8c87e7e1414",
3901"xX c #b9b993930e0e",
3902"cX c #bdbd93931212",
3903"vX c #c9c985851717",
3904"bX c #cbcb86861717",
3905"nX c #cdcd87871313",
3906"mX c #cccc86861414",
3907"MX c #cccc86861515",
3908"NX c #cbcb89891414",
3909"BX c #cfcf88881212",
3910"VX c #cfcf8c8c1212",
3911"CX c #c3c39b9b0f0f",
3912"ZX c #c4c498981313",
3913"AX c #c7c79a9a1414",
3914"SX c #cbcb9e9e1313",
3915"DX c #d1d189891212",
3916"FX c #d2d288881414",
3917"GX c #d0d08c8c1313",
3918"HX c #d7d7a8a81616",
3919"JX c #d7d7a8a81a1a",
3920"KX c #d8d8a5a51c1c",
3921"LX c #dadaaaaa1616",
3922"PX c #dadaaaaa1717",
3923"IX c #dbdbaaaa1616",
3924"UX c #dbdbabab1717",
3925"YX c #dcdcabab1515",
3926"TX c #dcdcaeae1111",
3927"RX c #dedeacac1313",
3928"EX c #dfdfadad1313",
3929"WX c #d8d8a9a91919",
3930"QX c #d8d8a9a91a1a",
3931"!X c #d9d9aaaa1919",
3932"~X c #dfdfb1b11212",
3933"^X c #e0e0adad1111",
3934"/X c #e1e1aeae1212",
3935"(X c #e0e0aeae1414",
3936")X c #e0e0b2b21313",
3937"_X c #808080808080",
3938"`X c None",
3939/* pixels */
3940"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X",
3941"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X",
3942"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X",
3943"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X",
3944"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X",
3945"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X",
3946"`X`X`X`X`X`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 $ $ # # # # # # # # # # # # # # # # # # # # # # # # # o `X`X`X`X",
3980"`X`X`X`X`X`X`X`X`X 8 6 o o = = $ $ # # # # # # # # # # # # # # $ $ `X`X`X`X",
3981"`X`X`X`X`X`X`X`X`X`X`X`X`X 5 5 4 `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",
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"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X",
3985"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X",
3986"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X",
3987"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X"
3988};
3989
3990/* XPM */
3991static char *question_xpm[] = {
3992/* columns rows colors chars-per-pixel */
3993"48 48 101 2",
3994" c Gray0",
3995". c Transparent",
3996"X c #010101010101",
3997"o c #000000000202",
3998"O c #000001010202",
3999"+ c #010101010202",
4000"@ c #010102020303",
4001"# c #020202020202",
4002"$ c #020202020303",
4003"% c Gray1",
4004"& c #030305050707",
4005"* c #040404040404",
4006"= c #040404040606",
4007"- c #070707070707",
4008"; c #060607070808",
4009": c #060608080a0a",
4010"> c #060608080b0b",
4011", c Gray3",
4012"< c #0d0d0d0d0c0c",
4013"1 c Gray6",
4014"2 c #191915150d0d",
4015"3 c Gray8",
4016"4 c Gray10",
4017"5 c #22221c1c1212",
4018"6 c #393939393939",
4019"7 c #2b2b3d3d6161",
4020"8 c #353545456464",
4021"9 c #65654f4f2424",
4022"0 c #6b6b55552727",
4023"q c #6e6e55552626",
4024"w c #707056562727",
4025"e c #717159592929",
4026"r c #73735f5f3b3b",
4027"t c #7c7c62622d2d",
4028"y c #7f7f69694141",
4029"u c Gray39",
4030"i c #727272727272",
4031"p c #737375757979",
4032"a c Gray50",
4033"s c #808063632d2d",
4034"d c #828266662f2f",
4035"f c #87876a6a3131",
4036"g c #8c8c6d6d3131",
4037"h c #929273733535",
4038"j c #939374743535",
4039"k c #949475753636",
4040"l c #979777773737",
4041"z c #99997a7a3b3b",
4042"x c #9d9d7d7d3a3a",
4043"c c #a2a27f7f3b3b",
4044"v c #92927c7c5252",
4045"b c #a6a682823c3c",
4046"n c #a8a884843d3d",
4047"m c #aaaa86863e3e",
4048"M c #a6a687874848",
4049"N c #a3a38e8e5555",
4050"B c #a4a48b8b5a5a",
4051"V c #b3b38d8d4040",
4052"C c #b8b892924343",
4053"Z c #b9b993934444",
4054"A c #bebe95954444",
4055"S c #bebe9b9b5353",
4056"D c #bebea3a36363",
4057"F c #bfbfa1a16a6a",
4058"G c #bebea2a27272",
4059"H c #c0c097974545",
4060"J c #c3c39f9f5555",
4061"K c #c3c39f9f5757",
4062"L c #c9c9a4a45b5b",
4063"P c #d2d2a6a64c4c",
4064"I c #d2d2a6a64d4d",
4065"U c #d8d8abab4e4e",
4066"Y c #d8d8acac5858",
4067"T c #d8d8acac5b5b",
4068"R c #d8d8b1b15f5f",
4069"E c #c3c3a4a46666",
4070"W c #c6c6a7a76a6a",
4071"Q c #c9c9acac7373",
4072"! c #d2d2b0b06c6c",
4073"~ c #d8d8b1b16363",
4074"^ c #d8d8b1b16565",
4075"/ c #dcdcb4b46363",
4076"( c #d8d8b5b56e6e",
4077") c #d8d8b6b66e6e",
4078"_ c #dadab8b87272",
4079"` c #ddddbcbc7474",
4080"' c #d8d8baba7b7b",
4081"] c #f7f7c3c35a5a",
4082"[ c #f7f7c9c96d6d",
4083"{ c #f7f7cfcf7e7e",
4084"} c #aaaaaaaaaaaa",
4085"| c #d8d8bebe8686",
4086" . c #dcdcc4c49494",
4087".. c #f7f7d4d48c8c",
4088"X. c #f7f7d8d89999",
4089"o. c #f7f7dcdca5a5",
4090"O. c #f7f7dfdfafaf",
4091"+. c #f7f7e2e2b8b8",
4092"@. c #f7f7e5e5c0c0",
4093"#. c Gray100",
4094"$. c None",
4095/* pixels */
4096"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4097"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4098"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4099"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4100"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4101"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4102"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4103"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4104"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.< $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4105"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. c C U x b t $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4106"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. U X.X.+.X.' ' ' S b $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4107"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. ] O.@.X...] ] ] { ' R b q $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4108"$.$.$.$.$.$.$.$.$.$.$.$.$.$.< ] O.o.] n j j m ] ] { ) R b * $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4109"$.$.$.$.$.$.$.$.$.$.$.$.$.$. D X.+.] k h ] ] [ R R s 1 $.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4110"$.$.$.$.$.$.$.$.$.$.$.$.$.< [ @.{ k o 7 @ K ] { U R b % $.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4111"$.$.$.$.$.$.$.$.$.$.$.$.$. N ..O.U o 8 a a B ] [ R U b # #.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4112"$.$.$.$.$.$.$.$.$.$.$.$.$. I { ] b 8 a #.#. B [ [ ) U d # } #.$.$.$.$.$.$.$.$.$.$.$.$.",
4113"$.$.$.$.$.$.$.$.$.$.$.$.$. ] { ] b a #.#.$. B ] ) ) U 9 % } #.$.$.$.$.$.$.$.$.$.$.$.$.",
4114"$.$.$.$.$.$.$.$.$.$.$.$.$. / R A d a #.$. E [ ' U b a } #.$.$.$.$.$.$.$.$.$.$.$.$.",
4115"$.$.$.$.$.$.$.$.$.$.$.$.$. a #.$. g ! | R U e + a } #.$.$.$.$.$.$.$.$.$.$.$.$.",
4116"$.$.$.$.$.$.$.$.$.$.$.$.$. : a #. Z ..| U A 3 a #.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4117"$.$.$.$.$.$.$.$.$.$.$.$.$.$. a a a a a a - V [ | U U $ a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4118"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. a a a a #. ] ..( Y z . 3 a #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4119"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. 0 J ._ Q F 2 3 a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4120"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. f ! ( L W y & a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4121"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. l ' ^ T G . p } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4122"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. H ' ~ T v = a #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4123"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. U | R U r a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4124"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. S ' U A X a #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4125"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. M M b s ; } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4126"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. 4 6 O a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4127"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$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.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4139"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4140"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4141"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4142"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.",
4143"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$."
4144};
4145
4146
4147wxIcon wxGTKRenderer::GetStdIcon(int which) const
4148{
4149 switch(which)
4150 {
4151 case wxICON_INFORMATION:
4152 return wxIcon(info_xpm);
4153
4154 case wxICON_QUESTION:
4155 return wxIcon(question_xpm);
4156
4157 case wxICON_EXCLAMATION:
4158 return wxIcon(warning_xpm);
4159
4160 default:
4161 wxFAIL_MSG(wxT("requested non existent standard icon"));
4162 // still fall through
4163
4164 case wxICON_HAND:
4165 return wxIcon(error_xpm);
4166 }
4167}
4168
24a23c35 4169
1e6feb95
VZ
4170// ============================================================================
4171// wxInputHandler
4172// ============================================================================
4173
4174// ----------------------------------------------------------------------------
4175// wxGTKInputHandler
4176// ----------------------------------------------------------------------------
4177
4178wxGTKInputHandler::wxGTKInputHandler(wxGTKRenderer *renderer)
4179{
4180 m_renderer = renderer;
4181}
4182
67e49a98 4183bool wxGTKInputHandler::HandleKey(wxInputConsumer *control,
1e6feb95
VZ
4184 const wxKeyEvent& event,
4185 bool pressed)
4186{
4187 return FALSE;
4188}
4189
67e49a98 4190bool wxGTKInputHandler::HandleMouse(wxInputConsumer *control,
1e6feb95
VZ
4191 const wxMouseEvent& event)
4192{
4193 // clicking on the control gives it focus
67e49a98 4194 if ( event.ButtonDown() && wxWindow::FindFocus() != control->GetInputWindow() )
1e6feb95 4195 {
67e49a98 4196 control->GetInputWindow()->SetFocus();
1e6feb95
VZ
4197
4198 return TRUE;
4199 }
4200
4201 return FALSE;
4202}
4203
67e49a98 4204bool wxGTKInputHandler::HandleMouseMove(wxInputConsumer *control,
1e6feb95
VZ
4205 const wxMouseEvent& event)
4206{
4207 if ( event.Entering() )
4208 {
67e49a98 4209 control->GetInputWindow()->SetCurrent(TRUE);
1e6feb95
VZ
4210 }
4211 else if ( event.Leaving() )
4212 {
67e49a98 4213 control->GetInputWindow()->SetCurrent(FALSE);
1e6feb95
VZ
4214 }
4215 else
4216 {
4217 return FALSE;
4218 }
4219
4220 return TRUE;
4221}
4222
4223// ----------------------------------------------------------------------------
4224// wxGTKCheckboxInputHandler
4225// ----------------------------------------------------------------------------
4226
67e49a98 4227bool wxGTKCheckboxInputHandler::HandleKey(wxInputConsumer *control,
1e6feb95
VZ
4228 const wxKeyEvent& event,
4229 bool pressed)
4230{
4231 if ( pressed )
4232 {
4233 int keycode = event.GetKeyCode();
4234 if ( keycode == WXK_SPACE || keycode == WXK_RETURN )
4235 {
4236 control->PerformAction(wxACTION_CHECKBOX_TOGGLE);
4237
4238 return TRUE;
4239 }
4240 }
4241
4242 return FALSE;
4243}
4244
4245// ----------------------------------------------------------------------------
4246// wxGTKTextCtrlInputHandler
4247// ----------------------------------------------------------------------------
4248
67e49a98 4249bool wxGTKTextCtrlInputHandler::HandleKey(wxInputConsumer *control,
1e6feb95
VZ
4250 const wxKeyEvent& event,
4251 bool pressed)
4252{
4253 // handle only GTK-specific text bindings here, the others are handled in
4254 // the base class
4255 if ( pressed )
4256 {
4257 wxControlAction action;
4258 int keycode = event.GetKeyCode();
4259 if ( event.ControlDown() )
4260 {
4261 switch ( keycode )
4262 {
4263 case 'A':
4264 action = wxACTION_TEXT_HOME;
4265 break;
4266
4267 case 'B':
4268 action = wxACTION_TEXT_LEFT;
4269 break;
4270
4271 case 'D':
4272 action << wxACTION_TEXT_PREFIX_DEL << wxACTION_TEXT_RIGHT;
4273 break;
4274
4275 case 'E':
4276 action = wxACTION_TEXT_END;
4277 break;
4278
4279 case 'F':
4280 action = wxACTION_TEXT_RIGHT;
4281 break;
4282
4283 case 'H':
4284 action << wxACTION_TEXT_PREFIX_DEL << wxACTION_TEXT_LEFT;
4285 break;
4286
4287 case 'K':
4288 action << wxACTION_TEXT_PREFIX_DEL << wxACTION_TEXT_END;
4289 break;
4290
4291 case 'N':
4292 action = wxACTION_TEXT_DOWN;
4293 break;
4294
4295 case 'P':
4296 action = wxACTION_TEXT_UP;
4297 break;
4298
4299 case 'U':
4300 //delete the entire line
4301 control->PerformAction(wxACTION_TEXT_HOME);
4302 action << wxACTION_TEXT_PREFIX_DEL << wxACTION_TEXT_END;
4303 break;
4304
4305 case 'W':
4306 action << wxACTION_TEXT_PREFIX_DEL << wxACTION_TEXT_WORD_LEFT;
4307 break;
4308 }
4309 }
4310 else if ( event.AltDown() )
4311 {
4312 switch ( keycode )
4313 {
4314 case 'B':
4315 action = wxACTION_TEXT_WORD_LEFT;
4316 break;
4317
4318 case 'D':
4319 action << wxACTION_TEXT_PREFIX_DEL << wxACTION_TEXT_WORD_RIGHT;
4320 break;
4321
4322 case 'F':
4323 action = wxACTION_TEXT_WORD_RIGHT;
4324 break;
4325 }
4326 }
4327
4328 if ( action != wxACTION_NONE )
4329 {
4330 control->PerformAction(action);
4331
4332 return TRUE;
4333 }
4334 }
4335
4336 return wxStdTextCtrlInputHandler::HandleKey(control, event, pressed);
4337}