From ee1aaf9996f831c29443ddf1673784e8c9fac3a9 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 26 Oct 1999 15:16:29 +0000 Subject: [PATCH] Motif: made file selector and message box properly take on background colour. Initialised a member variable in wxDC, so e.g. bombs sample now works and splitter displays something. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/html/index.htm | 1 + docs/motif/install.txt | 15 ++++++++------- docs/readme.txt | 39 ++++++++++++++++++++++++++++++++++++--- src/motif/dc.cpp | 5 +++++ src/motif/filedlg.cpp | 25 ++++++++++++++++--------- src/motif/msgdlg.cpp | 29 +++++++++++++++++++---------- 6 files changed, 85 insertions(+), 29 deletions(-) diff --git a/docs/html/index.htm b/docs/html/index.htm index a789110..f00dc99 100644 --- a/docs/html/index.htm +++ b/docs/html/index.htm @@ -233,6 +233,7 @@ platforms that don't support it, a normal-sized title bar is displayed. small a wxWindows application as you can get.
  • nativdlg: shows how wxWindows can load a standard Windows dialog resource, translating the controls into wxWindows controls (Windows only). +
  • nettest: wxDialUpManager demo.
  • notebook: shows the wxNotebook (tabbed window) control.
  • oleauto: a little OLE automation controller (Windows only; requires Excel to be present). diff --git a/docs/motif/install.txt b/docs/motif/install.txt index 214fd8e..efdd4aa 100644 --- a/docs/motif/install.txt +++ b/docs/motif/install.txt @@ -177,8 +177,8 @@ make install ldconfig exit -NB: DO NOT COMPILE WXGTK WITH GCC AND THREADS, SINCE ALL PROGRAMS WILL CRASH UPON -START-UP! Just always use egcs and be happy. +NB: DO NOT COMPILE WXGTK WITH GCC AND THREADS, SINCE ALL PROGRAMS WILL +CRASH UPON START-UP! Just always use egcs and be happy. * Building wxMotif on SGI -------------------------- @@ -203,7 +203,7 @@ The SGI native compiler support has only been tested on Irix 6.5. Usage: ./configure options -` + If you want to use system's C and C++ compiler, set environment variables CC and CCC as @@ -417,8 +417,9 @@ and configure before you can type make. * Further notes by Julian Smart --------------------------------- -- You may find the following script useful for compiling wxMotif: - Make this script executable with the command +- You may find the following script useful for compiling wxMotif, + especially if installing from zips (which don't preserve file + permissions). Make this script executable with the command chmod a+x makewxmotif. -------:x-----Cut here-----:x----- @@ -562,5 +563,5 @@ compiler and the error message(s) to the wxwin-developers mailing list at: wxwin-developers@wx.dent.med.uni-muenchen.de -Julian Smart, February 1999. -julian.smart@ukonline.co.uk +Julian Smart, Robert Roebling and Vadim Zeitlin, November 1999. + diff --git a/docs/readme.txt b/docs/readme.txt index 099947c..89d7f72 100644 --- a/docs/readme.txt +++ b/docs/readme.txt @@ -18,6 +18,21 @@ Windows Help form: see the docs hierarchy. For a quick start, point your Web browser at docs/html/index.htm for a list of important documents and samples. +Changes in this release +----------------------- + +These are the major improvements: + +wxWindows 2.1 +============= + +- Integration of wxHTML widget and help controller into + wxWindows. wxHTML allows HTML viewing and printing. +- New classes wxChrono, wxDialUpManager, wxFontEnumerator, + TODO +- wxSocket and wxThread classes rewritten. +- Documentation improvements. + Platforms supported ------------------- @@ -68,19 +83,37 @@ tex2rtf2.zip Tex2RTF documentation tool wxWindows for GTK distribution ------------------------------ -TODO +wxGTK-2.x.x.tgz wxGTK source distribution. You will + need the HTML and/or PDF documentation + from the zip set (above). wxWindows for Motif distribution -------------------------------- -TODO +wxMotif-2.x.x.tgz wxMotif source distribution. You will + need the HTML and/or PDF documentation + from the zip set (above). wxWindows for Windows distribution ---------------------------------- +As well as the core source, the Windows setup contains: + +- Windows Help versions of the documentation (docs/winhelp); +- wxGLCanvas (OpenGL integration, in utils/glcanvas); +- OGL 3 (Object Graphics Library, in utils/ogl); +- wxTreeLayout (for tree drawing, in utils/wxtree); +- a Dialog Editor binary; +- the JPEG library. + setup.exe Setup file (Windows 95/98, NT) setup.* Other setup files +wxWindows for Mac distribution +------------------------------ + +TODO + Installation ------------ @@ -115,7 +148,7 @@ commercial applications using wxWindows. Documentation ------------- -See docs/changes.txt for a history of changes to wxWindows 2. +See docs/changes.txt for a detailed history of changes to wxWindows 2. See docs/html/index.htm for an HTML index of the major documents. The Windows help files are located in docs/winhelp. diff --git a/src/motif/dc.cpp b/src/motif/dc.cpp index 1ece237..1509fb3 100644 --- a/src/motif/dc.cpp +++ b/src/motif/dc.cpp @@ -46,6 +46,11 @@ wxDC::wxDC() m_backgroundMode = wxTRANSPARENT; m_isInteractive = FALSE; + + m_internalDeviceOriginX = 0; + m_internalDeviceOriginY = 0; + m_externalDeviceOriginX = 0; + m_externalDeviceOriginY = 0; } void wxDC::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y) diff --git a/src/motif/filedlg.cpp b/src/motif/filedlg.cpp index 01b763e..00b63d4 100644 --- a/src/motif/filedlg.cpp +++ b/src/motif/filedlg.cpp @@ -32,6 +32,8 @@ #include #include +#include "wx/motif/private.h" + #if !USE_SHARED_LIBRARY IMPLEMENT_CLASS(wxFileDialog, wxDialog) #endif @@ -187,8 +189,20 @@ int wxFileDialog::ShowModal() } else parentWidget = (Widget) wxTheApp->GetTopLevelWidget(); + // prepare the arg list + Arg args[10]; + int ac = 0; + + wxComputeColours (XtDisplay(parentWidget), & m_backgroundColour, + (wxColour*) NULL); + + XtSetArg(args[ac], XmNbackground, g_itemColors[wxBACK_INDEX].pixel); ac++; + XtSetArg(args[ac], XmNtopShadowColor, g_itemColors[wxTOPS_INDEX].pixel); ac++; + XtSetArg(args[ac], XmNbottomShadowColor, g_itemColors[wxBOTS_INDEX].pixel); ac++; + XtSetArg(args[ac], XmNforeground, g_itemColors[wxFORE_INDEX].pixel); ac++; + - Widget fileSel = XmCreateFileSelectionDialog(parentWidget, "file_selector", NULL, 0); + Widget fileSel = XmCreateFileSelectionDialog(parentWidget, "file_selector", args, ac); XtUnmanageChild(XmFileSelectionBoxGetChild(fileSel, XmDIALOG_HELP_BUTTON)); Widget filterWidget = XmFileSelectionBoxGetChild(fileSel, XmDIALOG_FILTER_TEXT); @@ -273,17 +287,10 @@ int wxFileDialog::ShowModal() XmNresizePolicy, XmRESIZE_NONE, NULL); #endif - DoChangeBackgroundColour((WXWidget) fileSel, m_backgroundColour); + // DoChangeBackgroundColour((WXWidget) fileSel, m_backgroundColour); DoChangeBackgroundColour((WXWidget) filterWidget, *wxWHITE); DoChangeBackgroundColour((WXWidget) selectionWidget, *wxWHITE); - // apparently, this provokes a crash -#if 0 - DoChangeBackgroundColour((WXWidget) okWidget, m_backgroundColour, TRUE); - DoChangeBackgroundColour((WXWidget) cancelWidget, m_backgroundColour, TRUE); - DoChangeBackgroundColour((WXWidget) applyWidget, m_backgroundColour, TRUE); -#endif - wxChangeListBoxColours(this, dirListWidget); wxChangeListBoxColours(this, fileListWidget); diff --git a/src/motif/msgdlg.cpp b/src/motif/msgdlg.cpp index dfae188..3e37ff0 100644 --- a/src/motif/msgdlg.cpp +++ b/src/motif/msgdlg.cpp @@ -125,16 +125,6 @@ int wxMessageDialog::ShowModal() dialogCreateFunction = XmCreateInformationDialog; } - // prepare the arg list - Arg args[2]; - int ac = 0; - - wxXmString text(m_message); - wxXmString title(m_caption); - XtSetArg(args[ac], XmNmessageString, text()); ac++; - XtSetArg(args[ac], XmNdialogTitle, title()); ac++; - - // do create message box Widget wParent = m_parent ? GetWidget(m_parent) : (Widget) 0; if ( !wParent ) { @@ -149,6 +139,25 @@ int wxMessageDialog::ShowModal() wParent = GetWidget(window); } + // prepare the arg list + Arg args[10]; + int ac = 0; + + wxXmString text(m_message); + wxXmString title(m_caption); + XtSetArg(args[ac], XmNmessageString, text()); ac++; + XtSetArg(args[ac], XmNdialogTitle, title()); ac++; + + wxComputeColours (XtDisplay(wParent), & m_backgroundColour, + (wxColour*) NULL); + + XtSetArg(args[ac], XmNbackground, g_itemColors[wxBACK_INDEX].pixel); ac++; + XtSetArg(args[ac], XmNtopShadowColor, g_itemColors[wxTOPS_INDEX].pixel); ac++; + XtSetArg(args[ac], XmNbottomShadowColor, g_itemColors[wxBOTS_INDEX].pixel); ac++; + XtSetArg(args[ac], XmNforeground, g_itemColors[wxFORE_INDEX].pixel); ac++; + + // do create message box + Widget wMsgBox = (*dialogCreateFunction)(wParent, "", args, ac); wxCHECK_MSG( wMsgBox, wxID_CANCEL, "msg box creation failed" ); -- 2.7.4