merged 2.4 branch into the trunk
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -101,6 +101,13 @@ public:
|
||||
const wxSize& GetInitialSize() const { return m_initialSize; }
|
||||
bool GetShowIconic() const { return m_showIconic; }
|
||||
|
||||
#if wxUSE_UNICODE
|
||||
// Global context for Pango layout. Either use X11
|
||||
// or use Xft rendering according to GDK_USE_XFT
|
||||
// environment variable
|
||||
PangoContext* GetPangoContext();
|
||||
#endif
|
||||
|
||||
// We need this before creating the app
|
||||
static WXDisplay* GetDisplay() { return ms_display; }
|
||||
static WXDisplay* ms_display;
|
||||
|
@@ -48,7 +48,10 @@ public:
|
||||
|
||||
// Implicit conversion from the colour name
|
||||
wxColour( const wxString &colourName ) { InitFromName(colourName); }
|
||||
wxColour( const char *colourName ) { InitFromName(colourName); }
|
||||
wxColour( const char *colourName ) { InitFromName( wxString::FromAscii(colourName) ); }
|
||||
#if wxUSE_UNICODE
|
||||
wxColour( const wxChar *colourName ) { InitFromName( wxString(colourName) ); }
|
||||
#endif
|
||||
|
||||
wxColour( const wxColour& col ) { Ref(col); }
|
||||
wxColour& operator = ( const wxColour& col ) { Ref(col); return *this; }
|
||||
|
@@ -133,6 +133,11 @@ protected:
|
||||
wxRegion m_currentClippingRegion;
|
||||
wxRegion m_paintClippingRegion;
|
||||
|
||||
#if wxUSE_UNICODE
|
||||
PangoContext *m_context;
|
||||
PangoFontDescription *m_fontdesc;
|
||||
#endif
|
||||
|
||||
void SetUpDC();
|
||||
void Destroy();
|
||||
void ComputeScaleAndOrigin();
|
||||
|
@@ -48,11 +48,15 @@ public:
|
||||
bool underlined = FALSE,
|
||||
const wxString& face = wxEmptyString,
|
||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
|
||||
|
||||
// wxMOTIF-specific
|
||||
|
||||
// FIXME: I added the ! to make it compile;
|
||||
// is this right? - JACS
|
||||
#if !wxUSE_UNICODE
|
||||
bool Create(const wxString& fontname,
|
||||
wxFontEncoding fontenc = wxFONTENCODING_DEFAULT);
|
||||
bool Create(const wxNativeFontInfo& fontinfo);
|
||||
#endif
|
||||
// DELETEME: no longer seems to be implemented.
|
||||
// bool Create(const wxNativeFontInfo& fontinfo);
|
||||
|
||||
virtual ~wxFont();
|
||||
|
||||
@@ -69,6 +73,8 @@ public:
|
||||
virtual wxFontEncoding GetEncoding() const;
|
||||
virtual wxNativeFontInfo *GetNativeFontInfo() const;
|
||||
|
||||
virtual bool IsFixedWidth() const;
|
||||
|
||||
virtual void SetPointSize(int pointSize);
|
||||
virtual void SetFamily(int family);
|
||||
virtual void SetStyle(int style);
|
||||
@@ -78,8 +84,13 @@ public:
|
||||
virtual void SetEncoding(wxFontEncoding encoding);
|
||||
virtual void SetNativeFontInfo( const wxNativeFontInfo& info );
|
||||
|
||||
// Implementation
|
||||
virtual void SetNoAntiAliasing( bool no = TRUE );
|
||||
virtual bool GetNoAntiAliasing();
|
||||
|
||||
// Implementation
|
||||
|
||||
#if wxUSE_PANGO
|
||||
#else
|
||||
// Find an existing, or create a new, XFontStruct
|
||||
// based on this wxFont and the given scale. Append the
|
||||
// font to list in the private data for future reference.
|
||||
@@ -98,13 +109,12 @@ public:
|
||||
// Helper function for convenient access of the above.
|
||||
WXFontStructPtr GetFontStruct(double scale = 1.0,
|
||||
WXDisplay* display = NULL) const;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
// VZ: IMHO, we don't need it at all...
|
||||
bool RealizeResource() { return TRUE; }
|
||||
void Unshare();
|
||||
|
||||
private:
|
||||
|
@@ -21,10 +21,26 @@
|
||||
// Include common declarations
|
||||
#include "wx/x11/privx.h"
|
||||
|
||||
#if wxUSE_UNICODE
|
||||
#include "pango/pango.h"
|
||||
#endif
|
||||
|
||||
class wxMouseEvent;
|
||||
class wxKeyEvent;
|
||||
class wxWindow;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Some Unicode <-> UTF8 macros stolen from GTK
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_UNICODE
|
||||
#define wxGTK_CONV(s) wxConvUTF8.cWX2MB(s)
|
||||
#define wxGTK_CONV_BACK(s) wxConvUTF8.cMB2WX(s)
|
||||
#else
|
||||
#define wxGTK_CONV(s) s.c_str()
|
||||
#define wxGTK_CONV_BACK(s) s
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// we maintain a hash table which contains the mapping from Widget to wxWindow
|
||||
// corresponding to the window for this widget
|
||||
@@ -42,7 +58,7 @@ extern bool wxAddClientWindowToTable(Window w, wxWindow *win);
|
||||
// TranslateXXXEvent() functions - translate X event to wxWindow one
|
||||
// ----------------------------------------------------------------------------
|
||||
extern bool wxTranslateMouseEvent(wxMouseEvent& wxevent, wxWindow *win, Window window, XEvent *xevent);
|
||||
extern bool wxTranslateKeyEvent(wxKeyEvent& wxevent, wxWindow *win, Window window, XEvent *xevent);
|
||||
extern bool wxTranslateKeyEvent(wxKeyEvent& wxevent, wxWindow *win, Window window, XEvent *xevent, bool isAscii = FALSE);
|
||||
|
||||
extern Window wxGetWindowParent(Window window);
|
||||
|
||||
|
@@ -14,6 +14,8 @@
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/utils.h"
|
||||
#include "wx/colour.h"
|
||||
|
||||
#include "X11/Xlib.h"
|
||||
#include "X11/Xatom.h"
|
||||
#include "X11/Xutil.h"
|
||||
|
Reference in New Issue
Block a user