git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39613 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
141 lines
3.8 KiB
C++
141 lines
3.8 KiB
C++
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: src/palmos/dirdlg.cpp
|
|
// Purpose: wxDirDialog
|
|
// Author: William Osborne - minimal working wxPalmOS port
|
|
// Modified by:
|
|
// Created: 10.13.04
|
|
// RCS-ID: $Id$
|
|
// Copyright: (c) William Osborne
|
|
// Licence: wxWindows licence
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// ============================================================================
|
|
// declarations
|
|
// ============================================================================
|
|
|
|
// ----------------------------------------------------------------------------
|
|
// headers
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// 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
|
|
|
|
#include "wx/dirdlg.h"
|
|
|
|
#ifndef WX_PRECOMP
|
|
#include "wx/utils.h"
|
|
#include "wx/dialog.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
|