Added wxUniv project file for dialogs

Fixed filelist.txt bug
Backported wxFileDialog fixes for wxUniv/MSW
wxFileSystem doc fixes
VC++ internal compiler error fix for statbar.cpp


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2002-12-17 22:31:37 +00:00
parent 812919f6af
commit 7f65647a0b
10 changed files with 169 additions and 92 deletions

View File

@@ -6,7 +6,6 @@
Name: {group}\Tex2rtf Help; Filename: {app}\bin\tex2rtf.chm; WorkingDir: {app}\bin; IconIndex: 0; Flags: useapppaths
Name: {group}\Changes; Filename: {app}\docs\changes.txt; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths
Name: {group}\Readme; Filename: {app}\docs\readme.txt; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths
; Name: {group}\Debug View; Filename: {app}\bin\DBGVIEW.EXE; WorkingDir: {app}\bin; IconFilename: {app}\bin\DBGVIEW.EXE; IconIndex: 0
Name: {group}\Compiling wxWindows; Filename: {app}\docs\msw\install.txt; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths
Name: {group}\wxWindows Manual; Filename: {app}\docs\htmlhelp\wx.chm; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths
Name: {group}\Tutorial; Filename: {app}\docs\pdf\wxTutorial.pdf; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths

View File

@@ -80,7 +80,7 @@ dirctrlg.cpp Generic
dirdlgg.cpp Generic NotWin32
dragimgg.cpp Generic NotOS2
fdrepdlg.cpp Generic NotMSW
filedlgg.cpp Generic NotMSW,NotX,NotOS2,NotMac
filedlgg.cpp Generic Generic,NotX,NotOS2,NotMac
fontdlgg.cpp Generic Generic,NotOS2
grid.cpp Generic
gridctrl.cpp Generic
@@ -297,7 +297,7 @@ evtloop.cpp MSW LowLevel
fdrepdlg.cpp MSW Win32Only
# FIXME: the generic implementation doesn't work under MSW, so we must
# the native dialog under MSW
filedlg.cpp MSW LowLevel
filedlg.cpp MSW
font.cpp MSW LowLevel
fontdlg.cpp MSW
fontenum.cpp MSW LowLevel
@@ -309,7 +309,7 @@ gdiimage.cpp MSW LowLevel
gdiobj.cpp MSW LowLevel
glcanvas.cpp MSW
helpchm.cpp MSW Win32Only,LowLevel
helpwin.cpp MSW LowLevel
helpwin.cpp MSW LowLevel
icon.cpp MSW LowLevel
imaglist.cpp MSW Win32Only
iniconf.cpp MSW

View File

@@ -51,6 +51,8 @@ samples/db/db.dsw
samples/dialogs/dialogs.dsp
samples/dialogs/dialogs.dsw
samples/dialogs/dialogsUniv.dsp
samples/dialogs/dialogsUniv.dsw
samples/dialup/dialup.dsp
samples/dialup/dialup.dsw
@@ -245,6 +247,7 @@ samples/wizard/wizard.dsw
samples/widgets/widgets.dsp
samples/widgets/widgets.dsw
samples/widgets/widgetsUniv.dsp
samples/widgets/widgetsUniv.dsw
samples/opengl/cube/cube.dsp
samples/opengl/cube/cube.dsw

View File

@@ -119,6 +119,8 @@ zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\stc.rsp
zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\contrib.rsp
zip32 -u -@ %dest%\wxMac-%version%.zip < %src%\distrib\msw\makefile.rsp
zip32 -@ %dest%\wxWindows-%version%-CW-Mac.zip < %src%\distrib\msw\cw_mac.rsp
erase /Y %src%\include\wx\setup.h
if direxist %dest%\wxWindows-%version% erase /sxyz %dest%\wxWindows-%version%

View File

@@ -59,18 +59,18 @@ Sets the current location. {\it location} parameter passed to
\helpref{OpenFile}{wxfilesystemopenfile} is relative to this path.
{\bf Caution! } Unless {\it is\_dir} is TRUE the {\it location} parameter
is not directory name but the name of the file in this directory!! All these
commands change path to "dir/subdir/" :
is not the directory name but the name of the file in this directory. All these
commands change the path to "dir/subdir/":
\begin{verbatim}
ChangePathTo("dir/subdir/xh.htm");
ChangePathTo("dir/subdir", TRUE);
ChangePathTo("dir/subdir/", TRUE);
ChangePathTo("dir/subdir/xh.htm");
ChangePathTo("dir/subdir", TRUE);
C hangePathTo("dir/subdir/", TRUE);
\end{verbatim}
\wxheading{Parameters}
\docparam{location}{the new location. Its meaning depends on value of {\it is\_dir}}
\docparam{location}{the new location. Its meaning depends on the value of {\it is\_dir}}
\docparam{is\_dir}{if TRUE {\it location} is new directory. If FALSE (default)
{\it location} is {\bf file in} the new directory.}
@@ -78,9 +78,9 @@ ChangePathTo("dir/subdir/", TRUE);
\wxheading{Example}
\begin{verbatim}
f = fs -> OpenFile("hello.htm"); // opens file 'hello.htm'
fs -> ChangePathTo("subdir/folder", TRUE);
f = fs -> OpenFile("hello.htm"); // opens file 'subdir/folder/hello.htm' !!
f = fs -> OpenFile("hello.htm"); // opens file 'hello.htm'
fs -> ChangePathTo("subdir/folder", TRUE);
f = fs -> OpenFile("hello.htm"); // opens file 'subdir/folder/hello.htm' !!
\end{verbatim}
\membersection{wxFileSystem::GetPath}\label{wxfilesystemgetpath}
@@ -112,14 +112,13 @@ wxFILE (only files), wxDIR (only directories) or 0 (both).
\func{wxString}{FindNext}{\void}
Returns next filename that matches parameters passed to \helpref{FindFirst}{wxfilesystemfindfirst}.
Returns the next filename that matches parameters passed to \helpref{FindFirst}{wxfilesystemfindfirst}.
\membersection{wxFileSystem::OpenFile}\label{wxfilesystemopenfile}
\func{wxFSFile*}{OpenFile}{\param{const wxString\& }{location}}
Opens file and returns pointer to \helpref{wxFSFile}{wxfsfile} object
Opens the file and returns a pointer to a \helpref{wxFSFile}{wxfsfile} object
or NULL if failed. It first tries to open the file in relative scope
(based on value passed to ChangePathTo() method) and then as an
absolute path.
@@ -128,10 +127,11 @@ absolute path.
\func{static wxFileName}{URLToFileName}{\param{const wxString& }{url}}
Converts URL into well-formed filename. The URL must use {\tt file}
Converts URL into a well-formed filename. The URL must use the {\tt file}
protocol.
\wxheading{See also}
\helpref{wxFileSystem::FileNameToURL}{wxfilesystemfilenametourl},
\helpref{wxFileName}{wxfilename}

View File

@@ -14,7 +14,9 @@ enum
wxCHANGE_DIR = 0x0040
};
#if defined(__WXMSW__)
#if defined (__WXUNIVERSAL__)
#include "wx/generic/filedlgg.h"
#elif defined(__WXMSW__)
#include "wx/msw/filedlg.h"
#elif defined(__WXMOTIF__)
#include "wx/motif/filedlg.h"

View File

@@ -249,7 +249,11 @@ void wxStatusBarBase::FreeStacks()
void wxStatusBarBase::PushStatusText(const wxString& text, int number)
{
wxListString* st = GetOrCreateStatusStack(number);
st->Insert(new wxString(GetStatusText(number)));
// Temporary variables used here to avoid an internal compiler error
// in VC++ 6 in _AFXDLL mode
wxString statusText(GetStatusText(number));
wxString* s = new wxString(statusText);
st->Insert(s);
SetStatusText(text, number);
}

View File

@@ -30,8 +30,8 @@
#if wxUSE_FILEDLG
#if !defined(__UNIX__) && !defined(__DOS__)
#error wxFileDialog currently only supports Unix and DOS
#if !defined(__UNIX__) && !defined(__DOS__) && !defined(__WIN32__)
#error wxFileDialog currently only supports Unix, win32 and DOS
#endif
#include "wx/checkbox.h"
@@ -76,7 +76,9 @@
#endif
#include <time.h>
#if defined(__UNIX__) || defined(__DOS__)
#include <unistd.h>
#endif
// ----------------------------------------------------------------------------
// constants
@@ -252,7 +254,7 @@ wxFileIconsTable::wxFileIconsTable() :
static wxBitmap CreateAntialiasedBitmap(const wxImage& img)
{
wxImage small(16, 16);
wxImage smallimg (16, 16);
unsigned char *p1, *p2, *ps;
unsigned char mr = img.GetMaskRed(),
mg = img.GetMaskGreen(),
@@ -261,8 +263,8 @@ static wxBitmap CreateAntialiasedBitmap(const wxImage& img)
unsigned x, y;
unsigned sr, sg, sb, smask;
p1 = img.GetData(), p2 = img.GetData() + 3 * 32, ps = small.GetData();
small.SetMaskColour(mr, mr, mr);
p1 = img.GetData(), p2 = img.GetData() + 3 * 32, ps = smallimg.GetData();
smallimg.SetMaskColour(mr, mr, mr);
for (y = 0; y < 16; y++)
{
@@ -295,7 +297,7 @@ static wxBitmap CreateAntialiasedBitmap(const wxImage& img)
p1 += 32 * 3, p2 += 32 * 3;
}
return wxBitmap(small);
return wxBitmap(smallimg);
}
// finds empty borders and return non-empty area of image:
@@ -364,7 +366,16 @@ int wxFileIconsTable::GetIconID(const wxString& extension, const wxString& mime)
m_HashTable.Put(extension, new wxFileIconEntry(newid));
return newid;
}
#ifdef __WIN32__
wxBitmap myBitmap (ic.GetWidth(), ic.GetHeight() ) ;
wxMemoryDC memDC;
memDC.SelectObject( myBitmap );
memDC.DrawIcon(ic,0,0);
memDC.SelectObject( wxNullBitmap );
wxImage img = myBitmap.ConvertToImage();
#else
wxImage img = ic.ConvertToImage();
#endif
delete ft;
int id = m_ImageList.GetImageCount();
@@ -396,7 +407,7 @@ int wxFileIconsTable::GetIconID(const wxString& extension, const wxString& mime)
// ----------------------------------------------------------------------------
static
int ListCompare( long data1, long data2, long WXUNUSED(data) )
int ListCompare( long data1, long data2, long WXUNUSED(data))
{
wxFileData *fd1 = (wxFileData*)data1 ;
wxFileData *fd2 = (wxFileData*)data2 ;
@@ -456,8 +467,12 @@ wxFileData::wxFileData( const wxString &name, const wxString &fname )
// struct passwd *user = getpwuid( buff.st_uid );
// struct group *grp = getgrgid( buff.st_gid );
m_isDir = S_ISDIR( buff.st_mode );
m_isExe = ((buff.st_mode & S_IXUSR ) == S_IXUSR );
#ifdef __VISUALC__
m_isDir = ((buff.st_mode & _S_IFDIR ) == _S_IFDIR );
#else
m_isDir = S_ISDIR( buff.st_mode );
#endif // VC++
m_isExe = ((buff.st_mode & wxS_IXUSR ) == wxS_IXUSR );
m_size = buff.st_size;
@@ -470,9 +485,9 @@ wxFileData::wxFileData( const wxString &name, const wxString &fname )
char buffer[10];
sprintf( buffer, "%c%c%c",
((( buff.st_mode & S_IRUSR ) == S_IRUSR ) ? 'r' : '-'),
((( buff.st_mode & S_IWUSR ) == S_IWUSR ) ? 'w' : '-'),
((( buff.st_mode & S_IXUSR ) == S_IXUSR ) ? 'x' : '-') );
((( buff.st_mode & wxS_IRUSR ) == wxS_IRUSR ) ? 'r' : '-'),
((( buff.st_mode & wxS_IWUSR ) == wxS_IWUSR ) ? 'w' : '-'),
((( buff.st_mode & wxS_IXUSR ) == wxS_IXUSR ) ? 'x' : '-') );
#if wxUSE_UNICODE
m_permissions = wxConvUTF8.cMB2WC( buffer );
#else
@@ -788,7 +803,7 @@ void wxFileCtrl::UpdateFiles()
}
}
SortItems(ListCompare, 0);
SortItems((wxListCtrlCompare)ListCompare, 0);
if ( my_style & wxLC_REPORT )
{
@@ -851,7 +866,7 @@ void wxFileCtrl::MakeDir()
if (id != -1)
{
SortItems( ListCompare, 0 );
SortItems( (wxListCtrlCompare) ListCompare, 0 );
id = FindItem( 0, (long)fd );
EnsureVisible( id );
EditLabel( id );

View File

@@ -424,6 +424,7 @@ static inline int GetScrollY(int y)
wxGridCellEditor::wxGridCellEditor()
{
m_control = NULL;
m_attr = NULL;
}
@@ -1193,7 +1194,31 @@ void wxGridCellBoolEditor::SetSize(const wxRect& r)
size.y -= 2;
#endif
m_control->Move(r.x + r.width/2 - size.x/2, r.y + r.height/2 - size.y/2);
int hAlign = wxALIGN_CENTRE;
int vAlign = wxALIGN_CENTRE;
if (GetCellAttr())
GetCellAttr()->GetAlignment(& hAlign, & vAlign);
int x = 0, y = 0;
if (hAlign == wxALIGN_LEFT)
{
x = r.x + 2;
#ifdef __WXMSW__
x += 2;
#endif
y = r.y + r.height/2 - size.y/2;
}
else if (hAlign == wxALIGN_RIGHT)
{
x = r.x + r.width - size.x - 2;
y = r.y + r.height/2 - size.y/2;
}
else if (hAlign == wxALIGN_CENTRE)
{
x = r.x + r.width/2 - size.x/2;
y = r.y + r.height/2 - size.y/2;
}
m_control->Move(x, y);
}
void wxGridCellBoolEditor::Show(bool show, wxGridCellAttr *attr)
@@ -1897,11 +1922,31 @@ void wxGridCellBoolRenderer::Draw(wxGrid& grid,
}
// draw a border around checkmark
int vAlign, hAlign;
attr.GetAlignment(& hAlign, &vAlign);
wxRect rectBorder;
rectBorder.x = rect.x + rect.width/2 - size.x/2;
rectBorder.y = rect.y + rect.height/2 - size.y/2;
rectBorder.width = size.x;
rectBorder.height = size.y;
if (hAlign == wxALIGN_CENTRE)
{
rectBorder.x = rect.x + rect.width/2 - size.x/2;
rectBorder.y = rect.y + rect.height/2 - size.y/2;
rectBorder.width = size.x;
rectBorder.height = size.y;
}
else if (hAlign == wxALIGN_LEFT)
{
rectBorder.x = rect.x + 2;
rectBorder.y = rect.y + rect.height/2 - size.y/2;
rectBorder.width = size.x;
rectBorder.height = size.y;
}
else if (hAlign == wxALIGN_RIGHT)
{
rectBorder.x = rect.x + rect.width - size.x - 2;
rectBorder.y = rect.y + rect.height/2 - size.y/2;
rectBorder.width = size.x;
rectBorder.height = size.y;
}
bool value;
if ( grid.GetTable()->CanGetValueAs(row, col, wxGRID_VALUE_BOOL) )
@@ -7301,9 +7346,11 @@ void wxGrid::ShowCellEditControl()
if (rect.GetRight() > client_right)
rect.SetRight(client_right-1);
}
editor->SetCellAttr(attr);
editor->SetSize( rect );
editor->BeginEdit(row, col, this);
editor->SetCellAttr(NULL);
editor->DecRef();
attr->DecRef();

View File

@@ -49,7 +49,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
# ADD LIB32 /nologo /out:"..\lib\wxuniv.lib"
!ELSEIF "$(CFG)" == "wxUniv - Win32 Debug"
@@ -221,11 +221,6 @@ SOURCE=.\common\event.cpp
# End Source File
# Begin Source File
SOURCE=.\common\extended.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=.\common\fddlgcmn.cpp
# End Source File
# Begin Source File
@@ -554,11 +549,6 @@ SOURCE=.\common\txtstrm.cpp
# End Source File
# Begin Source File
SOURCE=.\common\unzip.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=.\common\url.cpp
# End Source File
# Begin Source File
@@ -609,6 +599,18 @@ SOURCE=.\common\zipstrm.cpp
SOURCE=.\common\zstream.cpp
# End Source File
# Begin Source File
SOURCE=.\common\extended.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=.\common\unzip.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# End Group
# Begin Group "Generic Files"
@@ -659,6 +661,10 @@ SOURCE=.\generic\fdrepdlg.cpp
# End Source File
# Begin Source File
SOURCE=.\generic\filedlgg.cpp
# End Source File
# Begin Source File
SOURCE=.\generic\fontdlgg.cpp
# End Source File
# Begin Source File
@@ -789,6 +795,7 @@ SOURCE=.\generic\treelay.cpp
SOURCE=.\generic\wizard.cpp
# End Source File
# End Group
# Begin Group "wxHTML Files"
@@ -873,12 +880,18 @@ SOURCE=.\html\m_tables.cpp
SOURCE=.\html\winpars.cpp
# End Source File
# End Group
# Begin Group "MSW Files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\msw\dummy.cpp
# ADD CPP /Yc"wx/wxprec.h"
# End Source File
# Begin Source File
SOURCE=.\msw\app.cpp
# End Source File
# Begin Source File
@@ -943,19 +956,10 @@ SOURCE=.\msw\dir.cpp
# End Source File
# Begin Source File
SOURCE=.\msw\dummy.cpp
# ADD CPP /Yc"wx/wxprec.h"
# End Source File
# Begin Source File
SOURCE=.\msw\evtloop.cpp
# End Source File
# Begin Source File
SOURCE=.\msw\filedlg.cpp
# End Source File
# Begin Source File
SOURCE=.\msw\font.cpp
# End Source File
# Begin Source File
@@ -976,16 +980,6 @@ SOURCE=.\msw\gdiobj.cpp
# End Source File
# Begin Source File
SOURCE=.\msw\gsocket.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=.\msw\gsockmsw.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=.\msw\helpbest.cpp
# End Source File
# Begin Source File
@@ -1068,26 +1062,22 @@ SOURCE=.\msw\volume.cpp
SOURCE=.\msw\window.cpp
# End Source File
# Begin Source File
SOURCE=.\msw\gsocket.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=.\msw\gsockmsw.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# End Group
# Begin Group "Universal Files"
# PROP Default_Filter ""
# Begin Group "Theme Files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\univ\themes\gtk.cpp
# End Source File
# Begin Source File
SOURCE=.\univ\themes\metal.cpp
# End Source File
# Begin Source File
SOURCE=.\univ\themes\win32.cpp
# End Source File
# End Group
# Begin Source File
SOURCE=.\univ\bmpbuttn.cpp
@@ -1224,6 +1214,24 @@ SOURCE=.\univ\topluniv.cpp
SOURCE=.\univ\winuniv.cpp
# End Source File
# Begin Group "Theme Files"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\univ\themes\gtk.cpp
# End Source File
# Begin Source File
SOURCE=.\univ\themes\metal.cpp
# End Source File
# Begin Source File
SOURCE=.\univ\themes\win32.cpp
# End Source File
# End Group
# End Group
# Begin Group "Headers"
@@ -1234,9 +1242,7 @@ SOURCE=.\univ\winuniv.cpp
# Begin Source File
SOURCE=..\include\wx\univ\setup.h
!IF "$(CFG)" == "wxUniv - Win32 Release"
# Begin Custom Build - Creating lib\univ\wx\setup.h from $(InputPath)
InputPath=..\include\wx\univ\setup.h
@@ -1244,9 +1250,7 @@ InputPath=..\include\wx\univ\setup.h
copy "$(InputPath)" ..\lib\univ\wx\setup.h
# End Custom Build
!ELSEIF "$(CFG)" == "wxUniv - Win32 Debug"
# Begin Custom Build - Creating lib\univd\wx\setup.h from $(InputPath)
InputPath=..\include\wx\univ\setup.h
@@ -1254,9 +1258,7 @@ InputPath=..\include\wx\univ\setup.h
copy "$(InputPath)" ..\lib\univd\wx\setup.h
# End Custom Build
!ENDIF
# End Source File
# End Group
# Begin Group "Common"
@@ -2210,6 +2212,7 @@ SOURCE=..\include\wx\zipstrm.h
SOURCE=..\include\wx\zstream.h
# End Source File
# End Group
# Begin Group "MSW"
@@ -2378,6 +2381,7 @@ SOURCE=..\include\wx\generic\treectlg.h
SOURCE=..\include\wx\generic\wizard.h
# End Source File
# End Group
# Begin Group "HTML"
@@ -2434,6 +2438,7 @@ SOURCE=..\include\wx\html\m_templ.h
SOURCE=..\include\wx\html\winpars.h
# End Source File
# End Group
# Begin Group "Universal"