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"
31 #include "wx/colour.h"
32 #include "wx/bitmap.h"
35 WXDLLIMPEXP_DATA_CORE(wxBrushList
*) wxTheBrushList
;
36 WXDLLIMPEXP_DATA_CORE(wxFontList
*) wxTheFontList
;
37 WXDLLIMPEXP_DATA_CORE(wxPenList
*) wxThePenList
;
39 WXDLLIMPEXP_DATA_CORE(wxColourDatabase
*) wxTheColourDatabase
;
41 WXDLLIMPEXP_DATA_CORE(wxBitmap
) wxNullBitmap
;
42 WXDLLIMPEXP_DATA_CORE(wxBrush
) wxNullBrush
;
43 WXDLLIMPEXP_DATA_CORE(wxColour
) wxNullColour
;
44 WXDLLIMPEXP_DATA_CORE(wxCursor
) wxNullCursor
;
45 WXDLLIMPEXP_DATA_CORE(wxFont
) wxNullFont
;
46 WXDLLIMPEXP_DATA_CORE(wxIcon
) wxNullIcon
;
47 WXDLLIMPEXP_DATA_CORE(wxPen
) wxNullPen
;
49 WXDLLIMPEXP_DATA_CORE(wxPalette
) wxNullPalette
;
52 const wxSize
wxDefaultSize(wxDefaultCoord
, wxDefaultCoord
);
53 const wxPoint
wxDefaultPosition(wxDefaultCoord
, wxDefaultCoord
);
55 #if wxUSE_EXTENDED_RTTI
59 template<> void wxStringReadValue(const wxString
&s
, wxPoint
&data
)
61 wxSscanf(s
, wxT("%d,%d"), &data
.x
, &data
.y
) ;
64 template<> void wxStringWriteValue(wxString
&s
, const wxPoint
&data
)
66 s
= wxString::Format(wxT("%d,%d"), data
.x
, data
.y
) ;
69 wxCUSTOM_TYPE_INFO(wxPoint
, wxToStringConverter
<wxPoint
> , wxFromStringConverter
<wxPoint
>)
71 template<> void wxStringReadValue(const wxString
&s
, wxSize
&data
)
73 wxSscanf(s
, wxT("%d,%d"), &data
.x
, &data
.y
) ;
76 template<> void wxStringWriteValue(wxString
&s
, const wxSize
&data
)
78 s
= wxString::Format(wxT("%d,%d"), data
.x
, data
.y
) ;
81 wxCUSTOM_TYPE_INFO(wxSize
, wxToStringConverter
<wxSize
> , wxFromStringConverter
<wxSize
>)
85 wxRect::wxRect(const wxPoint
& point1
, const wxPoint
& point2
)
89 width
= point2
.x
- point1
.x
;
90 height
= point2
.y
- point1
.y
;
107 bool wxRect::operator==(const wxRect
& rect
) const
109 return ((x
== rect
.x
) &&
111 (width
== rect
.width
) &&
112 (height
== rect
.height
));
115 wxRect
wxRect::operator+(const wxRect
& rect
) const
117 int x1
= wxMin(this->x
, rect
.x
);
118 int y1
= wxMin(this->y
, rect
.y
);
119 int y2
= wxMax(y
+height
, rect
.height
+rect
.y
);
120 int x2
= wxMax(x
+width
, rect
.width
+rect
.x
);
121 return wxRect(x1
, y1
, x2
-x1
, y2
-y1
);
124 wxRect
& wxRect::Union(const wxRect
& rect
)
126 // ignore empty rectangles: union with an empty rectangle shouldn't extend
127 // this one to (0, 0)
128 if ( !width
|| !height
)
132 else if ( rect
.width
&& rect
.height
)
134 int x1
= wxMin(x
, rect
.x
);
135 int y1
= wxMin(y
, rect
.y
);
136 int y2
= wxMax(y
+ height
, rect
.height
+ rect
.y
);
137 int x2
= wxMax(x
+ width
, rect
.width
+ rect
.x
);
144 //else: we're not empty and rect is empty
149 wxRect
& wxRect::Inflate(wxCoord dx
, wxCoord dy
)
153 // Don't allow deflate to eat more width than we have,
154 // a well-defined rectangle cannot have negative width.
160 // The inflate is valid.
167 // Don't allow deflate to eat more height than we have,
168 // a well-defined rectangle cannot have negative height.
174 // The inflate is valid.
182 bool wxRect::Inside(int cx
, int cy
) const
184 return ( (cx
>= x
) && (cy
>= y
)
185 && ((cy
- y
) < height
)
186 && ((cx
- x
) < width
)
190 wxRect
& wxRect::Intersect(const wxRect
& rect
)
199 if ( x2
> rect
.GetRight() )
200 x2
= rect
.GetRight();
201 if ( y2
> rect
.GetBottom() )
202 y2
= rect
.GetBottom();
207 if ( width
<= 0 || height
<= 0 )
216 bool wxRect::Intersects(const wxRect
& rect
) const
218 wxRect r
= Intersect(rect
);
220 // if there is no intersection, both width and height are 0
224 // ============================================================================
226 // ============================================================================
228 // ----------------------------------------------------------------------------
229 // wxColourDatabase ctor/dtor
230 // ----------------------------------------------------------------------------
232 wxColourDatabase::wxColourDatabase ()
234 // will be created on demand in Initialize()
238 wxColourDatabase::~wxColourDatabase ()
242 WX_CLEAR_HASH_MAP(wxStringToColourHashMap
, *m_map
);
248 delete [] m_palTable
;
252 // Colour database stuff
253 void wxColourDatabase::Initialize()
257 // already initialized
261 m_map
= new wxStringToColourHashMap
;
263 static const struct wxColourDesc
270 {wxT("AQUAMARINE"),112, 219, 147},
271 {wxT("BLACK"),0, 0, 0},
272 {wxT("BLUE"), 0, 0, 255},
273 {wxT("BLUE VIOLET"), 159, 95, 159},
274 {wxT("BROWN"), 165, 42, 42},
275 {wxT("CADET BLUE"), 95, 159, 159},
276 {wxT("CORAL"), 255, 127, 0},
277 {wxT("CORNFLOWER BLUE"), 66, 66, 111},
278 {wxT("CYAN"), 0, 255, 255},
279 {wxT("DARK GREY"), 47, 47, 47}, // ?
281 {wxT("DARK GREEN"), 47, 79, 47},
282 {wxT("DARK OLIVE GREEN"), 79, 79, 47},
283 {wxT("DARK ORCHID"), 153, 50, 204},
284 {wxT("DARK SLATE BLUE"), 107, 35, 142},
285 {wxT("DARK SLATE GREY"), 47, 79, 79},
286 {wxT("DARK TURQUOISE"), 112, 147, 219},
287 {wxT("DIM GREY"), 84, 84, 84},
288 {wxT("FIREBRICK"), 142, 35, 35},
289 {wxT("FOREST GREEN"), 35, 142, 35},
290 {wxT("GOLD"), 204, 127, 50},
291 {wxT("GOLDENROD"), 219, 219, 112},
292 {wxT("GREY"), 128, 128, 128},
293 {wxT("GREEN"), 0, 255, 0},
294 {wxT("GREEN YELLOW"), 147, 219, 112},
295 {wxT("INDIAN RED"), 79, 47, 47},
296 {wxT("KHAKI"), 159, 159, 95},
297 {wxT("LIGHT BLUE"), 191, 216, 216},
298 {wxT("LIGHT GREY"), 192, 192, 192},
299 {wxT("LIGHT STEEL BLUE"), 143, 143, 188},
300 {wxT("LIME GREEN"), 50, 204, 50},
301 {wxT("LIGHT MAGENTA"), 255, 0, 255},
302 {wxT("MAGENTA"), 255, 0, 255},
303 {wxT("MAROON"), 142, 35, 107},
304 {wxT("MEDIUM AQUAMARINE"), 50, 204, 153},
305 {wxT("MEDIUM GREY"), 100, 100, 100},
306 {wxT("MEDIUM BLUE"), 50, 50, 204},
307 {wxT("MEDIUM FOREST GREEN"), 107, 142, 35},
308 {wxT("MEDIUM GOLDENROD"), 234, 234, 173},
309 {wxT("MEDIUM ORCHID"), 147, 112, 219},
310 {wxT("MEDIUM SEA GREEN"), 66, 111, 66},
311 {wxT("MEDIUM SLATE BLUE"), 127, 0, 255},
312 {wxT("MEDIUM SPRING GREEN"), 127, 255, 0},
313 {wxT("MEDIUM TURQUOISE"), 112, 219, 219},
314 {wxT("MEDIUM VIOLET RED"), 219, 112, 147},
315 {wxT("MIDNIGHT BLUE"), 47, 47, 79},
316 {wxT("NAVY"), 35, 35, 142},
317 {wxT("ORANGE"), 204, 50, 50},
318 {wxT("ORANGE RED"), 255, 0, 127},
319 {wxT("ORCHID"), 219, 112, 219},
320 {wxT("PALE GREEN"), 143, 188, 143},
321 {wxT("PINK"), 188, 143, 234},
322 {wxT("PLUM"), 234, 173, 234},
323 {wxT("PURPLE"), 176, 0, 255},
324 {wxT("RED"), 255, 0, 0},
325 {wxT("SALMON"), 111, 66, 66},
326 {wxT("SEA GREEN"), 35, 142, 107},
327 {wxT("SIENNA"), 142, 107, 35},
328 {wxT("SKY BLUE"), 50, 153, 204},
329 {wxT("SLATE BLUE"), 0, 127, 255},
330 {wxT("SPRING GREEN"), 0, 255, 127},
331 {wxT("STEEL BLUE"), 35, 107, 142},
332 {wxT("TAN"), 219, 147, 112},
333 {wxT("THISTLE"), 216, 191, 216},
334 {wxT("TURQUOISE"), 173, 234, 234},
335 {wxT("VIOLET"), 79, 47, 79},
336 {wxT("VIOLET RED"), 204, 50, 153},
337 {wxT("WHEAT"), 216, 216, 191},
338 {wxT("WHITE"), 255, 255, 255},
339 {wxT("YELLOW"), 255, 255, 0},
340 {wxT("YELLOW GREEN"), 153, 204, 50}
345 for ( n
= 0; n
< WXSIZEOF(wxColourTable
); n
++ )
347 const wxColourDesc
& cc
= wxColourTable
[n
];
348 (*m_map
)[cc
.name
] = new wxColour(cc
.r
, cc
.g
, cc
.b
);
352 m_palTable
= new long[n
];
353 for ( n
= 0; n
< WXSIZEOF(wxColourTable
); n
++ )
355 const wxColourDesc
& cc
= wxColourTable
[n
];
356 m_palTable
[n
] = OS2RGB(cc
.r
,cc
.g
,cc
.b
);
362 // ----------------------------------------------------------------------------
363 // wxColourDatabase operations
364 // ----------------------------------------------------------------------------
366 void wxColourDatabase::AddColour(const wxString
& name
, const wxColour
& colour
)
370 // canonicalize the colour names before using them as keys: they should be
372 wxString colName
= name
;
375 // ... and we also allow both grey/gray
376 wxString colNameAlt
= colName
;
377 if ( !colNameAlt
.Replace(_T("GRAY"), _T("GREY")) )
379 // but in this case it is not necessary so avoid extra search below
383 wxStringToColourHashMap::iterator it
= m_map
->find(colName
);
384 if ( it
== m_map
->end() && !colNameAlt
.empty() )
385 it
= m_map
->find(colNameAlt
);
386 if ( it
!= m_map
->end() )
388 *(it
->second
) = colour
;
392 (*m_map
)[colName
] = new wxColour(colour
);
396 wxColour
wxColourDatabase::Find(const wxString
& colour
) const
398 wxColourDatabase
* const self
= wxConstCast(this, wxColourDatabase
);
401 // make the comparaison case insensitive and also match both grey and gray
402 wxString colName
= colour
;
404 wxString colNameAlt
= colName
;
405 if ( !colNameAlt
.Replace(_T("GRAY"), _T("GREY")) )
408 wxStringToColourHashMap::iterator it
= m_map
->find(colName
);
409 if ( it
== m_map
->end() && !colNameAlt
.empty() )
410 it
= m_map
->find(colNameAlt
);
411 if ( it
!= m_map
->end() )
412 return *(it
->second
);
414 // we did not find any result in existing colours:
415 // we won't use wxString -> wxColour conversion because the
416 // wxColour::Set(const wxString &) function which does that conversion
417 // internally uses this function (wxColourDatabase::Find) and we want
418 // to avoid infinite recursion !
422 wxString
wxColourDatabase::FindName(const wxColour
& colour
) const
424 wxColourDatabase
* const self
= wxConstCast(this, wxColourDatabase
);
427 typedef wxStringToColourHashMap::iterator iterator
;
429 for ( iterator it
= m_map
->begin(), en
= m_map
->end(); it
!= en
; ++it
)
431 if ( *(it
->second
) == colour
)
435 return wxEmptyString
;
438 // ----------------------------------------------------------------------------
439 // deprecated wxColourDatabase methods
440 // ----------------------------------------------------------------------------
442 #if WXWIN_COMPATIBILITY_2_6
443 wxColour
*wxColourDatabase::FindColour(const wxString
& name
)
445 // This function is deprecated, use Find() instead.
446 // Formerly this function sometimes would return a deletable pointer and
447 // sometimes a non-deletable one (when returning a colour from the database).
448 // Trying to delete the latter anyway results in problems, so probably
449 // nobody ever freed the pointers. Currently it always returns a new
450 // instance, which means there will be memory leaks.
451 wxLogDebug(wxT("wxColourDataBase::FindColour():")
452 wxT(" Please use wxColourDataBase::Find() instead"));
454 // using a static variable here is not the most elegant solution but unless
455 // we want to make wxStringToColourHashMap public (i.e. move it to the
456 // header) so that we could have a member function returning
457 // wxStringToColourHashMap::iterator, there is really no good way to do it
460 // and knowing that this function is going to disappear in the next release
461 // anyhow I don't want to waste time on this
463 static wxColour s_col
;
469 return new wxColour(s_col
);
471 #endif // WXWIN_COMPATIBILITY_2_6
473 // ============================================================================
475 // ============================================================================
477 static wxStockGDI gs_wxStockGDI_instance
;
478 wxStockGDI
* wxStockGDI::ms_instance
= &gs_wxStockGDI_instance
;
479 wxObject
* wxStockGDI::ms_stockObject
[ITEMCOUNT
];
481 wxStockGDI::wxStockGDI()
485 wxStockGDI::~wxStockGDI()
489 void wxStockGDI::DeleteAll()
491 for (unsigned i
= 0; i
< ITEMCOUNT
; i
++)
493 delete ms_stockObject
[i
];
494 ms_stockObject
[i
] = NULL
;
498 const wxBrush
* wxStockGDI::GetBrush(Item item
)
500 wxBrush
* brush
= wx_static_cast(wxBrush
*, ms_stockObject
[item
]);
506 brush
= new wxBrush(*GetColour(COLOUR_BLACK
), wxSOLID
);
509 brush
= new wxBrush(*GetColour(COLOUR_BLUE
), wxSOLID
);
512 brush
= new wxBrush(*GetColour(COLOUR_CYAN
), wxSOLID
);
515 brush
= new wxBrush(*GetColour(COLOUR_GREEN
), wxSOLID
);
518 brush
= new wxBrush(wxColour(wxT("GREY")), wxSOLID
);
520 case BRUSH_LIGHTGREY
:
521 brush
= new wxBrush(*GetColour(COLOUR_LIGHTGREY
), wxSOLID
);
523 case BRUSH_MEDIUMGREY
:
524 brush
= new wxBrush(wxColour(wxT("MEDIUM GREY")), wxSOLID
);
527 brush
= new wxBrush(*GetColour(COLOUR_RED
), wxSOLID
);
529 case BRUSH_TRANSPARENT
:
530 brush
= new wxBrush(*GetColour(COLOUR_BLACK
), wxTRANSPARENT
);
533 brush
= new wxBrush(*GetColour(COLOUR_WHITE
), wxSOLID
);
538 ms_stockObject
[item
] = brush
;
543 const wxColour
* wxStockGDI::GetColour(Item item
)
545 wxColour
* colour
= wx_static_cast(wxColour
*, ms_stockObject
[item
]);
551 colour
= new wxColour(0, 0, 0);
554 colour
= new wxColour(0, 0, 255);
557 colour
= new wxColour(wxT("CYAN"));
560 colour
= new wxColour(0, 255, 0);
562 case COLOUR_LIGHTGREY
:
563 colour
= new wxColour(wxT("LIGHT GREY"));
566 colour
= new wxColour(255, 0, 0);
569 colour
= new wxColour(255, 255, 255);
574 ms_stockObject
[item
] = colour
;
579 const wxCursor
* wxStockGDI::GetCursor(Item item
)
581 wxCursor
* cursor
= wx_static_cast(wxCursor
*, ms_stockObject
[item
]);
587 cursor
= new wxCursor(wxCURSOR_CROSS
);
589 case CURSOR_HOURGLASS
:
590 cursor
= new wxCursor(wxCURSOR_WAIT
);
592 case CURSOR_STANDARD
:
593 cursor
= new wxCursor(wxCURSOR_ARROW
);
598 ms_stockObject
[item
] = cursor
;
603 const wxFont
* wxStockGDI::GetFont(Item item
)
605 wxFont
* font
= wx_static_cast(wxFont
*, ms_stockObject
[item
]);
611 font
= new wxFont(GetFont(FONT_NORMAL
)->GetPointSize(), wxROMAN
, wxITALIC
, wxNORMAL
);
614 font
= new wxFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT
));
617 font
= new wxFont(GetFont(FONT_NORMAL
)->GetPointSize() - 2, wxSWISS
, wxNORMAL
, wxNORMAL
);
620 font
= new wxFont(GetFont(FONT_NORMAL
)->GetPointSize(), wxSWISS
, wxNORMAL
, wxNORMAL
);
625 ms_stockObject
[item
] = font
;
630 const wxPen
* wxStockGDI::GetPen(Item item
)
632 wxPen
* pen
= wx_static_cast(wxPen
*, ms_stockObject
[item
]);
638 pen
= new wxPen(*GetColour(COLOUR_BLACK
), 1, wxSOLID
);
640 case PEN_BLACKDASHED
:
641 pen
= new wxPen(*GetColour(COLOUR_BLACK
), 1, wxSHORT_DASH
);
644 pen
= new wxPen(*GetColour(COLOUR_CYAN
), 1, wxSOLID
);
647 pen
= new wxPen(*GetColour(COLOUR_GREEN
), 1, wxSOLID
);
650 pen
= new wxPen(wxColour(wxT("GREY")), 1, wxSOLID
);
653 pen
= new wxPen(*GetColour(COLOUR_LIGHTGREY
), 1, wxSOLID
);
656 pen
= new wxPen(wxColour(wxT("MEDIUM GREY")), 1, wxSOLID
);
659 pen
= new wxPen(*GetColour(COLOUR_RED
), 1, wxSOLID
);
661 case PEN_TRANSPARENT
:
662 pen
= new wxPen(*GetColour(COLOUR_BLACK
), 1, wxTRANSPARENT
);
665 pen
= new wxPen(*GetColour(COLOUR_WHITE
), 1, wxSOLID
);
670 ms_stockObject
[item
] = pen
;
675 void wxInitializeStockLists()
677 wxTheColourDatabase
= new wxColourDatabase
;
679 wxTheBrushList
= new wxBrushList
;
680 wxThePenList
= new wxPenList
;
681 wxTheFontList
= new wxFontList
;
684 void wxDeleteStockLists()
686 wxDELETE(wxTheBrushList
);
687 wxDELETE(wxThePenList
);
688 wxDELETE(wxTheFontList
);
691 // ============================================================================
692 // wxTheXXXList stuff (semi-obsolete)
693 // ============================================================================
695 wxGDIObjListBase::wxGDIObjListBase()
699 wxGDIObjListBase::~wxGDIObjListBase()
701 for (wxList::compatibility_iterator node
= list
.GetFirst(); node
; node
= node
->GetNext())
703 delete wx_static_cast(wxObject
*, node
->GetData());
707 wxPen
*wxPenList::FindOrCreatePen (const wxColour
& colour
, int width
, int style
)
709 for (wxList::compatibility_iterator node
= list
.GetFirst(); node
; node
= node
->GetNext())
711 wxPen
*each_pen
= (wxPen
*) node
->GetData ();
713 each_pen
->GetWidth () == width
&&
714 each_pen
->GetStyle () == style
&&
715 each_pen
->GetColour ().Red () == colour
.Red () &&
716 each_pen
->GetColour ().Green () == colour
.Green () &&
717 each_pen
->GetColour ().Blue () == colour
.Blue ())
722 wxPen
penTmp(colour
, width
, style
);
725 pen
= new wxPen(penTmp
);
732 wxBrush
*wxBrushList::FindOrCreateBrush (const wxColour
& colour
, int style
)
734 for (wxList::compatibility_iterator node
= list
.GetFirst(); node
; node
= node
->GetNext())
736 wxBrush
*each_brush
= (wxBrush
*) node
->GetData ();
738 each_brush
->GetStyle () == style
&&
739 each_brush
->GetColour ().Red () == colour
.Red () &&
740 each_brush
->GetColour ().Green () == colour
.Green () &&
741 each_brush
->GetColour ().Blue () == colour
.Blue ())
745 wxBrush
* brush
= NULL
;
746 wxBrush
brushTmp(colour
, style
);
749 brush
= new wxBrush(brushTmp
);
756 wxFont
*wxFontList::FindOrCreateFont(int pointSize
,
761 const wxString
& facename
,
762 wxFontEncoding encoding
)
765 wxList::compatibility_iterator node
;
766 for (node
= list
.GetFirst(); node
; node
= node
->GetNext())
768 font
= (wxFont
*)node
->GetData();
770 font
->GetPointSize () == pointSize
&&
771 font
->GetStyle () == style
&&
772 font
->GetWeight () == weight
&&
773 font
->GetUnderlined () == underline
)
775 int fontFamily
= font
->GetFamily();
777 #if defined(__WXGTK__)
778 // under GTK the default family is wxSWISS, so looking for a font
779 // with wxDEFAULT family should return a wxSWISS one instead of
780 // creating a new one
781 bool same
= (fontFamily
== family
) ||
782 (fontFamily
== wxSWISS
&& family
== wxDEFAULT
);
784 // VZ: but why elsewhere do we require an exact match? mystery...
785 bool same
= fontFamily
== family
;
788 // empty facename matches anything at all: this is bad because
789 // depending on which fonts are already created, we might get back
790 // a different font if we create it with empty facename, but it is
791 // still better than never matching anything in the cache at all
793 if ( same
&& !facename
.empty() )
795 const wxString
& fontFace
= font
->GetFaceName();
797 // empty facename matches everything
798 same
= !fontFace
|| fontFace
== facename
;
801 if ( same
&& (encoding
!= wxFONTENCODING_DEFAULT
) )
803 // have to match the encoding too
804 same
= font
->GetEncoding() == encoding
;
814 // font not found, create the new one
816 wxFont
fontTmp(pointSize
, family
, style
, weight
, underline
, facename
, encoding
);
819 font
= new wxFont(fontTmp
);
826 #if WXWIN_COMPATIBILITY_2_6
827 void wxBrushList::AddBrush(wxBrush
*) { }
828 void wxBrushList::RemoveBrush(wxBrush
*) { }
829 void wxFontList::AddFont(wxFont
*) { }
830 void wxFontList::RemoveFont(wxFont
*) { }
831 void wxPenList::AddPen(wxPen
*) { }
832 void wxPenList::RemovePen(wxPen
*) { }
835 wxSize
wxGetDisplaySize()
838 wxDisplaySize(& x
, & y
);
842 wxRect
wxGetClientDisplayRect()
844 int x
, y
, width
, height
;
845 wxClientDisplayRect(&x
, &y
, &width
, &height
); // call plat-specific version
846 return wxRect(x
, y
, width
, height
);
849 wxSize
wxGetDisplaySizeMM()
852 wxDisplaySizeMM(& x
, & y
);
856 wxResourceCache::~wxResourceCache ()
858 wxList::compatibility_iterator node
= GetFirst ();
860 wxObject
*item
= (wxObject
*)node
->GetData();
863 node
= node
->GetNext ();