Added script to help make wxMotif via configure; nativdlg sample works again;
resource sample now works using .rc files for most Windows compilers git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1178 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -6,6 +6,9 @@ config.guess
|
|||||||
config.sub
|
config.sub
|
||||||
wx-config.in
|
wx-config.in
|
||||||
mkinstalldirs
|
mkinstalldirs
|
||||||
|
|
||||||
|
makeenvs/*.env
|
||||||
|
|
||||||
src/Makefile
|
src/Makefile
|
||||||
src/Makefile.in
|
src/Makefile.in
|
||||||
src/*.inc
|
src/*.inc
|
||||||
@@ -89,7 +92,8 @@ src/makeprog.env
|
|||||||
|
|
||||||
include/wx/motif/*.h
|
include/wx/motif/*.h
|
||||||
|
|
||||||
docs/motif/*.*
|
docs/motif/*.txt
|
||||||
|
docs/motif/makewx
|
||||||
|
|
||||||
lib/dummy
|
lib/dummy
|
||||||
|
|
||||||
|
@@ -125,7 +125,7 @@ The MDI client window is set to occupy the remaining space.
|
|||||||
|
|
||||||
\membersection{wxLayoutAlgorithm::LayoutFrame}\label{wxlayoutalgorithmlayoutframe}
|
\membersection{wxLayoutAlgorithm::LayoutFrame}\label{wxlayoutalgorithmlayoutframe}
|
||||||
|
|
||||||
\constfunc{bool}{LayoutFrame}{\param{wxFrame* }{frame}, \param{wxWindow*}{ mainWindow}}
|
\constfunc{bool}{LayoutFrame}{\param{wxFrame* }{frame}, \param{wxWindow*}{ mainWindow = NULL}}
|
||||||
|
|
||||||
Lays out the children of a normal frame.
|
Lays out the children of a normal frame.
|
||||||
|
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
wxWindows 2.0 for Motif installation
|
wxWindows 2.0 for Motif installation
|
||||||
------------------------------------
|
------------------------------------
|
||||||
|
|
||||||
- Prerequisites: Motif 1.2 or above, or
|
- Prerequisites: Motif 1.2 or above, or Lesstif
|
||||||
Lesstif (not yet tested).
|
(not yet tested). Motif 2.0 and above may also be suitable.
|
||||||
|
|
||||||
- Download the files wx200gen.zip and wx200mot.zip, and
|
- Download the files wx200gen.zip and wx200mot.zip, and
|
||||||
documentation in a preferred format, such as wx200htm.zip
|
documentation in a preferred format, such as wx200htm.zip
|
||||||
@@ -13,6 +13,32 @@ wxWindows 2.0 for Motif installation
|
|||||||
files to Unix format. Don't worry about files being
|
files to Unix format. Don't worry about files being
|
||||||
overwritten: they should be identical anyway.
|
overwritten: they should be identical anyway.
|
||||||
|
|
||||||
|
COMPILING USING CONFIGURE
|
||||||
|
|
||||||
|
- You can use the wxGTK configure system to make wxMotif, or
|
||||||
|
you can follow the following steps to use the simpler (but
|
||||||
|
less automatic) makefile system. If using configure, the
|
||||||
|
following script should make the library and samples, when
|
||||||
|
run from the top-level wxWindows directory (see also 'makewx'
|
||||||
|
in this directory):
|
||||||
|
|
||||||
|
# Make wxMotif using the configure system
|
||||||
|
chmod a+x install/unix/config.sub
|
||||||
|
install/unix/setup/general/* \
|
||||||
|
install/unix/config.guess install/unix/setup/shared/*
|
||||||
|
cd install/unix
|
||||||
|
autoconf && ./configure --with-shared --with-motif --with-debug_flag \
|
||||||
|
--with-debug_info --without-threads
|
||||||
|
cd ../..
|
||||||
|
make makefiles
|
||||||
|
make
|
||||||
|
|
||||||
|
COMPILING USING MAKEFILES
|
||||||
|
|
||||||
|
- Choose a .env file from src/makeenvs that matches your
|
||||||
|
environment, and copy it to src/make.env. These are the
|
||||||
|
settings read by wxWindows for Motif makefiles.
|
||||||
|
|
||||||
- Edit src/make.env to change options according to your local
|
- Edit src/make.env to change options according to your local
|
||||||
environment. In particular, change WXDIR to where wxWindows is
|
environment. In particular, change WXDIR to where wxWindows is
|
||||||
found on your system, or set the WXWIN environment variable
|
found on your system, or set the WXWIN environment variable
|
||||||
@@ -42,10 +68,10 @@ Notes:
|
|||||||
------
|
------
|
||||||
|
|
||||||
- Better installation and makefile systems are
|
- Better installation and makefile systems are
|
||||||
required. I didn't use the wxGTK system because I couldn't
|
required. Although the wxGTK config system can be used to make
|
||||||
understand it or make it work with wxMotif. Also I think
|
wxMotif and samples, it can't easily be made to work
|
||||||
we should use something that can be made to work easily
|
with applications outside the wxWindows hierarchy. Hence the
|
||||||
with applications outside the wxWindows hierarchy.
|
simple makefile system.
|
||||||
|
|
||||||
- Debugging mode is switched on by default. To compile in non-debug
|
- Debugging mode is switched on by default. To compile in non-debug
|
||||||
mode, remove the -D__WXDEBUG__ switch in make.env.
|
mode, remove the -D__WXDEBUG__ switch in make.env.
|
||||||
@@ -59,6 +85,11 @@ Notes:
|
|||||||
need to install the XPM package. It can be obtained from:
|
need to install the XPM package. It can be obtained from:
|
||||||
|
|
||||||
ftp://ftp.x.org/contrib/libraries/xpm-3.4k.tar.gz
|
ftp://ftp.x.org/contrib/libraries/xpm-3.4k.tar.gz
|
||||||
|
http://sunfreeware.com
|
||||||
|
|
||||||
|
You may need to modify make.env to add -I and -L options pointing to where Xpm
|
||||||
|
is installed and possibly change bitmap.cpp to
|
||||||
|
include <xpm.h> instead of <X11/xpm.h>
|
||||||
|
|
||||||
Alternatively, edit include/motif/setup.h, set wxUSE_XPM
|
Alternatively, edit include/motif/setup.h, set wxUSE_XPM
|
||||||
to 0, and recompile. You will not be able to load any XPMs,
|
to 0, and recompile. You will not be able to load any XPMs,
|
||||||
@@ -70,5 +101,5 @@ Notes:
|
|||||||
wxwin-users@wx.dent.med.uni-muenchen.de
|
wxwin-users@wx.dent.med.uni-muenchen.de
|
||||||
|
|
||||||
|
|
||||||
Julian Smart, November 1998.
|
Julian Smart, December 1998.
|
||||||
julian.smart@ukonline.co.uk
|
julian.smart@ukonline.co.uk
|
||||||
|
7
docs/motif/makewx
Normal file
7
docs/motif/makewx
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# Make wxMotif using the configure system
|
||||||
|
chmod a+x install/unix/config.sub install/unix/setup/general/* install/unix/config.guess install/unix/setup/shared/*
|
||||||
|
cd install/unix
|
||||||
|
autoconf && ./configure --with-shared --with-gtk --with-debug_flag --with-debug_info --without-threads
|
||||||
|
cd ../..
|
||||||
|
make makefiles
|
||||||
|
make
|
@@ -174,7 +174,7 @@ public:
|
|||||||
bool LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* rect = (wxRect*) NULL);
|
bool LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* rect = (wxRect*) NULL);
|
||||||
|
|
||||||
// mainWindow is sized to whatever's left over.
|
// mainWindow is sized to whatever's left over.
|
||||||
bool LayoutFrame(wxFrame* frame, wxWindow* mainWindow);
|
bool LayoutFrame(wxFrame* frame, wxWindow* mainWindow = (wxWindow*) NULL);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -91,7 +91,7 @@ void MyFrame::OnQuit(wxCommandEvent& event)
|
|||||||
void MyFrame::OnTest1(wxCommandEvent& event)
|
void MyFrame::OnTest1(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
MyDialog *dialog = new MyDialog;
|
MyDialog *dialog = new MyDialog;
|
||||||
if (dialog->LoadNativeDialog(this, dialog1))
|
if (dialog->LoadNativeDialog(this, "dialog1"))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
wxTextCtrl *text = (wxTextCtrl *)wxFindWindowByName("multitext3", dialog);
|
wxTextCtrl *text = (wxTextCtrl *)wxFindWindowByName("multitext3", dialog);
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
// Microsoft Developer Studio generated include file.
|
// Microsoft Developer Studio generated include file.
|
||||||
// Used by dialog1.rc
|
// Used by dialog1.rc
|
||||||
//
|
//
|
||||||
#define dialog1 101
|
// #define dialog1 101
|
||||||
#define IDC_EDIT1 1000
|
#define IDC_EDIT1 1000
|
||||||
#define IDC_CHECK1 1001
|
#define IDC_CHECK1 1001
|
||||||
#define IDC_COMBO1 1003
|
#define IDC_COMBO1 1003
|
||||||
|
@@ -42,7 +42,7 @@
|
|||||||
// the TEXT resource, for some reason, so either run-time file loading
|
// the TEXT resource, for some reason, so either run-time file loading
|
||||||
// or file inclusion should be used.
|
// or file inclusion should be used.
|
||||||
|
|
||||||
#if defined(__WXMSW__) && !defined(__BORLANDC__) && !defined(__GNUWIN32__)
|
#if defined(__WXMSW__)
|
||||||
// Under Windows, some compilers can't include
|
// Under Windows, some compilers can't include
|
||||||
// a whole .wxr file. So we use a .rc user-defined resource
|
// a whole .wxr file. So we use a .rc user-defined resource
|
||||||
// instead. dialog1 will point to the whole .wxr 'file'.
|
// instead. dialog1 will point to the whole .wxr 'file'.
|
||||||
@@ -69,10 +69,10 @@ MyApp::MyApp()
|
|||||||
// main frame
|
// main frame
|
||||||
bool MyApp::OnInit(void)
|
bool MyApp::OnInit(void)
|
||||||
{
|
{
|
||||||
#if defined(__WXMSW__) && !defined(__BORLANDC__)
|
#if defined(__WXMSW__)
|
||||||
// Load the .wxr 'file' from a .rc resource, under Windows.
|
// Load the .wxr 'file' from a .rc resource, under Windows.
|
||||||
dialog1 = wxLoadUserResource("dialog1");
|
dialog1 = wxLoadUserResource("dialog1", "WXRDATA");
|
||||||
menu1 = wxLoadUserResource("menu1");
|
menu1 = wxLoadUserResource("menu1", "WXRDATA");
|
||||||
// All resources in the file (only one in this case) get parsed
|
// All resources in the file (only one in this case) get parsed
|
||||||
// by this call.
|
// by this call.
|
||||||
wxResourceParseString(dialog1);
|
wxResourceParseString(dialog1);
|
||||||
|
@@ -1,7 +1,10 @@
|
|||||||
#include "wx/msw/wx.rc"
|
#include "wx/msw/wx.rc"
|
||||||
|
|
||||||
/* Comment out these lines for Borland C++ or GNU-WIN32 */
|
/* Comment out these lines for Borland C++ or GNU-WIN32 */
|
||||||
|
/*
|
||||||
dialog1 TEXT "dialog1.wxr"
|
dialog1 TEXT "dialog1.wxr"
|
||||||
menu1 TEXT "menu1.wxr"
|
menu1 TEXT "menu1.wxr"
|
||||||
|
*/
|
||||||
|
dialog1 WXRDATA "dialog1.wxr"
|
||||||
|
menu1 WXRDATA "menu1.wxr"
|
||||||
|
|
||||||
|
@@ -176,4 +176,4 @@ double ConvertFromIeeeExtended(const unsigned char *bytes)
|
|||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_APPLE_IEEE
|
#endif /* wxUSE_APPLE_IEEE */
|
||||||
|
@@ -226,7 +226,8 @@ bool wxLayoutAlgorithm::LayoutFrame(wxFrame* frame, wxWindow* mainWindow)
|
|||||||
|
|
||||||
rect = event.GetRect();
|
rect = event.GetRect();
|
||||||
|
|
||||||
mainWindow->SetSize(rect.x, rect.y, rect.width, rect.height);
|
if (mainWindow)
|
||||||
|
mainWindow->SetSize(rect.x, rect.y, rect.width, rect.height);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
# Common makefile settings for wxWindows programs
|
# Common makefile settings for wxWindows programs
|
||||||
# This file is included by all the other makefiles, thus changes
|
# This file is included by all the other makefiles, thus changes
|
||||||
# made here take effect everywhere (except where overriden).
|
# made here take effect everywhere (except where overriden).
|
||||||
|
# RCS-ID: $Id$
|
||||||
#
|
#
|
||||||
########################### Programs #################################
|
########################### Programs #################################
|
||||||
|
|
||||||
|
@@ -174,7 +174,7 @@ wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd)
|
|||||||
{
|
{
|
||||||
// TODO: how to find the bitmap?
|
// TODO: how to find the bitmap?
|
||||||
win = new wxBitmapButton;
|
win = new wxBitmapButton;
|
||||||
wxMessageBox("Have not yet implemented bitmap button as BS_BITMAP button.");
|
wxLogError("Have not yet implemented bitmap button as BS_BITMAP button.");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
else if (style1 == BS_OWNERDRAW)
|
else if (style1 == BS_OWNERDRAW)
|
||||||
@@ -199,7 +199,7 @@ wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd)
|
|||||||
{
|
{
|
||||||
char buf[256];
|
char buf[256];
|
||||||
sprintf(buf, "Don't know what kind of button this is: id = %d", (int) id);
|
sprintf(buf, "Don't know what kind of button this is: id = %d", (int) id);
|
||||||
wxMessageBox(buf);
|
wxLogError(buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (str == "COMBOBOX")
|
else if (str == "COMBOBOX")
|
||||||
@@ -247,7 +247,7 @@ wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd)
|
|||||||
win = new wxStaticBitmap;
|
win = new wxStaticBitmap;
|
||||||
|
|
||||||
// Help! this doesn't correspond with the wxWin implementation.
|
// Help! this doesn't correspond with the wxWin implementation.
|
||||||
wxMessageBox("Please make SS_BITMAP statics into owner-draw buttons.");
|
wxLogError("Please make SS_BITMAP statics into owner-draw buttons.");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -255,7 +255,7 @@ wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd)
|
|||||||
{
|
{
|
||||||
wxString msg("Don't know how to convert from Windows class ");
|
wxString msg("Don't know how to convert from Windows class ");
|
||||||
msg += str;
|
msg += str;
|
||||||
wxMessageBox(msg);
|
wxLogError(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (win)
|
if (win)
|
||||||
|
Reference in New Issue
Block a user