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
This commit is contained in:
Julian Smart 1999-10-26 15:16:29 +00:00
parent adc6fb165a
commit ee1aaf9996
6 changed files with 85 additions and 29 deletions

View File

@ -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. small a wxWindows application as you can get.
<li><a href="../../samples/nativdlg">nativdlg</a>: shows how wxWindows can load a standard Windows <li><a href="../../samples/nativdlg">nativdlg</a>: shows how wxWindows can load a standard Windows
dialog resource, translating the controls into wxWindows controls (Windows only). dialog resource, translating the controls into wxWindows controls (Windows only).
<li><a href="../../samples/nettest">nettest</a>: wxDialUpManager demo.
<li><a href="../../samples/notebook">notebook</a>: shows the wxNotebook (tabbed window) control. <li><a href="../../samples/notebook">notebook</a>: shows the wxNotebook (tabbed window) control.
<li><a href="../../samples/oleauto">oleauto</a>: a little OLE automation controller (Windows only; requires <li><a href="../../samples/oleauto">oleauto</a>: a little OLE automation controller (Windows only; requires
Excel to be present). Excel to be present).

View File

@ -177,8 +177,8 @@ make install
ldconfig ldconfig
exit exit
NB: DO NOT COMPILE WXGTK WITH GCC AND THREADS, SINCE ALL PROGRAMS WILL CRASH UPON NB: DO NOT COMPILE WXGTK WITH GCC AND THREADS, SINCE ALL PROGRAMS WILL
START-UP! Just always use egcs and be happy. CRASH UPON START-UP! Just always use egcs and be happy.
* Building wxMotif on SGI * Building wxMotif on SGI
-------------------------- --------------------------
@ -203,7 +203,7 @@ The SGI native compiler support has only been tested on Irix 6.5.
Usage: Usage:
./configure options ./configure options
`
If you want to use system's C and C++ compiler, If you want to use system's C and C++ compiler,
set environment variables CC and CCC as set environment variables CC and CCC as
@ -417,8 +417,9 @@ and configure before you can type make.
* Further notes by Julian Smart * Further notes by Julian Smart
--------------------------------- ---------------------------------
- You may find the following script useful for compiling wxMotif: - You may find the following script useful for compiling wxMotif,
Make this script executable with the command especially if installing from zips (which don't preserve file
permissions). Make this script executable with the command
chmod a+x makewxmotif. chmod a+x makewxmotif.
-------:x-----Cut here-----:x----- -------: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 wxwin-developers@wx.dent.med.uni-muenchen.de
Julian Smart, February 1999. Julian Smart, Robert Roebling and Vadim Zeitlin, November 1999.
julian.smart@ukonline.co.uk

View File

@ -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 For a quick start, point your Web browser at docs/html/index.htm for a list of
important documents and samples. 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 Platforms supported
------------------- -------------------
@ -68,19 +83,37 @@ tex2rtf2.zip Tex2RTF documentation tool
wxWindows for GTK distribution 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 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 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.exe Setup file (Windows 95/98, NT)
setup.* Other setup files setup.* Other setup files
wxWindows for Mac distribution
------------------------------
TODO
Installation Installation
------------ ------------
@ -115,7 +148,7 @@ commercial applications using wxWindows.
Documentation 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. See docs/html/index.htm for an HTML index of the major documents.
The Windows help files are located in docs/winhelp. The Windows help files are located in docs/winhelp.

View File

@ -46,6 +46,11 @@ wxDC::wxDC()
m_backgroundMode = wxTRANSPARENT; m_backgroundMode = wxTRANSPARENT;
m_isInteractive = FALSE; 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) void wxDC::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y)

View File

@ -32,6 +32,8 @@
#include <Xm/RowColumn.h> #include <Xm/RowColumn.h>
#include <Xm/LabelG.h> #include <Xm/LabelG.h>
#include "wx/motif/private.h"
#if !USE_SHARED_LIBRARY #if !USE_SHARED_LIBRARY
IMPLEMENT_CLASS(wxFileDialog, wxDialog) IMPLEMENT_CLASS(wxFileDialog, wxDialog)
#endif #endif
@ -187,8 +189,20 @@ int wxFileDialog::ShowModal()
} }
else else
parentWidget = (Widget) wxTheApp->GetTopLevelWidget(); parentWidget = (Widget) wxTheApp->GetTopLevelWidget();
// prepare the arg list
Arg args[10];
int ac = 0;
Widget fileSel = XmCreateFileSelectionDialog(parentWidget, "file_selector", NULL, 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", args, ac);
XtUnmanageChild(XmFileSelectionBoxGetChild(fileSel, XmDIALOG_HELP_BUTTON)); XtUnmanageChild(XmFileSelectionBoxGetChild(fileSel, XmDIALOG_HELP_BUTTON));
Widget filterWidget = XmFileSelectionBoxGetChild(fileSel, XmDIALOG_FILTER_TEXT); Widget filterWidget = XmFileSelectionBoxGetChild(fileSel, XmDIALOG_FILTER_TEXT);
@ -273,17 +287,10 @@ int wxFileDialog::ShowModal()
XmNresizePolicy, XmRESIZE_NONE, XmNresizePolicy, XmRESIZE_NONE,
NULL); NULL);
#endif #endif
DoChangeBackgroundColour((WXWidget) fileSel, m_backgroundColour); // DoChangeBackgroundColour((WXWidget) fileSel, m_backgroundColour);
DoChangeBackgroundColour((WXWidget) filterWidget, *wxWHITE); DoChangeBackgroundColour((WXWidget) filterWidget, *wxWHITE);
DoChangeBackgroundColour((WXWidget) selectionWidget, *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, dirListWidget);
wxChangeListBoxColours(this, fileListWidget); wxChangeListBoxColours(this, fileListWidget);

View File

@ -125,16 +125,6 @@ int wxMessageDialog::ShowModal()
dialogCreateFunction = XmCreateInformationDialog; 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; Widget wParent = m_parent ? GetWidget(m_parent) : (Widget) 0;
if ( !wParent ) if ( !wParent )
{ {
@ -149,6 +139,25 @@ int wxMessageDialog::ShowModal()
wParent = GetWidget(window); 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); Widget wMsgBox = (*dialogCreateFunction)(wParent, "", args, ac);
wxCHECK_MSG( wMsgBox, wxID_CANCEL, "msg box creation failed" ); wxCHECK_MSG( wMsgBox, wxID_CANCEL, "msg box creation failed" );