1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/gdicmn.cpp
3 // Purpose: Common GDI classes
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // For compilers that support precompilation, includes "wx.h".
13 #include "wx/wxprec.h"
19 #include "wx/gdicmn.h"
25 #include "wx/palette.h"
27 #include "wx/cursor.h"
28 #include "wx/settings.h"
29 #include "wx/bitmap.h"
30 #include "wx/colour.h"
34 WXDLLIMPEXP_DATA_CORE(wxBrushList
*) wxTheBrushList
;
35 WXDLLIMPEXP_DATA_CORE(wxFontList
*) wxTheFontList
;
36 WXDLLIMPEXP_DATA_CORE(wxPenList
*) wxThePenList
;
38 WXDLLIMPEXP_DATA_CORE(wxColourDatabase
*) wxTheColourDatabase
;
40 WXDLLIMPEXP_DATA_CORE(wxBitmap
) wxNullBitmap
;
41 WXDLLIMPEXP_DATA_CORE(wxBrush
) wxNullBrush
;
42 WXDLLIMPEXP_DATA_CORE(wxColour
) wxNullColour
;
43 WXDLLIMPEXP_DATA_CORE(wxCursor
) wxNullCursor
;
44 WXDLLIMPEXP_DATA_CORE(wxFont
) wxNullFont
;
45 WXDLLIMPEXP_DATA_CORE(wxIcon
) wxNullIcon
;
46 WXDLLIMPEXP_DATA_CORE(wxPen
) wxNullPen
;
48 WXDLLIMPEXP_DATA_CORE(wxPalette
) wxNullPalette
;
51 const wxSize
wxDefaultSize(wxDefaultCoord
, wxDefaultCoord
);
52 const wxPoint
wxDefaultPosition(wxDefaultCoord
, wxDefaultCoord
);
54 #if wxUSE_EXTENDED_RTTI
58 template<> void wxStringReadValue(const wxString
&s
, wxPoint
&data
)
60 wxSscanf(s
, wxT("%d,%d"), &data
.x
, &data
.y
) ;
63 template<> void wxStringWriteValue(wxString
&s
, const wxPoint
&data
)
65 s
= wxString::Format(wxT("%d,%d"), data
.x
, data
.y
) ;
68 wxCUSTOM_TYPE_INFO(wxPoint
, wxToStringConverter
<wxPoint
> , wxFromStringConverter
<wxPoint
>)
70 template<> void wxStringReadValue(const wxString
&s
, wxSize
&data
)
72 wxSscanf(s
, wxT("%d,%d"), &data
.x
, &data
.y
) ;
75 template<> void wxStringWriteValue(wxString
&s
, const wxSize
&data
)
77 s
= wxString::Format(wxT("%d,%d"), data
.x
, data
.y
) ;
80 wxCUSTOM_TYPE_INFO(wxSize
, wxToStringConverter
<wxSize
> , wxFromStringConverter
<wxSize
>)
84 wxRect::wxRect(const wxPoint
& point1
, const wxPoint
& point2
)
88 width
= point2
.x
- point1
.x
;
89 height
= point2
.y
- point1
.y
;
106 bool wxRect::operator==(const wxRect
& rect
) const
108 return ((x
== rect
.x
) &&
110 (width
== rect
.width
) &&
111 (height
== rect
.height
));
114 wxRect
wxRect::operator+(const wxRect
& rect
) const
116 int x1
= wxMin(this->x
, rect
.x
);
117 int y1
= wxMin(this->y
, rect
.y
);
118 int y2
= wxMax(y
+height
, rect
.height
+rect
.y
);
119 int x2
= wxMax(x
+width
, rect
.width
+rect
.x
);
120 return wxRect(x1
, y1
, x2
-x1
, y2
-y1
);
123 wxRect
& wxRect::Union(const wxRect
& rect
)
125 // ignore empty rectangles: union with an empty rectangle shouldn't extend
126 // this one to (0, 0)
127 if ( !width
|| !height
)
131 else if ( rect
.width
&& rect
.height
)
133 int x1
= wxMin(x
, rect
.x
);
134 int y1
= wxMin(y
, rect
.y
);
135 int y2
= wxMax(y
+ height
, rect
.height
+ rect
.y
);
136 int x2
= wxMax(x
+ width
, rect
.width
+ rect
.x
);
143 //else: we're not empty and rect is empty
148 wxRect
& wxRect::Inflate(wxCoord dx
, wxCoord dy
)
152 // Don't allow deflate to eat more width than we have,
153 // a well-defined rectangle cannot have negative width.
159 // The inflate is valid.
166 // Don't allow deflate to eat more height than we have,
167 // a well-defined rectangle cannot have negative height.
173 // The inflate is valid.
181 bool wxRect::Inside(int cx
, int cy
) const
183 return ( (cx
>= x
) && (cy
>= y
)
184 && ((cy
- y
) < height
)
185 && ((cx
- x
) < width
)
189 wxRect
& wxRect::Intersect(const wxRect
& rect
)
198 if ( x2
> rect
.GetRight() )
199 x2
= rect
.GetRight();
200 if ( y2
> rect
.GetBottom() )
201 y2
= rect
.GetBottom();
206 if ( width
<= 0 || height
<= 0 )
215 bool wxRect::Intersects(const wxRect
& rect
) const
217 wxRect r
= Intersect(rect
);
219 // if there is no intersection, both width and height are 0
223 // ============================================================================
225 // ============================================================================
227 // ----------------------------------------------------------------------------
228 // wxColourDatabase ctor/dtor
229 // ----------------------------------------------------------------------------
231 wxColourDatabase::wxColourDatabase ()
233 // will be created on demand in Initialize()
237 wxColourDatabase::~wxColourDatabase ()
241 WX_CLEAR_HASH_MAP(wxStringToColourHashMap
, *m_map
);
247 delete [] m_palTable
;
251 // Colour database stuff
252 void wxColourDatabase::Initialize()
256 // already initialized
260 m_map
= new wxStringToColourHashMap
;
262 static const struct wxColourDesc
269 {wxT("AQUAMARINE"),112, 219, 147},
270 {wxT("BLACK"),0, 0, 0},
271 {wxT("BLUE"), 0, 0, 255},
272 {wxT("BLUE VIOLET"), 159, 95, 159},
273 {wxT("BROWN"), 165, 42, 42},
274 {wxT("CADET BLUE"), 95, 159, 159},
275 {wxT("CORAL"), 255, 127, 0},
276 {wxT("CORNFLOWER BLUE"), 66, 66, 111},
277 {wxT("CYAN"), 0, 255, 255},
278 {wxT("DARK GREY"), 47, 47, 47}, // ?
280 {wxT("DARK GREEN"), 47, 79, 47},
281 {wxT("DARK OLIVE GREEN"), 79, 79, 47},
282 {wxT("DARK ORCHID"), 153, 50, 204},
283 {wxT("DARK SLATE BLUE"), 107, 35, 142},
284 {wxT("DARK SLATE GREY"), 47, 79, 79},
285 {wxT("DARK TURQUOISE"), 112, 147, 219},
286 {wxT("DIM GREY"), 84, 84, 84},
287 {wxT("FIREBRICK"), 142, 35, 35},
288 {wxT("FOREST GREEN"), 35, 142, 35},
289 {wxT("GOLD"), 204, 127, 50},
290 {wxT("GOLDENROD"), 219, 219, 112},
291 {wxT("GREY"), 128, 128, 128},
292 {wxT("GREEN"), 0, 255, 0},
293 {wxT("GREEN YELLOW"), 147, 219, 112},
294 {wxT("INDIAN RED"), 79, 47, 47},
295 {wxT("KHAKI"), 159, 159, 95},
296 {wxT("LIGHT BLUE"), 191, 216, 216},
297 {wxT("LIGHT GREY"), 192, 192, 192},
298 {wxT("LIGHT STEEL BLUE"), 143, 143, 188},
299 {wxT("LIME GREEN"), 50, 204, 50},
300 {wxT("LIGHT MAGENTA"), 255, 0, 255},
301 {wxT("MAGENTA"), 255, 0, 255},
302 {wxT("MAROON"), 142, 35, 107},
303 {wxT("MEDIUM AQUAMARINE"), 50, 204, 153},
304 {wxT("MEDIUM GREY"), 100, 100, 100},
305 {wxT("MEDIUM BLUE"), 50, 50, 204},
306 {wxT("MEDIUM FOREST GREEN"), 107, 142, 35},
307 {wxT("MEDIUM GOLDENROD"), 234, 234, 173},
308 {wxT("MEDIUM ORCHID"), 147, 112, 219},
309 {wxT("MEDIUM SEA GREEN"), 66, 111, 66},
310 {wxT("MEDIUM SLATE BLUE"), 127, 0, 255},
311 {wxT("MEDIUM SPRING GREEN"), 127, 255, 0},
312 {wxT("MEDIUM TURQUOISE"), 112, 219, 219},
313 {wxT("MEDIUM VIOLET RED"), 219, 112, 147},
314 {wxT("MIDNIGHT BLUE"), 47, 47, 79},
315 {wxT("NAVY"), 35, 35, 142},
316 {wxT("ORANGE"), 204, 50, 50},
317 {wxT("ORANGE RED"), 255, 0, 127},
318 {wxT("ORCHID"), 219, 112, 219},
319 {wxT("PALE GREEN"), 143, 188, 143},
320 {wxT("PINK"), 188, 143, 234},
321 {wxT("PLUM"), 234, 173, 234},
322 {wxT("PURPLE"), 176, 0, 255},
323 {wxT("RED"), 255, 0, 0},
324 {wxT("SALMON"), 111, 66, 66},
325 {wxT("SEA GREEN"), 35, 142, 107},
326 {wxT("SIENNA"), 142, 107, 35},
327 {wxT("SKY BLUE"), 50, 153, 204},
328 {wxT("SLATE BLUE"), 0, 127, 255},
329 {wxT("SPRING GREEN"), 0, 255, 127},
330 {wxT("STEEL BLUE"), 35, 107, 142},
331 {wxT("TAN"), 219, 147, 112},
332 {wxT("THISTLE"), 216, 191, 216},
333 {wxT("TURQUOISE"), 173, 234, 234},
334 {wxT("VIOLET"), 79, 47, 79},
335 {wxT("VIOLET RED"), 204, 50, 153},
336 {wxT("WHEAT"), 216, 216, 191},
337 {wxT("WHITE"), 255, 255, 255},
338 {wxT("YELLOW"), 255, 255, 0},
339 {wxT("YELLOW GREEN"), 153, 204, 50}
344 for ( n
= 0; n
< WXSIZEOF(wxColourTable
); n
++ )
346 const wxColourDesc
& cc
= wxColourTable
[n
];
347 (*m_map
)[cc
.name
] = new wxColour(cc
.r
, cc
.g
, cc
.b
);
351 m_palTable
= new long[n
];
352 for ( n
= 0; n
< WXSIZEOF(wxColourTable
); n
++ )
354 const wxColourDesc
& cc
= wxColourTable
[n
];
355 m_palTable
[n
] = OS2RGB(cc
.r
,cc
.g
,cc
.b
);
361 // ----------------------------------------------------------------------------
362 // wxColourDatabase operations
363 // ----------------------------------------------------------------------------
365 void wxColourDatabase::AddColour(const wxString
& name
, const wxColour
& colour
)
369 // canonicalize the colour names before using them as keys: they should be
371 wxString colName
= name
;
374 // ... and we also allow both grey/gray
375 wxString colNameAlt
= colName
;
376 if ( !colNameAlt
.Replace(_T("GRAY"), _T("GREY")) )
378 // but in this case it is not necessary so avoid extra search below
382 wxStringToColourHashMap::iterator it
= m_map
->find(colName
);
383 if ( it
== m_map
->end() && !colNameAlt
.empty() )
384 it
= m_map
->find(colNameAlt
);
385 if ( it
!= m_map
->end() )
387 *(it
->second
) = colour
;
391 (*m_map
)[colName
] = new wxColour(colour
);
395 wxColour
wxColourDatabase::Find(const wxString
& colour
) const
397 wxColourDatabase
* const self
= wxConstCast(this, wxColourDatabase
);
400 // make the comparaison case insensitive and also match both grey and gray
401 wxString colName
= colour
;
403 wxString colNameAlt
= colName
;
404 if ( !colNameAlt
.Replace(_T("GRAY"), _T("GREY")) )
407 wxStringToColourHashMap::iterator it
= m_map
->find(colName
);
408 if ( it
== m_map
->end() && !colNameAlt
.empty() )
409 it
= m_map
->find(colNameAlt
);
410 if ( it
!= m_map
->end() )
411 return *(it
->second
);
413 // we did not find any result in existing colours:
414 // we won't use wxString -> wxColour conversion because the
415 // wxColour::Set(const wxString &) function which does that conversion
416 // internally uses this function (wxColourDatabase::Find) and we want
417 // to avoid infinite recursion !
421 wxString
wxColourDatabase::FindName(const wxColour
& colour
) const
423 wxColourDatabase
* const self
= wxConstCast(this, wxColourDatabase
);
426 typedef wxStringToColourHashMap::iterator iterator
;
428 for ( iterator it
= m_map
->begin(), en
= m_map
->end(); it
!= en
; ++it
)
430 if ( *(it
->second
) == colour
)
434 return wxEmptyString
;
437 // ----------------------------------------------------------------------------
438 // deprecated wxColourDatabase methods
439 // ----------------------------------------------------------------------------
441 #if WXWIN_COMPATIBILITY_2_6
442 wxColour
*wxColourDatabase::FindColour(const wxString
& name
)
444 // This function is deprecated, use Find() instead.
445 // Formerly this function sometimes would return a deletable pointer and
446 // sometimes a non-deletable one (when returning a colour from the database).
447 // Trying to delete the latter anyway results in problems, so probably
448 // nobody ever freed the pointers. Currently it always returns a new
449 // instance, which means there will be memory leaks.
450 wxLogDebug(wxT("wxColourDataBase::FindColour():")
451 wxT(" Please use wxColourDataBase::Find() instead"));
453 // using a static variable here is not the most elegant solution but unless
454 // we want to make wxStringToColourHashMap public (i.e. move it to the
455 // header) so that we could have a member function returning
456 // wxStringToColourHashMap::iterator, there is really no good way to do it
459 // and knowing that this function is going to disappear in the next release
460 // anyhow I don't want to waste time on this
462 static wxColour s_col
;
468 return new wxColour(s_col
);
470 #endif // WXWIN_COMPATIBILITY_2_6
472 // ============================================================================
474 // ============================================================================
476 static wxStockGDI gs_wxStockGDI_instance
;
477 wxStockGDI
* wxStockGDI::ms_instance
= &gs_wxStockGDI_instance
;
478 wxObject
* wxStockGDI::ms_stockObject
[ITEMCOUNT
];
480 wxStockGDI::wxStockGDI()
484 wxStockGDI::~wxStockGDI()
488 void wxStockGDI::DeleteAll()
490 for (unsigned i
= 0; i
< ITEMCOUNT
; i
++)
492 delete ms_stockObject
[i
];
493 ms_stockObject
[i
] = NULL
;
497 const wxBrush
* wxStockGDI::GetBrush(Item item
)
499 wxBrush
* brush
= wx_static_cast(wxBrush
*, ms_stockObject
[item
]);
505 brush
= new wxBrush(*GetColour(COLOUR_BLACK
), wxSOLID
);
508 brush
= new wxBrush(*GetColour(COLOUR_BLUE
), wxSOLID
);
511 brush
= new wxBrush(*GetColour(COLOUR_CYAN
), wxSOLID
);
514 brush
= new wxBrush(*GetColour(COLOUR_GREEN
), wxSOLID
);
517 brush
= new wxBrush(wxColour(wxT("GREY")), wxSOLID
);
519 case BRUSH_LIGHTGREY
:
520 brush
= new wxBrush(*GetColour(COLOUR_LIGHTGREY
), wxSOLID
);
522 case BRUSH_MEDIUMGREY
:
523 brush
= new wxBrush(wxColour(wxT("MEDIUM GREY")), wxSOLID
);
526 brush
= new wxBrush(*GetColour(COLOUR_RED
), wxSOLID
);
528 case BRUSH_TRANSPARENT
:
529 brush
= new wxBrush(*GetColour(COLOUR_BLACK
), wxTRANSPARENT
);
532 brush
= new wxBrush(*GetColour(COLOUR_WHITE
), wxSOLID
);
537 ms_stockObject
[item
] = brush
;
542 const wxColour
* wxStockGDI::GetColour(Item item
)
544 wxColour
* colour
= wx_static_cast(wxColour
*, ms_stockObject
[item
]);
550 colour
= new wxColour(0, 0, 0);
553 colour
= new wxColour(0, 0, 255);
556 colour
= new wxColour(wxT("CYAN"));
559 colour
= new wxColour(0, 255, 0);
561 case COLOUR_LIGHTGREY
:
562 colour
= new wxColour(wxT("LIGHT GREY"));
565 colour
= new wxColour(255, 0, 0);
568 colour
= new wxColour(255, 255, 255);
573 ms_stockObject
[item
] = colour
;
578 const wxCursor
* wxStockGDI::GetCursor(Item item
)
580 wxCursor
* cursor
= wx_static_cast(wxCursor
*, ms_stockObject
[item
]);
586 cursor
= new wxCursor(wxCURSOR_CROSS
);
588 case CURSOR_HOURGLASS
:
589 cursor
= new wxCursor(wxCURSOR_WAIT
);
591 case CURSOR_STANDARD
:
592 cursor
= new wxCursor(wxCURSOR_ARROW
);
597 ms_stockObject
[item
] = cursor
;
602 const wxFont
* wxStockGDI::GetFont(Item item
)
604 wxFont
* font
= wx_static_cast(wxFont
*, ms_stockObject
[item
]);
610 font
= new wxFont(GetFont(FONT_NORMAL
)->GetPointSize(), wxROMAN
, wxITALIC
, wxNORMAL
);
613 font
= new wxFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT
));
616 font
= new wxFont(GetFont(FONT_NORMAL
)->GetPointSize() - 2, wxSWISS
, wxNORMAL
, wxNORMAL
);
619 font
= new wxFont(GetFont(FONT_NORMAL
)->GetPointSize(), wxSWISS
, wxNORMAL
, wxNORMAL
);
624 ms_stockObject
[item
] = font
;
629 const wxPen
* wxStockGDI::GetPen(Item item
)
631 wxPen
* pen
= wx_static_cast(wxPen
*, ms_stockObject
[item
]);
637 pen
= new wxPen(*GetColour(COLOUR_BLACK
), 1, wxSOLID
);
639 case PEN_BLACKDASHED
:
640 pen
= new wxPen(*GetColour(COLOUR_BLACK
), 1, wxSHORT_DASH
);
643 pen
= new wxPen(*GetColour(COLOUR_CYAN
), 1, wxSOLID
);
646 pen
= new wxPen(*GetColour(COLOUR_GREEN
), 1, wxSOLID
);
649 pen
= new wxPen(wxColour(wxT("GREY")), 1, wxSOLID
);
652 pen
= new wxPen(*GetColour(COLOUR_LIGHTGREY
), 1, wxSOLID
);
655 pen
= new wxPen(wxColour(wxT("MEDIUM GREY")), 1, wxSOLID
);
658 pen
= new wxPen(*GetColour(COLOUR_RED
), 1, wxSOLID
);
660 case PEN_TRANSPARENT
:
661 pen
= new wxPen(*GetColour(COLOUR_BLACK
), 1, wxTRANSPARENT
);
664 pen
= new wxPen(*GetColour(COLOUR_WHITE
), 1, wxSOLID
);
669 ms_stockObject
[item
] = pen
;
674 void wxInitializeStockLists()
676 wxTheColourDatabase
= new wxColourDatabase
;
678 wxTheBrushList
= new wxBrushList
;
679 wxThePenList
= new wxPenList
;
680 wxTheFontList
= new wxFontList
;
683 void wxDeleteStockLists()
685 wxDELETE(wxTheBrushList
);
686 wxDELETE(wxThePenList
);
687 wxDELETE(wxTheFontList
);
690 // ============================================================================
691 // wxTheXXXList stuff (semi-obsolete)
692 // ============================================================================
694 wxGDIObjListBase::wxGDIObjListBase()
698 wxGDIObjListBase::~wxGDIObjListBase()
700 for (wxList::compatibility_iterator node
= list
.GetFirst(); node
; node
= node
->GetNext())
702 delete wx_static_cast(wxObject
*, node
->GetData());
706 wxPen
*wxPenList::FindOrCreatePen (const wxColour
& colour
, int width
, int style
)
708 for (wxList::compatibility_iterator node
= list
.GetFirst(); node
; node
= node
->GetNext())
710 wxPen
*each_pen
= (wxPen
*) node
->GetData ();
712 each_pen
->GetWidth () == width
&&
713 each_pen
->GetStyle () == style
&&
714 each_pen
->GetColour ().Red () == colour
.Red () &&
715 each_pen
->GetColour ().Green () == colour
.Green () &&
716 each_pen
->GetColour ().Blue () == colour
.Blue ())
721 wxPen
penTmp(colour
, width
, style
);
724 pen
= new wxPen(penTmp
);
731 wxBrush
*wxBrushList::FindOrCreateBrush (const wxColour
& colour
, int style
)
733 for (wxList::compatibility_iterator node
= list
.GetFirst(); node
; node
= node
->GetNext())
735 wxBrush
*each_brush
= (wxBrush
*) node
->GetData ();
737 each_brush
->GetStyle () == style
&&
738 each_brush
->GetColour ().Red () == colour
.Red () &&
739 each_brush
->GetColour ().Green () == colour
.Green () &&
740 each_brush
->GetColour ().Blue () == colour
.Blue ())
744 wxBrush
* brush
= NULL
;
745 wxBrush
brushTmp(colour
, style
);
748 brush
= new wxBrush(brushTmp
);
755 wxFont
*wxFontList::FindOrCreateFont(int pointSize
,
760 const wxString
& facename
,
761 wxFontEncoding encoding
)
764 wxList::compatibility_iterator node
;
765 for (node
= list
.GetFirst(); node
; node
= node
->GetNext())
767 font
= (wxFont
*)node
->GetData();
769 font
->GetPointSize () == pointSize
&&
770 font
->GetStyle () == style
&&
771 font
->GetWeight () == weight
&&
772 font
->GetUnderlined () == underline
)
774 int fontFamily
= font
->GetFamily();
776 #if defined(__WXGTK__)
777 // under GTK the default family is wxSWISS, so looking for a font
778 // with wxDEFAULT family should return a wxSWISS one instead of
779 // creating a new one
780 bool same
= (fontFamily
== family
) ||
781 (fontFamily
== wxSWISS
&& family
== wxDEFAULT
);
783 // VZ: but why elsewhere do we require an exact match? mystery...
784 bool same
= fontFamily
== family
;
787 // empty facename matches anything at all: this is bad because
788 // depending on which fonts are already created, we might get back
789 // a different font if we create it with empty facename, but it is
790 // still better than never matching anything in the cache at all
792 if ( same
&& !facename
.empty() )
794 const wxString
& fontFace
= font
->GetFaceName();
796 // empty facename matches everything
797 same
= !fontFace
|| fontFace
== facename
;
800 if ( same
&& (encoding
!= wxFONTENCODING_DEFAULT
) )
802 // have to match the encoding too
803 same
= font
->GetEncoding() == encoding
;
813 // font not found, create the new one
815 wxFont
fontTmp(pointSize
, family
, style
, weight
, underline
, facename
, encoding
);
818 font
= new wxFont(fontTmp
);
825 #if WXWIN_COMPATIBILITY_2_6
826 void wxBrushList::AddBrush(wxBrush
*) { }
827 void wxBrushList::RemoveBrush(wxBrush
*) { }
828 void wxFontList::AddFont(wxFont
*) { }
829 void wxFontList::RemoveFont(wxFont
*) { }
830 void wxPenList::AddPen(wxPen
*) { }
831 void wxPenList::RemovePen(wxPen
*) { }
834 wxSize
wxGetDisplaySize()
837 wxDisplaySize(& x
, & y
);
841 wxRect
wxGetClientDisplayRect()
843 int x
, y
, width
, height
;
844 wxClientDisplayRect(&x
, &y
, &width
, &height
); // call plat-specific version
845 return wxRect(x
, y
, width
, height
);
848 wxSize
wxGetDisplaySizeMM()
851 wxDisplaySizeMM(& x
, & y
);
855 wxResourceCache::~wxResourceCache ()
857 wxList::compatibility_iterator node
= GetFirst ();
859 wxObject
*item
= (wxObject
*)node
->GetData();
862 node
= node
->GetNext ();