Committed William Osborne's wxPalmOS port

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2004-10-19 13:40:30 +00:00
parent 698b34facd
commit ffecfa5aeb
260 changed files with 40716 additions and 44 deletions

143
src/palmos/dirdlg.cpp Normal file
View File

@@ -0,0 +1,143 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dirdlg.cpp
// Purpose: wxDirDialog
// Author: William Osborne
// Modified by:
// Created: 10.13.04
// RCS-ID: $Id:
// Copyright: (c) William Osborne
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
// declarations
// ============================================================================
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "dirdlg.h"
#endif
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#if wxUSE_DIRDLG
#if defined(__WIN95__) && !defined(__GNUWIN32_OLD__) && wxUSE_OLE
#ifndef WX_PRECOMP
#include "wx/utils.h"
#include "wx/dialog.h"
#include "wx/dirdlg.h"
#include "wx/log.h"
#include "wx/app.h" // for GetComCtl32Version()
#endif
#include "wx/palmos/private.h"
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
#ifndef MAX_PATH
#define MAX_PATH 4096 // be generous
#endif
#ifndef BIF_NEWDIALOGSTYLE
#define BIF_NEWDIALOGSTYLE 0x0040
#endif
#ifndef BIF_NONEWFOLDERBUTTON
#define BIF_NONEWFOLDERBUTTON 0x0200
#endif
#ifndef BIF_EDITBOX
#define BIF_EDITBOX 16
#endif
// ----------------------------------------------------------------------------
// wxWidgets macros
// ----------------------------------------------------------------------------
IMPLEMENT_CLASS(wxDirDialog, wxDialog)
// ----------------------------------------------------------------------------
// private functions prototypes
// ----------------------------------------------------------------------------
// free the parameter
static void ItemListFree(LPITEMIDLIST pidl);
// the callback proc for the dir dlg
static int CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp,
LPARAM pData);
// ============================================================================
// implementation
// ============================================================================
// ----------------------------------------------------------------------------
// wxDirDialog
// ----------------------------------------------------------------------------
wxDirDialog::wxDirDialog(wxWindow *parent,
const wxString& message,
const wxString& defaultPath,
long style,
const wxPoint& WXUNUSED(pos),
const wxSize& WXUNUSED(size),
const wxString& WXUNUSED(name))
{
}
void wxDirDialog::SetPath(const wxString& path)
{
}
int wxDirDialog::ShowModal()
{
return wxID_OK;
}
// ----------------------------------------------------------------------------
// private functions
// ----------------------------------------------------------------------------
static int CALLBACK
BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LPARAM pData)
{
return 0;
}
static void ItemListFree(LPITEMIDLIST pidl)
{
if ( pidl )
{
LPMALLOC pMalloc;
SHGetMalloc(&pMalloc);
if ( pMalloc )
{
pMalloc->Free(pidl);
pMalloc->Release();
}
else
{
wxLogLastError(wxT("SHGetMalloc"));
}
}
}
#else
#include "../generic/dirdlgg.cpp"
#endif // compiler/platform on which the code here compiles
#endif // wxUSE_DIRDLG