gzip $2/wxMotif-${WXVER}.tar
mv $2/wxMotif-${WXVER}.tar.gz $2/wxMotif-${WXVER}.tgz
+### wxX: combined wxMotif and wxX11 distributions
+ls `cat $1/distrib/msw/generic.rsp $1/distrib/msw/motif.rsp $1/distrib/msw/x11.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/ogl.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp` | uniq > /tmp/wxx.txt
+tar cvf $2/wxWindows-X-${WXVER}.tar -T /tmp/wxx.txt
+gzip $2/wxWindows-X-${WXVER}.tar
+mv $2/wxWindows-X-${WXVER}.tar.gz $2/wxWindows-X-${WXVER}.tgz
+
### wxMSW
ls `cat $1/distrib/msw/msw.rsp $1/distrib/msw/vc.rsp $1/distrib/msw/bc.rsp $1/distrib/msw/contrib.rsp $1/distrib/msw/xml.rsp $1/distrib/msw/makefile.rsp $1/distrib/msw/tiff.rsp $1/distrib/msw/jpeg.rsp` > /tmp/wxmsw.txt
tar cvf $2/wxMSW-${WXVER}.tar -T /tmp/wxmsw.txt
#define KeymapStateMask 0
#define StructureNotifyMask GR_EVENT_MASK_UPDATE
+#ifdef ConfigureNotify
+/* XtoNX.h gets it wrong */
+#undef ConfigureNotify
+#endif
+#define ConfigureNotify GR_EVENT_TYPE_UPDATE
+
#ifndef FocusIn
#define FocusIn GR_EVENT_TYPE_FOCUS_IN
#define FocusOut GR_EVENT_TYPE_FOCUS_OUT
EndModal(wxID_CANCEL);
}
+ // Not sure how to put this in platform-specific
+ // code just yet. Nano-X has to force a size event,
+ // else there's no initial size.
+#if wxUSE_NANOX
+ if (show)
+ {
+ wxSizeEvent event(GetSize(), GetId());
+ event.SetEventObject(this);
+ GetEventHandler()->ProcessEvent(event);
+ }
+#endif
+
bool ret = wxDialogBase::Show(show);
if ( show )
default: xfamily = wxT("*");
}
#if wxUSE_NANOX
+ int xweight;
+ switch (weight)
+ {
+ case wxBOLD:
+ {
+ xweight = MWLF_WEIGHT_BOLD;
+ break;
+ }
+ case wxLIGHT:
+ {
+ xweight = MWLF_WEIGHT_LIGHT;
+ break;
+ }
+ case wxNORMAL:
+ {
+ xweight = MWLF_WEIGHT_NORMAL;
+ break;
+ }
+
+ default:
+ {
+ xweight = MWLF_WEIGHT_DEFAULT;
+ break;
+ }
+ }
GR_SCREEN_INFO screenInfo;
GrGetScreenInfo(& screenInfo);
// A point is 1/20 of an inch.
// An inch is 2.541 cm.
// So pixelHeight = (pointSize / 20) (inches) * 2.541 (for cm) * yPixelsPerCM (for pixels)
-
- int pixelHeight = (int) ( (((float)pointSize) / 20.0) * 2.541 * (float) yPixelsPerCM) ;
+ // In fact pointSize is 10 * the normal point size so
+ // divide by 10.
+
+ // I don't know why this is necessary, but otherwise fonts
+ // are just too big.
+ float fudgeFactor = 0.6 ;
+ int pixelHeight = (int) ( (((float)pointSize) / 200.0) * 2.541 * (float) yPixelsPerCM * fudgeFactor) ;
+
+ // An alternative: assume that the screen is 72 dpi.
+ // This gets a similar result to above (pre-fudge factor)
+ //int pixelHeight = (int) (((float)pointSize / 200.0) * 72.0) ;
GR_LOGFONT logFont;
logFont.lfHeight = pixelHeight;
logFont.lfWidth = 0;
logFont.lfEscapement = 0;
logFont.lfOrientation = 0;
- logFont.lfWeight = weight; // TODO: check of conversion req'd
+ logFont.lfWeight = xweight;
logFont.lfItalic = (style == wxNORMAL ? 0 : 1) ;
logFont.lfUnderline = 0;
logFont.lfStrikeOut = 0;