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