/////////////////////////////////////////////////////////////////////////////
-// Name: font.h
+// Name: wx/cocoa/font.h
// Purpose: wxFont class
// Author: Julian Smart
// Modified by:
// Created: 01/02/97
-// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
*/
wxFont() { }
+ wxFont(const wxFontInfo& info)
+ {
+ Create(info.GetPointSize(),
+ info.GetFamily(),
+ info.GetStyle(),
+ info.GetWeight(),
+ info.IsUnderlined(),
+ info.GetFaceName(),
+ info.GetEncoding());
+
+ if ( info.IsUsingSizeInPixels() )
+ SetPixelSize(info.GetPixelSize());
+ }
+
/*! @abstract Platform-independent construction with individual properties
*/
#if FUTURE_WXWIN_COMPATIBILITY_3_0
// implement base class pure virtuals
virtual int GetPointSize() const;
- virtual wxFontFamily GetFamily() const;
virtual wxFontStyle GetStyle() const;
virtual wxFontWeight GetWeight() const;
virtual bool GetUnderlined() const;
virtual wxGDIRefData *CreateGDIRefData() const;
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
+ virtual wxFontFamily DoGetFamily() const;
+
private:
DECLARE_DYNAMIC_CLASS(wxFont)
};