Added new __WXMOTIF20__ macro, which is true if the Motif version

is 2.0 or higher.
  Now Motif 2.0 or better (but not Lesstif) uses XmRenderTable instead
of the deprecated XmFontList. This allows underlined text in controls.
  Miscellaneous cleanup; used wxXmString in some more places.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mattia Barbon
2003-03-05 20:15:35 +00:00
parent bdb9ccbfd6
commit da494b405d
20 changed files with 1018 additions and 860 deletions

View File

@@ -2024,6 +2024,10 @@ typedef void* WXRegion;
typedef void* WXFont;
typedef void* WXImage;
typedef void* WXFontList;
typedef void* WXRendition;
typedef void* WXRenderTable;
typedef void* WXFontType; /* either a XmFontList or XmRenderTable */
typedef void* WXString;
typedef unsigned long Atom; /* this might fail on a few architectures */

View File

@@ -99,7 +99,13 @@ public:
WXDisplay* display = NULL) const;
WXFontList GetFontList(double scale = 1.0,
WXDisplay* display = NULL) const;
#if __WXMOTIF20__
WXRenderTable GetRenderTable(WXDisplay* display) const;
#endif
// returns either a XmFontList or XmRendition, depending
// on Motif version
WXFontType GetFontType(WXDisplay* display) const;
static WXString GetFontTag();
protected:
virtual void DoSetNativeFontInfo( const wxNativeFontInfo& info );

View File

@@ -109,7 +109,10 @@ public:
m_string = XmStringCreateLtoR((char *)str.c_str(),
XmSTRING_DEFAULT_CHARSET);
}
// just to avoid calling XmStringFree()
wxXmString(const XmString& string) { m_string = string; }
~wxXmString() { XmStringFree(m_string); }
// semi-implicit conversion to XmString (shouldn't rely on implicit