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