X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a756f210019dd5b51331b7181c816d3882146a30..16c9a4258f33da3a3a6c14bec9d1b239f2c93edd:/src/common/gdicmn.cpp diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp index 91cdb4ae8c..2210dc3485 100644 --- a/src/common/gdicmn.cpp +++ b/src/common/gdicmn.cpp @@ -55,6 +55,10 @@ #endif #endif +#ifdef __WXX11__ +#include "X11/Xlib.h" +#endif + IMPLEMENT_CLASS(wxColourDatabase, wxList) IMPLEMENT_DYNAMIC_CLASS(wxFontList, wxList) IMPLEMENT_DYNAMIC_CLASS(wxPenList, wxList) @@ -370,12 +374,9 @@ wxColour *wxColourDatabase::FindColour(const wxString& colour) #ifdef __WXMOTIF__ Display *display = XtDisplay((Widget) wxTheApp->GetTopLevelWidget()) ; #endif -#ifdef __XVIEW__ - Xv_Screen screen = xv_get(xview_server, SERVER_NTH_SCREEN, 0); - Xv_opaque root_window = xv_get(screen, XV_ROOT); - Display *display = (Display *)xv_get(root_window, XV_DISPLAY); +#ifdef __WXX11__ + Display* display = (Display*) wxGetDisplay(); #endif - /* MATTHEW: [4] Use wxGetMainColormap */ if (!XParseColor(display, (Colormap) wxTheApp->GetMainColormap((WXDisplay*) display), colour,&xcolour)) return NULL; @@ -442,17 +443,30 @@ void wxInitializeStockObjects () #else #endif */ -#if defined(__WXPM__) || defined(__WXMAC__) +#if defined(__WXMAC__) static const int sizeFont = 12; wxNORMAL_FONT = new wxFont (sizeFont, wxMODERN, wxNORMAL, wxNORMAL); +#elif defined(__WXPM__) + static const int sizeFont = 12; #else wxNORMAL_FONT = new wxFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); static const int sizeFont = wxNORMAL_FONT->GetPointSize(); #endif +#if defined(__WXPM__) + /* + // Basic OS/2 has a fairly limited number of fonts and these are as good + // as I can do to get something that looks halfway "wx" normal + */ + wxNORMAL_FONT = new wxFont (sizeFont, wxMODERN, wxNORMAL, wxNORMAL); /* System VIO */ + wxSMALL_FONT = new wxFont (sizeFont - 4, wxMODERN, wxNORMAL, wxNORMAL); /* System VIO */ + wxITALIC_FONT = new wxFont (sizeFont, wxROMAN, wxITALIC, wxNORMAL); + wxSWISS_FONT = new wxFont (sizeFont, wxSWISS, wxNORMAL, wxNORMAL); /* Helv */ +#else wxSMALL_FONT = new wxFont (sizeFont - 2, wxSWISS, wxNORMAL, wxNORMAL); wxITALIC_FONT = new wxFont (sizeFont, wxROMAN, wxITALIC, wxNORMAL); wxSWISS_FONT = new wxFont (sizeFont, wxSWISS, wxNORMAL, wxNORMAL); +#endif wxRED_PEN = new wxPen (wxT("RED"), 1, wxSOLID); wxCYAN_PEN = new wxPen (wxT("CYAN"), 1, wxSOLID);